From 459a37aa015be125a944c7eeea4de83032a10a89 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Thu, 27 Oct 2022 10:26:28 +0200 Subject: [PATCH 1/2] node_modules: upgrade --- node_modules/.bin/pino | 1 - node_modules/.bin/uuid | 1 + node_modules/.package-lock.json | 61 + node_modules/@actions/core/README.md | 200 +- node_modules/@actions/core/lib/command.d.ts | 3 +- node_modules/@actions/core/lib/command.js | 17 +- node_modules/@actions/core/lib/command.js.map | 2 +- node_modules/@actions/core/lib/core.d.ts | 84 +- node_modules/@actions/core/lib/core.js | 142 +- node_modules/@actions/core/lib/core.js.map | 2 +- .../@actions/core/lib/file-command.d.ts | 3 +- .../@actions/core/lib/file-command.js | 37 +- .../@actions/core/lib/file-command.js.map | 2 +- .../@actions/core/lib/oidc-utils.d.ts | 7 + node_modules/@actions/core/lib/oidc-utils.js | 77 + .../@actions/core/lib/oidc-utils.js.map | 1 + .../@actions/core/lib/path-utils.d.ts | 25 + node_modules/@actions/core/lib/path-utils.js | 58 + .../@actions/core/lib/path-utils.js.map | 1 + node_modules/@actions/core/lib/summary.d.ts | 202 + node_modules/@actions/core/lib/summary.js | 283 + node_modules/@actions/core/lib/summary.js.map | 1 + node_modules/@actions/core/lib/utils.d.ts | 9 + node_modules/@actions/core/lib/utils.js | 21 + node_modules/@actions/core/lib/utils.js.map | 2 +- node_modules/@actions/core/package.json | 66 +- .../license.md => @actions/exec/LICENSE.md} | 6 +- node_modules/@actions/exec/lib/exec.d.ts | 15 +- node_modules/@actions/exec/lib/exec.js | 73 +- node_modules/@actions/exec/lib/exec.js.map | 2 +- .../@actions/exec/lib/interfaces.d.ts | 34 +- node_modules/@actions/exec/lib/toolrunner.js | 48 +- .../@actions/exec/lib/toolrunner.js.map | 2 +- node_modules/@actions/exec/package.json | 64 +- node_modules/@actions/http-client/LICENSE | 21 + node_modules/@actions/http-client/README.md | 73 + .../@actions/http-client/lib/auth.d.ts | 26 + node_modules/@actions/http-client/lib/auth.js | 81 + .../@actions/http-client/lib/auth.js.map | 1 + .../@actions/http-client/lib/index.d.ts | 123 + .../@actions/http-client/lib/index.js | 605 + .../@actions/http-client/lib/index.js.map | 1 + .../@actions/http-client/lib/interfaces.d.ts | 44 + .../@actions/http-client/lib/interfaces.js | 3 + .../http-client/lib/interfaces.js.map | 1 + .../@actions/http-client/lib/proxy.d.ts | 2 + .../@actions/http-client/lib/proxy.js | 61 + .../@actions/http-client/lib/proxy.js.map | 1 + .../@actions/http-client/package.json | 48 + .../LICENSE => @actions/io/LICENSE.md} | 6 +- node_modules/@actions/io/lib/io-util.d.ts | 12 +- node_modules/@actions/io/lib/io-util.js | 74 +- node_modules/@actions/io/lib/io-util.js.map | 2 +- node_modules/@actions/io/lib/io.d.ts | 8 + node_modules/@actions/io/lib/io.js | 165 +- node_modules/@actions/io/lib/io.js.map | 2 +- node_modules/@actions/io/package.json | 56 +- node_modules/atomic-sleep/.travis.yml | 11 - node_modules/atomic-sleep/LICENSE | 22 - node_modules/atomic-sleep/index.js | 38 - node_modules/atomic-sleep/package.json | 65 - node_modules/atomic-sleep/readme.md | 58 - node_modules/atomic-sleep/test.js | 47 - node_modules/axios/CHANGELOG.md | 662 -- node_modules/axios/LICENSE | 19 - node_modules/axios/README.md | 798 -- node_modules/axios/UPGRADE_GUIDE.md | 162 - node_modules/axios/dist/axios.js | 1736 --- node_modules/axios/dist/axios.map | 1 - node_modules/axios/dist/axios.min.js | 3 - node_modules/axios/dist/axios.min.map | 1 - node_modules/axios/index.d.ts | 160 - node_modules/axios/index.js | 1 - node_modules/axios/lib/adapters/README.md | 37 - node_modules/axios/lib/adapters/http.js | 287 - node_modules/axios/lib/adapters/xhr.js | 179 - node_modules/axios/lib/axios.js | 53 - node_modules/axios/lib/cancel/Cancel.js | 19 - node_modules/axios/lib/cancel/CancelToken.js | 57 - node_modules/axios/lib/cancel/isCancel.js | 5 - node_modules/axios/lib/core/Axios.js | 95 - .../axios/lib/core/InterceptorManager.js | 52 - node_modules/axios/lib/core/README.md | 7 - node_modules/axios/lib/core/buildFullPath.js | 20 - node_modules/axios/lib/core/createError.js | 18 - .../axios/lib/core/dispatchRequest.js | 79 - node_modules/axios/lib/core/enhanceError.js | 42 - node_modules/axios/lib/core/mergeConfig.js | 87 - node_modules/axios/lib/core/settle.js | 25 - node_modules/axios/lib/core/transformData.js | 20 - node_modules/axios/lib/defaults.js | 98 - node_modules/axios/lib/helpers/README.md | 7 - node_modules/axios/lib/helpers/bind.js | 11 - node_modules/axios/lib/helpers/buildURL.js | 70 - node_modules/axios/lib/helpers/combineURLs.js | 14 - node_modules/axios/lib/helpers/cookies.js | 53 - .../axios/lib/helpers/deprecatedMethod.js | 24 - .../axios/lib/helpers/isAbsoluteURL.js | 14 - .../axios/lib/helpers/isURLSameOrigin.js | 68 - .../axios/lib/helpers/normalizeHeaderName.js | 12 - .../axios/lib/helpers/parseHeaders.js | 53 - node_modules/axios/lib/helpers/spread.js | 27 - node_modules/axios/lib/utils.js | 351 - node_modules/axios/package.json | 113 - node_modules/camelcase-keys/index.d.ts | 103 - node_modules/camelcase-keys/index.js | 77 - node_modules/camelcase-keys/license | 9 - node_modules/camelcase-keys/package.json | 105 - node_modules/camelcase-keys/readme.md | 125 - node_modules/camelcase/index.d.ts | 63 - node_modules/camelcase/index.js | 76 - node_modules/camelcase/license | 9 - node_modules/camelcase/package.json | 75 - node_modules/camelcase/readme.md | 99 - node_modules/docker-hub-utils/README.md | 50 - .../dist/docker-hub-utils.cjs.development.js | 1191 -- .../docker-hub-utils.cjs.development.js.map | 1 - .../docker-hub-utils.cjs.production.min.js | 2 - ...docker-hub-utils.cjs.production.min.js.map | 1 - .../dist/docker-hub-utils.esm.js | 1181 -- .../dist/docker-hub-utils.esm.js.map | 1 - node_modules/docker-hub-utils/dist/index.d.ts | 6 - node_modules/docker-hub-utils/dist/index.js | 8 - .../dist/services/DockerHubAPI.d.ts | 49 - .../dist/types/DockerHubRepo.d.ts | 123 - .../dist/utils/constants.d.ts | 3 - .../docker-hub-utils/dist/utils/log.d.ts | 3 - node_modules/docker-hub-utils/package.json | 114 - node_modules/fast-redact/.travis.yml | 9 - node_modules/fast-redact/LICENSE | 21 - node_modules/fast-redact/benchmark/index.js | 207 - .../fast-redact/example/default-usage.js | 14 - .../example/intermediate-wildcard-array.js | 11 - .../fast-redact/example/serialize-false.js | 11 - .../fast-redact/example/serialize-function.js | 4 - .../example/top-wildcard-object.js | 9 - node_modules/fast-redact/index.js | 56 - node_modules/fast-redact/lib/modifiers.js | 113 - node_modules/fast-redact/lib/parse.js | 45 - node_modules/fast-redact/lib/redactor.js | 99 - node_modules/fast-redact/lib/restorer.js | 71 - node_modules/fast-redact/lib/rx.js | 16 - node_modules/fast-redact/lib/state.js | 20 - node_modules/fast-redact/lib/validator.js | 38 - node_modules/fast-redact/package.json | 78 - node_modules/fast-redact/readme.md | 280 - node_modules/fast-redact/test/index.js | 1031 -- node_modules/fast-safe-stringify/.travis.yml | 8 - node_modules/fast-safe-stringify/CHANGELOG.md | 17 - node_modules/fast-safe-stringify/LICENSE | 23 - node_modules/fast-safe-stringify/benchmark.js | 137 - node_modules/fast-safe-stringify/index.d.ts | 8 - node_modules/fast-safe-stringify/index.js | 161 - node_modules/fast-safe-stringify/package.json | 87 - node_modules/fast-safe-stringify/readme.md | 154 - .../fast-safe-stringify/test-stable.js | 311 - node_modules/fast-safe-stringify/test.js | 304 - node_modules/flatstr/LICENSE | 21 - node_modules/flatstr/alt-benchmark.js | 234 - node_modules/flatstr/benchmark.js | 61 - node_modules/flatstr/index.js | 15 - node_modules/flatstr/package.json | 58 - node_modules/flatstr/readme.md | 82 - node_modules/flatstr/test.js | 26 - node_modules/follow-redirects/LICENSE | 18 - node_modules/follow-redirects/README.md | 148 - node_modules/follow-redirects/debug.js | 9 - node_modules/follow-redirects/http.js | 1 - node_modules/follow-redirects/https.js | 1 - node_modules/follow-redirects/index.js | 498 - node_modules/follow-redirects/package.json | 90 - node_modules/luxon/CHANGELOG.md | 513 - node_modules/luxon/README.md | 54 - node_modules/luxon/build/amd/luxon.js | 8295 -------------- node_modules/luxon/build/amd/luxon.js.map | 1 - node_modules/luxon/build/cjs-browser/luxon.js | 8293 -------------- .../luxon/build/cjs-browser/luxon.js.map | 1 - node_modules/luxon/build/global/luxon.js | 8296 -------------- node_modules/luxon/build/global/luxon.js.map | 1 - node_modules/luxon/build/global/luxon.min.js | 1 - .../luxon/build/global/luxon.min.js.map | 1 - node_modules/luxon/build/node/luxon.js | 7348 ------------- node_modules/luxon/build/node/luxon.js.map | 1 - node_modules/luxon/build/readme.md | 1 - node_modules/luxon/package.json | 130 - node_modules/luxon/src/datetime.js | 2123 ---- node_modules/luxon/src/duration.js | 789 -- node_modules/luxon/src/errors.js | 61 - node_modules/luxon/src/impl/conversions.js | 157 - node_modules/luxon/src/impl/diff.js | 79 - node_modules/luxon/src/impl/digits.js | 76 - node_modules/luxon/src/impl/english.js | 233 - node_modules/luxon/src/impl/formats.js | 191 - node_modules/luxon/src/impl/formatter.js | 386 - node_modules/luxon/src/impl/invalid.js | 14 - node_modules/luxon/src/impl/locale.js | 469 - node_modules/luxon/src/impl/regexParser.js | 319 - node_modules/luxon/src/impl/tokenParser.js | 424 - node_modules/luxon/src/impl/util.js | 286 - node_modules/luxon/src/impl/zoneUtil.js | 36 - node_modules/luxon/src/info.js | 186 - node_modules/luxon/src/interval.js | 601 - node_modules/luxon/src/luxon.js | 23 - node_modules/luxon/src/luxonFilled.js | 13 - node_modules/luxon/src/settings.js | 137 - node_modules/luxon/src/zone.js | 88 - node_modules/luxon/src/zones/IANAZone.js | 188 - .../luxon/src/zones/fixedOffsetZone.js | 94 - node_modules/luxon/src/zones/invalidZone.js | 53 - node_modules/luxon/src/zones/localZone.js | 63 - node_modules/map-obj/index.d.ts | 106 - node_modules/map-obj/index.js | 54 - node_modules/map-obj/license | 9 - node_modules/map-obj/package.json | 74 - node_modules/map-obj/readme.md | 76 - .../pino-std-serializers/.editorconfig | 13 - node_modules/pino-std-serializers/.travis.yml | 23 - node_modules/pino-std-serializers/Readme.md | 107 - node_modules/pino-std-serializers/index.js | 34 - node_modules/pino-std-serializers/lib/err.js | 64 - node_modules/pino-std-serializers/lib/req.js | 80 - node_modules/pino-std-serializers/lib/res.js | 47 - .../pino-std-serializers/package.json | 64 - .../pino-std-serializers/test/err.test.js | 106 - .../pino-std-serializers/test/req.test.js | 354 - .../pino-std-serializers/test/res.test.js | 89 - node_modules/pino/LICENSE | 24 - node_modules/pino/README.md | 152 - node_modules/pino/bin.js | 6 - node_modules/pino/browser.js | 325 - node_modules/pino/docs/api.md | 868 -- node_modules/pino/docs/benchmarks.md | 58 - node_modules/pino/docs/browser.md | 199 - node_modules/pino/docs/child-loggers.md | 95 - node_modules/pino/docs/ecosystem.md | 72 - node_modules/pino/docs/extreme.md | 95 - node_modules/pino/docs/help.md | 215 - node_modules/pino/docs/legacy.md | 167 - node_modules/pino/docs/pretty.md | 93 - node_modules/pino/docs/redaction.md | 133 - node_modules/pino/docs/transports.md | 387 - node_modules/pino/docs/web.md | 230 - node_modules/pino/example.js | 35 - node_modules/pino/lib/levels.js | 183 - node_modules/pino/lib/meta.js | 7 - node_modules/pino/lib/proto.js | 167 - node_modules/pino/lib/redaction.js | 104 - node_modules/pino/lib/symbols.js | 64 - node_modules/pino/lib/time.js | 11 - node_modules/pino/lib/tools.js | 386 - node_modules/pino/package.json | 135 - node_modules/pino/pino.js | 144 - node_modules/pino/test/basic.test.js | 702 -- node_modules/pino/test/broken-pipe.test.js | 42 - node_modules/pino/test/browser-levels.test.js | 218 - .../pino/test/browser-serializers.test.js | 327 - .../pino/test/browser-transmit.test.js | 349 - node_modules/pino/test/browser.test.js | 553 - node_modules/pino/test/crlf.test.js | 32 - node_modules/pino/test/custom-levels.test.js | 308 - node_modules/pino/test/error.test.js | 179 - node_modules/pino/test/escaping.test.js | 93 - node_modules/pino/test/exit.test.js | 53 - node_modules/pino/test/extreme.test.js | 125 - node_modules/pino/test/final.test.js | 182 - .../pino/test/fixtures/broken-pipe/basic.js | 9 - .../test/fixtures/broken-pipe/destination.js | 10 - .../pino/test/fixtures/broken-pipe/extreme.js | 12 - .../pino/test/fixtures/destination-exit.js | 8 - .../pino/test/fixtures/extreme-child.js | 6 - .../pino/test/fixtures/extreme-exit.js | 9 - .../pino/test/fixtures/extreme-flush-exit.js | 10 - node_modules/pino/test/fixtures/extreme.js | 6 - .../pino/test/fixtures/pretty/basic.js | 6 - .../pino/test/fixtures/pretty/child.js | 8 - .../test/fixtures/pretty/custom-time-label.js | 9 - .../pino/test/fixtures/pretty/custom-time.js | 9 - .../pino/test/fixtures/pretty/dateformat.js | 10 - .../pino/test/fixtures/pretty/error-props.js | 9 - .../pino/test/fixtures/pretty/error.js | 7 - .../fixtures/pretty/final-no-log-before.js | 8 - .../pino/test/fixtures/pretty/final-return.js | 7 - .../pino/test/fixtures/pretty/final.js | 9 - .../pino/test/fixtures/pretty/level-first.js | 6 - .../pino/test/fixtures/pretty/no-time.js | 9 - .../pino/test/fixtures/pretty/obj-msg-prop.js | 6 - .../test/fixtures/pretty/pretty-factory.js | 6 - .../pino/test/fixtures/pretty/redact.js | 9 - .../pino/test/fixtures/pretty/serializers.js | 17 - .../test/fixtures/pretty/skipped-output.js | 13 - .../test/fixtures/stdout-hack-protection.js | 11 - node_modules/pino/test/helper.js | 55 - node_modules/pino/test/http.test.js | 247 - .../pino/test/is-level-enabled.test.js | 43 - node_modules/pino/test/levels.test.js | 441 - node_modules/pino/test/metadata.test.js | 110 - node_modules/pino/test/mixin.test.js | 106 - node_modules/pino/test/pretty.test.js | 312 - node_modules/pino/test/redact.test.js | 713 -- node_modules/pino/test/serializers.test.js | 245 - .../pino/test/stdout-protection.test.js | 19 - node_modules/pino/test/timestamp.test.js | 121 - .../quick-format-unescaped/.travis.yml | 9 - node_modules/quick-format-unescaped/LICENSE | 21 - .../quick-format-unescaped/benchmark.js | 24 - node_modules/quick-format-unescaped/index.js | 105 - .../quick-format-unescaped/package.json | 54 - node_modules/quick-format-unescaped/readme.md | 66 - .../quick-format-unescaped/test/index.js | 78 - node_modules/quick-lru/index.d.ts | 90 - node_modules/quick-lru/index.js | 115 - node_modules/quick-lru/package.json | 74 - node_modules/quick-lru/readme.md | 93 - node_modules/ramda/CHANGELOG.md | 6 - node_modules/ramda/README.md | 248 - node_modules/ramda/dist/ramda.js | 9716 ----------------- node_modules/ramda/dist/ramda.min.js | 1 - node_modules/ramda/es/F.js | 20 - node_modules/ramda/es/T.js | 20 - node_modules/ramda/es/__.js | 30 - node_modules/ramda/es/add.js | 26 - node_modules/ramda/es/addIndex.js | 48 - node_modules/ramda/es/adjust.js | 46 - node_modules/ramda/es/all.js | 47 - node_modules/ramda/es/allPass.js | 51 - node_modules/ramda/es/always.js | 30 - node_modules/ramda/es/and.js | 28 - node_modules/ramda/es/andThen.js | 38 - node_modules/ramda/es/any.js | 48 - node_modules/ramda/es/anyPass.js | 52 - node_modules/ramda/es/ap.js | 42 - node_modules/ramda/es/aperture.js | 33 - node_modules/ramda/es/append.js | 30 - node_modules/ramda/es/apply.js | 29 - node_modules/ramda/es/applySpec.js | 58 - node_modules/ramda/es/applyTo.js | 28 - node_modules/ramda/es/ascend.js | 36 - node_modules/ramda/es/assoc.js | 36 - node_modules/ramda/es/assocPath.js | 55 - node_modules/ramda/es/binary.js | 38 - node_modules/ramda/es/bind.js | 34 - node_modules/ramda/es/both.js | 45 - node_modules/ramda/es/call.js | 40 - node_modules/ramda/es/chain.js | 47 - node_modules/ramda/es/clamp.js | 33 - node_modules/ramda/es/clone.js | 31 - node_modules/ramda/es/comparator.js | 34 - node_modules/ramda/es/complement.js | 29 - node_modules/ramda/es/compose.js | 34 - node_modules/ramda/es/composeK.js | 44 - node_modules/ramda/es/composeP.js | 45 - node_modules/ramda/es/composeWith.js | 35 - node_modules/ramda/es/concat.js | 65 - node_modules/ramda/es/cond.js | 53 - node_modules/ramda/es/construct.js | 42 - node_modules/ramda/es/constructN.js | 88 - node_modules/ramda/es/contains.js | 31 - node_modules/ramda/es/converge.js | 48 - node_modules/ramda/es/countBy.js | 32 - node_modules/ramda/es/curry.js | 51 - node_modules/ramda/es/curryN.js | 58 - node_modules/ramda/es/dec.js | 21 - node_modules/ramda/es/defaultTo.js | 32 - node_modules/ramda/es/descend.js | 36 - node_modules/ramda/es/difference.js | 48 - node_modules/ramda/es/differenceWith.js | 44 - node_modules/ramda/es/dissoc.js | 32 - node_modules/ramda/es/dissocPath.js | 53 - node_modules/ramda/es/divide.js | 31 - node_modules/ramda/es/drop.js | 38 - node_modules/ramda/es/dropLast.js | 35 - node_modules/ramda/es/dropLastWhile.js | 39 - node_modules/ramda/es/dropRepeats.js | 35 - node_modules/ramda/es/dropRepeatsWith.js | 51 - node_modules/ramda/es/dropWhile.js | 49 - node_modules/ramda/es/either.js | 44 - node_modules/ramda/es/empty.js | 39 - node_modules/ramda/es/endsWith.js | 33 - node_modules/ramda/es/eqBy.js | 27 - node_modules/ramda/es/eqProps.js | 31 - node_modules/ramda/es/equals.js | 35 - node_modules/ramda/es/evolve.js | 45 - node_modules/ramda/es/filter.js | 51 - node_modules/ramda/es/find.js | 46 - node_modules/ramda/es/findIndex.js | 46 - node_modules/ramda/es/findLast.js | 43 - node_modules/ramda/es/findLastIndex.js | 45 - node_modules/ramda/es/flatten.js | 27 - node_modules/ramda/es/flip.js | 35 - node_modules/ramda/es/forEach.js | 54 - node_modules/ramda/es/forEachObjIndexed.js | 41 - node_modules/ramda/es/fromPairs.js | 33 - node_modules/ramda/es/groupBy.js | 60 - node_modules/ramda/es/groupWith.js | 54 - node_modules/ramda/es/gt.js | 30 - node_modules/ramda/es/gte.js | 30 - node_modules/ramda/es/has.js | 34 - node_modules/ramda/es/hasIn.js | 35 - node_modules/ramda/es/hasPath.js | 48 - node_modules/ramda/es/head.js | 27 - node_modules/ramda/es/identical.js | 33 - node_modules/ramda/es/identity.js | 27 - node_modules/ramda/es/ifElse.js | 37 - node_modules/ramda/es/inc.js | 21 - node_modules/ramda/es/includes.js | 30 - node_modules/ramda/es/index.js | 257 - node_modules/ramda/es/indexBy.js | 30 - node_modules/ramda/es/indexOf.js | 30 - node_modules/ramda/es/init.js | 30 - node_modules/ramda/es/innerJoin.js | 48 - node_modules/ramda/es/insert.js | 31 - node_modules/ramda/es/insertAll.js | 28 - node_modules/ramda/es/internal/_Set.js | 201 - node_modules/ramda/es/internal/_aperture.js | 12 - node_modules/ramda/es/internal/_arity.js | 62 - .../ramda/es/internal/_arrayFromIterator.js | 10 - .../ramda/es/internal/_assertPromise.js | 7 - .../ramda/es/internal/_checkForMethod.js | 24 - node_modules/ramda/es/internal/_clone.js | 53 - .../ramda/es/internal/_cloneRegExp.js | 3 - node_modules/ramda/es/internal/_complement.js | 5 - node_modules/ramda/es/internal/_concat.js | 34 - .../es/internal/_createPartialApplicator.js | 9 - node_modules/ramda/es/internal/_curry1.js | 19 - node_modules/ramda/es/internal/_curry2.js | 31 - node_modules/ramda/es/internal/_curry3.js | 49 - node_modules/ramda/es/internal/_curryN.js | 42 - .../ramda/es/internal/_dispatchable.js | 46 - node_modules/ramda/es/internal/_dropLast.js | 4 - .../ramda/es/internal/_dropLastWhile.js | 10 - node_modules/ramda/es/internal/_equals.js | 166 - node_modules/ramda/es/internal/_filter.js | 15 - node_modules/ramda/es/internal/_flatCat.js | 32 - .../ramda/es/internal/_forceReduced.js | 6 - .../ramda/es/internal/_functionName.js | 5 - .../ramda/es/internal/_functionsWith.js | 14 - node_modules/ramda/es/internal/_has.js | 3 - node_modules/ramda/es/internal/_identity.js | 3 - node_modules/ramda/es/internal/_includes.js | 4 - .../ramda/es/internal/_includesWith.js | 14 - node_modules/ramda/es/internal/_indexOf.js | 67 - .../ramda/es/internal/_isArguments.js | 14 - node_modules/ramda/es/internal/_isArray.js | 15 - .../ramda/es/internal/_isArrayLike.js | 56 - node_modules/ramda/es/internal/_isFunction.js | 4 - node_modules/ramda/es/internal/_isInteger.js | 11 - node_modules/ramda/es/internal/_isNumber.js | 3 - node_modules/ramda/es/internal/_isObject.js | 3 - .../ramda/es/internal/_isPlaceholder.js | 3 - node_modules/ramda/es/internal/_isRegExp.js | 3 - node_modules/ramda/es/internal/_isString.js | 3 - .../ramda/es/internal/_isTransformer.js | 3 - node_modules/ramda/es/internal/_makeFlat.js | 35 - node_modules/ramda/es/internal/_map.js | 12 - .../ramda/es/internal/_objectAssign.js | 29 - node_modules/ramda/es/internal/_objectIs.js | 14 - node_modules/ramda/es/internal/_of.js | 3 - node_modules/ramda/es/internal/_pipe.js | 5 - node_modules/ramda/es/internal/_pipeP.js | 8 - node_modules/ramda/es/internal/_quote.js | 5 - node_modules/ramda/es/internal/_reduce.js | 71 - node_modules/ramda/es/internal/_reduced.js | 6 - node_modules/ramda/es/internal/_stepCat.js | 46 - .../ramda/es/internal/_toISOString.js | 14 - node_modules/ramda/es/internal/_toString.js | 58 - node_modules/ramda/es/internal/_xall.js | 42 - node_modules/ramda/es/internal/_xany.js | 42 - node_modules/ramda/es/internal/_xaperture.js | 50 - node_modules/ramda/es/internal/_xchain.js | 11 - node_modules/ramda/es/internal/_xdrop.js | 33 - node_modules/ramda/es/internal/_xdropLast.js | 49 - .../ramda/es/internal/_xdropLastWhile.js | 45 - .../ramda/es/internal/_xdropRepeatsWith.js | 39 - node_modules/ramda/es/internal/_xdropWhile.js | 36 - node_modules/ramda/es/internal/_xfBase.js | 8 - node_modules/ramda/es/internal/_xfilter.js | 28 - node_modules/ramda/es/internal/_xfind.js | 42 - node_modules/ramda/es/internal/_xfindIndex.js | 45 - node_modules/ramda/es/internal/_xfindLast.js | 35 - .../ramda/es/internal/_xfindLastIndex.js | 39 - node_modules/ramda/es/internal/_xmap.js | 28 - node_modules/ramda/es/internal/_xreduceBy.js | 52 - node_modules/ramda/es/internal/_xtake.js | 32 - node_modules/ramda/es/internal/_xtakeWhile.js | 29 - node_modules/ramda/es/internal/_xtap.js | 29 - node_modules/ramda/es/internal/_xwrap.js | 25 - node_modules/ramda/es/intersection.js | 40 - node_modules/ramda/es/intersperse.js | 43 - node_modules/ramda/es/into.js | 52 - node_modules/ramda/es/invert.js | 46 - node_modules/ramda/es/invertObj.js | 48 - node_modules/ramda/es/invoker.js | 54 - node_modules/ramda/es/is.js | 32 - node_modules/ramda/es/isEmpty.js | 32 - node_modules/ramda/es/isNil.js | 26 - node_modules/ramda/es/join.js | 25 - node_modules/ramda/es/juxt.js | 29 - node_modules/ramda/es/keys.js | 91 - node_modules/ramda/es/keysIn.js | 37 - node_modules/ramda/es/last.js | 26 - node_modules/ramda/es/lastIndexOf.js | 44 - node_modules/ramda/es/length.js | 25 - node_modules/ramda/es/lens.js | 39 - node_modules/ramda/es/lensIndex.js | 32 - node_modules/ramda/es/lensPath.js | 36 - node_modules/ramda/es/lensProp.js | 32 - node_modules/ramda/es/lift.js | 32 - node_modules/ramda/es/liftN.js | 33 - node_modules/ramda/es/lt.js | 30 - node_modules/ramda/es/lte.js | 30 - node_modules/ramda/es/map.js | 66 - node_modules/ramda/es/mapAccum.js | 54 - node_modules/ramda/es/mapAccumRight.js | 56 - node_modules/ramda/es/mapObjIndexed.js | 35 - node_modules/ramda/es/match.js | 30 - node_modules/ramda/es/mathMod.js | 51 - node_modules/ramda/es/max.js | 26 - node_modules/ramda/es/maxBy.js | 33 - node_modules/ramda/es/mean.js | 26 - node_modules/ramda/es/median.js | 37 - node_modules/ramda/es/memoizeWith.js | 48 - node_modules/ramda/es/merge.js | 34 - node_modules/ramda/es/mergeAll.js | 27 - node_modules/ramda/es/mergeDeepLeft.js | 33 - node_modules/ramda/es/mergeDeepRight.js | 33 - node_modules/ramda/es/mergeDeepWith.js | 39 - node_modules/ramda/es/mergeDeepWithKey.js | 45 - node_modules/ramda/es/mergeLeft.js | 33 - node_modules/ramda/es/mergeRight.js | 33 - node_modules/ramda/es/mergeWith.js | 35 - node_modules/ramda/es/mergeWithKey.js | 50 - node_modules/ramda/es/min.js | 26 - node_modules/ramda/es/minBy.js | 33 - node_modules/ramda/es/modulo.js | 34 - node_modules/ramda/es/move.js | 32 - node_modules/ramda/es/multiply.js | 29 - node_modules/ramda/es/nAry.js | 97 - node_modules/ramda/es/negate.js | 23 - node_modules/ramda/es/none.js | 36 - node_modules/ramda/es/not.js | 28 - node_modules/ramda/es/nth.js | 37 - node_modules/ramda/es/nthArg.js | 32 - node_modules/ramda/es/o.js | 36 - node_modules/ramda/es/objOf.js | 31 - node_modules/ramda/es/of.js | 26 - node_modules/ramda/es/omit.js | 41 - node_modules/ramda/es/once.js | 39 - node_modules/ramda/es/or.js | 29 - node_modules/ramda/es/otherwise.js | 40 - node_modules/ramda/es/over.js | 47 - node_modules/ramda/es/pair.js | 25 - node_modules/ramda/es/partial.js | 36 - node_modules/ramda/es/partialRight.js | 35 - node_modules/ramda/es/partition.js | 32 - node_modules/ramda/es/path.js | 30 - node_modules/ramda/es/pathEq.js | 35 - node_modules/ramda/es/pathOr.js | 30 - node_modules/ramda/es/pathSatisfies.js | 30 - node_modules/ramda/es/paths.js | 45 - node_modules/ramda/es/pick.js | 38 - node_modules/ramda/es/pickAll.js | 37 - node_modules/ramda/es/pickBy.js | 37 - node_modules/ramda/es/pipe.js | 35 - node_modules/ramda/es/pipeK.js | 45 - node_modules/ramda/es/pipeP.js | 31 - node_modules/ramda/es/pipeWith.js | 47 - node_modules/ramda/es/pluck.js | 38 - node_modules/ramda/es/prepend.js | 27 - node_modules/ramda/es/product.js | 22 - node_modules/ramda/es/project.js | 29 - node_modules/ramda/es/prop.js | 31 - node_modules/ramda/es/propEq.js | 35 - node_modules/ramda/es/propIs.js | 30 - node_modules/ramda/es/propOr.js | 36 - node_modules/ramda/es/propSatisfies.js | 28 - node_modules/ramda/es/props.js | 32 - node_modules/ramda/es/range.js | 38 - node_modules/ramda/es/reduce.js | 54 - node_modules/ramda/es/reduceBy.js | 61 - node_modules/ramda/es/reduceRight.js | 58 - node_modules/ramda/es/reduceWhile.js | 42 - node_modules/ramda/es/reduced.js | 33 - node_modules/ramda/es/reject.js | 35 - node_modules/ramda/es/remove.js | 31 - node_modules/ramda/es/repeat.js | 34 - node_modules/ramda/es/replace.js | 33 - node_modules/ramda/es/reverse.js | 34 - node_modules/ramda/es/scan.js | 40 - node_modules/ramda/es/sequence.js | 39 - node_modules/ramda/es/set.js | 33 - node_modules/ramda/es/slice.js | 36 - node_modules/ramda/es/sort.js | 29 - node_modules/ramda/es/sortBy.js | 46 - node_modules/ramda/es/sortWith.js | 51 - node_modules/ramda/es/split.js | 26 - node_modules/ramda/es/splitAt.js | 29 - node_modules/ramda/es/splitEvery.js | 38 - node_modules/ramda/es/splitWhen.js | 37 - node_modules/ramda/es/startsWith.js | 33 - node_modules/ramda/es/subtract.js | 32 - node_modules/ramda/es/sum.js | 22 - node_modules/ramda/es/symmetricDifference.js | 29 - .../ramda/es/symmetricDifferenceWith.js | 33 - node_modules/ramda/es/tail.js | 40 - node_modules/ramda/es/take.js | 57 - node_modules/ramda/es/takeLast.js | 32 - node_modules/ramda/es/takeLastWhile.js | 41 - node_modules/ramda/es/takeWhile.js | 50 - node_modules/ramda/es/tap.js | 34 - node_modules/ramda/es/test.js | 33 - node_modules/ramda/es/thunkify.js | 33 - node_modules/ramda/es/times.js | 47 - node_modules/ramda/es/toLower.js | 21 - node_modules/ramda/es/toPairs.js | 36 - node_modules/ramda/es/toPairsIn.js | 36 - node_modules/ramda/es/toString.js | 46 - node_modules/ramda/es/toUpper.js | 21 - node_modules/ramda/es/transduce.js | 57 - node_modules/ramda/es/transpose.js | 52 - node_modules/ramda/es/traverse.js | 37 - node_modules/ramda/es/trim.js | 36 - node_modules/ramda/es/tryCatch.js | 40 - node_modules/ramda/es/type.js | 34 - node_modules/ramda/es/unapply.js | 35 - node_modules/ramda/es/unary.js | 38 - node_modules/ramda/es/uncurryN.js | 43 - node_modules/ramda/es/unfold.js | 42 - node_modules/ramda/es/union.js | 29 - node_modules/ramda/es/unionWith.js | 33 - node_modules/ramda/es/uniq.js | 24 - node_modules/ramda/es/uniqBy.js | 44 - node_modules/ramda/es/uniqWith.js | 47 - node_modules/ramda/es/unless.js | 33 - node_modules/ramda/es/unnest.js | 24 - node_modules/ramda/es/until.js | 34 - node_modules/ramda/es/update.js | 33 - node_modules/ramda/es/useWith.js | 49 - node_modules/ramda/es/values.js | 37 - node_modules/ramda/es/valuesIn.js | 37 - node_modules/ramda/es/view.js | 42 - node_modules/ramda/es/when.js | 37 - node_modules/ramda/es/where.js | 51 - node_modules/ramda/es/whereEq.js | 40 - node_modules/ramda/es/without.js | 31 - node_modules/ramda/es/xor.js | 30 - node_modules/ramda/es/xprod.js | 45 - node_modules/ramda/es/zip.js | 37 - node_modules/ramda/es/zipObj.js | 35 - node_modules/ramda/es/zipWith.js | 42 - node_modules/ramda/package.json | 137 - node_modules/ramda/src/F.js | 20 - node_modules/ramda/src/T.js | 20 - node_modules/ramda/src/__.js | 30 - node_modules/ramda/src/add.js | 29 - node_modules/ramda/src/addIndex.js | 57 - node_modules/ramda/src/adjust.js | 52 - node_modules/ramda/src/all.js | 56 - node_modules/ramda/src/allPass.js | 66 - node_modules/ramda/src/always.js | 33 - node_modules/ramda/src/and.js | 31 - node_modules/ramda/src/andThen.js | 44 - node_modules/ramda/src/any.js | 57 - node_modules/ramda/src/anyPass.js | 67 - node_modules/ramda/src/ap.js | 54 - node_modules/ramda/src/aperture.js | 45 - node_modules/ramda/src/append.js | 36 - node_modules/ramda/src/apply.js | 32 - node_modules/ramda/src/applySpec.js | 82 - node_modules/ramda/src/applyTo.js | 31 - node_modules/ramda/src/ascend.js | 39 - node_modules/ramda/src/assoc.js | 39 - node_modules/ramda/src/assocPath.js | 73 - node_modules/ramda/src/binary.js | 44 - node_modules/ramda/src/bind.js | 40 - node_modules/ramda/src/both.js | 57 - node_modules/ramda/src/call.js | 43 - node_modules/ramda/src/chain.js | 62 - node_modules/ramda/src/clamp.js | 36 - node_modules/ramda/src/clone.js | 37 - node_modules/ramda/src/comparator.js | 37 - node_modules/ramda/src/complement.js | 35 - node_modules/ramda/src/compose.js | 42 - node_modules/ramda/src/composeK.js | 55 - node_modules/ramda/src/composeP.js | 53 - node_modules/ramda/src/composeWith.js | 44 - node_modules/ramda/src/concat.js | 80 - node_modules/ramda/src/cond.js | 68 - node_modules/ramda/src/construct.js | 48 - node_modules/ramda/src/constructN.js | 97 - node_modules/ramda/src/contains.js | 37 - node_modules/ramda/src/converge.js | 66 - node_modules/ramda/src/countBy.js | 35 - node_modules/ramda/src/curry.js | 57 - node_modules/ramda/src/curryN.js | 70 - node_modules/ramda/src/dec.js | 24 - node_modules/ramda/src/defaultTo.js | 35 - node_modules/ramda/src/descend.js | 39 - node_modules/ramda/src/difference.js | 54 - node_modules/ramda/src/differenceWith.js | 50 - node_modules/ramda/src/dissoc.js | 35 - node_modules/ramda/src/dissocPath.js | 74 - node_modules/ramda/src/divide.js | 34 - node_modules/ramda/src/drop.js | 50 - node_modules/ramda/src/dropLast.js | 47 - node_modules/ramda/src/dropLastWhile.js | 51 - node_modules/ramda/src/dropRepeats.js | 50 - node_modules/ramda/src/dropRepeatsWith.js | 63 - node_modules/ramda/src/dropWhile.js | 61 - node_modules/ramda/src/either.js | 56 - node_modules/ramda/src/empty.js | 54 - node_modules/ramda/src/endsWith.js | 42 - node_modules/ramda/src/eqBy.js | 33 - node_modules/ramda/src/eqProps.js | 37 - node_modules/ramda/src/equals.js | 41 - node_modules/ramda/src/evolve.js | 48 - node_modules/ramda/src/filter.js | 72 - node_modules/ramda/src/find.js | 55 - node_modules/ramda/src/findIndex.js | 55 - node_modules/ramda/src/findLast.js | 52 - node_modules/ramda/src/findLastIndex.js | 54 - node_modules/ramda/src/flatten.js | 33 - node_modules/ramda/src/flip.js | 41 - node_modules/ramda/src/forEach.js | 60 - node_modules/ramda/src/forEachObjIndexed.js | 47 - node_modules/ramda/src/fromPairs.js | 36 - node_modules/ramda/src/groupBy.js | 69 - node_modules/ramda/src/groupWith.js | 57 - node_modules/ramda/src/gt.js | 33 - node_modules/ramda/src/gte.js | 33 - node_modules/ramda/src/has.js | 40 - node_modules/ramda/src/hasIn.js | 38 - node_modules/ramda/src/hasPath.js | 57 - node_modules/ramda/src/head.js | 30 - node_modules/ramda/src/identical.js | 39 - node_modules/ramda/src/identity.js | 33 - node_modules/ramda/src/ifElse.js | 43 - node_modules/ramda/src/inc.js | 24 - node_modules/ramda/src/includes.js | 36 - node_modules/ramda/src/index.js | 772 -- node_modules/ramda/src/index.mjs | 257 - node_modules/ramda/src/indexBy.js | 33 - node_modules/ramda/src/indexOf.js | 39 - node_modules/ramda/src/init.js | 33 - node_modules/ramda/src/innerJoin.js | 57 - node_modules/ramda/src/insert.js | 34 - node_modules/ramda/src/insertAll.js | 31 - node_modules/ramda/src/internal/_Set.js | 203 - node_modules/ramda/src/internal/_aperture.js | 14 - node_modules/ramda/src/internal/_arity.js | 64 - .../ramda/src/internal/_arrayFromIterator.js | 12 - .../ramda/src/internal/_assertPromise.js | 15 - .../ramda/src/internal/_checkForMethod.js | 29 - node_modules/ramda/src/internal/_clone.js | 61 - .../ramda/src/internal/_cloneRegExp.js | 5 - .../ramda/src/internal/_complement.js | 7 - node_modules/ramda/src/internal/_concat.js | 36 - .../src/internal/_createPartialApplicator.js | 17 - node_modules/ramda/src/internal/_curry1.js | 24 - node_modules/ramda/src/internal/_curry2.js | 39 - node_modules/ramda/src/internal/_curry3.js | 60 - node_modules/ramda/src/internal/_curryN.js | 50 - .../ramda/src/internal/_dispatchable.js | 54 - node_modules/ramda/src/internal/_dropLast.js | 9 - .../ramda/src/internal/_dropLastWhile.js | 15 - node_modules/ramda/src/internal/_equals.js | 189 - node_modules/ramda/src/internal/_filter.js | 17 - node_modules/ramda/src/internal/_flatCat.js | 43 - .../ramda/src/internal/_forceReduced.js | 8 - .../ramda/src/internal/_functionName.js | 7 - .../ramda/src/internal/_functionsWith.js | 19 - node_modules/ramda/src/internal/_has.js | 5 - node_modules/ramda/src/internal/_identity.js | 5 - node_modules/ramda/src/internal/_includes.js | 9 - .../ramda/src/internal/_includesWith.js | 16 - node_modules/ramda/src/internal/_indexOf.js | 72 - .../ramda/src/internal/_isArguments.js | 17 - node_modules/ramda/src/internal/_isArray.js | 15 - .../ramda/src/internal/_isArrayLike.js | 65 - .../ramda/src/internal/_isFunction.js | 6 - node_modules/ramda/src/internal/_isInteger.js | 11 - node_modules/ramda/src/internal/_isNumber.js | 5 - node_modules/ramda/src/internal/_isObject.js | 5 - .../ramda/src/internal/_isPlaceholder.js | 5 - node_modules/ramda/src/internal/_isRegExp.js | 5 - node_modules/ramda/src/internal/_isString.js | 5 - .../ramda/src/internal/_isTransformer.js | 5 - node_modules/ramda/src/internal/_makeFlat.js | 40 - node_modules/ramda/src/internal/_map.js | 14 - .../ramda/src/internal/_objectAssign.js | 32 - node_modules/ramda/src/internal/_objectIs.js | 14 - node_modules/ramda/src/internal/_of.js | 5 - node_modules/ramda/src/internal/_pipe.js | 7 - node_modules/ramda/src/internal/_pipeP.js | 10 - node_modules/ramda/src/internal/_quote.js | 7 - node_modules/ramda/src/internal/_reduce.js | 82 - node_modules/ramda/src/internal/_reduced.js | 8 - node_modules/ramda/src/internal/_stepCat.js | 64 - .../ramda/src/internal/_toISOString.js | 14 - node_modules/ramda/src/internal/_toString.js | 78 - node_modules/ramda/src/internal/_xall.js | 50 - node_modules/ramda/src/internal/_xany.js | 50 - node_modules/ramda/src/internal/_xaperture.js | 58 - node_modules/ramda/src/internal/_xchain.js | 19 - node_modules/ramda/src/internal/_xdrop.js | 38 - node_modules/ramda/src/internal/_xdropLast.js | 54 - .../ramda/src/internal/_xdropLastWhile.js | 53 - .../ramda/src/internal/_xdropRepeatsWith.js | 44 - .../ramda/src/internal/_xdropWhile.js | 41 - node_modules/ramda/src/internal/_xfBase.js | 8 - node_modules/ramda/src/internal/_xfilter.js | 33 - node_modules/ramda/src/internal/_xfind.js | 50 - .../ramda/src/internal/_xfindIndex.js | 53 - node_modules/ramda/src/internal/_xfindLast.js | 40 - .../ramda/src/internal/_xfindLastIndex.js | 44 - node_modules/ramda/src/internal/_xmap.js | 33 - node_modules/ramda/src/internal/_xreduceBy.js | 60 - node_modules/ramda/src/internal/_xtake.js | 40 - .../ramda/src/internal/_xtakeWhile.js | 37 - node_modules/ramda/src/internal/_xtap.js | 34 - node_modules/ramda/src/internal/_xwrap.js | 27 - node_modules/ramda/src/intersection.js | 55 - node_modules/ramda/src/intersperse.js | 49 - node_modules/ramda/src/into.js | 67 - node_modules/ramda/src/invert.js | 55 - node_modules/ramda/src/invertObj.js | 54 - node_modules/ramda/src/invoker.js | 66 - node_modules/ramda/src/is.js | 35 - node_modules/ramda/src/isEmpty.js | 41 - node_modules/ramda/src/isNil.js | 29 - node_modules/ramda/src/join.js | 28 - node_modules/ramda/src/juxt.js | 35 - node_modules/ramda/src/keys.js | 100 - node_modules/ramda/src/keysIn.js | 40 - node_modules/ramda/src/last.js | 29 - node_modules/ramda/src/lastIndexOf.js | 53 - node_modules/ramda/src/length.js | 31 - node_modules/ramda/src/lens.js | 45 - node_modules/ramda/src/lensIndex.js | 44 - node_modules/ramda/src/lensPath.js | 48 - node_modules/ramda/src/lensProp.js | 44 - node_modules/ramda/src/lift.js | 38 - node_modules/ramda/src/liftN.js | 48 - node_modules/ramda/src/lt.js | 33 - node_modules/ramda/src/lte.js | 33 - node_modules/ramda/src/map.js | 87 - node_modules/ramda/src/mapAccum.js | 57 - node_modules/ramda/src/mapAccumRight.js | 59 - node_modules/ramda/src/mapObjIndexed.js | 44 - node_modules/ramda/src/match.js | 33 - node_modules/ramda/src/mathMod.js | 57 - node_modules/ramda/src/max.js | 29 - node_modules/ramda/src/maxBy.js | 36 - node_modules/ramda/src/mean.js | 32 - node_modules/ramda/src/median.js | 43 - node_modules/ramda/src/memoizeWith.js | 57 - node_modules/ramda/src/merge.js | 40 - node_modules/ramda/src/mergeAll.js | 33 - node_modules/ramda/src/mergeDeepLeft.js | 39 - node_modules/ramda/src/mergeDeepRight.js | 39 - node_modules/ramda/src/mergeDeepWith.js | 45 - node_modules/ramda/src/mergeDeepWithKey.js | 54 - node_modules/ramda/src/mergeLeft.js | 39 - node_modules/ramda/src/mergeRight.js | 39 - node_modules/ramda/src/mergeWith.js | 41 - node_modules/ramda/src/mergeWithKey.js | 56 - node_modules/ramda/src/min.js | 29 - node_modules/ramda/src/minBy.js | 36 - node_modules/ramda/src/modulo.js | 37 - node_modules/ramda/src/move.js | 35 - node_modules/ramda/src/multiply.js | 32 - node_modules/ramda/src/nAry.js | 100 - node_modules/ramda/src/negate.js | 26 - node_modules/ramda/src/none.js | 45 - node_modules/ramda/src/not.js | 31 - node_modules/ramda/src/nth.js | 43 - node_modules/ramda/src/nthArg.js | 41 - node_modules/ramda/src/o.js | 39 - node_modules/ramda/src/objOf.js | 34 - node_modules/ramda/src/of.js | 32 - node_modules/ramda/src/omit.js | 44 - node_modules/ramda/src/once.js | 45 - node_modules/ramda/src/or.js | 32 - node_modules/ramda/src/otherwise.js | 46 - node_modules/ramda/src/over.js | 50 - node_modules/ramda/src/pair.js | 28 - node_modules/ramda/src/partial.js | 42 - node_modules/ramda/src/partialRight.js | 44 - node_modules/ramda/src/partition.js | 41 - node_modules/ramda/src/path.js | 36 - node_modules/ramda/src/pathEq.js | 44 - node_modules/ramda/src/pathOr.js | 39 - node_modules/ramda/src/pathSatisfies.js | 36 - node_modules/ramda/src/paths.js | 54 - node_modules/ramda/src/pick.js | 41 - node_modules/ramda/src/pickAll.js | 40 - node_modules/ramda/src/pickBy.js | 40 - node_modules/ramda/src/pipe.js | 49 - node_modules/ramda/src/pipeK.js | 53 - node_modules/ramda/src/pipeP.js | 45 - node_modules/ramda/src/pipeWith.js | 65 - node_modules/ramda/src/pluck.js | 47 - node_modules/ramda/src/prepend.js | 33 - node_modules/ramda/src/product.js | 28 - node_modules/ramda/src/project.js | 41 - node_modules/ramda/src/prop.js | 37 - node_modules/ramda/src/propEq.js | 41 - node_modules/ramda/src/propIs.js | 36 - node_modules/ramda/src/propOr.js | 42 - node_modules/ramda/src/propSatisfies.js | 31 - node_modules/ramda/src/props.js | 38 - node_modules/ramda/src/range.js | 44 - node_modules/ramda/src/reduce.js | 60 - node_modules/ramda/src/reduceBy.js | 79 - node_modules/ramda/src/reduceRight.js | 61 - node_modules/ramda/src/reduceWhile.js | 51 - node_modules/ramda/src/reduced.js | 39 - node_modules/ramda/src/reject.js | 44 - node_modules/ramda/src/remove.js | 34 - node_modules/ramda/src/repeat.js | 43 - node_modules/ramda/src/replace.js | 36 - node_modules/ramda/src/reverse.js | 40 - node_modules/ramda/src/scan.js | 43 - node_modules/ramda/src/sequence.js | 54 - node_modules/ramda/src/set.js | 42 - node_modules/ramda/src/slice.js | 42 - node_modules/ramda/src/sort.js | 32 - node_modules/ramda/src/sortBy.js | 49 - node_modules/ramda/src/sortWith.js | 54 - node_modules/ramda/src/split.js | 29 - node_modules/ramda/src/splitAt.js | 38 - node_modules/ramda/src/splitEvery.js | 44 - node_modules/ramda/src/splitWhen.js | 40 - node_modules/ramda/src/startsWith.js | 42 - node_modules/ramda/src/subtract.js | 35 - node_modules/ramda/src/sum.js | 28 - node_modules/ramda/src/symmetricDifference.js | 38 - .../ramda/src/symmetricDifferenceWith.js | 42 - node_modules/ramda/src/tail.js | 49 - node_modules/ramda/src/take.js | 69 - node_modules/ramda/src/takeLast.js | 38 - node_modules/ramda/src/takeLastWhile.js | 47 - node_modules/ramda/src/takeWhile.js | 62 - node_modules/ramda/src/tap.js | 43 - node_modules/ramda/src/test.js | 45 - node_modules/ramda/src/thunkify.js | 39 - node_modules/ramda/src/times.js | 50 - node_modules/ramda/src/toLower.js | 24 - node_modules/ramda/src/toPairs.js | 42 - node_modules/ramda/src/toPairsIn.js | 39 - node_modules/ramda/src/toString.js | 52 - node_modules/ramda/src/toUpper.js | 24 - node_modules/ramda/src/transduce.js | 66 - node_modules/ramda/src/transpose.js | 55 - node_modules/ramda/src/traverse.js | 46 - node_modules/ramda/src/trim.js | 39 - node_modules/ramda/src/tryCatch.js | 49 - node_modules/ramda/src/type.js | 37 - node_modules/ramda/src/unapply.js | 38 - node_modules/ramda/src/unary.js | 44 - node_modules/ramda/src/uncurryN.js | 49 - node_modules/ramda/src/unfold.js | 45 - node_modules/ramda/src/union.js | 41 - node_modules/ramda/src/unionWith.js | 42 - node_modules/ramda/src/uniq.js | 30 - node_modules/ramda/src/uniqBy.js | 50 - node_modules/ramda/src/uniqWith.js | 53 - node_modules/ramda/src/unless.js | 36 - node_modules/ramda/src/unnest.js | 30 - node_modules/ramda/src/until.js | 37 - node_modules/ramda/src/update.js | 42 - node_modules/ramda/src/useWith.js | 55 - node_modules/ramda/src/values.js | 43 - node_modules/ramda/src/valuesIn.js | 40 - node_modules/ramda/src/view.js | 45 - node_modules/ramda/src/when.js | 40 - node_modules/ramda/src/where.js | 57 - node_modules/ramda/src/whereEq.js | 52 - node_modules/ramda/src/without.js | 43 - node_modules/ramda/src/xor.js | 33 - node_modules/ramda/src/xprod.js | 48 - node_modules/ramda/src/zip.js | 40 - node_modules/ramda/src/zipObj.js | 38 - node_modules/ramda/src/zipWith.js | 45 - node_modules/sonic-boom/.travis.yml | 9 - node_modules/sonic-boom/LICENSE | 21 - node_modules/sonic-boom/README.md | 100 - node_modules/sonic-boom/bench.js | 63 - node_modules/sonic-boom/check.js | 18 - node_modules/sonic-boom/example.js | 8 - node_modules/sonic-boom/fixtures/firehose.js | 22 - node_modules/sonic-boom/index.js | 317 - node_modules/sonic-boom/package.json | 67 - node_modules/sonic-boom/test.js | 762 -- node_modules/tunnel/.travis.yml | 6 + node_modules/tunnel/CHANGELOG.md | 22 + .../{ramda/LICENSE.txt => tunnel/LICENSE} | 2 +- node_modules/tunnel/README.md | 185 + node_modules/tunnel/index.js | 1 + node_modules/tunnel/lib/tunnel.js | 264 + node_modules/tunnel/package.json | 34 + node_modules/uuid/CHANGELOG.md | 229 + node_modules/uuid/CONTRIBUTING.md | 18 + .../{quick-lru/license => uuid/LICENSE.md} | 4 +- node_modules/uuid/README.md | 505 + node_modules/uuid/dist/bin/uuid | 2 + node_modules/uuid/dist/esm-browser/index.js | 9 + node_modules/uuid/dist/esm-browser/md5.js | 215 + node_modules/uuid/dist/esm-browser/nil.js | 1 + node_modules/uuid/dist/esm-browser/parse.js | 35 + node_modules/uuid/dist/esm-browser/regex.js | 1 + node_modules/uuid/dist/esm-browser/rng.js | 19 + node_modules/uuid/dist/esm-browser/sha1.js | 96 + .../uuid/dist/esm-browser/stringify.js | 30 + node_modules/uuid/dist/esm-browser/v1.js | 95 + node_modules/uuid/dist/esm-browser/v3.js | 4 + node_modules/uuid/dist/esm-browser/v35.js | 64 + node_modules/uuid/dist/esm-browser/v4.js | 24 + node_modules/uuid/dist/esm-browser/v5.js | 4 + .../uuid/dist/esm-browser/validate.js | 7 + node_modules/uuid/dist/esm-browser/version.js | 11 + node_modules/uuid/dist/esm-node/index.js | 9 + node_modules/uuid/dist/esm-node/md5.js | 13 + node_modules/uuid/dist/esm-node/nil.js | 1 + node_modules/uuid/dist/esm-node/parse.js | 35 + node_modules/uuid/dist/esm-node/regex.js | 1 + node_modules/uuid/dist/esm-node/rng.js | 12 + node_modules/uuid/dist/esm-node/sha1.js | 13 + node_modules/uuid/dist/esm-node/stringify.js | 29 + node_modules/uuid/dist/esm-node/v1.js | 95 + node_modules/uuid/dist/esm-node/v3.js | 4 + node_modules/uuid/dist/esm-node/v35.js | 64 + node_modules/uuid/dist/esm-node/v4.js | 24 + node_modules/uuid/dist/esm-node/v5.js | 4 + node_modules/uuid/dist/esm-node/validate.js | 7 + node_modules/uuid/dist/esm-node/version.js | 11 + node_modules/uuid/dist/index.js | 79 + node_modules/uuid/dist/md5-browser.js | 223 + node_modules/uuid/dist/md5.js | 23 + node_modules/uuid/dist/nil.js | 8 + node_modules/uuid/dist/parse.js | 45 + node_modules/uuid/dist/regex.js | 8 + node_modules/uuid/dist/rng-browser.js | 26 + node_modules/uuid/dist/rng.js | 24 + node_modules/uuid/dist/sha1-browser.js | 104 + node_modules/uuid/dist/sha1.js | 23 + node_modules/uuid/dist/stringify.js | 39 + node_modules/uuid/dist/umd/uuid.min.js | 1 + node_modules/uuid/dist/umd/uuidNIL.min.js | 1 + node_modules/uuid/dist/umd/uuidParse.min.js | 1 + .../uuid/dist/umd/uuidStringify.min.js | 1 + .../uuid/dist/umd/uuidValidate.min.js | 1 + node_modules/uuid/dist/umd/uuidVersion.min.js | 1 + node_modules/uuid/dist/umd/uuidv1.min.js | 1 + node_modules/uuid/dist/umd/uuidv3.min.js | 1 + node_modules/uuid/dist/umd/uuidv4.min.js | 1 + node_modules/uuid/dist/umd/uuidv5.min.js | 1 + node_modules/uuid/dist/uuid-bin.js | 85 + node_modules/uuid/dist/v1.js | 107 + node_modules/uuid/dist/v3.js | 16 + node_modules/uuid/dist/v35.js | 78 + node_modules/uuid/dist/v4.js | 37 + node_modules/uuid/dist/v5.js | 16 + node_modules/uuid/dist/validate.js | 17 + node_modules/uuid/dist/version.js | 21 + node_modules/uuid/package.json | 135 + node_modules/uuid/wrapper.mjs | 10 + package-lock.json | 202 +- package.json | 1 - 1068 files changed, 6067 insertions(+), 105143 deletions(-) delete mode 120000 node_modules/.bin/pino create mode 120000 node_modules/.bin/uuid create mode 100644 node_modules/.package-lock.json create mode 100644 node_modules/@actions/core/lib/oidc-utils.d.ts create mode 100644 node_modules/@actions/core/lib/oidc-utils.js create mode 100644 node_modules/@actions/core/lib/oidc-utils.js.map create mode 100644 node_modules/@actions/core/lib/path-utils.d.ts create mode 100644 node_modules/@actions/core/lib/path-utils.js create mode 100644 node_modules/@actions/core/lib/path-utils.js.map create mode 100644 node_modules/@actions/core/lib/summary.d.ts create mode 100644 node_modules/@actions/core/lib/summary.js create mode 100644 node_modules/@actions/core/lib/summary.js.map rename node_modules/{luxon/license.md => @actions/exec/LICENSE.md} (93%) create mode 100644 node_modules/@actions/http-client/LICENSE create mode 100644 node_modules/@actions/http-client/README.md create mode 100644 node_modules/@actions/http-client/lib/auth.d.ts create mode 100644 node_modules/@actions/http-client/lib/auth.js create mode 100644 node_modules/@actions/http-client/lib/auth.js.map create mode 100644 node_modules/@actions/http-client/lib/index.d.ts create mode 100644 node_modules/@actions/http-client/lib/index.js create mode 100644 node_modules/@actions/http-client/lib/index.js.map create mode 100644 node_modules/@actions/http-client/lib/interfaces.d.ts create mode 100644 node_modules/@actions/http-client/lib/interfaces.js create mode 100644 node_modules/@actions/http-client/lib/interfaces.js.map create mode 100644 node_modules/@actions/http-client/lib/proxy.d.ts create mode 100644 node_modules/@actions/http-client/lib/proxy.js create mode 100644 node_modules/@actions/http-client/lib/proxy.js.map create mode 100644 node_modules/@actions/http-client/package.json rename node_modules/{pino-std-serializers/LICENSE => @actions/io/LICENSE.md} (93%) delete mode 100644 node_modules/atomic-sleep/.travis.yml delete mode 100644 node_modules/atomic-sleep/LICENSE delete mode 100644 node_modules/atomic-sleep/index.js delete mode 100644 node_modules/atomic-sleep/package.json delete mode 100644 node_modules/atomic-sleep/readme.md delete mode 100644 node_modules/atomic-sleep/test.js delete mode 100644 node_modules/axios/CHANGELOG.md delete mode 100644 node_modules/axios/LICENSE delete mode 100755 node_modules/axios/README.md delete mode 100644 node_modules/axios/UPGRADE_GUIDE.md delete mode 100644 node_modules/axios/dist/axios.js delete mode 100644 node_modules/axios/dist/axios.map delete mode 100644 node_modules/axios/dist/axios.min.js delete mode 100644 node_modules/axios/dist/axios.min.map delete mode 100644 node_modules/axios/index.d.ts delete mode 100644 node_modules/axios/index.js delete mode 100644 node_modules/axios/lib/adapters/README.md delete mode 100755 node_modules/axios/lib/adapters/http.js delete mode 100644 node_modules/axios/lib/adapters/xhr.js delete mode 100644 node_modules/axios/lib/axios.js delete mode 100644 node_modules/axios/lib/cancel/Cancel.js delete mode 100644 node_modules/axios/lib/cancel/CancelToken.js delete mode 100644 node_modules/axios/lib/cancel/isCancel.js delete mode 100644 node_modules/axios/lib/core/Axios.js delete mode 100644 node_modules/axios/lib/core/InterceptorManager.js delete mode 100644 node_modules/axios/lib/core/README.md delete mode 100644 node_modules/axios/lib/core/buildFullPath.js delete mode 100644 node_modules/axios/lib/core/createError.js delete mode 100644 node_modules/axios/lib/core/dispatchRequest.js delete mode 100644 node_modules/axios/lib/core/enhanceError.js delete mode 100644 node_modules/axios/lib/core/mergeConfig.js delete mode 100644 node_modules/axios/lib/core/settle.js delete mode 100644 node_modules/axios/lib/core/transformData.js delete mode 100644 node_modules/axios/lib/defaults.js delete mode 100644 node_modules/axios/lib/helpers/README.md delete mode 100644 node_modules/axios/lib/helpers/bind.js delete mode 100644 node_modules/axios/lib/helpers/buildURL.js delete mode 100644 node_modules/axios/lib/helpers/combineURLs.js delete mode 100644 node_modules/axios/lib/helpers/cookies.js delete mode 100644 node_modules/axios/lib/helpers/deprecatedMethod.js delete mode 100644 node_modules/axios/lib/helpers/isAbsoluteURL.js delete mode 100644 node_modules/axios/lib/helpers/isURLSameOrigin.js delete mode 100644 node_modules/axios/lib/helpers/normalizeHeaderName.js delete mode 100644 node_modules/axios/lib/helpers/parseHeaders.js delete mode 100644 node_modules/axios/lib/helpers/spread.js delete mode 100644 node_modules/axios/lib/utils.js delete mode 100644 node_modules/axios/package.json delete mode 100644 node_modules/camelcase-keys/index.d.ts delete mode 100644 node_modules/camelcase-keys/index.js delete mode 100644 node_modules/camelcase-keys/license delete mode 100644 node_modules/camelcase-keys/package.json delete mode 100644 node_modules/camelcase-keys/readme.md delete mode 100644 node_modules/camelcase/index.d.ts delete mode 100644 node_modules/camelcase/index.js delete mode 100644 node_modules/camelcase/license delete mode 100644 node_modules/camelcase/package.json delete mode 100644 node_modules/camelcase/readme.md delete mode 100644 node_modules/docker-hub-utils/README.md delete mode 100644 node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.development.js delete mode 100644 node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.development.js.map delete mode 100644 node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.production.min.js delete mode 100644 node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.production.min.js.map delete mode 100644 node_modules/docker-hub-utils/dist/docker-hub-utils.esm.js delete mode 100644 node_modules/docker-hub-utils/dist/docker-hub-utils.esm.js.map delete mode 100644 node_modules/docker-hub-utils/dist/index.d.ts delete mode 100644 node_modules/docker-hub-utils/dist/index.js delete mode 100644 node_modules/docker-hub-utils/dist/services/DockerHubAPI.d.ts delete mode 100644 node_modules/docker-hub-utils/dist/types/DockerHubRepo.d.ts delete mode 100644 node_modules/docker-hub-utils/dist/utils/constants.d.ts delete mode 100644 node_modules/docker-hub-utils/dist/utils/log.d.ts delete mode 100644 node_modules/docker-hub-utils/package.json delete mode 100644 node_modules/fast-redact/.travis.yml delete mode 100644 node_modules/fast-redact/LICENSE delete mode 100644 node_modules/fast-redact/benchmark/index.js delete mode 100644 node_modules/fast-redact/example/default-usage.js delete mode 100644 node_modules/fast-redact/example/intermediate-wildcard-array.js delete mode 100644 node_modules/fast-redact/example/serialize-false.js delete mode 100644 node_modules/fast-redact/example/serialize-function.js delete mode 100644 node_modules/fast-redact/example/top-wildcard-object.js delete mode 100644 node_modules/fast-redact/index.js delete mode 100644 node_modules/fast-redact/lib/modifiers.js delete mode 100644 node_modules/fast-redact/lib/parse.js delete mode 100644 node_modules/fast-redact/lib/redactor.js delete mode 100644 node_modules/fast-redact/lib/restorer.js delete mode 100644 node_modules/fast-redact/lib/rx.js delete mode 100644 node_modules/fast-redact/lib/state.js delete mode 100644 node_modules/fast-redact/lib/validator.js delete mode 100644 node_modules/fast-redact/package.json delete mode 100644 node_modules/fast-redact/readme.md delete mode 100644 node_modules/fast-redact/test/index.js delete mode 100644 node_modules/fast-safe-stringify/.travis.yml delete mode 100644 node_modules/fast-safe-stringify/CHANGELOG.md delete mode 100644 node_modules/fast-safe-stringify/LICENSE delete mode 100644 node_modules/fast-safe-stringify/benchmark.js delete mode 100644 node_modules/fast-safe-stringify/index.d.ts delete mode 100644 node_modules/fast-safe-stringify/index.js delete mode 100644 node_modules/fast-safe-stringify/package.json delete mode 100644 node_modules/fast-safe-stringify/readme.md delete mode 100644 node_modules/fast-safe-stringify/test-stable.js delete mode 100644 node_modules/fast-safe-stringify/test.js delete mode 100644 node_modules/flatstr/LICENSE delete mode 100644 node_modules/flatstr/alt-benchmark.js delete mode 100644 node_modules/flatstr/benchmark.js delete mode 100644 node_modules/flatstr/index.js delete mode 100644 node_modules/flatstr/package.json delete mode 100644 node_modules/flatstr/readme.md delete mode 100644 node_modules/flatstr/test.js delete mode 100644 node_modules/follow-redirects/LICENSE delete mode 100644 node_modules/follow-redirects/README.md delete mode 100644 node_modules/follow-redirects/debug.js delete mode 100644 node_modules/follow-redirects/http.js delete mode 100644 node_modules/follow-redirects/https.js delete mode 100644 node_modules/follow-redirects/index.js delete mode 100644 node_modules/follow-redirects/package.json delete mode 100644 node_modules/luxon/CHANGELOG.md delete mode 100644 node_modules/luxon/README.md delete mode 100644 node_modules/luxon/build/amd/luxon.js delete mode 100644 node_modules/luxon/build/amd/luxon.js.map delete mode 100644 node_modules/luxon/build/cjs-browser/luxon.js delete mode 100644 node_modules/luxon/build/cjs-browser/luxon.js.map delete mode 100644 node_modules/luxon/build/global/luxon.js delete mode 100644 node_modules/luxon/build/global/luxon.js.map delete mode 100644 node_modules/luxon/build/global/luxon.min.js delete mode 100644 node_modules/luxon/build/global/luxon.min.js.map delete mode 100644 node_modules/luxon/build/node/luxon.js delete mode 100644 node_modules/luxon/build/node/luxon.js.map delete mode 100644 node_modules/luxon/build/readme.md delete mode 100644 node_modules/luxon/package.json delete mode 100644 node_modules/luxon/src/datetime.js delete mode 100644 node_modules/luxon/src/duration.js delete mode 100644 node_modules/luxon/src/errors.js delete mode 100644 node_modules/luxon/src/impl/conversions.js delete mode 100644 node_modules/luxon/src/impl/diff.js delete mode 100644 node_modules/luxon/src/impl/digits.js delete mode 100644 node_modules/luxon/src/impl/english.js delete mode 100644 node_modules/luxon/src/impl/formats.js delete mode 100644 node_modules/luxon/src/impl/formatter.js delete mode 100644 node_modules/luxon/src/impl/invalid.js delete mode 100644 node_modules/luxon/src/impl/locale.js delete mode 100644 node_modules/luxon/src/impl/regexParser.js delete mode 100644 node_modules/luxon/src/impl/tokenParser.js delete mode 100644 node_modules/luxon/src/impl/util.js delete mode 100644 node_modules/luxon/src/impl/zoneUtil.js delete mode 100644 node_modules/luxon/src/info.js delete mode 100644 node_modules/luxon/src/interval.js delete mode 100644 node_modules/luxon/src/luxon.js delete mode 100644 node_modules/luxon/src/luxonFilled.js delete mode 100644 node_modules/luxon/src/settings.js delete mode 100644 node_modules/luxon/src/zone.js delete mode 100644 node_modules/luxon/src/zones/IANAZone.js delete mode 100644 node_modules/luxon/src/zones/fixedOffsetZone.js delete mode 100644 node_modules/luxon/src/zones/invalidZone.js delete mode 100644 node_modules/luxon/src/zones/localZone.js delete mode 100644 node_modules/map-obj/index.d.ts delete mode 100644 node_modules/map-obj/index.js delete mode 100644 node_modules/map-obj/license delete mode 100644 node_modules/map-obj/package.json delete mode 100644 node_modules/map-obj/readme.md delete mode 100644 node_modules/pino-std-serializers/.editorconfig delete mode 100644 node_modules/pino-std-serializers/.travis.yml delete mode 100644 node_modules/pino-std-serializers/Readme.md delete mode 100644 node_modules/pino-std-serializers/index.js delete mode 100644 node_modules/pino-std-serializers/lib/err.js delete mode 100644 node_modules/pino-std-serializers/lib/req.js delete mode 100644 node_modules/pino-std-serializers/lib/res.js delete mode 100644 node_modules/pino-std-serializers/package.json delete mode 100644 node_modules/pino-std-serializers/test/err.test.js delete mode 100644 node_modules/pino-std-serializers/test/req.test.js delete mode 100644 node_modules/pino-std-serializers/test/res.test.js delete mode 100644 node_modules/pino/LICENSE delete mode 100644 node_modules/pino/README.md delete mode 100755 node_modules/pino/bin.js delete mode 100644 node_modules/pino/browser.js delete mode 100644 node_modules/pino/docs/api.md delete mode 100644 node_modules/pino/docs/benchmarks.md delete mode 100644 node_modules/pino/docs/browser.md delete mode 100644 node_modules/pino/docs/child-loggers.md delete mode 100644 node_modules/pino/docs/ecosystem.md delete mode 100644 node_modules/pino/docs/extreme.md delete mode 100644 node_modules/pino/docs/help.md delete mode 100644 node_modules/pino/docs/legacy.md delete mode 100644 node_modules/pino/docs/pretty.md delete mode 100644 node_modules/pino/docs/redaction.md delete mode 100644 node_modules/pino/docs/transports.md delete mode 100644 node_modules/pino/docs/web.md delete mode 100644 node_modules/pino/example.js delete mode 100644 node_modules/pino/lib/levels.js delete mode 100644 node_modules/pino/lib/meta.js delete mode 100644 node_modules/pino/lib/proto.js delete mode 100644 node_modules/pino/lib/redaction.js delete mode 100644 node_modules/pino/lib/symbols.js delete mode 100644 node_modules/pino/lib/time.js delete mode 100644 node_modules/pino/lib/tools.js delete mode 100644 node_modules/pino/package.json delete mode 100644 node_modules/pino/pino.js delete mode 100644 node_modules/pino/test/basic.test.js delete mode 100644 node_modules/pino/test/broken-pipe.test.js delete mode 100644 node_modules/pino/test/browser-levels.test.js delete mode 100644 node_modules/pino/test/browser-serializers.test.js delete mode 100644 node_modules/pino/test/browser-transmit.test.js delete mode 100644 node_modules/pino/test/browser.test.js delete mode 100644 node_modules/pino/test/crlf.test.js delete mode 100644 node_modules/pino/test/custom-levels.test.js delete mode 100644 node_modules/pino/test/error.test.js delete mode 100644 node_modules/pino/test/escaping.test.js delete mode 100644 node_modules/pino/test/exit.test.js delete mode 100644 node_modules/pino/test/extreme.test.js delete mode 100644 node_modules/pino/test/final.test.js delete mode 100644 node_modules/pino/test/fixtures/broken-pipe/basic.js delete mode 100644 node_modules/pino/test/fixtures/broken-pipe/destination.js delete mode 100644 node_modules/pino/test/fixtures/broken-pipe/extreme.js delete mode 100644 node_modules/pino/test/fixtures/destination-exit.js delete mode 100644 node_modules/pino/test/fixtures/extreme-child.js delete mode 100644 node_modules/pino/test/fixtures/extreme-exit.js delete mode 100644 node_modules/pino/test/fixtures/extreme-flush-exit.js delete mode 100644 node_modules/pino/test/fixtures/extreme.js delete mode 100644 node_modules/pino/test/fixtures/pretty/basic.js delete mode 100644 node_modules/pino/test/fixtures/pretty/child.js delete mode 100644 node_modules/pino/test/fixtures/pretty/custom-time-label.js delete mode 100644 node_modules/pino/test/fixtures/pretty/custom-time.js delete mode 100644 node_modules/pino/test/fixtures/pretty/dateformat.js delete mode 100644 node_modules/pino/test/fixtures/pretty/error-props.js delete mode 100644 node_modules/pino/test/fixtures/pretty/error.js delete mode 100644 node_modules/pino/test/fixtures/pretty/final-no-log-before.js delete mode 100644 node_modules/pino/test/fixtures/pretty/final-return.js delete mode 100644 node_modules/pino/test/fixtures/pretty/final.js delete mode 100644 node_modules/pino/test/fixtures/pretty/level-first.js delete mode 100644 node_modules/pino/test/fixtures/pretty/no-time.js delete mode 100644 node_modules/pino/test/fixtures/pretty/obj-msg-prop.js delete mode 100644 node_modules/pino/test/fixtures/pretty/pretty-factory.js delete mode 100644 node_modules/pino/test/fixtures/pretty/redact.js delete mode 100644 node_modules/pino/test/fixtures/pretty/serializers.js delete mode 100644 node_modules/pino/test/fixtures/pretty/skipped-output.js delete mode 100644 node_modules/pino/test/fixtures/stdout-hack-protection.js delete mode 100644 node_modules/pino/test/helper.js delete mode 100644 node_modules/pino/test/http.test.js delete mode 100644 node_modules/pino/test/is-level-enabled.test.js delete mode 100644 node_modules/pino/test/levels.test.js delete mode 100644 node_modules/pino/test/metadata.test.js delete mode 100644 node_modules/pino/test/mixin.test.js delete mode 100644 node_modules/pino/test/pretty.test.js delete mode 100644 node_modules/pino/test/redact.test.js delete mode 100644 node_modules/pino/test/serializers.test.js delete mode 100644 node_modules/pino/test/stdout-protection.test.js delete mode 100644 node_modules/pino/test/timestamp.test.js delete mode 100644 node_modules/quick-format-unescaped/.travis.yml delete mode 100644 node_modules/quick-format-unescaped/LICENSE delete mode 100644 node_modules/quick-format-unescaped/benchmark.js delete mode 100644 node_modules/quick-format-unescaped/index.js delete mode 100644 node_modules/quick-format-unescaped/package.json delete mode 100644 node_modules/quick-format-unescaped/readme.md delete mode 100644 node_modules/quick-format-unescaped/test/index.js delete mode 100644 node_modules/quick-lru/index.d.ts delete mode 100644 node_modules/quick-lru/index.js delete mode 100644 node_modules/quick-lru/package.json delete mode 100644 node_modules/quick-lru/readme.md delete mode 100644 node_modules/ramda/CHANGELOG.md delete mode 100644 node_modules/ramda/README.md delete mode 100644 node_modules/ramda/dist/ramda.js delete mode 100644 node_modules/ramda/dist/ramda.min.js delete mode 100644 node_modules/ramda/es/F.js delete mode 100644 node_modules/ramda/es/T.js delete mode 100644 node_modules/ramda/es/__.js delete mode 100644 node_modules/ramda/es/add.js delete mode 100644 node_modules/ramda/es/addIndex.js delete mode 100644 node_modules/ramda/es/adjust.js delete mode 100644 node_modules/ramda/es/all.js delete mode 100644 node_modules/ramda/es/allPass.js delete mode 100644 node_modules/ramda/es/always.js delete mode 100644 node_modules/ramda/es/and.js delete mode 100644 node_modules/ramda/es/andThen.js delete mode 100644 node_modules/ramda/es/any.js delete mode 100644 node_modules/ramda/es/anyPass.js delete mode 100644 node_modules/ramda/es/ap.js delete mode 100644 node_modules/ramda/es/aperture.js delete mode 100644 node_modules/ramda/es/append.js delete mode 100644 node_modules/ramda/es/apply.js delete mode 100644 node_modules/ramda/es/applySpec.js delete mode 100644 node_modules/ramda/es/applyTo.js delete mode 100644 node_modules/ramda/es/ascend.js delete mode 100644 node_modules/ramda/es/assoc.js delete mode 100644 node_modules/ramda/es/assocPath.js delete mode 100644 node_modules/ramda/es/binary.js delete mode 100644 node_modules/ramda/es/bind.js delete mode 100644 node_modules/ramda/es/both.js delete mode 100644 node_modules/ramda/es/call.js delete mode 100644 node_modules/ramda/es/chain.js delete mode 100644 node_modules/ramda/es/clamp.js delete mode 100644 node_modules/ramda/es/clone.js delete mode 100644 node_modules/ramda/es/comparator.js delete mode 100644 node_modules/ramda/es/complement.js delete mode 100644 node_modules/ramda/es/compose.js delete mode 100644 node_modules/ramda/es/composeK.js delete mode 100644 node_modules/ramda/es/composeP.js delete mode 100644 node_modules/ramda/es/composeWith.js delete mode 100644 node_modules/ramda/es/concat.js delete mode 100644 node_modules/ramda/es/cond.js delete mode 100644 node_modules/ramda/es/construct.js delete mode 100644 node_modules/ramda/es/constructN.js delete mode 100644 node_modules/ramda/es/contains.js delete mode 100644 node_modules/ramda/es/converge.js delete mode 100644 node_modules/ramda/es/countBy.js delete mode 100644 node_modules/ramda/es/curry.js delete mode 100644 node_modules/ramda/es/curryN.js delete mode 100644 node_modules/ramda/es/dec.js delete mode 100644 node_modules/ramda/es/defaultTo.js delete mode 100644 node_modules/ramda/es/descend.js delete mode 100644 node_modules/ramda/es/difference.js delete mode 100644 node_modules/ramda/es/differenceWith.js delete mode 100644 node_modules/ramda/es/dissoc.js delete mode 100644 node_modules/ramda/es/dissocPath.js delete mode 100644 node_modules/ramda/es/divide.js delete mode 100644 node_modules/ramda/es/drop.js delete mode 100644 node_modules/ramda/es/dropLast.js delete mode 100644 node_modules/ramda/es/dropLastWhile.js delete mode 100644 node_modules/ramda/es/dropRepeats.js delete mode 100644 node_modules/ramda/es/dropRepeatsWith.js delete mode 100644 node_modules/ramda/es/dropWhile.js delete mode 100644 node_modules/ramda/es/either.js delete mode 100644 node_modules/ramda/es/empty.js delete mode 100644 node_modules/ramda/es/endsWith.js delete mode 100644 node_modules/ramda/es/eqBy.js delete mode 100644 node_modules/ramda/es/eqProps.js delete mode 100644 node_modules/ramda/es/equals.js delete mode 100644 node_modules/ramda/es/evolve.js delete mode 100644 node_modules/ramda/es/filter.js delete mode 100644 node_modules/ramda/es/find.js delete mode 100644 node_modules/ramda/es/findIndex.js delete mode 100644 node_modules/ramda/es/findLast.js delete mode 100644 node_modules/ramda/es/findLastIndex.js delete mode 100644 node_modules/ramda/es/flatten.js delete mode 100644 node_modules/ramda/es/flip.js delete mode 100644 node_modules/ramda/es/forEach.js delete mode 100644 node_modules/ramda/es/forEachObjIndexed.js delete mode 100644 node_modules/ramda/es/fromPairs.js delete mode 100644 node_modules/ramda/es/groupBy.js delete mode 100644 node_modules/ramda/es/groupWith.js delete mode 100644 node_modules/ramda/es/gt.js delete mode 100644 node_modules/ramda/es/gte.js delete mode 100644 node_modules/ramda/es/has.js delete mode 100644 node_modules/ramda/es/hasIn.js delete mode 100644 node_modules/ramda/es/hasPath.js delete mode 100644 node_modules/ramda/es/head.js delete mode 100644 node_modules/ramda/es/identical.js delete mode 100644 node_modules/ramda/es/identity.js delete mode 100644 node_modules/ramda/es/ifElse.js delete mode 100644 node_modules/ramda/es/inc.js delete mode 100644 node_modules/ramda/es/includes.js delete mode 100644 node_modules/ramda/es/index.js delete mode 100644 node_modules/ramda/es/indexBy.js delete mode 100644 node_modules/ramda/es/indexOf.js delete mode 100644 node_modules/ramda/es/init.js delete mode 100644 node_modules/ramda/es/innerJoin.js delete mode 100644 node_modules/ramda/es/insert.js delete mode 100644 node_modules/ramda/es/insertAll.js delete mode 100644 node_modules/ramda/es/internal/_Set.js delete mode 100644 node_modules/ramda/es/internal/_aperture.js delete mode 100644 node_modules/ramda/es/internal/_arity.js delete mode 100644 node_modules/ramda/es/internal/_arrayFromIterator.js delete mode 100644 node_modules/ramda/es/internal/_assertPromise.js delete mode 100644 node_modules/ramda/es/internal/_checkForMethod.js delete mode 100644 node_modules/ramda/es/internal/_clone.js delete mode 100644 node_modules/ramda/es/internal/_cloneRegExp.js delete mode 100644 node_modules/ramda/es/internal/_complement.js delete mode 100644 node_modules/ramda/es/internal/_concat.js delete mode 100644 node_modules/ramda/es/internal/_createPartialApplicator.js delete mode 100644 node_modules/ramda/es/internal/_curry1.js delete mode 100644 node_modules/ramda/es/internal/_curry2.js delete mode 100644 node_modules/ramda/es/internal/_curry3.js delete mode 100644 node_modules/ramda/es/internal/_curryN.js delete mode 100644 node_modules/ramda/es/internal/_dispatchable.js delete mode 100644 node_modules/ramda/es/internal/_dropLast.js delete mode 100644 node_modules/ramda/es/internal/_dropLastWhile.js delete mode 100644 node_modules/ramda/es/internal/_equals.js delete mode 100644 node_modules/ramda/es/internal/_filter.js delete mode 100644 node_modules/ramda/es/internal/_flatCat.js delete mode 100644 node_modules/ramda/es/internal/_forceReduced.js delete mode 100644 node_modules/ramda/es/internal/_functionName.js delete mode 100644 node_modules/ramda/es/internal/_functionsWith.js delete mode 100644 node_modules/ramda/es/internal/_has.js delete mode 100644 node_modules/ramda/es/internal/_identity.js delete mode 100644 node_modules/ramda/es/internal/_includes.js delete mode 100644 node_modules/ramda/es/internal/_includesWith.js delete mode 100644 node_modules/ramda/es/internal/_indexOf.js delete mode 100644 node_modules/ramda/es/internal/_isArguments.js delete mode 100644 node_modules/ramda/es/internal/_isArray.js delete mode 100644 node_modules/ramda/es/internal/_isArrayLike.js delete mode 100644 node_modules/ramda/es/internal/_isFunction.js delete mode 100644 node_modules/ramda/es/internal/_isInteger.js delete mode 100644 node_modules/ramda/es/internal/_isNumber.js delete mode 100644 node_modules/ramda/es/internal/_isObject.js delete mode 100644 node_modules/ramda/es/internal/_isPlaceholder.js delete mode 100644 node_modules/ramda/es/internal/_isRegExp.js delete mode 100644 node_modules/ramda/es/internal/_isString.js delete mode 100644 node_modules/ramda/es/internal/_isTransformer.js delete mode 100644 node_modules/ramda/es/internal/_makeFlat.js delete mode 100644 node_modules/ramda/es/internal/_map.js delete mode 100644 node_modules/ramda/es/internal/_objectAssign.js delete mode 100644 node_modules/ramda/es/internal/_objectIs.js delete mode 100644 node_modules/ramda/es/internal/_of.js delete mode 100644 node_modules/ramda/es/internal/_pipe.js delete mode 100644 node_modules/ramda/es/internal/_pipeP.js delete mode 100644 node_modules/ramda/es/internal/_quote.js delete mode 100644 node_modules/ramda/es/internal/_reduce.js delete mode 100644 node_modules/ramda/es/internal/_reduced.js delete mode 100644 node_modules/ramda/es/internal/_stepCat.js delete mode 100644 node_modules/ramda/es/internal/_toISOString.js delete mode 100644 node_modules/ramda/es/internal/_toString.js delete mode 100644 node_modules/ramda/es/internal/_xall.js delete mode 100644 node_modules/ramda/es/internal/_xany.js delete mode 100644 node_modules/ramda/es/internal/_xaperture.js delete mode 100644 node_modules/ramda/es/internal/_xchain.js delete mode 100644 node_modules/ramda/es/internal/_xdrop.js delete mode 100644 node_modules/ramda/es/internal/_xdropLast.js delete mode 100644 node_modules/ramda/es/internal/_xdropLastWhile.js delete mode 100644 node_modules/ramda/es/internal/_xdropRepeatsWith.js delete mode 100644 node_modules/ramda/es/internal/_xdropWhile.js delete mode 100644 node_modules/ramda/es/internal/_xfBase.js delete mode 100644 node_modules/ramda/es/internal/_xfilter.js delete mode 100644 node_modules/ramda/es/internal/_xfind.js delete mode 100644 node_modules/ramda/es/internal/_xfindIndex.js delete mode 100644 node_modules/ramda/es/internal/_xfindLast.js delete mode 100644 node_modules/ramda/es/internal/_xfindLastIndex.js delete mode 100644 node_modules/ramda/es/internal/_xmap.js delete mode 100644 node_modules/ramda/es/internal/_xreduceBy.js delete mode 100644 node_modules/ramda/es/internal/_xtake.js delete mode 100644 node_modules/ramda/es/internal/_xtakeWhile.js delete mode 100644 node_modules/ramda/es/internal/_xtap.js delete mode 100644 node_modules/ramda/es/internal/_xwrap.js delete mode 100644 node_modules/ramda/es/intersection.js delete mode 100644 node_modules/ramda/es/intersperse.js delete mode 100644 node_modules/ramda/es/into.js delete mode 100644 node_modules/ramda/es/invert.js delete mode 100644 node_modules/ramda/es/invertObj.js delete mode 100644 node_modules/ramda/es/invoker.js delete mode 100644 node_modules/ramda/es/is.js delete mode 100644 node_modules/ramda/es/isEmpty.js delete mode 100644 node_modules/ramda/es/isNil.js delete mode 100644 node_modules/ramda/es/join.js delete mode 100644 node_modules/ramda/es/juxt.js delete mode 100644 node_modules/ramda/es/keys.js delete mode 100644 node_modules/ramda/es/keysIn.js delete mode 100644 node_modules/ramda/es/last.js delete mode 100644 node_modules/ramda/es/lastIndexOf.js delete mode 100644 node_modules/ramda/es/length.js delete mode 100644 node_modules/ramda/es/lens.js delete mode 100644 node_modules/ramda/es/lensIndex.js delete mode 100644 node_modules/ramda/es/lensPath.js delete mode 100644 node_modules/ramda/es/lensProp.js delete mode 100644 node_modules/ramda/es/lift.js delete mode 100644 node_modules/ramda/es/liftN.js delete mode 100644 node_modules/ramda/es/lt.js delete mode 100644 node_modules/ramda/es/lte.js delete mode 100644 node_modules/ramda/es/map.js delete mode 100644 node_modules/ramda/es/mapAccum.js delete mode 100644 node_modules/ramda/es/mapAccumRight.js delete mode 100644 node_modules/ramda/es/mapObjIndexed.js delete mode 100644 node_modules/ramda/es/match.js delete mode 100644 node_modules/ramda/es/mathMod.js delete mode 100644 node_modules/ramda/es/max.js delete mode 100644 node_modules/ramda/es/maxBy.js delete mode 100644 node_modules/ramda/es/mean.js delete mode 100644 node_modules/ramda/es/median.js delete mode 100644 node_modules/ramda/es/memoizeWith.js delete mode 100644 node_modules/ramda/es/merge.js delete mode 100644 node_modules/ramda/es/mergeAll.js delete mode 100644 node_modules/ramda/es/mergeDeepLeft.js delete mode 100644 node_modules/ramda/es/mergeDeepRight.js delete mode 100644 node_modules/ramda/es/mergeDeepWith.js delete mode 100644 node_modules/ramda/es/mergeDeepWithKey.js delete mode 100644 node_modules/ramda/es/mergeLeft.js delete mode 100644 node_modules/ramda/es/mergeRight.js delete mode 100644 node_modules/ramda/es/mergeWith.js delete mode 100644 node_modules/ramda/es/mergeWithKey.js delete mode 100644 node_modules/ramda/es/min.js delete mode 100644 node_modules/ramda/es/minBy.js delete mode 100644 node_modules/ramda/es/modulo.js delete mode 100644 node_modules/ramda/es/move.js delete mode 100644 node_modules/ramda/es/multiply.js delete mode 100644 node_modules/ramda/es/nAry.js delete mode 100644 node_modules/ramda/es/negate.js delete mode 100644 node_modules/ramda/es/none.js delete mode 100644 node_modules/ramda/es/not.js delete mode 100644 node_modules/ramda/es/nth.js delete mode 100644 node_modules/ramda/es/nthArg.js delete mode 100644 node_modules/ramda/es/o.js delete mode 100644 node_modules/ramda/es/objOf.js delete mode 100644 node_modules/ramda/es/of.js delete mode 100644 node_modules/ramda/es/omit.js delete mode 100644 node_modules/ramda/es/once.js delete mode 100644 node_modules/ramda/es/or.js delete mode 100644 node_modules/ramda/es/otherwise.js delete mode 100644 node_modules/ramda/es/over.js delete mode 100644 node_modules/ramda/es/pair.js delete mode 100644 node_modules/ramda/es/partial.js delete mode 100644 node_modules/ramda/es/partialRight.js delete mode 100644 node_modules/ramda/es/partition.js delete mode 100644 node_modules/ramda/es/path.js delete mode 100644 node_modules/ramda/es/pathEq.js delete mode 100644 node_modules/ramda/es/pathOr.js delete mode 100644 node_modules/ramda/es/pathSatisfies.js delete mode 100644 node_modules/ramda/es/paths.js delete mode 100644 node_modules/ramda/es/pick.js delete mode 100644 node_modules/ramda/es/pickAll.js delete mode 100644 node_modules/ramda/es/pickBy.js delete mode 100644 node_modules/ramda/es/pipe.js delete mode 100644 node_modules/ramda/es/pipeK.js delete mode 100644 node_modules/ramda/es/pipeP.js delete mode 100644 node_modules/ramda/es/pipeWith.js delete mode 100644 node_modules/ramda/es/pluck.js delete mode 100644 node_modules/ramda/es/prepend.js delete mode 100644 node_modules/ramda/es/product.js delete mode 100644 node_modules/ramda/es/project.js delete mode 100644 node_modules/ramda/es/prop.js delete mode 100644 node_modules/ramda/es/propEq.js delete mode 100644 node_modules/ramda/es/propIs.js delete mode 100644 node_modules/ramda/es/propOr.js delete mode 100644 node_modules/ramda/es/propSatisfies.js delete mode 100644 node_modules/ramda/es/props.js delete mode 100644 node_modules/ramda/es/range.js delete mode 100644 node_modules/ramda/es/reduce.js delete mode 100644 node_modules/ramda/es/reduceBy.js delete mode 100644 node_modules/ramda/es/reduceRight.js delete mode 100644 node_modules/ramda/es/reduceWhile.js delete mode 100644 node_modules/ramda/es/reduced.js delete mode 100644 node_modules/ramda/es/reject.js delete mode 100644 node_modules/ramda/es/remove.js delete mode 100644 node_modules/ramda/es/repeat.js delete mode 100644 node_modules/ramda/es/replace.js delete mode 100644 node_modules/ramda/es/reverse.js delete mode 100644 node_modules/ramda/es/scan.js delete mode 100644 node_modules/ramda/es/sequence.js delete mode 100644 node_modules/ramda/es/set.js delete mode 100644 node_modules/ramda/es/slice.js delete mode 100644 node_modules/ramda/es/sort.js delete mode 100644 node_modules/ramda/es/sortBy.js delete mode 100644 node_modules/ramda/es/sortWith.js delete mode 100644 node_modules/ramda/es/split.js delete mode 100644 node_modules/ramda/es/splitAt.js delete mode 100644 node_modules/ramda/es/splitEvery.js delete mode 100644 node_modules/ramda/es/splitWhen.js delete mode 100644 node_modules/ramda/es/startsWith.js delete mode 100644 node_modules/ramda/es/subtract.js delete mode 100644 node_modules/ramda/es/sum.js delete mode 100644 node_modules/ramda/es/symmetricDifference.js delete mode 100644 node_modules/ramda/es/symmetricDifferenceWith.js delete mode 100644 node_modules/ramda/es/tail.js delete mode 100644 node_modules/ramda/es/take.js delete mode 100644 node_modules/ramda/es/takeLast.js delete mode 100644 node_modules/ramda/es/takeLastWhile.js delete mode 100644 node_modules/ramda/es/takeWhile.js delete mode 100644 node_modules/ramda/es/tap.js delete mode 100644 node_modules/ramda/es/test.js delete mode 100644 node_modules/ramda/es/thunkify.js delete mode 100644 node_modules/ramda/es/times.js delete mode 100644 node_modules/ramda/es/toLower.js delete mode 100644 node_modules/ramda/es/toPairs.js delete mode 100644 node_modules/ramda/es/toPairsIn.js delete mode 100644 node_modules/ramda/es/toString.js delete mode 100644 node_modules/ramda/es/toUpper.js delete mode 100644 node_modules/ramda/es/transduce.js delete mode 100644 node_modules/ramda/es/transpose.js delete mode 100644 node_modules/ramda/es/traverse.js delete mode 100644 node_modules/ramda/es/trim.js delete mode 100644 node_modules/ramda/es/tryCatch.js delete mode 100644 node_modules/ramda/es/type.js delete mode 100644 node_modules/ramda/es/unapply.js delete mode 100644 node_modules/ramda/es/unary.js delete mode 100644 node_modules/ramda/es/uncurryN.js delete mode 100644 node_modules/ramda/es/unfold.js delete mode 100644 node_modules/ramda/es/union.js delete mode 100644 node_modules/ramda/es/unionWith.js delete mode 100644 node_modules/ramda/es/uniq.js delete mode 100644 node_modules/ramda/es/uniqBy.js delete mode 100644 node_modules/ramda/es/uniqWith.js delete mode 100644 node_modules/ramda/es/unless.js delete mode 100644 node_modules/ramda/es/unnest.js delete mode 100644 node_modules/ramda/es/until.js delete mode 100644 node_modules/ramda/es/update.js delete mode 100644 node_modules/ramda/es/useWith.js delete mode 100644 node_modules/ramda/es/values.js delete mode 100644 node_modules/ramda/es/valuesIn.js delete mode 100644 node_modules/ramda/es/view.js delete mode 100644 node_modules/ramda/es/when.js delete mode 100644 node_modules/ramda/es/where.js delete mode 100644 node_modules/ramda/es/whereEq.js delete mode 100644 node_modules/ramda/es/without.js delete mode 100644 node_modules/ramda/es/xor.js delete mode 100644 node_modules/ramda/es/xprod.js delete mode 100644 node_modules/ramda/es/zip.js delete mode 100644 node_modules/ramda/es/zipObj.js delete mode 100644 node_modules/ramda/es/zipWith.js delete mode 100644 node_modules/ramda/package.json delete mode 100644 node_modules/ramda/src/F.js delete mode 100644 node_modules/ramda/src/T.js delete mode 100644 node_modules/ramda/src/__.js delete mode 100644 node_modules/ramda/src/add.js delete mode 100644 node_modules/ramda/src/addIndex.js delete mode 100644 node_modules/ramda/src/adjust.js delete mode 100644 node_modules/ramda/src/all.js delete mode 100644 node_modules/ramda/src/allPass.js delete mode 100644 node_modules/ramda/src/always.js delete mode 100644 node_modules/ramda/src/and.js delete mode 100644 node_modules/ramda/src/andThen.js delete mode 100644 node_modules/ramda/src/any.js delete mode 100644 node_modules/ramda/src/anyPass.js delete mode 100644 node_modules/ramda/src/ap.js delete mode 100644 node_modules/ramda/src/aperture.js delete mode 100644 node_modules/ramda/src/append.js delete mode 100644 node_modules/ramda/src/apply.js delete mode 100644 node_modules/ramda/src/applySpec.js delete mode 100644 node_modules/ramda/src/applyTo.js delete mode 100644 node_modules/ramda/src/ascend.js delete mode 100644 node_modules/ramda/src/assoc.js delete mode 100644 node_modules/ramda/src/assocPath.js delete mode 100644 node_modules/ramda/src/binary.js delete mode 100644 node_modules/ramda/src/bind.js delete mode 100644 node_modules/ramda/src/both.js delete mode 100644 node_modules/ramda/src/call.js delete mode 100644 node_modules/ramda/src/chain.js delete mode 100644 node_modules/ramda/src/clamp.js delete mode 100644 node_modules/ramda/src/clone.js delete mode 100644 node_modules/ramda/src/comparator.js delete mode 100644 node_modules/ramda/src/complement.js delete mode 100644 node_modules/ramda/src/compose.js delete mode 100644 node_modules/ramda/src/composeK.js delete mode 100644 node_modules/ramda/src/composeP.js delete mode 100644 node_modules/ramda/src/composeWith.js delete mode 100644 node_modules/ramda/src/concat.js delete mode 100644 node_modules/ramda/src/cond.js delete mode 100644 node_modules/ramda/src/construct.js delete mode 100644 node_modules/ramda/src/constructN.js delete mode 100644 node_modules/ramda/src/contains.js delete mode 100644 node_modules/ramda/src/converge.js delete mode 100644 node_modules/ramda/src/countBy.js delete mode 100644 node_modules/ramda/src/curry.js delete mode 100644 node_modules/ramda/src/curryN.js delete mode 100644 node_modules/ramda/src/dec.js delete mode 100644 node_modules/ramda/src/defaultTo.js delete mode 100644 node_modules/ramda/src/descend.js delete mode 100644 node_modules/ramda/src/difference.js delete mode 100644 node_modules/ramda/src/differenceWith.js delete mode 100644 node_modules/ramda/src/dissoc.js delete mode 100644 node_modules/ramda/src/dissocPath.js delete mode 100644 node_modules/ramda/src/divide.js delete mode 100644 node_modules/ramda/src/drop.js delete mode 100644 node_modules/ramda/src/dropLast.js delete mode 100644 node_modules/ramda/src/dropLastWhile.js delete mode 100644 node_modules/ramda/src/dropRepeats.js delete mode 100644 node_modules/ramda/src/dropRepeatsWith.js delete mode 100644 node_modules/ramda/src/dropWhile.js delete mode 100644 node_modules/ramda/src/either.js delete mode 100644 node_modules/ramda/src/empty.js delete mode 100644 node_modules/ramda/src/endsWith.js delete mode 100644 node_modules/ramda/src/eqBy.js delete mode 100644 node_modules/ramda/src/eqProps.js delete mode 100644 node_modules/ramda/src/equals.js delete mode 100644 node_modules/ramda/src/evolve.js delete mode 100644 node_modules/ramda/src/filter.js delete mode 100644 node_modules/ramda/src/find.js delete mode 100644 node_modules/ramda/src/findIndex.js delete mode 100644 node_modules/ramda/src/findLast.js delete mode 100644 node_modules/ramda/src/findLastIndex.js delete mode 100644 node_modules/ramda/src/flatten.js delete mode 100644 node_modules/ramda/src/flip.js delete mode 100644 node_modules/ramda/src/forEach.js delete mode 100644 node_modules/ramda/src/forEachObjIndexed.js delete mode 100644 node_modules/ramda/src/fromPairs.js delete mode 100644 node_modules/ramda/src/groupBy.js delete mode 100644 node_modules/ramda/src/groupWith.js delete mode 100644 node_modules/ramda/src/gt.js delete mode 100644 node_modules/ramda/src/gte.js delete mode 100644 node_modules/ramda/src/has.js delete mode 100644 node_modules/ramda/src/hasIn.js delete mode 100644 node_modules/ramda/src/hasPath.js delete mode 100644 node_modules/ramda/src/head.js delete mode 100644 node_modules/ramda/src/identical.js delete mode 100644 node_modules/ramda/src/identity.js delete mode 100644 node_modules/ramda/src/ifElse.js delete mode 100644 node_modules/ramda/src/inc.js delete mode 100644 node_modules/ramda/src/includes.js delete mode 100644 node_modules/ramda/src/index.js delete mode 100644 node_modules/ramda/src/index.mjs delete mode 100644 node_modules/ramda/src/indexBy.js delete mode 100644 node_modules/ramda/src/indexOf.js delete mode 100644 node_modules/ramda/src/init.js delete mode 100644 node_modules/ramda/src/innerJoin.js delete mode 100644 node_modules/ramda/src/insert.js delete mode 100644 node_modules/ramda/src/insertAll.js delete mode 100644 node_modules/ramda/src/internal/_Set.js delete mode 100644 node_modules/ramda/src/internal/_aperture.js delete mode 100644 node_modules/ramda/src/internal/_arity.js delete mode 100644 node_modules/ramda/src/internal/_arrayFromIterator.js delete mode 100644 node_modules/ramda/src/internal/_assertPromise.js delete mode 100644 node_modules/ramda/src/internal/_checkForMethod.js delete mode 100644 node_modules/ramda/src/internal/_clone.js delete mode 100644 node_modules/ramda/src/internal/_cloneRegExp.js delete mode 100644 node_modules/ramda/src/internal/_complement.js delete mode 100644 node_modules/ramda/src/internal/_concat.js delete mode 100644 node_modules/ramda/src/internal/_createPartialApplicator.js delete mode 100644 node_modules/ramda/src/internal/_curry1.js delete mode 100644 node_modules/ramda/src/internal/_curry2.js delete mode 100644 node_modules/ramda/src/internal/_curry3.js delete mode 100644 node_modules/ramda/src/internal/_curryN.js delete mode 100644 node_modules/ramda/src/internal/_dispatchable.js delete mode 100644 node_modules/ramda/src/internal/_dropLast.js delete mode 100644 node_modules/ramda/src/internal/_dropLastWhile.js delete mode 100644 node_modules/ramda/src/internal/_equals.js delete mode 100644 node_modules/ramda/src/internal/_filter.js delete mode 100644 node_modules/ramda/src/internal/_flatCat.js delete mode 100644 node_modules/ramda/src/internal/_forceReduced.js delete mode 100644 node_modules/ramda/src/internal/_functionName.js delete mode 100644 node_modules/ramda/src/internal/_functionsWith.js delete mode 100644 node_modules/ramda/src/internal/_has.js delete mode 100644 node_modules/ramda/src/internal/_identity.js delete mode 100644 node_modules/ramda/src/internal/_includes.js delete mode 100644 node_modules/ramda/src/internal/_includesWith.js delete mode 100644 node_modules/ramda/src/internal/_indexOf.js delete mode 100644 node_modules/ramda/src/internal/_isArguments.js delete mode 100644 node_modules/ramda/src/internal/_isArray.js delete mode 100644 node_modules/ramda/src/internal/_isArrayLike.js delete mode 100644 node_modules/ramda/src/internal/_isFunction.js delete mode 100644 node_modules/ramda/src/internal/_isInteger.js delete mode 100644 node_modules/ramda/src/internal/_isNumber.js delete mode 100644 node_modules/ramda/src/internal/_isObject.js delete mode 100644 node_modules/ramda/src/internal/_isPlaceholder.js delete mode 100644 node_modules/ramda/src/internal/_isRegExp.js delete mode 100644 node_modules/ramda/src/internal/_isString.js delete mode 100644 node_modules/ramda/src/internal/_isTransformer.js delete mode 100644 node_modules/ramda/src/internal/_makeFlat.js delete mode 100644 node_modules/ramda/src/internal/_map.js delete mode 100644 node_modules/ramda/src/internal/_objectAssign.js delete mode 100644 node_modules/ramda/src/internal/_objectIs.js delete mode 100644 node_modules/ramda/src/internal/_of.js delete mode 100644 node_modules/ramda/src/internal/_pipe.js delete mode 100644 node_modules/ramda/src/internal/_pipeP.js delete mode 100644 node_modules/ramda/src/internal/_quote.js delete mode 100644 node_modules/ramda/src/internal/_reduce.js delete mode 100644 node_modules/ramda/src/internal/_reduced.js delete mode 100644 node_modules/ramda/src/internal/_stepCat.js delete mode 100644 node_modules/ramda/src/internal/_toISOString.js delete mode 100644 node_modules/ramda/src/internal/_toString.js delete mode 100644 node_modules/ramda/src/internal/_xall.js delete mode 100644 node_modules/ramda/src/internal/_xany.js delete mode 100644 node_modules/ramda/src/internal/_xaperture.js delete mode 100644 node_modules/ramda/src/internal/_xchain.js delete mode 100644 node_modules/ramda/src/internal/_xdrop.js delete mode 100644 node_modules/ramda/src/internal/_xdropLast.js delete mode 100644 node_modules/ramda/src/internal/_xdropLastWhile.js delete mode 100644 node_modules/ramda/src/internal/_xdropRepeatsWith.js delete mode 100644 node_modules/ramda/src/internal/_xdropWhile.js delete mode 100644 node_modules/ramda/src/internal/_xfBase.js delete mode 100644 node_modules/ramda/src/internal/_xfilter.js delete mode 100644 node_modules/ramda/src/internal/_xfind.js delete mode 100644 node_modules/ramda/src/internal/_xfindIndex.js delete mode 100644 node_modules/ramda/src/internal/_xfindLast.js delete mode 100644 node_modules/ramda/src/internal/_xfindLastIndex.js delete mode 100644 node_modules/ramda/src/internal/_xmap.js delete mode 100644 node_modules/ramda/src/internal/_xreduceBy.js delete mode 100644 node_modules/ramda/src/internal/_xtake.js delete mode 100644 node_modules/ramda/src/internal/_xtakeWhile.js delete mode 100644 node_modules/ramda/src/internal/_xtap.js delete mode 100644 node_modules/ramda/src/internal/_xwrap.js delete mode 100644 node_modules/ramda/src/intersection.js delete mode 100644 node_modules/ramda/src/intersperse.js delete mode 100644 node_modules/ramda/src/into.js delete mode 100644 node_modules/ramda/src/invert.js delete mode 100644 node_modules/ramda/src/invertObj.js delete mode 100644 node_modules/ramda/src/invoker.js delete mode 100644 node_modules/ramda/src/is.js delete mode 100644 node_modules/ramda/src/isEmpty.js delete mode 100644 node_modules/ramda/src/isNil.js delete mode 100644 node_modules/ramda/src/join.js delete mode 100644 node_modules/ramda/src/juxt.js delete mode 100644 node_modules/ramda/src/keys.js delete mode 100644 node_modules/ramda/src/keysIn.js delete mode 100644 node_modules/ramda/src/last.js delete mode 100644 node_modules/ramda/src/lastIndexOf.js delete mode 100644 node_modules/ramda/src/length.js delete mode 100644 node_modules/ramda/src/lens.js delete mode 100644 node_modules/ramda/src/lensIndex.js delete mode 100644 node_modules/ramda/src/lensPath.js delete mode 100644 node_modules/ramda/src/lensProp.js delete mode 100644 node_modules/ramda/src/lift.js delete mode 100644 node_modules/ramda/src/liftN.js delete mode 100644 node_modules/ramda/src/lt.js delete mode 100644 node_modules/ramda/src/lte.js delete mode 100644 node_modules/ramda/src/map.js delete mode 100644 node_modules/ramda/src/mapAccum.js delete mode 100644 node_modules/ramda/src/mapAccumRight.js delete mode 100644 node_modules/ramda/src/mapObjIndexed.js delete mode 100644 node_modules/ramda/src/match.js delete mode 100644 node_modules/ramda/src/mathMod.js delete mode 100644 node_modules/ramda/src/max.js delete mode 100644 node_modules/ramda/src/maxBy.js delete mode 100644 node_modules/ramda/src/mean.js delete mode 100644 node_modules/ramda/src/median.js delete mode 100644 node_modules/ramda/src/memoizeWith.js delete mode 100644 node_modules/ramda/src/merge.js delete mode 100644 node_modules/ramda/src/mergeAll.js delete mode 100644 node_modules/ramda/src/mergeDeepLeft.js delete mode 100644 node_modules/ramda/src/mergeDeepRight.js delete mode 100644 node_modules/ramda/src/mergeDeepWith.js delete mode 100644 node_modules/ramda/src/mergeDeepWithKey.js delete mode 100644 node_modules/ramda/src/mergeLeft.js delete mode 100644 node_modules/ramda/src/mergeRight.js delete mode 100644 node_modules/ramda/src/mergeWith.js delete mode 100644 node_modules/ramda/src/mergeWithKey.js delete mode 100644 node_modules/ramda/src/min.js delete mode 100644 node_modules/ramda/src/minBy.js delete mode 100644 node_modules/ramda/src/modulo.js delete mode 100644 node_modules/ramda/src/move.js delete mode 100644 node_modules/ramda/src/multiply.js delete mode 100644 node_modules/ramda/src/nAry.js delete mode 100644 node_modules/ramda/src/negate.js delete mode 100644 node_modules/ramda/src/none.js delete mode 100644 node_modules/ramda/src/not.js delete mode 100644 node_modules/ramda/src/nth.js delete mode 100644 node_modules/ramda/src/nthArg.js delete mode 100644 node_modules/ramda/src/o.js delete mode 100644 node_modules/ramda/src/objOf.js delete mode 100644 node_modules/ramda/src/of.js delete mode 100644 node_modules/ramda/src/omit.js delete mode 100644 node_modules/ramda/src/once.js delete mode 100644 node_modules/ramda/src/or.js delete mode 100644 node_modules/ramda/src/otherwise.js delete mode 100644 node_modules/ramda/src/over.js delete mode 100644 node_modules/ramda/src/pair.js delete mode 100644 node_modules/ramda/src/partial.js delete mode 100644 node_modules/ramda/src/partialRight.js delete mode 100644 node_modules/ramda/src/partition.js delete mode 100644 node_modules/ramda/src/path.js delete mode 100644 node_modules/ramda/src/pathEq.js delete mode 100644 node_modules/ramda/src/pathOr.js delete mode 100644 node_modules/ramda/src/pathSatisfies.js delete mode 100644 node_modules/ramda/src/paths.js delete mode 100644 node_modules/ramda/src/pick.js delete mode 100644 node_modules/ramda/src/pickAll.js delete mode 100644 node_modules/ramda/src/pickBy.js delete mode 100644 node_modules/ramda/src/pipe.js delete mode 100644 node_modules/ramda/src/pipeK.js delete mode 100644 node_modules/ramda/src/pipeP.js delete mode 100644 node_modules/ramda/src/pipeWith.js delete mode 100644 node_modules/ramda/src/pluck.js delete mode 100644 node_modules/ramda/src/prepend.js delete mode 100644 node_modules/ramda/src/product.js delete mode 100644 node_modules/ramda/src/project.js delete mode 100644 node_modules/ramda/src/prop.js delete mode 100644 node_modules/ramda/src/propEq.js delete mode 100644 node_modules/ramda/src/propIs.js delete mode 100644 node_modules/ramda/src/propOr.js delete mode 100644 node_modules/ramda/src/propSatisfies.js delete mode 100644 node_modules/ramda/src/props.js delete mode 100644 node_modules/ramda/src/range.js delete mode 100644 node_modules/ramda/src/reduce.js delete mode 100644 node_modules/ramda/src/reduceBy.js delete mode 100644 node_modules/ramda/src/reduceRight.js delete mode 100644 node_modules/ramda/src/reduceWhile.js delete mode 100644 node_modules/ramda/src/reduced.js delete mode 100644 node_modules/ramda/src/reject.js delete mode 100644 node_modules/ramda/src/remove.js delete mode 100644 node_modules/ramda/src/repeat.js delete mode 100644 node_modules/ramda/src/replace.js delete mode 100644 node_modules/ramda/src/reverse.js delete mode 100644 node_modules/ramda/src/scan.js delete mode 100644 node_modules/ramda/src/sequence.js delete mode 100644 node_modules/ramda/src/set.js delete mode 100644 node_modules/ramda/src/slice.js delete mode 100644 node_modules/ramda/src/sort.js delete mode 100644 node_modules/ramda/src/sortBy.js delete mode 100644 node_modules/ramda/src/sortWith.js delete mode 100644 node_modules/ramda/src/split.js delete mode 100644 node_modules/ramda/src/splitAt.js delete mode 100644 node_modules/ramda/src/splitEvery.js delete mode 100644 node_modules/ramda/src/splitWhen.js delete mode 100644 node_modules/ramda/src/startsWith.js delete mode 100644 node_modules/ramda/src/subtract.js delete mode 100644 node_modules/ramda/src/sum.js delete mode 100644 node_modules/ramda/src/symmetricDifference.js delete mode 100644 node_modules/ramda/src/symmetricDifferenceWith.js delete mode 100644 node_modules/ramda/src/tail.js delete mode 100644 node_modules/ramda/src/take.js delete mode 100644 node_modules/ramda/src/takeLast.js delete mode 100644 node_modules/ramda/src/takeLastWhile.js delete mode 100644 node_modules/ramda/src/takeWhile.js delete mode 100644 node_modules/ramda/src/tap.js delete mode 100644 node_modules/ramda/src/test.js delete mode 100644 node_modules/ramda/src/thunkify.js delete mode 100644 node_modules/ramda/src/times.js delete mode 100644 node_modules/ramda/src/toLower.js delete mode 100644 node_modules/ramda/src/toPairs.js delete mode 100644 node_modules/ramda/src/toPairsIn.js delete mode 100644 node_modules/ramda/src/toString.js delete mode 100644 node_modules/ramda/src/toUpper.js delete mode 100644 node_modules/ramda/src/transduce.js delete mode 100644 node_modules/ramda/src/transpose.js delete mode 100644 node_modules/ramda/src/traverse.js delete mode 100644 node_modules/ramda/src/trim.js delete mode 100644 node_modules/ramda/src/tryCatch.js delete mode 100644 node_modules/ramda/src/type.js delete mode 100644 node_modules/ramda/src/unapply.js delete mode 100644 node_modules/ramda/src/unary.js delete mode 100644 node_modules/ramda/src/uncurryN.js delete mode 100644 node_modules/ramda/src/unfold.js delete mode 100644 node_modules/ramda/src/union.js delete mode 100644 node_modules/ramda/src/unionWith.js delete mode 100644 node_modules/ramda/src/uniq.js delete mode 100644 node_modules/ramda/src/uniqBy.js delete mode 100644 node_modules/ramda/src/uniqWith.js delete mode 100644 node_modules/ramda/src/unless.js delete mode 100644 node_modules/ramda/src/unnest.js delete mode 100644 node_modules/ramda/src/until.js delete mode 100644 node_modules/ramda/src/update.js delete mode 100644 node_modules/ramda/src/useWith.js delete mode 100644 node_modules/ramda/src/values.js delete mode 100644 node_modules/ramda/src/valuesIn.js delete mode 100644 node_modules/ramda/src/view.js delete mode 100644 node_modules/ramda/src/when.js delete mode 100644 node_modules/ramda/src/where.js delete mode 100644 node_modules/ramda/src/whereEq.js delete mode 100644 node_modules/ramda/src/without.js delete mode 100644 node_modules/ramda/src/xor.js delete mode 100644 node_modules/ramda/src/xprod.js delete mode 100644 node_modules/ramda/src/zip.js delete mode 100644 node_modules/ramda/src/zipObj.js delete mode 100644 node_modules/ramda/src/zipWith.js delete mode 100644 node_modules/sonic-boom/.travis.yml delete mode 100644 node_modules/sonic-boom/LICENSE delete mode 100644 node_modules/sonic-boom/README.md delete mode 100644 node_modules/sonic-boom/bench.js delete mode 100644 node_modules/sonic-boom/check.js delete mode 100644 node_modules/sonic-boom/example.js delete mode 100644 node_modules/sonic-boom/fixtures/firehose.js delete mode 100644 node_modules/sonic-boom/index.js delete mode 100644 node_modules/sonic-boom/package.json delete mode 100644 node_modules/sonic-boom/test.js create mode 100644 node_modules/tunnel/.travis.yml create mode 100644 node_modules/tunnel/CHANGELOG.md rename node_modules/{ramda/LICENSE.txt => tunnel/LICENSE} (94%) create mode 100644 node_modules/tunnel/README.md create mode 100644 node_modules/tunnel/index.js create mode 100644 node_modules/tunnel/lib/tunnel.js create mode 100644 node_modules/tunnel/package.json create mode 100644 node_modules/uuid/CHANGELOG.md create mode 100644 node_modules/uuid/CONTRIBUTING.md rename node_modules/{quick-lru/license => uuid/LICENSE.md} (92%) create mode 100644 node_modules/uuid/README.md create mode 100755 node_modules/uuid/dist/bin/uuid create mode 100644 node_modules/uuid/dist/esm-browser/index.js create mode 100644 node_modules/uuid/dist/esm-browser/md5.js create mode 100644 node_modules/uuid/dist/esm-browser/nil.js create mode 100644 node_modules/uuid/dist/esm-browser/parse.js create mode 100644 node_modules/uuid/dist/esm-browser/regex.js create mode 100644 node_modules/uuid/dist/esm-browser/rng.js create mode 100644 node_modules/uuid/dist/esm-browser/sha1.js create mode 100644 node_modules/uuid/dist/esm-browser/stringify.js create mode 100644 node_modules/uuid/dist/esm-browser/v1.js create mode 100644 node_modules/uuid/dist/esm-browser/v3.js create mode 100644 node_modules/uuid/dist/esm-browser/v35.js create mode 100644 node_modules/uuid/dist/esm-browser/v4.js create mode 100644 node_modules/uuid/dist/esm-browser/v5.js create mode 100644 node_modules/uuid/dist/esm-browser/validate.js create mode 100644 node_modules/uuid/dist/esm-browser/version.js create mode 100644 node_modules/uuid/dist/esm-node/index.js create mode 100644 node_modules/uuid/dist/esm-node/md5.js create mode 100644 node_modules/uuid/dist/esm-node/nil.js create mode 100644 node_modules/uuid/dist/esm-node/parse.js create mode 100644 node_modules/uuid/dist/esm-node/regex.js create mode 100644 node_modules/uuid/dist/esm-node/rng.js create mode 100644 node_modules/uuid/dist/esm-node/sha1.js create mode 100644 node_modules/uuid/dist/esm-node/stringify.js create mode 100644 node_modules/uuid/dist/esm-node/v1.js create mode 100644 node_modules/uuid/dist/esm-node/v3.js create mode 100644 node_modules/uuid/dist/esm-node/v35.js create mode 100644 node_modules/uuid/dist/esm-node/v4.js create mode 100644 node_modules/uuid/dist/esm-node/v5.js create mode 100644 node_modules/uuid/dist/esm-node/validate.js create mode 100644 node_modules/uuid/dist/esm-node/version.js create mode 100644 node_modules/uuid/dist/index.js create mode 100644 node_modules/uuid/dist/md5-browser.js create mode 100644 node_modules/uuid/dist/md5.js create mode 100644 node_modules/uuid/dist/nil.js create mode 100644 node_modules/uuid/dist/parse.js create mode 100644 node_modules/uuid/dist/regex.js create mode 100644 node_modules/uuid/dist/rng-browser.js create mode 100644 node_modules/uuid/dist/rng.js create mode 100644 node_modules/uuid/dist/sha1-browser.js create mode 100644 node_modules/uuid/dist/sha1.js create mode 100644 node_modules/uuid/dist/stringify.js create mode 100644 node_modules/uuid/dist/umd/uuid.min.js create mode 100644 node_modules/uuid/dist/umd/uuidNIL.min.js create mode 100644 node_modules/uuid/dist/umd/uuidParse.min.js create mode 100644 node_modules/uuid/dist/umd/uuidStringify.min.js create mode 100644 node_modules/uuid/dist/umd/uuidValidate.min.js create mode 100644 node_modules/uuid/dist/umd/uuidVersion.min.js create mode 100644 node_modules/uuid/dist/umd/uuidv1.min.js create mode 100644 node_modules/uuid/dist/umd/uuidv3.min.js create mode 100644 node_modules/uuid/dist/umd/uuidv4.min.js create mode 100644 node_modules/uuid/dist/umd/uuidv5.min.js create mode 100644 node_modules/uuid/dist/uuid-bin.js create mode 100644 node_modules/uuid/dist/v1.js create mode 100644 node_modules/uuid/dist/v3.js create mode 100644 node_modules/uuid/dist/v35.js create mode 100644 node_modules/uuid/dist/v4.js create mode 100644 node_modules/uuid/dist/v5.js create mode 100644 node_modules/uuid/dist/validate.js create mode 100644 node_modules/uuid/dist/version.js create mode 100644 node_modules/uuid/package.json create mode 100644 node_modules/uuid/wrapper.mjs diff --git a/node_modules/.bin/pino b/node_modules/.bin/pino deleted file mode 120000 index 9855bfc..0000000 --- a/node_modules/.bin/pino +++ /dev/null @@ -1 +0,0 @@ -../pino/bin.js \ No newline at end of file diff --git a/node_modules/.bin/uuid b/node_modules/.bin/uuid new file mode 120000 index 0000000..588f70e --- /dev/null +++ b/node_modules/.bin/uuid @@ -0,0 +1 @@ +../uuid/dist/bin/uuid \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..54c6b2b --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,61 @@ +{ + "name": "action-debian-package", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/@actions/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/exec": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", + "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", + "dependencies": { + "@actions/io": "^1.0.1" + } + }, + "node_modules/@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "dependencies": { + "tunnel": "^0.0.6" + } + }, + "node_modules/@actions/io": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.2.tgz", + "integrity": "sha512-d+RwPlMp+2qmBfeLYPLXuSRykDIFEwdTA0MMxzS9kh4kvP1ftrc/9fzy6pX6qAjthdXruHQ6/6kjT/DNo5ALuw==" + }, + "node_modules/firstline": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/firstline/-/firstline-2.0.2.tgz", + "integrity": "sha512-8KcmfI0jgSECnzdhucm0i7vrwef3BWwgjimW2YkRC5eSFwjb5DibVoA0YvgkYwwxuJi9c+7M7X3b3lX8o9B6wg==", + "engines": { + "node": ">=6.4.0" + } + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + } + } +} diff --git a/node_modules/@actions/core/README.md b/node_modules/@actions/core/README.md index 95428cf..3c20c8e 100644 --- a/node_modules/@actions/core/README.md +++ b/node_modules/@actions/core/README.md @@ -16,11 +16,14 @@ import * as core from '@actions/core'; #### Inputs/Outputs -Action inputs can be read with `getInput`. Outputs can be set with `setOutput` which makes them available to be mapped into inputs of other actions to ensure they are decoupled. +Action inputs can be read with `getInput` which returns a `string` or `getBooleanInput` which parses a boolean based on the [yaml 1.2 specification](https://yaml.org/spec/1.2/spec.html#id2804923). If `required` set to be false, the input should have a default value in `action.yml`. + +Outputs can be set with `setOutput` which makes them available to be mapped into inputs of other actions to ensure they are decoupled. ```js const myInput = core.getInput('inputName', { required: true }); - +const myBooleanInput = core.getBooleanInput('booleanInputName', { required: true }); +const myMultilineInput = core.getMultilineInput('multilineInputName', { required: true }); core.setOutput('outputKey', 'outputVal'); ``` @@ -62,11 +65,10 @@ catch (err) { // setFailed logs the message and sets a failing exit code core.setFailed(`Action failed with error ${err}`); } +``` Note that `setNeutral` is not yet implemented in actions V2 but equivalent functionality is being planned. -``` - #### Logging Finally, this library provides some utilities for logging. Note that debug logging is hidden from the logs by default. This behavior can be toggled by enabling the [Step Debug Logs](../../docs/action-debugging.md#step-debug-logs). @@ -90,6 +92,8 @@ try { // Do stuff core.info('Output to the actions build log') + + core.notice('This is a message that will also emit an annotation') } catch (err) { core.error(`Error ${err}, action may still succeed though`); @@ -113,11 +117,123 @@ const result = await core.group('Do something async', async () => { }) ``` +#### Annotations + +This library has 3 methods that will produce [annotations](https://docs.github.com/en/rest/reference/checks#create-a-check-run). +```js +core.error('This is a bad error. This will also fail the build.') + +core.warning('Something went wrong, but it\'s not bad enough to fail the build.') + +core.notice('Something happened that you might want to know about.') +``` + +These will surface to the UI in the Actions page and on Pull Requests. They look something like this: + +![Annotations Image](../../docs/assets/annotations.png) + +These annotations can also be attached to particular lines and columns of your source files to show exactly where a problem is occuring. + +These options are: +```typescript +export interface AnnotationProperties { + /** + * A title for the annotation. + */ + title?: string + + /** + * The name of the file for which the annotation should be created. + */ + file?: string + + /** + * The start line for the annotation. + */ + startLine?: number + + /** + * The end line for the annotation. Defaults to `startLine` when `startLine` is provided. + */ + endLine?: number + + /** + * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. + */ + startColumn?: number + + /** + * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. + * Defaults to `startColumn` when `startColumn` is provided. + */ + endColumn?: number +} +``` + +#### Styling output + +Colored output is supported in the Action logs via standard [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code). 3/4 bit, 8 bit and 24 bit colors are all supported. + +Foreground colors: + +```js +// 3/4 bit +core.info('\u001b[35mThis foreground will be magenta') + +// 8 bit +core.info('\u001b[38;5;6mThis foreground will be cyan') + +// 24 bit +core.info('\u001b[38;2;255;0;0mThis foreground will be bright red') +``` + +Background colors: + +```js +// 3/4 bit +core.info('\u001b[43mThis background will be yellow'); + +// 8 bit +core.info('\u001b[48;5;6mThis background will be cyan') + +// 24 bit +core.info('\u001b[48;2;255;0;0mThis background will be bright red') +``` + +Special styles: + +```js +core.info('\u001b[1mBold text') +core.info('\u001b[3mItalic text') +core.info('\u001b[4mUnderlined text') +``` + +ANSI escape codes can be combined with one another: + +```js +core.info('\u001b[31;46mRed foreground with a cyan background and \u001b[1mbold text at the end'); +``` + +> Note: Escape codes reset at the start of each line + +```js +core.info('\u001b[35mThis foreground will be magenta') +core.info('This foreground will reset to the default') +``` + +Manually typing escape codes can be a little difficult, but you can use third party modules such as [ansi-styles](https://github.com/chalk/ansi-styles). + +```js +const style = require('ansi-styles'); +core.info(style.color.ansi16m.hex('#abcdef') + 'Hello world!') +``` + #### Action state -You can use this library to save state and get state for sharing information between a given wrapper action: +You can use this library to save state and get state for sharing information between a given wrapper action: + +**action.yml**: -**action.yml** ```yaml name: 'Wrapper action sample' inputs: @@ -138,6 +254,7 @@ core.saveState("pidToKill", 12345); ``` In action's `cleanup.js`: + ```js const core = require('@actions/core'); @@ -145,3 +262,74 @@ var pid = core.getState("pidToKill"); process.kill(pid); ``` + +#### OIDC Token + +You can use these methods to interact with the GitHub OIDC provider and get a JWT ID token which would help to get access token from third party cloud providers. + +**Method Name**: getIDToken() + +**Inputs** + +audience : optional + +**Outputs** + +A [JWT](https://jwt.io/) ID Token + +In action's `main.ts`: +```js +const core = require('@actions/core'); +async function getIDTokenAction(): Promise { + + const audience = core.getInput('audience', {required: false}) + + const id_token1 = await core.getIDToken() // ID Token with default audience + const id_token2 = await core.getIDToken(audience) // ID token with custom audience + + // this id_token can be used to get access token from third party cloud providers +} +getIDTokenAction() +``` + +In action's `actions.yml`: + +```yaml +name: 'GetIDToken' +description: 'Get ID token from Github OIDC provider' +inputs: + audience: + description: 'Audience for which the ID token is intended for' + required: false +outputs: + id_token1: + description: 'ID token obtained from OIDC provider' + id_token2: + description: 'ID token obtained from OIDC provider' +runs: + using: 'node12' + main: 'dist/index.js' +``` + +#### Filesystem path helpers + +You can use these methods to manipulate file paths across operating systems. + +The `toPosixPath` function converts input paths to Posix-style (Linux) paths. +The `toWin32Path` function converts input paths to Windows-style paths. These +functions work independently of the underlying runner operating system. + +```js +toPosixPath('\\foo\\bar') // => /foo/bar +toWin32Path('/foo/bar') // => \foo\bar +``` + +The `toPlatformPath` function converts input paths to the expected value on the runner's operating system. + +```js +// On a Windows runner. +toPlatformPath('/foo/bar') // => \foo\bar + +// On a Linux runner. +toPlatformPath('\\foo\\bar') // => /foo/bar +``` diff --git a/node_modules/@actions/core/lib/command.d.ts b/node_modules/@actions/core/lib/command.d.ts index 89eff66..53f8f4b 100644 --- a/node_modules/@actions/core/lib/command.d.ts +++ b/node_modules/@actions/core/lib/command.d.ts @@ -1,4 +1,4 @@ -interface CommandProperties { +export interface CommandProperties { [key: string]: any; } /** @@ -13,4 +13,3 @@ interface CommandProperties { */ export declare function issueCommand(command: string, properties: CommandProperties, message: any): void; export declare function issue(name: string, message?: string): void; -export {}; diff --git a/node_modules/@actions/core/lib/command.js b/node_modules/@actions/core/lib/command.js index 10bf3eb..0b28c66 100644 --- a/node_modules/@actions/core/lib/command.js +++ b/node_modules/@actions/core/lib/command.js @@ -1,12 +1,25 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.issue = exports.issueCommand = void 0; const os = __importStar(require("os")); const utils_1 = require("./utils"); /** diff --git a/node_modules/@actions/core/lib/command.js.map b/node_modules/@actions/core/lib/command.js.map index a95b303..51c7c63 100644 --- a/node_modules/@actions/core/lib/command.js.map +++ b/node_modules/@actions/core/lib/command.js.map @@ -1 +1 @@ -{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAwB;AACxB,mCAAsC;AAWtC;;;;;;;;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,CAAA;yBACd;6BAAM;4BACL,MAAM,IAAI,GAAG,CAAA;yBACd;wBAED,MAAM,IAAI,GAAG,GAAG,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE,CAAA;qBAC1C;iBACF;aACF;SACF;QAED,MAAM,IAAI,GAAG,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAA;QACpD,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,UAAU,CAAC,CAAM;IACxB,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,CAAM;IAC5B,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"} \ No newline at end of file +{"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,mCAAsC;AAWtC;;;;;;;;;GASG;AACH,SAAgB,YAAY,CAC1B,OAAe,EACf,UAA6B,EAC7B,OAAY;IAEZ,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;IACrD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAA;AAC/C,CAAC;AAPD,oCAOC;AAED,SAAgB,KAAK,CAAC,IAAY,E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;IACxB,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AAC1B,CAAC;AAED,SAAS,cAAc,CAAC,CAAM;IAC5B,OAAO,sBAAc,CAAC,CAAC,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;SACpB,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;AACzB,CAAC"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/core.d.ts b/node_modules/@actions/core/lib/core.d.ts index 8bb5093..1defb57 100644 --- a/node_modules/@actions/core/lib/core.d.ts +++ b/node_modules/@actions/core/lib/core.d.ts @@ -4,6 +4,8 @@ export interface InputOptions { /** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */ required?: boolean; + /** Optional. Whether leading/trailing whitespace will be trimmed for the input. Defaults to true */ + trimWhitespace?: boolean; } /** * The code to exit an action @@ -18,6 +20,37 @@ export declare enum ExitCode { */ Failure = 1 } +/** + * Optional properties that can be sent with annotatation commands (notice, error, and warning) + * See: https://docs.github.com/en/rest/reference/checks#create-a-check-run for more information about annotations. + */ +export interface AnnotationProperties { + /** + * A title for the annotation. + */ + title?: string; + /** + * The path of the file for which the annotation should be created. + */ + file?: string; + /** + * The start line for the annotation. + */ + startLine?: number; + /** + * The end line for the annotation. Defaults to `startLine` when `startLine` is provided. + */ + endLine?: number; + /** + * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. + */ + startColumn?: number; + /** + * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values. + * Defaults to `startColumn` when `startColumn` is provided. + */ + endColumn?: number; +} /** * Sets env variable for this action and future actions in the job * @param name the name of the variable to set @@ -35,13 +68,35 @@ export declare function setSecret(secret: string): void; */ export declare function addPath(inputPath: string): void; /** - * Gets the value of an input. The value is also trimmed. + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. * * @param name name of the input to get * @param options optional. See InputOptions. * @returns string */ export declare function getInput(name: string, options?: InputOptions): string; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +export declare function getMultilineInput(name: string, options?: InputOptions): string[]; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +export declare function getBooleanInput(name: string, options?: InputOptions): boolean; /** * Sets the value of an output. * @@ -73,13 +128,21 @@ export declare function debug(message: string): void; /** * Adds an error issue * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. */ -export declare function error(message: string | Error): void; +export declare function error(message: string | Error, properties?: AnnotationProperties): void; /** - * Adds an warning issue + * Adds a warning issue * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. */ -export declare function warning(message: string | Error): void; +export declare function warning(message: string | Error, properties?: AnnotationProperties): void; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +export declare function notice(message: string | Error, properties?: AnnotationProperties): void; /** * Writes info to log with console.log. * @param message info message @@ -120,3 +183,16 @@ export declare function saveState(name: string, value: any): void; * @returns string */ export declare function getState(name: string): string; +export declare function getIDToken(aud?: string): Promise; +/** + * Summary exports + */ +export { summary } from './summary'; +/** + * @deprecated use core.summary + */ +export { markdownSummary } from './summary'; +/** + * Path exports + */ +export { toPosixPath, toWin32Path, toPlatformPath } from './path-utils'; diff --git a/node_modules/@actions/core/lib/core.js b/node_modules/@actions/core/lib/core.js index 8b33110..48df6ad 100644 --- a/node_modules/@actions/core/lib/core.js +++ b/node_modules/@actions/core/lib/core.js @@ -1,4 +1,23 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -8,19 +27,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; const command_1 = require("./command"); const file_command_1 = require("./file-command"); const utils_1 = require("./utils"); const os = __importStar(require("os")); const path = __importStar(require("path")); +const oidc_utils_1 = require("./oidc-utils"); /** * The code to exit an action */ @@ -49,13 +63,9 @@ function exportVariable(name, val) { process.env[name] = convertedVal; const filePath = process.env['GITHUB_ENV'] || ''; if (filePath) { - const delimiter = '_GitHubActionsFileCommandDelimeter_'; - const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`; - file_command_1.issueCommand('ENV', commandValue); - } - else { - command_1.issueCommand('set-env', { name }, convertedVal); + return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val)); } + command_1.issueCommand('set-env', { name }, convertedVal); } exports.exportVariable = exportVariable; /** @@ -73,7 +83,7 @@ exports.setSecret = setSecret; function addPath(inputPath) { const filePath = process.env['GITHUB_PATH'] || ''; if (filePath) { - file_command_1.issueCommand('PATH', inputPath); + file_command_1.issueFileCommand('PATH', inputPath); } else { command_1.issueCommand('add-path', {}, inputPath); @@ -82,7 +92,9 @@ function addPath(inputPath) { } exports.addPath = addPath; /** - * Gets the value of an input. The value is also trimmed. + * Gets the value of an input. + * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. + * Returns an empty string if the value is not defined. * * @param name name of the input to get * @param options optional. See InputOptions. @@ -93,9 +105,52 @@ function getInput(name, options) { if (options && options.required && !val) { throw new Error(`Input required and not supplied: ${name}`); } + if (options && options.trimWhitespace === false) { + return val; + } return val.trim(); } exports.getInput = getInput; +/** + * Gets the values of an multiline input. Each value is also trimmed. + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns string[] + * + */ +function getMultilineInput(name, options) { + const inputs = getInput(name, options) + .split('\n') + .filter(x => x !== ''); + if (options && options.trimWhitespace === false) { + return inputs; + } + return inputs.map(input => input.trim()); +} +exports.getMultilineInput = getMultilineInput; +/** + * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. + * Support boolean input list: `true | True | TRUE | false | False | FALSE` . + * The return value is also in boolean type. + * ref: https://yaml.org/spec/1.2/spec.html#id2804923 + * + * @param name name of the input to get + * @param options optional. See InputOptions. + * @returns boolean + */ +function getBooleanInput(name, options) { + const trueValue = ['true', 'True', 'TRUE']; + const falseValue = ['false', 'False', 'FALSE']; + const val = getInput(name, options); + if (trueValue.includes(val)) + return true; + if (falseValue.includes(val)) + return false; + throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` + + `Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); +} +exports.getBooleanInput = getBooleanInput; /** * Sets the value of an output. * @@ -104,7 +159,12 @@ exports.getInput = getInput; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function setOutput(name, value) { - command_1.issueCommand('set-output', { name }, value); + const filePath = process.env['GITHUB_OUTPUT'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value)); + } + process.stdout.write(os.EOL); + command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value)); } exports.setOutput = setOutput; /** @@ -150,19 +210,30 @@ exports.debug = debug; /** * Adds an error issue * @param message error issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. */ -function error(message) { - command_1.issue('error', message instanceof Error ? message.toString() : message); +function error(message, properties = {}) { + command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } exports.error = error; /** - * Adds an warning issue + * Adds a warning issue * @param message warning issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. */ -function warning(message) { - command_1.issue('warning', message instanceof Error ? message.toString() : message); +function warning(message, properties = {}) { + command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); } exports.warning = warning; +/** + * Adds a notice issue + * @param message notice issue message. Errors will be converted to string via toString() + * @param properties optional properties to add to the annotation. + */ +function notice(message, properties = {}) { + command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +exports.notice = notice; /** * Writes info to log with console.log. * @param message info message @@ -222,7 +293,11 @@ exports.group = group; */ // eslint-disable-next-line @typescript-eslint/no-explicit-any function saveState(name, value) { - command_1.issueCommand('save-state', { name }, value); + const filePath = process.env['GITHUB_STATE'] || ''; + if (filePath) { + return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value)); + } + command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value)); } exports.saveState = saveState; /** @@ -235,4 +310,27 @@ function getState(name) { return process.env[`STATE_${name}`] || ''; } exports.getState = getState; +function getIDToken(aud) { + return __awaiter(this, void 0, void 0, function* () { + return yield oidc_utils_1.OidcClient.getIDToken(aud); + }); +} +exports.getIDToken = getIDToken; +/** + * Summary exports + */ +var summary_1 = require("./summary"); +Object.defineProperty(exports, "summary", { enumerable: true, get: function () { return summary_1.summary; } }); +/** + * @deprecated use core.summary + */ +var summary_2 = require("./summary"); +Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return summary_2.markdownSummary; } }); +/** + * Path exports + */ +var path_utils_1 = require("./path-utils"); +Object.defineProperty(exports, "toPosixPath", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } }); +Object.defineProperty(exports, "toWin32Path", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } }); +Object.defineProperty(exports, "toPlatformPath", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }); //# sourceMappingURL=core.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/core.js.map b/node_modules/@actions/core/lib/core.js.map index 7e7cbcc..99f7fd8 100644 --- a/node_modules/@actions/core/lib/core.js.map +++ b/node_modules/@actions/core/lib/core.js.map @@ -1 +1 @@ -{"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAA6C;AAC7C,iDAA+D;AAC/D,mCAAsC;AAEtC,uCAAwB;AACxB,2CAA4B;AAU5B;;GAEG;AACH,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB;;OAEG;IACH,6CAAW,CAAA;IAEX;;OAEG;IACH,6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AC3D,CAAC;AAPD,8BAOC;AAED;;;;;GAKG;AACH,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,IAAI,EAAE,CAAA;AAC3C,CAAC;AAFD,4BAEC;AAED,SAAsB,UAAU,CAAC,GAAY;;QAC3C,OAAO,MAAM,uBAAU,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;IACzC,CAAC;CAAA;AAFD,gCAEC;AAED;;GAEG;AACH,qCAAiC;AAAzB,kGAAA,OAAO,OAAA;AAEf;;GAEG;AACH,qCAAyC;AAAjC,0GAAA,eAAe,OAAA;AAEvB;;GAEG;AACH,2CAAqE;AAA7D,yGAAA,WAAW,OAAA;AAAE,yGAAA,WAAW,OAAA;AAAE,4GAAA,cAAc,OAAA"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/file-command.d.ts b/node_modules/@actions/core/lib/file-command.d.ts index ed408eb..2d1f2f4 100644 --- a/node_modules/@actions/core/lib/file-command.d.ts +++ b/node_modules/@actions/core/lib/file-command.d.ts @@ -1 +1,2 @@ -export declare function issueCommand(command: string, message: any): void; +export declare function issueFileCommand(command: string, message: any): void; +export declare function prepareKeyValueMessage(key: string, value: any): string; diff --git a/node_modules/@actions/core/lib/file-command.js b/node_modules/@actions/core/lib/file-command.js index 10783c0..2d0d738 100644 --- a/node_modules/@actions/core/lib/file-command.js +++ b/node_modules/@actions/core/lib/file-command.js @@ -1,19 +1,33 @@ "use strict"; // For internal use, subject to change. +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); +exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ const fs = __importStar(require("fs")); const os = __importStar(require("os")); +const uuid_1 = require("uuid"); const utils_1 = require("./utils"); -function issueCommand(command, message) { +function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); @@ -25,5 +39,20 @@ function issueCommand(command, message) { encoding: 'utf8' }); } -exports.issueCommand = issueCommand; +exports.issueFileCommand = issueFileCommand; +function prepareKeyValueMessage(key, value) { + const delimiter = `ghadelimiter_${uuid_1.v4()}`; + const convertedValue = utils_1.toCommandValue(value); + // These should realistically never happen, but just in case someone finds a + // way to exploit uuid generation let's not allow keys or values that contain + // the delimiter. + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; +} +exports.prepareKeyValueMessage = prepareKeyValueMessage; //# sourceMappingURL=file-command.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/file-command.js.map b/node_modules/@actions/core/lib/file-command.js.map index 45fd8c4..b1a9d54 100644 --- a/node_modules/@actions/core/lib/file-command.js.map +++ b/node_modules/@actions/core/lib/file-command.js.map @@ -1 +1 @@ -{"version":3,"file":"file-command.js","sourceRoot":"","sources":["../src/file-command.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;;;;;;;AA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,GAAG,EAAE,CAAC,GAAG,EAAE,EAAE;QACjE,QAAQ,EAAE,MAAM;KACjB,CAAC,CAAA;AACJ,CAAC;AAdD,4CAcC;AAED,SAAgB,sBAAsB,CAAC,GAAW,EAAE,KAAU;IAC5D,MAAM,SAAS,GAAG,gBAAgB,SAAM,EAAE,EAAE,CAAA;IAC5C,MAAM,cAAc,GAAG,sBAAc,CAAC,KAAK,CAAC,CAAA;IAE5C,4EAA4E;IAC5E,6EAA6E;IAC7E,iBAAiB;IACjB,IAAI,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QAC3B,MAAM,IAAI,KAAK,CACb,4DAA4D,SAAS,GAAG,CACzE,CAAA;KACF;IAED,IAAI,cAAc,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QACtC,MAAM,IAAI,KAAK,CACb,6DAA6D,SAAS,GAAG,CAC1E,CAAA;KACF;IAED,OAAO,GAAG,GAAG,KAAK,SAAS,GAAG,EAAE,CAAC,GAAG,GAAG,cAAc,GAAG,EAAE,CAAC,GAAG,GAAG,SAAS,EAAE,CAAA;AAC9E,CAAC;AApBD,wDAoBC"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/oidc-utils.d.ts b/node_modules/@actions/core/lib/oidc-utils.d.ts new file mode 100644 index 0000000..657c7f4 --- /dev/null +++ b/node_modules/@actions/core/lib/oidc-utils.d.ts @@ -0,0 +1,7 @@ +export declare class OidcClient { + private static createHttpClient; + private static getRequestToken; + private static getIDTokenUrl; + private static getCall; + static getIDToken(audience?: string): Promise; +} diff --git a/node_modules/@actions/core/lib/oidc-utils.js b/node_modules/@actions/core/lib/oidc-utils.js new file mode 100644 index 0000000..f701277 --- /dev/null +++ b/node_modules/@actions/core/lib/oidc-utils.js @@ -0,0 +1,77 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.OidcClient = void 0; +const http_client_1 = require("@actions/http-client"); +const auth_1 = require("@actions/http-client/lib/auth"); +const core_1 = require("./core"); +class OidcClient { + static createHttpClient(allowRetry = true, maxRetry = 10) { + const requestOptions = { + allowRetries: allowRetry, + maxRetries: maxRetry + }; + return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions); + } + static getRequestToken() { + const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN']; + if (!token) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable'); + } + return token; + } + static getIDTokenUrl() { + const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL']; + if (!runtimeUrl) { + throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable'); + } + return runtimeUrl; + } + static getCall(id_token_url) { + var _a; + return __awaiter(this, void 0, void 0, function* () { + const httpclient = OidcClient.createHttpClient(); + const res = yield httpclient + .getJson(id_token_url) + .catch(error => { + throw new Error(`Failed to get ID Token. \n + Error Code : ${error.statusCode}\n + Error Message: ${error.result.message}`); + }); + const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; + if (!id_token) { + throw new Error('Response json body do not have ID Token field'); + } + return id_token; + }); + } + static getIDToken(audience) { + return __awaiter(this, void 0, void 0, function* () { + try { + // New ID Token is requested from action service + let id_token_url = OidcClient.getIDTokenUrl(); + if (audience) { + const encodedAudience = encodeURIComponent(audience); + id_token_url = `${id_token_url}&audience=${encodedAudience}`; + } + core_1.debug(`ID token url is ${id_token_url}`); + const id_token = yield OidcClient.getCall(id_token_url); + core_1.setSecret(id_token); + return id_token; + } + catch (error) { + throw new Error(`Error message: ${error.message}`); + } + }); + } +} +exports.OidcClient = OidcClient; +//# sourceMappingURL=oidc-utils.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/oidc-utils.js.map b/node_modules/@actions/core/lib/oidc-utils.js.map new file mode 100644 index 0000000..284fa1d --- /dev/null +++ b/node_modules/@actions/core/lib/oidc-utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"oidc-utils.js","sourceRoot":"","sources":["../src/oidc-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,sDAA+C;AAC/C,wDAAqE;AACrE,iCAAuC;AAKvC,MAAa,UAAU;IACb,MAAM,CAAC,gBAAgB,CAC7B,UAAU,GAAG,IAAI,EACjB,QAAQ,GAAG,EAAE;QAEb,MAAM,cAAc,GAAmB;YACrC,YAAY,EAAE,UAAU;YACxB,UAAU,EAAE,QAAQ;SACrB,CAAA;QAED,OAAO,IAAI,wBAAU,CACnB,qBAAqB,EACrB,CAAC,IAAI,8BAAuB,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC,EAC3D,cAAc,CACf,CAAA;IACH,CAAC;IAEO,MAAM,CAAC,eAAe;QAC5B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAA;QAC3D,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,CACb,2DAA2D,CAC5D,CAAA;SACF;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAEO,MAAM,CAAC,aAAa;QAC1B,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAA;QAC9D,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAA;SAC3E;QACD,OAAO,UAAU,CAAA;IACnB,CAAC;IAEO,MAAM,CAAO,OAAO,CAAC,YAAoB;;;YAC/C,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAA;YAEhD,MAAM,GAAG,GAAG,MAAM,UAAU;iBACzB,OAAO,CAAgB,YAAY,CAAC;iBACpC,KAAK,CAAC,KAAK,CAAC,EAAE;gBACb,MAAM,IAAI,KAAK,CACb;uBACa,KAAK,CAAC,UAAU;yBACd,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CACtC,CAAA;YACH,CAAC,CAAC,CAAA;YAEJ,MAAM,QAAQ,SAAG,GAAG,CAAC,MAAM,0CAAE,KAAK,CAAA;YAClC,IAAI,CAAC,QAAQ,EAAE;gBACb,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;aACjE;YACD,OAAO,QAAQ,CAAA;;KAChB;IAED,MAAM,CAAO,UAAU,CAAC,QAAiB;;YACvC,IAAI;gBACF,gDAAgD;gBAChD,IAAI,YAAY,GAAW,UAAU,CAAC,aAAa,EAAE,CAAA;gBACrD,IAAI,QAAQ,EAAE;oBACZ,MAAM,eAAe,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAA;oBACpD,YAAY,GAAG,GAAG,YAAY,aAAa,eAAe,EAAE,CAAA;iBAC7D;gBAED,YAAK,CAAC,mBAAmB,YAAY,EAAE,CAAC,CAAA;gBAExC,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;gBACvD,gBAAS,CAAC,QAAQ,CAAC,CAAA;gBACnB,OAAO,QAAQ,CAAA;aAChB;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,IAAI,KAAK,CAAC,kBAAkB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAA;aACnD;QACH,CAAC;KAAA;CACF;AAzED,gCAyEC"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/path-utils.d.ts b/node_modules/@actions/core/lib/path-utils.d.ts new file mode 100644 index 0000000..1fee9f3 --- /dev/null +++ b/node_modules/@actions/core/lib/path-utils.d.ts @@ -0,0 +1,25 @@ +/** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ +export declare function toPosixPath(pth: string): string; +/** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ +export declare function toWin32Path(pth: string): string; +/** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ +export declare function toPlatformPath(pth: string): string; diff --git a/node_modules/@actions/core/lib/path-utils.js b/node_modules/@actions/core/lib/path-utils.js new file mode 100644 index 0000000..7251c82 --- /dev/null +++ b/node_modules/@actions/core/lib/path-utils.js @@ -0,0 +1,58 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0; +const path = __importStar(require("path")); +/** + * toPosixPath converts the given path to the posix form. On Windows, \\ will be + * replaced with /. + * + * @param pth. Path to transform. + * @return string Posix path. + */ +function toPosixPath(pth) { + return pth.replace(/[\\]/g, '/'); +} +exports.toPosixPath = toPosixPath; +/** + * toWin32Path converts the given path to the win32 form. On Linux, / will be + * replaced with \\. + * + * @param pth. Path to transform. + * @return string Win32 path. + */ +function toWin32Path(pth) { + return pth.replace(/[/]/g, '\\'); +} +exports.toWin32Path = toWin32Path; +/** + * toPlatformPath converts the given path to a platform-specific path. It does + * this by replacing instances of / and \ with the platform-specific path + * separator. + * + * @param pth The path to platformize. + * @return string The platform-specific path. + */ +function toPlatformPath(pth) { + return pth.replace(/[/\\]/g, path.sep); +} +exports.toPlatformPath = toPlatformPath; +//# sourceMappingURL=path-utils.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/path-utils.js.map b/node_modules/@actions/core/lib/path-utils.js.map new file mode 100644 index 0000000..7ab1cac --- /dev/null +++ b/node_modules/@actions/core/lib/path-utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"path-utils.js","sourceRoot":"","sources":["../src/path-utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAE5B;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;AAClC,CAAC;AAFD,kCAEC;AAED;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,GAAW;IACrC,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AAClC,CAAC;AAFD,kCAEC;AAED;;;;;;;GAOG;AACH,SAAgB,cAAc,CAAC,GAAW;IACxC,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;AACxC,CAAC;AAFD,wCAEC"} \ No newline at end of file diff --git a/node_modules/@actions/core/lib/summary.d.ts b/node_modules/@actions/core/lib/summary.d.ts new file mode 100644 index 0000000..bb79255 --- /dev/null +++ b/node_modules/@actions/core/lib/summary.d.ts @@ -0,0 +1,202 @@ +export declare const SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; +export declare const SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; +export declare type SummaryTableRow = (SummaryTableCell | string)[]; +export interface SummaryTableCell { + /** + * Cell content + */ + data: string; + /** + * Render cell as header + * (optional) default: false + */ + header?: boolean; + /** + * Number of columns the cell extends + * (optional) default: '1' + */ + colspan?: string; + /** + * Number of rows the cell extends + * (optional) default: '1' + */ + rowspan?: string; +} +export interface SummaryImageOptions { + /** + * The width of the image in pixels. Must be an integer without a unit. + * (optional) + */ + width?: string; + /** + * The height of the image in pixels. Must be an integer without a unit. + * (optional) + */ + height?: string; +} +export interface SummaryWriteOptions { + /** + * Replace all existing content in summary file with buffer contents + * (optional) default: false + */ + overwrite?: boolean; +} +declare class Summary { + private _buffer; + private _filePath?; + constructor(); + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + private filePath; + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + private wrap; + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options?: SummaryWriteOptions): Promise; + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear(): Promise; + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify(): string; + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer(): boolean; + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer(): Summary; + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text: string, addEOL?: boolean): Summary; + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL(): Summary; + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code: string, lang?: string): Summary; + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items: string[], ordered?: boolean): Summary; + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows: SummaryTableRow[]): Summary; + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label: string, content: string): Summary; + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src: string, alt: string, options?: SummaryImageOptions): Summary; + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text: string, level?: number | string): Summary; + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator(): Summary; + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak(): Summary; + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text: string, cite?: string): Summary; + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text: string, href: string): Summary; +} +/** + * @deprecated use `core.summary` + */ +export declare const markdownSummary: Summary; +export declare const summary: Summary; +export {}; diff --git a/node_modules/@actions/core/lib/summary.js b/node_modules/@actions/core/lib/summary.js new file mode 100644 index 0000000..04a335b --- /dev/null +++ b/node_modules/@actions/core/lib/summary.js @@ -0,0 +1,283 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0; +const os_1 = require("os"); +const fs_1 = require("fs"); +const { access, appendFile, writeFile } = fs_1.promises; +exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY'; +exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary'; +class Summary { + constructor() { + this._buffer = ''; + } + /** + * Finds the summary file path from the environment, rejects if env var is not found or file does not exist + * Also checks r/w permissions. + * + * @returns step summary file path + */ + filePath() { + return __awaiter(this, void 0, void 0, function* () { + if (this._filePath) { + return this._filePath; + } + const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR]; + if (!pathFromEnv) { + throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); + } + try { + yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); + } + catch (_a) { + throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); + } + this._filePath = pathFromEnv; + return this._filePath; + }); + } + /** + * Wraps content in an HTML tag, adding any HTML attributes + * + * @param {string} tag HTML tag to wrap + * @param {string | null} content content within the tag + * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add + * + * @returns {string} content wrapped in HTML element + */ + wrap(tag, content, attrs = {}) { + const htmlAttrs = Object.entries(attrs) + .map(([key, value]) => ` ${key}="${value}"`) + .join(''); + if (!content) { + return `<${tag}${htmlAttrs}>`; + } + return `<${tag}${htmlAttrs}>${content}`; + } + /** + * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. + * + * @param {SummaryWriteOptions} [options] (optional) options for write operation + * + * @returns {Promise} summary instance + */ + write(options) { + return __awaiter(this, void 0, void 0, function* () { + const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); + const filePath = yield this.filePath(); + const writeFunc = overwrite ? writeFile : appendFile; + yield writeFunc(filePath, this._buffer, { encoding: 'utf8' }); + return this.emptyBuffer(); + }); + } + /** + * Clears the summary buffer and wipes the summary file + * + * @returns {Summary} summary instance + */ + clear() { + return __awaiter(this, void 0, void 0, function* () { + return this.emptyBuffer().write({ overwrite: true }); + }); + } + /** + * Returns the current summary buffer as a string + * + * @returns {string} string of summary buffer + */ + stringify() { + return this._buffer; + } + /** + * If the summary buffer is empty + * + * @returns {boolen} true if the buffer is empty + */ + isEmptyBuffer() { + return this._buffer.length === 0; + } + /** + * Resets the summary buffer without writing to summary file + * + * @returns {Summary} summary instance + */ + emptyBuffer() { + this._buffer = ''; + return this; + } + /** + * Adds raw text to the summary buffer + * + * @param {string} text content to add + * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) + * + * @returns {Summary} summary instance + */ + addRaw(text, addEOL = false) { + this._buffer += text; + return addEOL ? this.addEOL() : this; + } + /** + * Adds the operating system-specific end-of-line marker to the buffer + * + * @returns {Summary} summary instance + */ + addEOL() { + return this.addRaw(os_1.EOL); + } + /** + * Adds an HTML codeblock to the summary buffer + * + * @param {string} code content to render within fenced code block + * @param {string} lang (optional) language to syntax highlight code + * + * @returns {Summary} summary instance + */ + addCodeBlock(code, lang) { + const attrs = Object.assign({}, (lang && { lang })); + const element = this.wrap('pre', this.wrap('code', code), attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML list to the summary buffer + * + * @param {string[]} items list of items to render + * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) + * + * @returns {Summary} summary instance + */ + addList(items, ordered = false) { + const tag = ordered ? 'ol' : 'ul'; + const listItems = items.map(item => this.wrap('li', item)).join(''); + const element = this.wrap(tag, listItems); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML table to the summary buffer + * + * @param {SummaryTableCell[]} rows table rows + * + * @returns {Summary} summary instance + */ + addTable(rows) { + const tableBody = rows + .map(row => { + const cells = row + .map(cell => { + if (typeof cell === 'string') { + return this.wrap('td', cell); + } + const { header, data, colspan, rowspan } = cell; + const tag = header ? 'th' : 'td'; + const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan })); + return this.wrap(tag, data, attrs); + }) + .join(''); + return this.wrap('tr', cells); + }) + .join(''); + const element = this.wrap('table', tableBody); + return this.addRaw(element).addEOL(); + } + /** + * Adds a collapsable HTML details element to the summary buffer + * + * @param {string} label text for the closed state + * @param {string} content collapsable content + * + * @returns {Summary} summary instance + */ + addDetails(label, content) { + const element = this.wrap('details', this.wrap('summary', label) + content); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML image tag to the summary buffer + * + * @param {string} src path to the image you to embed + * @param {string} alt text description of the image + * @param {SummaryImageOptions} options (optional) addition image attributes + * + * @returns {Summary} summary instance + */ + addImage(src, alt, options) { + const { width, height } = options || {}; + const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height })); + const element = this.wrap('img', null, Object.assign({ src, alt }, attrs)); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML section heading element + * + * @param {string} text heading text + * @param {number | string} [level=1] (optional) the heading level, default: 1 + * + * @returns {Summary} summary instance + */ + addHeading(text, level) { + const tag = `h${level}`; + const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag) + ? tag + : 'h1'; + const element = this.wrap(allowedTag, text); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML thematic break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addSeparator() { + const element = this.wrap('hr', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML line break (
) to the summary buffer + * + * @returns {Summary} summary instance + */ + addBreak() { + const element = this.wrap('br', null); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML blockquote to the summary buffer + * + * @param {string} text quote text + * @param {string} cite (optional) citation url + * + * @returns {Summary} summary instance + */ + addQuote(text, cite) { + const attrs = Object.assign({}, (cite && { cite })); + const element = this.wrap('blockquote', text, attrs); + return this.addRaw(element).addEOL(); + } + /** + * Adds an HTML anchor tag to the summary buffer + * + * @param {string} text link text/content + * @param {string} href hyperlink + * + * @returns {Summary} summary instance + */ + addLink(text, href) { + const element = this.wrap('a', text, { href }); + return this.addRaw(element).addEOL(); + } +} +const _summary = new Summary(); +/** + * @deprecated use `core.summary` + */ +exports.markdownSummary = _summary; +exports.summary = _summary; +//# sourceMappingURL=summary.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/summary.js.map b/node_modules/@actions/core/lib/summary.js.map new file mode 100644 index 0000000..d598f26 --- /dev/null +++ b/node_modules/@actions/core/lib/summary.js.map @@ -0,0 +1 @@ +{"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2BAAsB;AACtB,2BAAsC;AACtC,MAAM,EAAC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAC,GAAG,aAAQ,CAAA;AAEnC,QAAA,eAAe,GAAG,qBAAqB,CAAA;AACvC,QAAA,gBAAgB,GAC3B,2GAA2G,CAAA;AA+C7G,MAAM,OAAO;IAIX;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;IACnB,CAAC;IAED;;;;;OAKG;IACW,QAAQ;;YACpB,IAAI,IAAI,CAAC,SAAS,EAAE;gBAClB,OAAO,IAAI,CAAC,SAAS,CAAA;aACtB;YAED,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAe,CAAC,C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..3b9e28d 100644 --- a/node_modules/@actions/core/lib/utils.d.ts +++ b/node_modules/@actions/core/lib/utils.d.ts @@ -1,5 +1,14 @@ +import { AnnotationProperties } from './core'; +import { CommandProperties } from './command'; /** * Sanitizes an input into a string so it can be passed into issueCommand safely * @param input input to sanitize into a string */ export declare function toCommandValue(input: any): string; +/** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ +export declare function toCommandProperties(annotationProperties: AnnotationProperties): CommandProperties; diff --git a/node_modules/@actions/core/lib/utils.js b/node_modules/@actions/core/lib/utils.js index 97cea33..9b5ca44 100644 --- a/node_modules/@actions/core/lib/utils.js +++ b/node_modules/@actions/core/lib/utils.js @@ -2,6 +2,7 @@ // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ Object.defineProperty(exports, "__esModule", { value: true }); +exports.toCommandProperties = exports.toCommandValue = void 0; /** * Sanitizes an input into a string so it can be passed into issueCommand safely * @param input input to sanitize into a string @@ -16,4 +17,24 @@ function toCommandValue(input) { return JSON.stringify(input); } exports.toCommandValue = toCommandValue; +/** + * + * @param annotationProperties + * @returns The command properties to send with the actual annotation command + * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646 + */ +function toCommandProperties(annotationProperties) { + if (!Object.keys(annotationProperties).length) { + return {}; + } + return { + title: annotationProperties.title, + file: annotationProperties.file, + line: annotationProperties.startLine, + endLine: annotationProperties.endLine, + col: annotationProperties.startColumn, + endColumn: annotationProperties.endColumn + }; +} +exports.toCommandProperties = toCommandProperties; //# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/node_modules/@actions/core/lib/utils.js.map b/node_modules/@actions/core/lib/utils.js.map index ce43f03..8211bb7 100644 --- a/node_modules/@actions/core/lib/utils.js.map +++ b/node_modules/@actions/core/lib/utils.js.map @@ -1 +1 @@ -{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC,uDAAuD;;AAEvD;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAAU;IACvC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;QACzC,OAAO,EAAE,CAAA;KACV;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,EAAE;QAC/D,OAAO,KAAe,CAAA;KACvB;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAC9B,CAAC;AAPD,wCAOC"} \ No newline at end of file +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA,mCAAmC;AACnC,uDAAuD;;;AAKvD;;;GAGG;AACH,SAAgB,cAAc,CAAC,KAAU;IACvC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;QACzC,OAAO,EAAE,CAAA;KACV;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,EAAE;QAC/D,OAAO,KAAe,CAAA;KACvB;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;AAC9B,CAAC;AAPD,wCAOC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CACjC,oBAA0C;IAE1C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,MAAM,EAAE;QAC7C,OAAO,EAAE,CAAA;KACV;IAED,OAAO;QACL,KAAK,EAAE,oBAAoB,CAAC,KAAK;QACjC,IAAI,EAAE,oBAAoB,CAAC,IAAI;QAC/B,IAAI,EAAE,oBAAoB,CAAC,SAAS;QACpC,OAAO,EAAE,oBAAoB,CAAC,OAAO;QACrC,GAAG,EAAE,oBAAoB,CAAC,WAAW;QACrC,SAAS,EAAE,oBAAoB,CAAC,SAAS;KAC1C,CAAA;AACH,CAAC;AAfD,kDAeC"} \ No newline at end of file diff --git a/node_modules/@actions/core/package.json b/node_modules/@actions/core/package.json index a118749..1f3824d 100644 --- a/node_modules/@actions/core/package.json +++ b/node_modules/@actions/core/package.json @@ -1,38 +1,16 @@ { - "_from": "@actions/core@1.2.6", - "_id": "@actions/core@1.2.6", - "_inBundle": false, - "_integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==", - "_location": "/@actions/core", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@actions/core@1.2.6", - "name": "@actions/core", - "escapedName": "@actions%2fcore", - "scope": "@actions", - "rawSpec": "1.2.6", - "saveSpec": null, - "fetchSpec": "1.2.6" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", - "_shasum": "a78d49f41a4def18e88ce47c2cac615d5694bf09", - "_spec": "@actions/core@1.2.6", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package", - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "bundleDependencies": false, - "deprecated": false, + "name": "@actions/core", + "version": "1.10.0", "description": "Actions core lib", - "devDependencies": { - "@types/node": "^12.0.2" - }, + "keywords": [ + "github", + "actions", + "core" + ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/core", + "license": "MIT", + "main": "lib/core.js", + "types": "lib/core.d.ts", "directories": { "lib": "lib", "test": "__tests__" @@ -41,15 +19,6 @@ "lib", "!.DS_Store" ], - "homepage": "https://github.com/actions/toolkit/tree/main/packages/core", - "keywords": [ - "github", - "actions", - "core" - ], - "license": "MIT", - "main": "lib/core.js", - "name": "@actions/core", "publishConfig": { "access": "public" }, @@ -63,6 +32,15 @@ "test": "echo \"Error: run tests from root\" && exit 1", "tsc": "tsc" }, - "types": "lib/core.d.ts", - "version": "1.2.6" + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@types/node": "^12.0.2", + "@types/uuid": "^8.3.4" + } } diff --git a/node_modules/luxon/license.md b/node_modules/@actions/exec/LICENSE.md similarity index 93% rename from node_modules/luxon/license.md rename to node_modules/@actions/exec/LICENSE.md index 2d560a6..dbae2ed 100644 --- a/node_modules/luxon/license.md +++ b/node_modules/@actions/exec/LICENSE.md @@ -1,7 +1,9 @@ -Copyright 2019 JS Foundation and other contributors +The MIT License (MIT) + +Copyright 2019 GitHub Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/exec/lib/exec.d.ts b/node_modules/@actions/exec/lib/exec.d.ts index 390f1c8..baedcdb 100644 --- a/node_modules/@actions/exec/lib/exec.d.ts +++ b/node_modules/@actions/exec/lib/exec.d.ts @@ -1,5 +1,5 @@ -import { ExecOptions } from './interfaces'; -export { ExecOptions }; +import { ExecOptions, ExecOutput, ExecListeners } from './interfaces'; +export { ExecOptions, ExecOutput, ExecListeners }; /** * Exec a command. * Output will be streamed to the live console. @@ -11,3 +11,14 @@ export { ExecOptions }; * @returns Promise exit code */ export declare function exec(commandLine: string, args?: string[], options?: ExecOptions): Promise; +/** + * Exec a command and get the output. + * Output will be streamed to the live console. + * Returns promise with the exit code and collected stdout and stderr + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code, stdout, and stderr + */ +export declare function getExecOutput(commandLine: string, args?: string[], options?: ExecOptions): Promise; diff --git a/node_modules/@actions/exec/lib/exec.js b/node_modules/@actions/exec/lib/exec.js index ae05cce..72c7a9c 100644 --- a/node_modules/@actions/exec/lib/exec.js +++ b/node_modules/@actions/exec/lib/exec.js @@ -1,4 +1,23 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -8,14 +27,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", { value: true }); +exports.getExecOutput = exports.exec = void 0; +const string_decoder_1 = require("string_decoder"); const tr = __importStar(require("./toolrunner")); /** * Exec a command. @@ -41,4 +55,49 @@ function exec(commandLine, args, options) { }); } exports.exec = exec; +/** + * Exec a command and get the output. + * Output will be streamed to the live console. + * Returns promise with the exit code and collected stdout and stderr + * + * @param commandLine command to execute (can include additional args). Must be correctly escaped. + * @param args optional arguments for tool. Escaping is handled by the lib. + * @param options optional exec options. See ExecOptions + * @returns Promise exit code, stdout, and stderr + */ +function getExecOutput(commandLine, args, options) { + var _a, _b; + return __awaiter(this, void 0, void 0, function* () { + let stdout = ''; + let stderr = ''; + //Using string decoder covers the case where a mult-byte character is split + const stdoutDecoder = new string_decoder_1.StringDecoder('utf8'); + const stderrDecoder = new string_decoder_1.StringDecoder('utf8'); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } + }; + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } + }; + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + //flush any remaining characters + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr + }; + }); +} +exports.getExecOutput = getExecOutput; //# sourceMappingURL=exec.js.map \ No newline at end of file diff --git a/node_modules/@actions/exec/lib/exec.js.map b/node_modules/@actions/exec/lib/exec.js.map index 98901dd..0762636 100644 --- a/node_modules/@actions/exec/lib/exec.js.map +++ b/node_modules/@actions/exec/lib/exec.js.map @@ -1 +1 @@ -{"version":3,"file":"exec.js","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,iDAAkC;AAIlC;;;;;;;;;GASG;AACH,SAAsB,IAAI,CACxB,WAAmB,EACnB,IAAe,EACf,OAAqB;;QAErB,MAAM,WAAW,GAAG,EAAE,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAA;QACpD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YAC5B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;SACpE;QACD,8CAA8C;QAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAA;QAC/B,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;QAC9C,MAAM,MAAM,GAAkB,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QACxE,OAAO,MAAM,CAAC,IAAI,EAAE,CAAA;IACtB,CAAC;CAAA;AAdD,oBAcC"} \ No newline at end of file +{"version":3,"file":"exec.js","sourceRoot":"","sources":["../src/exec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAA4C;AAE5C,iDAAkC;AAI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AAC,CAAA;aAC7B;QACH,CAAC,CAAA;QAED,MAAM,cAAc,GAAG,CAAC,IAAY,EAAQ,EAAE;YAC5C,MAAM,IAAI,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YACnC,IAAI,sBAAsB,EAAE;gBAC1B,sBAAsB,CAAC,IAAI,CAAC,CAAA;aAC7B;QACH,CAAC,CAAA;QAED,MAAM,SAAS,mCACV,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,KACrB,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,cAAc,GACvB,CAAA;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,IAAI,kCAAM,OAAO,KAAE,SAAS,IAAE,CAAA;QAEvE,gCAAgC;QAChC,MAAM,IAAI,aAAa,CAAC,GAAG,EAAE,CAAA;QAC7B,MAAM,IAAI,aAAa,CAAC,GAAG,EAAE,CAAA;QAE7B,OAAO;YACL,QAAQ;YACR,MAAM;YACN,MAAM;SACP,CAAA;;CACF;AA9CD,sCA8CC"} \ No newline at end of file diff --git a/node_modules/@actions/exec/lib/interfaces.d.ts b/node_modules/@actions/exec/lib/interfaces.d.ts index 4fef7c1..8ae20e4 100644 --- a/node_modules/@actions/exec/lib/interfaces.d.ts +++ b/node_modules/@actions/exec/lib/interfaces.d.ts @@ -27,11 +27,31 @@ export interface ExecOptions { /** optional. input to write to the process on STDIN. */ input?: Buffer; /** optional. Listeners for output. Callback functions that will be called on these events */ - listeners?: { - stdout?: (data: Buffer) => void; - stderr?: (data: Buffer) => void; - stdline?: (data: string) => void; - errline?: (data: string) => void; - debug?: (data: string) => void; - }; + listeners?: ExecListeners; +} +/** + * Interface for the output of getExecOutput() + */ +export interface ExecOutput { + /**The exit code of the process */ + exitCode: number; + /**The entire stdout of the process as a string */ + stdout: string; + /**The entire stderr of the process as a string */ + stderr: string; +} +/** + * The user defined listeners for an exec call + */ +export interface ExecListeners { + /** A call back for each buffer of stdout */ + stdout?: (data: Buffer) => void; + /** A call back for each buffer of stderr */ + stderr?: (data: Buffer) => void; + /** A call back for each line of stdout */ + stdline?: (data: string) => void; + /** A call back for each line of stderr */ + errline?: (data: string) => void; + /** A call back for each debug log */ + debug?: (data: string) => void; } diff --git a/node_modules/@actions/exec/lib/toolrunner.js b/node_modules/@actions/exec/lib/toolrunner.js index d08bb59..e456a72 100644 --- a/node_modules/@actions/exec/lib/toolrunner.js +++ b/node_modules/@actions/exec/lib/toolrunner.js @@ -1,4 +1,23 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -8,20 +27,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; -}; Object.defineProperty(exports, "__esModule", { value: true }); +exports.argStringToArray = exports.ToolRunner = void 0; const os = __importStar(require("os")); const events = __importStar(require("events")); const child = __importStar(require("child_process")); const path = __importStar(require("path")); const io = __importStar(require("@actions/io")); const ioUtil = __importStar(require("@actions/io/lib/io-util")); +const timers_1 = require("timers"); /* eslint-disable @typescript-eslint/unbound-method */ const IS_WINDOWS = process.platform === 'win32'; /* @@ -91,11 +105,12 @@ class ToolRunner extends events.EventEmitter { s = s.substring(n + os.EOL.length); n = s.indexOf(os.EOL); } - strBuffer = s; + return s; } catch (err) { // streaming lines to console is best effort. Don't fail a build. this._debug(`error processing line. Failed with error ${err}`); + return ''; } } _getSpawnFileName() { @@ -377,7 +392,7 @@ class ToolRunner extends events.EventEmitter { // if the tool is only a file name, then resolve it from the PATH // otherwise verify it exists (add extension on Windows if necessary) this.toolPath = yield io.which(this.toolPath, true); - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug('arguments:'); for (const arg of this.args) { @@ -391,9 +406,12 @@ class ToolRunner extends events.EventEmitter { state.on('debug', (message) => { this._debug(message); }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } const fileName = this._getSpawnFileName(); const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - const stdbuffer = ''; + let stdbuffer = ''; if (cp.stdout) { cp.stdout.on('data', (data) => { if (this.options.listeners && this.options.listeners.stdout) { @@ -402,14 +420,14 @@ class ToolRunner extends events.EventEmitter { if (!optionsNonNull.silent && optionsNonNull.outStream) { optionsNonNull.outStream.write(data); } - this._processLineBuffer(data, stdbuffer, (line) => { + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { if (this.options.listeners && this.options.listeners.stdline) { this.options.listeners.stdline(line); } }); }); } - const errbuffer = ''; + let errbuffer = ''; if (cp.stderr) { cp.stderr.on('data', (data) => { state.processStderr = true; @@ -424,7 +442,7 @@ class ToolRunner extends events.EventEmitter { : optionsNonNull.outStream; s.write(data); } - this._processLineBuffer(data, errbuffer, (line) => { + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { if (this.options.listeners && this.options.listeners.errline) { this.options.listeners.errline(line); } @@ -471,7 +489,7 @@ class ToolRunner extends events.EventEmitter { } cp.stdin.end(this.options.input); } - }); + })); }); } } @@ -557,7 +575,7 @@ class ExecState extends events.EventEmitter { this._setResult(); } else if (this.processExited) { - this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this); + this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this); } } _debug(message) { diff --git a/node_modules/@actions/exec/lib/toolrunner.js.map b/node_modules/@actions/exec/lib/toolrunner.js.map index 0a52eec..6eaf183 100644 --- a/node_modules/@actions/exec/lib/toolrunner.js.map +++ b/node_modules/@actions/exec/lib/toolrunner.js.map @@ -1 +1 @@ -{"version":3,"file":"toolrunner.js","sourceRoot":"","sources":["../src/toolrunner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uCAAwB;AACxB,+CAAgC;AAChC,qDAAsC;AACtC,2CAA4B;AAG5B,gDAAiC;AACjC,gEAAiD;AAEjD,sDAAsD;AAEtD,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAE/C;;GAEG;AACH,MAAa,UAAW,SAAQ,MAAM,CAAC,YAAY;IACjD,YAAY,QAAgB,EAAE,IAAe,EAAE,OAAwB;QACrE,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;SACjE;QAED,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;IAC9B,CAAC;IAMO,MAAM,CAAC,OAAe;QAC5B,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,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,CAAA;YAC1B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAA;SACpB;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,CAAC,CAAA;IAChD,CAAC;IAEO,MAAM,CAAC,aAAa,CAAC,KAAgB;QAC3C,IAAI,KAAK,CAAC,IAAI,EAAE;YACd,OAAM;SACP;QAED,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,KAAK,CAAC,aAAa,EAAE;YAC/C,MAAM,OAAO,GAAG,0CAA0C,KAAK,CAAC,KAAK;gBACnE,IAAI,4CACJ,KAAK,CAAC,QACR,0FAA0F,CAAA;YAC1F,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;SACtB;QAED,KAAK,CAAC,UAAU,EAAE,CAAA;IACpB,CAAC;CACF"} \ No newline at end of file diff --git a/node_modules/@actions/exec/package.json b/node_modules/@actions/exec/package.json index 3d6ca4b..bc4d77a 100644 --- a/node_modules/@actions/exec/package.json +++ b/node_modules/@actions/exec/package.json @@ -1,54 +1,24 @@ { - "_from": "@actions/exec@1.0.4", - "_id": "@actions/exec@1.0.4", - "_inBundle": false, - "_integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==", - "_location": "/@actions/exec", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "@actions/exec@1.0.4", - "name": "@actions/exec", - "escapedName": "@actions%2fexec", - "scope": "@actions", - "rawSpec": "1.0.4", - "saveSpec": null, - "fetchSpec": "1.0.4" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz", - "_shasum": "99d75310e62e59fc37d2ee6dcff6d4bffadd3a5d", - "_spec": "@actions/exec@1.0.4", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package", - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "bundleDependencies": false, - "dependencies": { - "@actions/io": "^1.0.1" - }, - "deprecated": false, + "name": "@actions/exec", + "version": "1.1.1", "description": "Actions exec lib", - "directories": { - "lib": "lib", - "test": "__tests__" - }, - "files": [ - "lib" - ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/exec", "keywords": [ "github", "actions", "exec" ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/exec", "license": "MIT", "main": "lib/exec.js", - "name": "@actions/exec", + "types": "lib/exec.d.ts", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib", + "!.DS_Store" + ], "publishConfig": { "access": "public" }, @@ -58,10 +28,14 @@ "directory": "packages/exec" }, "scripts": { - "audit-moderate": "npm install && npm audit --audit-level=moderate", + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", "test": "echo \"Error: run tests from root\" && exit 1", "tsc": "tsc" }, - "types": "lib/exec.d.ts", - "version": "1.0.4" + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "dependencies": { + "@actions/io": "^1.0.1" + } } diff --git a/node_modules/@actions/http-client/LICENSE b/node_modules/@actions/http-client/LICENSE new file mode 100644 index 0000000..5823a51 --- /dev/null +++ b/node_modules/@actions/http-client/LICENSE @@ -0,0 +1,21 @@ +Actions Http Client for Node.js + +Copyright (c) GitHub, Inc. + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/@actions/http-client/README.md b/node_modules/@actions/http-client/README.md new file mode 100644 index 0000000..7e06ade --- /dev/null +++ b/node_modules/@actions/http-client/README.md @@ -0,0 +1,73 @@ +# `@actions/http-client` + +A lightweight HTTP client optimized for building actions. + +## Features + + - HTTP client with TypeScript generics and async/await/Promises + - Typings included! + - [Proxy support](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/about-self-hosted-runners#using-a-proxy-server-with-self-hosted-runners) just works with actions and the runner + - Targets ES2019 (runner runs actions with node 12+). Only supported on node 12+. + - Basic, Bearer and PAT Support out of the box. Extensible handlers for others. + - Redirects supported + +Features and releases [here](./RELEASES.md) + +## Install + +``` +npm install @actions/http-client --save +``` + +## Samples + +See the [tests](./__tests__) for detailed examples. + +## Errors + +### HTTP + +The HTTP client does not throw unless truly exceptional. + +* A request that successfully executes resulting in a 404, 500 etc... will return a response object with a status code and a body. +* Redirects (3xx) will be followed by default. + +See the [tests](./__tests__) for detailed examples. + +## Debugging + +To enable detailed console logging of all HTTP requests and responses, set the NODE_DEBUG environment varible: + +```shell +export NODE_DEBUG=http +``` + +## Node support + +The http-client is built using the latest LTS version of Node 12. It may work on previous node LTS versions but it's tested and officially supported on Node12+. + +## Support and Versioning + +We follow semver and will hold compatibility between major versions and increment the minor version with new features and capabilities (while holding compat). + +## Contributing + +We welcome PRs. Please create an issue and if applicable, a design before proceeding with code. + +once: + +``` +npm install +``` + +To build: + +``` +npm run build +``` + +To run all tests: + +``` +npm test +``` diff --git a/node_modules/@actions/http-client/lib/auth.d.ts b/node_modules/@actions/http-client/lib/auth.d.ts new file mode 100644 index 0000000..8cc9fc3 --- /dev/null +++ b/node_modules/@actions/http-client/lib/auth.d.ts @@ -0,0 +1,26 @@ +/// +import * as http from 'http'; +import * as ifm from './interfaces'; +import { HttpClientResponse } from './index'; +export declare class BasicCredentialHandler implements ifm.RequestHandler { + username: string; + password: string; + constructor(username: string, password: string); + prepareRequest(options: http.RequestOptions): void; + canHandleAuthentication(): boolean; + handleAuthentication(): Promise; +} +export declare class BearerCredentialHandler implements ifm.RequestHandler { + token: string; + constructor(token: string); + prepareRequest(options: http.RequestOptions): void; + canHandleAuthentication(): boolean; + handleAuthentication(): Promise; +} +export declare class PersonalAccessTokenCredentialHandler implements ifm.RequestHandler { + token: string; + constructor(token: string); + prepareRequest(options: http.RequestOptions): void; + canHandleAuthentication(): boolean; + handleAuthentication(): Promise; +} diff --git a/node_modules/@actions/http-client/lib/auth.js b/node_modules/@actions/http-client/lib/auth.js new file mode 100644 index 0000000..2c150a3 --- /dev/null +++ b/node_modules/@actions/http-client/lib/auth.js @@ -0,0 +1,81 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0; +class BasicCredentialHandler { + constructor(username, password) { + this.username = username; + this.password = password; + } + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BasicCredentialHandler = BasicCredentialHandler; +class BearerCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Bearer ${this.token}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.BearerCredentialHandler = BearerCredentialHandler; +class PersonalAccessTokenCredentialHandler { + constructor(token) { + this.token = token; + } + // currently implements pre-authorization + // TODO: support preAuth = false where it hooks on 401 + prepareRequest(options) { + if (!options.headers) { + throw Error('The request has no headers'); + } + options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`; + } + // This handler cannot handle 401 + canHandleAuthentication() { + return false; + } + handleAuthentication() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error('not implemented'); + }); + } +} +exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; +//# sourceMappingURL=auth.js.map \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/auth.js.map b/node_modules/@actions/http-client/lib/auth.js.map new file mode 100644 index 0000000..7d3a18a --- /dev/null +++ b/node_modules/@actions/http-client/lib/auth.js.map @@ -0,0 +1 @@ +{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,MAAa,sBAAsB;IAIjC,YAAY,QAAgB,EAAE,QAAgB;QAC5C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED,cAAc,CAAC,OAA4B;QACzC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;YACpB,MAAM,KAAK,CAAC,4BAA4B,C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ACpB,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAA;IACxB,CAAC;IAED,iCAAiC;IACjC,uBAAuB;QACrB,OAAO,KAAK,CAAA;IACd,CAAC;IAEK,oBAAoB;;YACxB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAA;QACpC,CAAC;KAAA;CACF;AA3BD,oFA2BC"} \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/index.d.ts b/node_modules/@actions/http-client/lib/index.d.ts new file mode 100644 index 0000000..fe733d1 --- /dev/null +++ b/node_modules/@actions/http-client/lib/index.d.ts @@ -0,0 +1,123 @@ +/// +import * as http from 'http'; +import * as ifm from './interfaces'; +export declare enum HttpCodes { + OK = 200, + MultipleChoices = 300, + MovedPermanently = 301, + ResourceMoved = 302, + SeeOther = 303, + NotModified = 304, + UseProxy = 305, + SwitchProxy = 306, + TemporaryRedirect = 307, + PermanentRedirect = 308, + BadRequest = 400, + Unauthorized = 401, + PaymentRequired = 402, + Forbidden = 403, + NotFound = 404, + MethodNotAllowed = 405, + NotAcceptable = 406, + ProxyAuthenticationRequired = 407, + RequestTimeout = 408, + Conflict = 409, + Gone = 410, + TooManyRequests = 429, + InternalServerError = 500, + NotImplemented = 501, + BadGateway = 502, + ServiceUnavailable = 503, + GatewayTimeout = 504 +} +export declare enum Headers { + Accept = "accept", + ContentType = "content-type" +} +export declare enum MediaTypes { + ApplicationJson = "application/json" +} +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +export declare function getProxyUrl(serverUrl: string): string; +export declare class HttpClientError extends Error { + constructor(message: string, statusCode: number); + statusCode: number; + result?: any; +} +export declare class HttpClientResponse { + constructor(message: http.IncomingMessage); + message: http.IncomingMessage; + readBody(): Promise; +} +export declare function isHttps(requestUrl: string): boolean; +export declare class HttpClient { + userAgent: string | undefined; + handlers: ifm.RequestHandler[]; + requestOptions: ifm.RequestOptions | undefined; + private _ignoreSslError; + private _socketTimeout; + private _allowRedirects; + private _allowRedirectDowngrade; + private _maxRedirects; + private _allowRetries; + private _maxRetries; + private _agent; + private _proxyAgent; + private _keepAlive; + private _disposed; + constructor(userAgent?: string, handlers?: ifm.RequestHandler[], requestOptions?: ifm.RequestOptions); + options(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + get(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + del(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + post(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + patch(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + put(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + head(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise>; + postJson(requestUrl: string, obj: any, additionalHeaders?: http.OutgoingHttpHeaders): Promise>; + putJson(requestUrl: string, obj: any, additionalHeaders?: http.OutgoingHttpHeaders): Promise>; + patchJson(requestUrl: string, obj: any, additionalHeaders?: http.OutgoingHttpHeaders): Promise>; + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream | null, headers?: http.OutgoingHttpHeaders): Promise; + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose(): void; + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info: ifm.RequestInfo, data: string | NodeJS.ReadableStream | null): Promise; + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info: ifm.RequestInfo, data: string | NodeJS.ReadableStream | null, onResult: (err?: Error, res?: HttpClientResponse) => void): void; + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl: string): http.Agent; + private _prepareRequest; + private _mergeHeaders; + private _getExistingOrDefaultHeader; + private _getAgent; + private _performExponentialBackoff; + private _processResponse; +} diff --git a/node_modules/@actions/http-client/lib/index.js b/node_modules/@actions/http-client/lib/index.js new file mode 100644 index 0000000..a1b7d03 --- /dev/null +++ b/node_modules/@actions/http-client/lib/index.js @@ -0,0 +1,605 @@ +"use strict"; +/* eslint-disable @typescript-eslint/no-explicit-any */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; +const http = __importStar(require("http")); +const https = __importStar(require("https")); +const pm = __importStar(require("./proxy")); +const tunnel = __importStar(require("tunnel")); +var HttpCodes; +(function (HttpCodes) { + HttpCodes[HttpCodes["OK"] = 200] = "OK"; + HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices"; + HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently"; + HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved"; + HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther"; + HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified"; + HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy"; + HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy"; + HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect"; + HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect"; + HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest"; + HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized"; + HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired"; + HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden"; + HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound"; + HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed"; + HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable"; + HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; + HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout"; + HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict"; + HttpCodes[HttpCodes["Gone"] = 410] = "Gone"; + HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests"; + HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError"; + HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented"; + HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; + HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; + HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; +})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +var Headers; +(function (Headers) { + Headers["Accept"] = "accept"; + Headers["ContentType"] = "content-type"; +})(Headers = exports.Headers || (exports.Headers = {})); +var MediaTypes; +(function (MediaTypes) { + MediaTypes["ApplicationJson"] = "application/json"; +})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +/** + * Returns the proxy URL, depending upon the supplied url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ +function getProxyUrl(serverUrl) { + const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); + return proxyUrl ? proxyUrl.href : ''; +} +exports.getProxyUrl = getProxyUrl; +const HttpRedirectCodes = [ + HttpCodes.MovedPermanently, + HttpCodes.ResourceMoved, + HttpCodes.SeeOther, + HttpCodes.TemporaryRedirect, + HttpCodes.PermanentRedirect +]; +const HttpResponseRetryCodes = [ + HttpCodes.BadGateway, + HttpCodes.ServiceUnavailable, + HttpCodes.GatewayTimeout +]; +const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD']; +const ExponentialBackoffCeiling = 10; +const ExponentialBackoffTimeSlice = 5; +class HttpClientError extends Error { + constructor(message, statusCode) { + super(message); + this.name = 'HttpClientError'; + this.statusCode = statusCode; + Object.setPrototypeOf(this, HttpClientError.prototype); + } +} +exports.HttpClientError = HttpClientError; +class HttpClientResponse { + constructor(message) { + this.message = message; + } + readBody() { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () { + let output = Buffer.alloc(0); + this.message.on('data', (chunk) => { + output = Buffer.concat([output, chunk]); + }); + this.message.on('end', () => { + resolve(output.toString()); + }); + })); + }); + } +} +exports.HttpClientResponse = HttpClientResponse; +function isHttps(requestUrl) { + const parsedUrl = new URL(requestUrl); + return parsedUrl.protocol === 'https:'; +} +exports.isHttps = isHttps; +class HttpClient { + constructor(userAgent, handlers, requestOptions) { + this._ignoreSslError = false; + this._allowRedirects = true; + this._allowRedirectDowngrade = false; + this._maxRedirects = 50; + this._allowRetries = false; + this._maxRetries = 1; + this._keepAlive = false; + this._disposed = false; + this.userAgent = userAgent; + this.handlers = handlers || []; + this.requestOptions = requestOptions; + if (requestOptions) { + if (requestOptions.ignoreSslError != null) { + this._ignoreSslError = requestOptions.ignoreSslError; + } + this._socketTimeout = requestOptions.socketTimeout; + if (requestOptions.allowRedirects != null) { + this._allowRedirects = requestOptions.allowRedirects; + } + if (requestOptions.allowRedirectDowngrade != null) { + this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; + } + if (requestOptions.maxRedirects != null) { + this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); + } + if (requestOptions.keepAlive != null) { + this._keepAlive = requestOptions.keepAlive; + } + if (requestOptions.allowRetries != null) { + this._allowRetries = requestOptions.allowRetries; + } + if (requestOptions.maxRetries != null) { + this._maxRetries = requestOptions.maxRetries; + } + } + } + options(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('OPTIONS', requestUrl, null, additionalHeaders || {}); + }); + } + get(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('GET', requestUrl, null, additionalHeaders || {}); + }); + } + del(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('DELETE', requestUrl, null, additionalHeaders || {}); + }); + } + post(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('POST', requestUrl, data, additionalHeaders || {}); + }); + } + patch(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PATCH', requestUrl, data, additionalHeaders || {}); + }); + } + put(requestUrl, data, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('PUT', requestUrl, data, additionalHeaders || {}); + }); + } + head(requestUrl, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request('HEAD', requestUrl, null, additionalHeaders || {}); + }); + } + sendStream(verb, requestUrl, stream, additionalHeaders) { + return __awaiter(this, void 0, void 0, function* () { + return this.request(verb, requestUrl, stream, additionalHeaders); + }); + } + /** + * Gets a typed object from an endpoint + * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise + */ + getJson(requestUrl, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + const res = yield this.get(requestUrl, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + postJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.post(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + putJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.put(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + patchJson(requestUrl, obj, additionalHeaders = {}) { + return __awaiter(this, void 0, void 0, function* () { + const data = JSON.stringify(obj, null, 2); + additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson); + additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson); + const res = yield this.patch(requestUrl, data, additionalHeaders); + return this._processResponse(res, this.requestOptions); + }); + } + /** + * Makes a raw http request. + * All other methods such as get, post, patch, and request ultimately call this. + * Prefer get, del, post and patch + */ + request(verb, requestUrl, data, headers) { + return __awaiter(this, void 0, void 0, function* () { + if (this._disposed) { + throw new Error('Client has already been disposed.'); + } + const parsedUrl = new URL(requestUrl); + let info = this._prepareRequest(verb, parsedUrl, headers); + // Only perform retries on reads since writes may not be idempotent. + const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) + ? this._maxRetries + 1 + : 1; + let numTries = 0; + let response; + do { + response = yield this.requestRaw(info, data); + // Check if it's an authentication challenge + if (response && + response.message && + response.message.statusCode === HttpCodes.Unauthorized) { + let authenticationHandler; + for (const handler of this.handlers) { + if (handler.canHandleAuthentication(response)) { + authenticationHandler = handler; + break; + } + } + if (authenticationHandler) { + return authenticationHandler.handleAuthentication(this, info, data); + } + else { + // We have received an unauthorized response but have no handlers to handle it. + // Let the response return to the caller. + return response; + } + } + let redirectsRemaining = this._maxRedirects; + while (response.message.statusCode && + HttpRedirectCodes.includes(response.message.statusCode) && + this._allowRedirects && + redirectsRemaining > 0) { + const redirectUrl = response.message.headers['location']; + if (!redirectUrl) { + // if there's no location to redirect to, we won't + break; + } + const parsedRedirectUrl = new URL(redirectUrl); + if (parsedUrl.protocol === 'https:' && + parsedUrl.protocol !== parsedRedirectUrl.protocol && + !this._allowRedirectDowngrade) { + throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.'); + } + // we need to finish reading the response before reassigning response + // which will leak the open socket. + yield response.readBody(); + // strip authorization header if redirected to a different hostname + if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { + for (const header in headers) { + // header names are case insensitive + if (header.toLowerCase() === 'authorization') { + delete headers[header]; + } + } + } + // let's make the request with the new redirectUrl + info = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info, data); + redirectsRemaining--; + } + if (!response.message.statusCode || + !HttpResponseRetryCodes.includes(response.message.statusCode)) { + // If not a retry code, return immediately instead of retrying + return response; + } + numTries += 1; + if (numTries < maxTries) { + yield response.readBody(); + yield this._performExponentialBackoff(numTries); + } + } while (numTries < maxTries); + return response; + }); + } + /** + * Needs to be called if keepAlive is set to true in request options. + */ + dispose() { + if (this._agent) { + this._agent.destroy(); + } + this._disposed = true; + } + /** + * Raw request. + * @param info + * @param data + */ + requestRaw(info, data) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => { + function callbackForResult(err, res) { + if (err) { + reject(err); + } + else if (!res) { + // If `err` is not passed, then `res` must be passed. + reject(new Error('Unknown error')); + } + else { + resolve(res); + } + } + this.requestRawWithCallback(info, data, callbackForResult); + }); + }); + } + /** + * Raw request with callback. + * @param info + * @param data + * @param onResult + */ + requestRawWithCallback(info, data, onResult) { + if (typeof data === 'string') { + if (!info.options.headers) { + info.options.headers = {}; + } + info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8'); + } + let callbackCalled = false; + function handleResult(err, res) { + if (!callbackCalled) { + callbackCalled = true; + onResult(err, res); + } + } + const req = info.httpModule.request(info.options, (msg) => { + const res = new HttpClientResponse(msg); + handleResult(undefined, res); + }); + let socket; + req.on('socket', sock => { + socket = sock; + }); + // If we ever get disconnected, we want the socket to timeout eventually + req.setTimeout(this._socketTimeout || 3 * 60000, () => { + if (socket) { + socket.end(); + } + handleResult(new Error(`Request timeout: ${info.options.path}`)); + }); + req.on('error', function (err) { + // err has statusCode property + // res should have headers + handleResult(err); + }); + if (data && typeof data === 'string') { + req.write(data, 'utf8'); + } + if (data && typeof data !== 'string') { + data.on('close', function () { + req.end(); + }); + data.pipe(req); + } + else { + req.end(); + } + } + /** + * Gets an http agent. This function is useful when you need an http agent that handles + * routing through a proxy server - depending upon the url and proxy environment variables. + * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com + */ + getAgent(serverUrl) { + const parsedUrl = new URL(serverUrl); + return this._getAgent(parsedUrl); + } + _prepareRequest(method, requestUrl, headers) { + const info = {}; + info.parsedUrl = requestUrl; + const usingSsl = info.parsedUrl.protocol === 'https:'; + info.httpModule = usingSsl ? https : http; + const defaultPort = usingSsl ? 443 : 80; + info.options = {}; + info.options.host = info.parsedUrl.hostname; + info.options.port = info.parsedUrl.port + ? parseInt(info.parsedUrl.port) + : defaultPort; + info.options.path = + (info.parsedUrl.pathname || '') + (info.parsedUrl.search || ''); + info.options.method = method; + info.options.headers = this._mergeHeaders(headers); + if (this.userAgent != null) { + info.options.headers['user-agent'] = this.userAgent; + } + info.options.agent = this._getAgent(info.parsedUrl); + // gives handlers an opportunity to participate + if (this.handlers) { + for (const handler of this.handlers) { + handler.prepareRequest(info.options); + } + } + return info; + } + _mergeHeaders(headers) { + if (this.requestOptions && this.requestOptions.headers) { + return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {})); + } + return lowercaseKeys(headers || {}); + } + _getExistingOrDefaultHeader(additionalHeaders, header, _default) { + let clientHeader; + if (this.requestOptions && this.requestOptions.headers) { + clientHeader = lowercaseKeys(this.requestOptions.headers)[header]; + } + return additionalHeaders[header] || clientHeader || _default; + } + _getAgent(parsedUrl) { + let agent; + const proxyUrl = pm.getProxyUrl(parsedUrl); + const useProxy = proxyUrl && proxyUrl.hostname; + if (this._keepAlive && useProxy) { + agent = this._proxyAgent; + } + if (this._keepAlive && !useProxy) { + agent = this._agent; + } + // if agent is already assigned use that agent. + if (agent) { + return agent; + } + const usingSsl = parsedUrl.protocol === 'https:'; + let maxSockets = 100; + if (this.requestOptions) { + maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets; + } + // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis. + if (proxyUrl && proxyUrl.hostname) { + const agentOptions = { + maxSockets, + keepAlive: this._keepAlive, + proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && { + proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` + })), { host: proxyUrl.hostname, port: proxyUrl.port }) + }; + let tunnelAgent; + const overHttps = proxyUrl.protocol === 'https:'; + if (usingSsl) { + tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp; + } + else { + tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp; + } + agent = tunnelAgent(agentOptions); + this._proxyAgent = agent; + } + // if reusing agent across request and tunneling agent isn't assigned create a new agent + if (this._keepAlive && !agent) { + const options = { keepAlive: this._keepAlive, maxSockets }; + agent = usingSsl ? new https.Agent(options) : new http.Agent(options); + this._agent = agent; + } + // if not using private agent and tunnel agent isn't setup then use global agent + if (!agent) { + agent = usingSsl ? https.globalAgent : http.globalAgent; + } + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + agent.options = Object.assign(agent.options || {}, { + rejectUnauthorized: false + }); + } + return agent; + } + _performExponentialBackoff(retryNumber) { + return __awaiter(this, void 0, void 0, function* () { + retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); + const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); + return new Promise(resolve => setTimeout(() => resolve(), ms)); + }); + } + _processResponse(res, options) { + return __awaiter(this, void 0, void 0, function* () { + return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { + const statusCode = res.message.statusCode || 0; + const response = { + statusCode, + result: null, + headers: {} + }; + // not found leads to null obj returned + if (statusCode === HttpCodes.NotFound) { + resolve(response); + } + // get the result from the body + function dateTimeDeserializer(key, value) { + if (typeof value === 'string') { + const a = new Date(value); + if (!isNaN(a.valueOf())) { + return a; + } + } + return value; + } + let obj; + let contents; + try { + contents = yield res.readBody(); + if (contents && contents.length > 0) { + if (options && options.deserializeDates) { + obj = JSON.parse(contents, dateTimeDeserializer); + } + else { + obj = JSON.parse(contents); + } + response.result = obj; + } + response.headers = res.message.headers; + } + catch (err) { + // Invalid resource (contents not json); leaving result obj null + } + // note that 3xx redirects are handled by the http layer. + if (statusCode > 299) { + let msg; + // if exception/error in body, attempt to get better error + if (obj && obj.message) { + msg = obj.message; + } + else if (contents && contents.length > 0) { + // it may be the case that the exception is in the body message as string + msg = contents; + } + else { + msg = `Failed request: (${statusCode})`; + } + const err = new HttpClientError(msg, statusCode); + err.result = response.result; + reject(err); + } + else { + resolve(response); + } + })); + }); + } +} +exports.HttpClient = HttpClient; +const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {}); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/index.js.map b/node_modules/@actions/http-client/lib/index.js.map new file mode 100644 index 0000000..ca8ea41 --- /dev/null +++ b/node_modules/@actions/http-client/lib/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEvD,2CAA4B;AAC5B,6CAA8B;AAG9B,4CAA6B;AAC7B,+CAAgC;AAEhC,IAAY,SA4BX;AA5BD,WAAY,SAAS;IACnB,uCAAQ,CAAA;IACR,iEAAqB,CAAA;IACrB,mEAAsB,CAAA;IACtB,6DAAmB,CAAA;IACnB,mDAAc,CAAA;IACd,yDAAiB,CAAA;IACjB,mDAAc,CAAA;IACd,yDAAiB,CAAA;IACjB,qEAAuB,CAAA;IACvB,qEAAuB,CAAA;IACvB,uDAAgB,CAAA;IAChB,2DAAkB,CAAA;IAClB,iEAAqB,CAAA;IACrB,qDAAe,CAAA;IACf,mDAAc,CAAA;IACd,mEAAsB,CAAA;IACtB,6DAAmB,CAAA;IACnB,yFAAiC,CAAA;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AC,CAAC,EAAE,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/interfaces.d.ts b/node_modules/@actions/http-client/lib/interfaces.d.ts new file mode 100644 index 0000000..54fd4a8 --- /dev/null +++ b/node_modules/@actions/http-client/lib/interfaces.d.ts @@ -0,0 +1,44 @@ +/// +import * as http from 'http'; +import * as https from 'https'; +import { HttpClientResponse } from './index'; +export interface HttpClient { + options(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + get(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + del(requestUrl: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + post(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + patch(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + put(requestUrl: string, data: string, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: http.OutgoingHttpHeaders): Promise; + request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: http.OutgoingHttpHeaders): Promise; + requestRaw(info: RequestInfo, data: string | NodeJS.ReadableStream): Promise; + requestRawWithCallback(info: RequestInfo, data: string | NodeJS.ReadableStream, onResult: (err?: Error, res?: HttpClientResponse) => void): void; +} +export interface RequestHandler { + prepareRequest(options: http.RequestOptions): void; + canHandleAuthentication(response: HttpClientResponse): boolean; + handleAuthentication(httpClient: HttpClient, requestInfo: RequestInfo, data: string | NodeJS.ReadableStream | null): Promise; +} +export interface RequestInfo { + options: http.RequestOptions; + parsedUrl: URL; + httpModule: typeof http | typeof https; +} +export interface RequestOptions { + headers?: http.OutgoingHttpHeaders; + socketTimeout?: number; + ignoreSslError?: boolean; + allowRedirects?: boolean; + allowRedirectDowngrade?: boolean; + maxRedirects?: number; + maxSockets?: number; + keepAlive?: boolean; + deserializeDates?: boolean; + allowRetries?: boolean; + maxRetries?: number; +} +export interface TypedResponse { + statusCode: number; + result: T | null; + headers: http.IncomingHttpHeaders; +} diff --git a/node_modules/@actions/http-client/lib/interfaces.js b/node_modules/@actions/http-client/lib/interfaces.js new file mode 100644 index 0000000..db91911 --- /dev/null +++ b/node_modules/@actions/http-client/lib/interfaces.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=interfaces.js.map \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/interfaces.js.map b/node_modules/@actions/http-client/lib/interfaces.js.map new file mode 100644 index 0000000..8fb5f7d --- /dev/null +++ b/node_modules/@actions/http-client/lib/interfaces.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../src/interfaces.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/proxy.d.ts b/node_modules/@actions/http-client/lib/proxy.d.ts new file mode 100644 index 0000000..4599865 --- /dev/null +++ b/node_modules/@actions/http-client/lib/proxy.d.ts @@ -0,0 +1,2 @@ +export declare function getProxyUrl(reqUrl: URL): URL | undefined; +export declare function checkBypass(reqUrl: URL): boolean; diff --git a/node_modules/@actions/http-client/lib/proxy.js b/node_modules/@actions/http-client/lib/proxy.js new file mode 100644 index 0000000..528ffe4 --- /dev/null +++ b/node_modules/@actions/http-client/lib/proxy.js @@ -0,0 +1,61 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.checkBypass = exports.getProxyUrl = void 0; +function getProxyUrl(reqUrl) { + const usingSsl = reqUrl.protocol === 'https:'; + if (checkBypass(reqUrl)) { + return undefined; + } + const proxyVar = (() => { + if (usingSsl) { + return process.env['https_proxy'] || process.env['HTTPS_PROXY']; + } + else { + return process.env['http_proxy'] || process.env['HTTP_PROXY']; + } + })(); + if (proxyVar) { + return new URL(proxyVar); + } + else { + return undefined; + } +} +exports.getProxyUrl = getProxyUrl; +function checkBypass(reqUrl) { + if (!reqUrl.hostname) { + return false; + } + const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; + if (!noProxy) { + return false; + } + // Determine the request port + let reqPort; + if (reqUrl.port) { + reqPort = Number(reqUrl.port); + } + else if (reqUrl.protocol === 'http:') { + reqPort = 80; + } + else if (reqUrl.protocol === 'https:') { + reqPort = 443; + } + // Format the request hostname and hostname with port + const upperReqHosts = [reqUrl.hostname.toUpperCase()]; + if (typeof reqPort === 'number') { + upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); + } + // Compare request host against noproxy + for (const upperNoProxyItem of noProxy + .split(',') + .map(x => x.trim().toUpperCase()) + .filter(x => x)) { + if (upperReqHosts.some(x => x === upperNoProxyItem)) { + return true; + } + } + return false; +} +exports.checkBypass = checkBypass; +//# sourceMappingURL=proxy.js.map \ No newline at end of file diff --git a/node_modules/@actions/http-client/lib/proxy.js.map b/node_modules/@actions/http-client/lib/proxy.js.map new file mode 100644 index 0000000..4440de9 --- /dev/null +++ b/node_modules/@actions/http-client/lib/proxy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../src/proxy.ts"],"names":[],"mappings":";;;AAAA,SAAgB,WAAW,CAAC,MAAW;IACrC,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAA;IAE7C,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE;QACvB,OAAO,SAAS,CAAA;KACjB;IAED,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE;QACrB,IAAI,QAAQ,EAAE;YACZ,OAAO,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;SAChE;aAAM;YACL,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;SAC9D;IACH,CAAC,CAAC,EAAE,CAAA;IAEJ,IAAI,QAAQ,EAAE;QACZ,OAAO,IAAI,GAAG,CAAC,QAAQ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nD,OAAO,IAAI,CAAA;SACZ;KACF;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AArCD,kCAqCC"} \ No newline at end of file diff --git a/node_modules/@actions/http-client/package.json b/node_modules/@actions/http-client/package.json new file mode 100644 index 0000000..c1de221 --- /dev/null +++ b/node_modules/@actions/http-client/package.json @@ -0,0 +1,48 @@ +{ + "name": "@actions/http-client", + "version": "2.0.1", + "description": "Actions Http Client", + "keywords": [ + "github", + "actions", + "http" + ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/http-client", + "license": "MIT", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "directories": { + "lib": "lib", + "test": "__tests__" + }, + "files": [ + "lib", + "!.DS_Store" + ], + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/actions/toolkit.git", + "directory": "packages/http-client" + }, + "scripts": { + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", + "test": "echo \"Error: run tests from root\" && exit 1", + "build": "tsc", + "format": "prettier --write **/*.ts", + "format-check": "prettier --check **/*.ts", + "tsc": "tsc" + }, + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + }, + "devDependencies": { + "@types/tunnel": "0.0.3", + "proxy": "^1.0.1" + }, + "dependencies": { + "tunnel": "^0.0.6" + } +} diff --git a/node_modules/pino-std-serializers/LICENSE b/node_modules/@actions/io/LICENSE.md similarity index 93% rename from node_modules/pino-std-serializers/LICENSE rename to node_modules/@actions/io/LICENSE.md index 69957c5..dbae2ed 100644 --- a/node_modules/pino-std-serializers/LICENSE +++ b/node_modules/@actions/io/LICENSE.md @@ -1,7 +1,9 @@ -Copyright Mateo Collina, David Mark Clements, James Sumners +The MIT License (MIT) + +Copyright 2019 GitHub Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/@actions/io/lib/io-util.d.ts b/node_modules/@actions/io/lib/io-util.d.ts index f0214fe..0cddd31 100644 --- a/node_modules/@actions/io/lib/io-util.d.ts +++ b/node_modules/@actions/io/lib/io-util.d.ts @@ -9,17 +9,6 @@ export declare function isDirectory(fsPath: string, useStat?: boolean): Promise< * \, \hello, \\hello\share, C:, and C:\hello (and corresponding alternate separator cases). */ export declare function isRooted(p: string): boolean; -/** - * Recursively create a directory at `fsPath`. - * - * This implementation is optimistic, meaning it attempts to create the full - * path first, and backs up the path stack from there. - * - * @param fsPath The path to create - * @param maxDepth The maximum recursion depth - * @param depth The current recursion depth - */ -export declare function mkdirP(fsPath: string, maxDepth?: number, depth?: number): Promise; /** * Best effort attempt to determine whether a file exists and is executable. * @param filePath file path to check @@ -27,3 +16,4 @@ export declare function mkdirP(fsPath: string, maxDepth?: number, depth?: number * @return if file exists and is executable, returns the file path. otherwise empty string. */ export declare function tryGetExecutablePath(filePath: string, extensions: string[]): Promise; +export declare function getCmdPath(): string; diff --git a/node_modules/@actions/io/lib/io-util.js b/node_modules/@actions/io/lib/io-util.js index 17b3bba..aae903c 100644 --- a/node_modules/@actions/io/lib/io-util.js +++ b/node_modules/@actions/io/lib/io-util.js @@ -1,4 +1,23 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -10,9 +29,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; var _a; Object.defineProperty(exports, "__esModule", { value: true }); -const assert_1 = require("assert"); -const fs = require("fs"); -const path = require("path"); +exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0; +const fs = __importStar(require("fs")); +const path = __importStar(require("path")); _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink; exports.IS_WINDOWS = process.platform === 'win32'; function exists(fsPath) { @@ -53,49 +72,6 @@ function isRooted(p) { return p.startsWith('/'); } exports.isRooted = isRooted; -/** - * Recursively create a directory at `fsPath`. - * - * This implementation is optimistic, meaning it attempts to create the full - * path first, and backs up the path stack from there. - * - * @param fsPath The path to create - * @param maxDepth The maximum recursion depth - * @param depth The current recursion depth - */ -function mkdirP(fsPath, maxDepth = 1000, depth = 1) { - return __awaiter(this, void 0, void 0, function* () { - assert_1.ok(fsPath, 'a path argument must be provided'); - fsPath = path.resolve(fsPath); - if (depth >= maxDepth) - return exports.mkdir(fsPath); - try { - yield exports.mkdir(fsPath); - return; - } - catch (err) { - switch (err.code) { - case 'ENOENT': { - yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1); - yield exports.mkdir(fsPath); - return; - } - default: { - let stats; - try { - stats = yield exports.stat(fsPath); - } - catch (err2) { - throw err; - } - if (!stats.isDirectory()) - throw err; - } - } - } - }); -} -exports.mkdirP = mkdirP; /** * Best effort attempt to determine whether a file exists and is executable. * @param filePath file path to check @@ -192,4 +168,10 @@ function isUnixExecutable(stats) { ((stats.mode & 8) > 0 && stats.gid === process.getgid()) || ((stats.mode & 64) > 0 && stats.uid === process.getuid())); } +// Get the path of cmd.exe in windows +function getCmdPath() { + var _a; + return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`; +} +exports.getCmdPath = getCmdPath; //# sourceMappingURL=io-util.js.map \ No newline at end of file diff --git a/node_modules/@actions/io/lib/io-util.js.map b/node_modules/@actions/io/lib/io-util.js.map index 76cd3b9..ad5eebb 100644 --- a/node_modules/@actions/io/lib/io-util.js.map +++ b/node_modules/@actions/io/lib/io-util.js.map @@ -1 +1 @@ -{"version":3,"file":"io-util.js","sourceRoot":"","sources":["../src/io-util.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mCAAyB;AACzB,yBAAwB;AACxB,6BAA4B;AAEf,gBAYE,qTAAA;AAEF,QAAA,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAA;AAEtD,SAAsB,MAAM,CAAC,MAAc;;QACzC,IAAI;YACF,MAAM,YAAI,CAAC,MAAM,CAAC,CAAA;SACnB;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;gBACzB,OAAO,KAAK,CAAA;aACb;YAED,MAAM,GAAG,CAAA;SACV;QAED,OAAO,IAAI,CAAA;IACb,CAAC;CAAA;AAZD,wBAYC;AAED,SAAsB,WAAW,CAC/B,MAAc,EACd,UAAmB,KAAK;;QAExB,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,MAAM,YAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,aAAK,CAAC,MAAM,CAAC,CAAA;QAChE,OAAO,KAAK,CAAC,WAAW,EAAE,CAAA;IAC5B,CAAC;CAAA;AAND,kCAMC;AAED;;;GAGG;AACH,SAAgB,QAAQ,CAAC,CAAS;IAChC,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,CAAA;IAC1B,IAAI,CAAC,CAAC,EAAE;QACN,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAA;KAC5D;IAED,IAAI,kBAAU,EAAE;QACd,OAAO,CACL,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,8BAA8B;SACxE,CAAA,CAAC,sBAAsB;KACzB;IAED,OAAO,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAA;AAC1B,CAAC;AAbD,4BAaC;AAED;;;;;;;;;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,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAA;AACjC,CAAC;AAED,qCAAqC;AACrC,6BAA6B;AAC7B,6BAA6B;AAC7B,SAAS,gBAAgB,CAAC,KAAe;IACvC,OAAO,CACL,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC;QACpB,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC;QACxD,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAC1D,CAAA;AACH,CAAC;AAED,qCAAqC;AACrC,SAAgB,UAAU;;IACxB,aAAO,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAI,SAAS,CAAA;AAC5C,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/node_modules/@actions/io/lib/io.d.ts b/node_modules/@actions/io/lib/io.d.ts index a4ea5a7..a674522 100644 --- a/node_modules/@actions/io/lib/io.d.ts +++ b/node_modules/@actions/io/lib/io.d.ts @@ -6,6 +6,8 @@ export interface CopyOptions { recursive?: boolean; /** Optional. Whether to overwrite existing files in the destination. Defaults to true */ force?: boolean; + /** Optional. Whether to copy the source directory along with all the files. Only takes effect when recursive=true and copying a directory. Default is true*/ + copySourceDirectory?: boolean; } /** * Interface for cp/mv options @@ -54,3 +56,9 @@ export declare function mkdirP(fsPath: string): Promise; * @returns Promise path to tool */ export declare function which(tool: string, check?: boolean): Promise; +/** + * Returns a list of all occurrences of the given tool on the system path. + * + * @returns Promise the paths of the tool + */ +export declare function findInPath(tool: string): Promise; diff --git a/node_modules/@actions/io/lib/io.js b/node_modules/@actions/io/lib/io.js index ad5bdb9..4dc1fc3 100644 --- a/node_modules/@actions/io/lib/io.js +++ b/node_modules/@actions/io/lib/io.js @@ -1,4 +1,23 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { @@ -9,11 +28,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -const childProcess = require("child_process"); -const path = require("path"); +exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0; +const assert_1 = require("assert"); +const childProcess = __importStar(require("child_process")); +const path = __importStar(require("path")); const util_1 = require("util"); -const ioUtil = require("./io-util"); +const ioUtil = __importStar(require("./io-util")); const exec = util_1.promisify(childProcess.exec); +const execFile = util_1.promisify(childProcess.execFile); /** * Copies a file or folder. * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js @@ -24,14 +46,14 @@ const exec = util_1.promisify(childProcess.exec); */ function cp(source, dest, options = {}) { return __awaiter(this, void 0, void 0, function* () { - const { force, recursive } = readCopyOptions(options); + const { force, recursive, copySourceDirectory } = readCopyOptions(options); const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; // Dest is an existing file, but not forcing if (destStat && destStat.isFile() && !force) { return; } // If dest is an existing directory, should copy inside. - const newDest = destStat && destStat.isDirectory() + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path.join(dest, path.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { @@ -96,12 +118,22 @@ function rmRF(inputPath) { if (ioUtil.IS_WINDOWS) { // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del. + // Check for invalid characters + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } try { + const cmdPath = ioUtil.getCmdPath(); if (yield ioUtil.isDirectory(inputPath, true)) { - yield exec(`rd /s /q "${inputPath}"`); + yield exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, { + env: { inputPath } + }); } else { - yield exec(`del /f /a "${inputPath}"`); + yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, { + env: { inputPath } + }); } } catch (err) { @@ -134,7 +166,7 @@ function rmRF(inputPath) { return; } if (isDir) { - yield exec(`rm -rf "${inputPath}"`); + yield execFile(`rm`, [`-rf`, `${inputPath}`]); } else { yield ioUtil.unlink(inputPath); @@ -152,7 +184,8 @@ exports.rmRF = rmRF; */ function mkdirP(fsPath) { return __awaiter(this, void 0, void 0, function* () { - yield ioUtil.mkdirP(fsPath); + assert_1.ok(fsPath, 'a path argument must be provided'); + yield ioUtil.mkdir(fsPath, { recursive: true }); }); } exports.mkdirP = mkdirP; @@ -180,62 +213,80 @@ function which(tool, check) { throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } + return result; } - try { - // build the list of extensions to try - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env.PATHEXT) { - for (const extension of process.env.PATHEXT.split(path.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - // if it's rooted, return it if exists. otherwise return empty. - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return filePath; - } - return ''; - } - // if any path separators, return empty - if (tool.includes('/') || (ioUtil.IS_WINDOWS && tool.includes('\\'))) { - return ''; - } - // build the list of directories - // - // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, - // it feels like we should not do this. Checking the current directory seems like more of a use - // case of a shell, and the which() function exposed by the toolkit should strive for consistency - // across platforms. - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path.delimiter)) { - if (p) { - directories.push(p); - } - } - } - // return the first match - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(directory + path.sep + tool, extensions); - if (filePath) { - return filePath; - } - } - return ''; - } - catch (err) { - throw new Error(`which failed with message ${err.message}`); + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; } + return ''; }); } exports.which = which; +/** + * Returns a list of all occurrences of the given tool on the system path. + * + * @returns Promise the paths of the tool + */ +function findInPath(tool) { + return __awaiter(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + // build the list of extensions to try + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) { + for (const extension of process.env['PATHEXT'].split(path.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + // if it's rooted, return it if exists. otherwise return empty. + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + // if any path separators, return empty + if (tool.includes(path.sep)) { + return []; + } + // build the list of directories + // + // Note, technically "where" checks the current directory on Windows. From a toolkit perspective, + // it feels like we should not do this. Checking the current directory seems like more of a use + // case of a shell, and the which() function exposed by the toolkit should strive for consistency + // across platforms. + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path.delimiter)) { + if (p) { + directories.push(p); + } + } + } + // find all matches + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); +} +exports.findInPath = findInPath; function readCopyOptions(options) { const force = options.force == null ? true : options.force; const recursive = Boolean(options.recursive); - return { force, recursive }; + const copySourceDirectory = options.copySourceDirectory == null + ? true + : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; } function cpDirRecursive(sourceDir, destDir, currentDepth, force) { return __awaiter(this, void 0, void 0, function* () { diff --git a/node_modules/@actions/io/lib/io.js.map b/node_modules/@actions/io/lib/io.js.map index 91db963..3249d7d 100644 --- a/node_modules/@actions/io/lib/io.js.map +++ b/node_modules/@actions/io/lib/io.js.map @@ -1 +1 @@ -{"version":3,"file":"io.js","sourceRoot":"","sources":["../src/io.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,8CAA6C;AAC7C,6BAA4B;AAC5B,+BAA8B;AAC9B,oCAAmC;AAEnC,MAAM,IAAI,GAAG,gBAAS,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;AAoBzC;;;;;;;GAOG;AACH,SAAsB,EAAE,CACtB,MAAc,EACd,IAAY,EACZ,UAAuB,EAAE;;QAEzB,MAAM,EAAC,KAAK,EAAE,SAAS,EAAC,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;QAEnD,MAAM,QAAQ,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;QAC7E,4CAA4C;QAC5C,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE;YAC3C,OAAM;SACP;QAED,wDAAwD;QACxD,MAAM,OAAO,GACX,QAAQ,IAAI,QAAQ,CAAC,WAAW,EAAE;YAChC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ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Q,EAAE,KAAK,CAAC,CAAA;aACzC;SACF;QAED,kDAAkD;QAClD,MAAM,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IAClE,CAAC;CAAA;AAED,qBAAqB;AACrB,SAAe,QAAQ,CACrB,OAAe,EACf,QAAgB,EAChB,KAAc;;QAEd,IAAI,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE;YAClD,oBAAoB;YACpB,IAAI;gBACF,MAAM,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;gBAC5B,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;aAC9B;YAAC,OAAO,CAAC,EAAE;gBACV,kCAAkC;gBAClC,IAAI,CAAC,CAAC,IAAI,KAAK,OAAO,EAAE;oBACtB,MAAM,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;oBACpC,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;iBAC9B;gBACD,iDAAiD;aAClD;YAED,oBAAoB;YACpB,MAAM,WAAW,GAAW,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;YAC1D,MAAM,MAAM,CAAC,OAAO,CAClB,WAAW,EACX,QAAQ,EACR,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CACtC,CAAA;SACF;aAAM,IAAI,CAAC,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,KAAK,EAAE;YACpD,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;SACzC;IACH,CAAC;CAAA"} \ No newline at end of file diff --git a/node_modules/@actions/io/package.json b/node_modules/@actions/io/package.json index d304f1d..5ebc63a 100644 --- a/node_modules/@actions/io/package.json +++ b/node_modules/@actions/io/package.json @@ -1,34 +1,16 @@ { - "_from": "@actions/io@^1.0.1", - "_id": "@actions/io@1.0.2", - "_inBundle": false, - "_integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==", - "_location": "/@actions/io", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@actions/io@^1.0.1", - "name": "@actions/io", - "escapedName": "@actions%2fio", - "scope": "@actions", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/@actions/exec" - ], - "_resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz", - "_shasum": "2f614b6e69ce14d191180451eb38e6576a6e6b27", - "_spec": "@actions/io@^1.0.1", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/@actions/exec", - "bugs": { - "url": "https://github.com/actions/toolkit/issues" - }, - "bundleDependencies": false, - "deprecated": false, + "name": "@actions/io", + "version": "1.1.2", "description": "Actions io lib", + "keywords": [ + "github", + "actions", + "io" + ], + "homepage": "https://github.com/actions/toolkit/tree/main/packages/io", + "license": "MIT", + "main": "lib/io.js", + "types": "lib/io.d.ts", "directories": { "lib": "lib", "test": "__tests__" @@ -36,15 +18,6 @@ "files": [ "lib" ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/io", - "keywords": [ - "github", - "actions", - "io" - ], - "license": "MIT", - "main": "lib/io.js", - "name": "@actions/io", "publishConfig": { "access": "public" }, @@ -54,10 +27,11 @@ "directory": "packages/io" }, "scripts": { - "audit-moderate": "npm install && npm audit --audit-level=moderate", + "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", "test": "echo \"Error: run tests from root\" && exit 1", "tsc": "tsc" }, - "types": "lib/io.d.ts", - "version": "1.0.2" + "bugs": { + "url": "https://github.com/actions/toolkit/issues" + } } diff --git a/node_modules/atomic-sleep/.travis.yml b/node_modules/atomic-sleep/.travis.yml deleted file mode 100644 index 3bb09da..0000000 --- a/node_modules/atomic-sleep/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js -sudo: false -node_js: - - 6 - - 8 - - 10 - - 11 - - 12 - - 13 -script: - - npm run ci \ No newline at end of file diff --git a/node_modules/atomic-sleep/LICENSE b/node_modules/atomic-sleep/LICENSE deleted file mode 100644 index d1d8849..0000000 --- a/node_modules/atomic-sleep/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2020 David Mark Clements - - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/atomic-sleep/index.js b/node_modules/atomic-sleep/index.js deleted file mode 100644 index fbfc8b2..0000000 --- a/node_modules/atomic-sleep/index.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict' - -/* global SharedArrayBuffer, Atomics */ - -if (typeof SharedArrayBuffer !== 'undefined' && typeof Atomics !== 'undefined') { - const nil = new Int32Array(new SharedArrayBuffer(4)) - - function sleep (ms) { - // also filters out NaN, non-number types, including empty strings, but allows bigints - const valid = ms > 0 && ms < Infinity - if (valid === false) { - if (typeof ms !== 'number' && typeof ms !== 'bigint') { - throw TypeError('sleep: ms must be a number') - } - throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity') - } - - Atomics.wait(nil, 0, 0, Number(ms)) - } - module.exports = sleep -} else { - - function sleep (ms) { - // also filters out NaN, non-number types, including empty strings, but allows bigints - const valid = ms > 0 && ms < Infinity - if (valid === false) { - if (typeof ms !== 'number' && typeof ms !== 'bigint') { - throw TypeError('sleep: ms must be a number') - } - throw RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity') - } - const target = Date.now() + Number(ms) - while (target > Date.now()){} - } - - module.exports = sleep - -} diff --git a/node_modules/atomic-sleep/package.json b/node_modules/atomic-sleep/package.json deleted file mode 100644 index 6b7f606..0000000 --- a/node_modules/atomic-sleep/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "atomic-sleep@^1.0.0", - "_id": "atomic-sleep@1.0.0", - "_inBundle": false, - "_integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", - "_location": "/atomic-sleep", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "atomic-sleep@^1.0.0", - "name": "atomic-sleep", - "escapedName": "atomic-sleep", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/sonic-boom" - ], - "_resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", - "_shasum": "eb85b77a601fc932cfe432c5acd364a9e2c9075b", - "_spec": "atomic-sleep@^1.0.0", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/sonic-boom", - "author": { - "name": "David Mark Clements", - "url": "@davidmarkclem" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/atomic-sleep/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Zero CPU overhead, zero dependency, true event-loop blocking sleep", - "devDependencies": { - "standard": "^14.3.1", - "tap": "^14.10.6", - "tape": "^4.13.2" - }, - "engines": { - "node": ">=8.0.0" - }, - "homepage": "https://github.com/davidmarkclements/atomic-sleep#readme", - "keywords": [ - "sleep", - "pause", - "wait", - "performance", - "atomics" - ], - "license": "MIT", - "main": "index.js", - "name": "atomic-sleep", - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/atomic-sleep.git" - }, - "scripts": { - "ci": "npm run lint && npm test", - "lint": "standard", - "test": "tap -R classic- -j1 test" - }, - "version": "1.0.0" -} diff --git a/node_modules/atomic-sleep/readme.md b/node_modules/atomic-sleep/readme.md deleted file mode 100644 index 3cdd91b..0000000 --- a/node_modules/atomic-sleep/readme.md +++ /dev/null @@ -1,58 +0,0 @@ -

Welcome to atomic-sleep ⏱️

-

- Version - - License: MIT - - - Twitter: davidmarkclem - -

- -> Zero CPU overhead, zero dependency, true event-loop blocking sleep - -## Usage - -```js -const sleep = require('atomic-sleep') - -console.time('sleep') -setTimeout(() => { console.timeEnd('sleep') }, 100) -sleep(1000) -``` - -The `console.time` will report a time of just over 1000ms despite the `setTimeout` -being 100ms. This is because the event loop is paused for 1000ms and the setTimeout -fires immediately after the event loop is no longer blocked (as more than 100ms have passed). - -## Install - -```sh -npm install -``` - -## Run tests - -```sh -npm test -``` - -## Support - -Node and Browser versions that support both `SharedArrayBuffer` and `Atomics` will have (virtually) zero CPU overhead sleep. - -For Node, Atomic Sleep can provide zero CPU overhead sleep from Node 8 and up. - -For browser support see https://caniuse.com/#feat=sharedarraybuffer and https://caniuse.com/#feat=mdn-javascript_builtins_atomics. - - -For older Node versions and olders browsers we fall back to blocking the event loop in a way that will cause a CPU spike. - - - -## Author - -👤 **David Mark Clements (@davidmarkclem)** - -* Twitter: [@davidmarkclem](https://twitter.com/davidmarkclem) -* Github: [@davidmarkclements](https://github.com/davidmarkclements) diff --git a/node_modules/atomic-sleep/test.js b/node_modules/atomic-sleep/test.js deleted file mode 100644 index 0020daa..0000000 --- a/node_modules/atomic-sleep/test.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict' -const test = require('tape') -const sleep = require('.') - -test('blocks event loop for given amount of milliseconds', ({ is, end }) => { - const now = Date.now() - setTimeout(() => { - const delta = Date.now() - now - const fuzzyDelta = Math.floor(delta / 10) * 10 // allow up to 10ms of execution lag - is(fuzzyDelta, 1000) - end() - }, 100) - sleep(1000) -}) - -if (typeof BigInt !== 'undefined') { - - test('allows ms to be supplied as a BigInt number', ({ is, end }) => { - const now = Date.now() - setTimeout(() => { - const delta = Date.now() - now - const fuzzyDelta = Math.floor(delta / 10) * 10 // allow up to 10ms of execution lag - is(fuzzyDelta, 1000) - end() - }, 100) - sleep(BigInt(1000)) // avoiding n notation as this will error on legacy node/browsers - }) - -} - -test('throws range error if ms less than 0', ({ throws, end }) => { - throws(() => sleep(-1), RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity')) - end() -}) - -test('throws range error if ms is Infinity', ({ throws, end }) => { - throws(() => sleep(Infinity), RangeError('sleep: ms must be a number that is greater than 0 but less than Infinity')) - end() -}) - -test('throws range error if ms is not a number or bigint', ({ throws, end }) => { - throws(() => sleep('Infinity'), TypeError('sleep: ms must be a number')) - throws(() => sleep('foo'), TypeError('sleep: ms must be a number')) - throws(() => sleep({a: 1}), TypeError('sleep: ms must be a number')) - throws(() => sleep([1,2,3]), TypeError('sleep: ms must be a number')) - end() -}) \ No newline at end of file diff --git a/node_modules/axios/CHANGELOG.md b/node_modules/axios/CHANGELOG.md deleted file mode 100644 index 8c6b7d9..0000000 --- a/node_modules/axios/CHANGELOG.md +++ /dev/null @@ -1,662 +0,0 @@ -# Changelog - -### 0.21.0 (October 23, 2020) - -Fixes and Functionality: - -- Fixing requestHeaders.Authorization ([#3287](https://github.com/axios/axios/pull/3287)) -- Fixing node types ([#3237](https://github.com/axios/axios/pull/3237)) -- Fixing axios.delete ignores config.data ([#3282](https://github.com/axios/axios/pull/3282)) -- Revert "Fixing overwrite Blob/File type as Content-Type in browser. (#1773)" ([#3289](https://github.com/axios/axios/pull/3289)) -- Fixing an issue that type 'null' and 'undefined' is not assignable to validateStatus when typescript strict option is enabled ([#3200](https://github.com/axios/axios/pull/3200)) - -Internal and Tests: - -- Lock travis to not use node v15 ([#3361](https://github.com/axios/axios/pull/3361)) - -Documentation: - -- Fixing simple typo, existant -> existent ([#3252](https://github.com/axios/axios/pull/3252)) -- Fixing typos ([#3309](https://github.com/axios/axios/pull/3309)) - -Huge thanks to everyone who contributed to this release via code (authors listed below) or via reviews and triaging on GitHub: - -- Allan Cruz <57270969+Allanbcruz@users.noreply.github.com> -- George Cheng -- Jay -- Kevin Kirsche -- Remco Haszing -- Taemin Shin -- Tim Gates -- Xianming Zhong - -### 0.20.0 (August 20, 2020) - -Release of 0.20.0-pre as a full release with no other changes. - -### 0.20.0-pre (July 15, 2020) - -Fixes and Functionality: - -- Fixing response with utf-8 BOM can not parse to json ([#2419](https://github.com/axios/axios/pull/2419)) - - fix: remove byte order marker (UTF-8 BOM) when transform response - - fix: remove BOM only utf-8 - - test: utf-8 BOM - - fix: incorrect param name -- Refactor mergeConfig without utils.deepMerge ([#2844](https://github.com/axios/axios/pull/2844)) - - Adding failing test - - Fixing #2587 default custom config persisting - - Adding Concat keys and filter duplicates - - Fixed value from CPE - - update for review feedbacks - - no deepMerge - - only merge between plain objects - - fix rename - - always merge config by mergeConfig - - extract function mergeDeepProperties - - refactor mergeConfig with all keys, and add special logic for validateStatus - - add test for resetting headers - - add lots of tests and fix a bug - - should not inherit `data` - - use simple toString -- Fixing overwrite Blob/File type as Content-Type in browser. ([#1773](https://github.com/axios/axios/pull/1773)) -- Fixing an issue that type 'null' is not assignable to validateStatus ([#2773](https://github.com/axios/axios/pull/2773)) -- Fixing special char encoding ([#1671](https://github.com/axios/axios/pull/1671)) - - removing @ character from replacement list since it is a reserved character - - Updating buildURL test to not include the @ character - - Removing console logs -- Fixing password encoding with special characters in basic authentication ([#1492](https://github.com/axios/axios/pull/1492)) - - Fixing password encoding with special characters in basic authentication - - Adding test to check if password with non-Latin1 characters pass -- Fixing 'Network Error' in react native android ([#1487](https://github.com/axios/axios/pull/1487)) - There is a bug in react native Android platform when using get method. It will trigger a 'Network Error' when passing the requestData which is an empty string to request.send function. So if the requestData is an empty string we can set it to null as well to fix the bug. -- Fixing Cookie Helper with Asyc Components ([#1105](https://github.com/axios/axios/pull/1105)) ([#1107](https://github.com/axios/axios/pull/1107)) -- Fixing 'progressEvent' type ([#2851](https://github.com/axios/axios/pull/2851)) - - Fix 'progressEvent' type - - Update axios.ts -- Fixing getting local files (file://) failed ([#2470](https://github.com/axios/axios/pull/2470)) - - fix issue #2416, #2396 - - fix Eslint warn - - Modify judgment conditions - - add unit test - - update unit test - - update unit test -- Allow PURGE method in typings ([#2191](https://github.com/axios/axios/pull/2191)) -- Adding option to disable automatic decompression ([#2661](https://github.com/axios/axios/pull/2661)) - - Adding ability to disable auto decompression - - Updating decompress documentation in README - - Fixing test\unit\adapters\http.js lint errors - - Adding test for disabling auto decompression - - Removing changes that fixed lint errors in tests - - Removing formatting change to unit test -- Add independent `maxBodyLength` option ([#2781](https://github.com/axios/axios/pull/2781)) - - Add independent option to set the maximum size of the request body - - Remove maxBodyLength check - - Update README - - Assert for error code and message -- Adding responseEncoding to mergeConfig ([#1745](https://github.com/axios/axios/pull/1745)) -- Compatible with follow-redirect aborts the request ([#2689](https://github.com/axios/axios/pull/2689)) - - Compatible with follow-redirect aborts the request - - Use the error code -- Fix merging of params ([#2656](https://github.com/axios/axios/pull/2656)) - - Name function to avoid ESLint func-names warning - - Switch params config to merge list and update tests - - Restore testing of both false and null - - Restore test cases for keys without defaults - - Include test for non-object values that aren't false-y. -- Revert `finally` as `then` ([#2683](https://github.com/axios/axios/pull/2683)) - -Internal and Tests: - -- Fix stale bot config ([#3049](https://github.com/axios/axios/pull/3049)) - - fix stale bot config - - fix multiple lines -- Add days and change name to work ([#3035](https://github.com/axios/axios/pull/3035)) -- Update close-issues.yml ([#3031](https://github.com/axios/axios/pull/3031)) - - Update close-issues.yml - Update close message to read better 😄 - - Fix use of quotations - Use single quotes as per other .yml files - - Remove user name form message -- Add GitHub actions to close stale issues/prs ([#3029](https://github.com/axios/axios/pull/3029)) - - prepare stale actions - - update messages - - Add exempt labels and lighten up comments -- Add GitHub actions to close invalid issues ([#3022](https://github.com/axios/axios/pull/3022)) - - add close actions - - fix with checkout - - update issue templates - - add reminder - - update close message -- Add test with Node.js 12 ([#2860](https://github.com/axios/axios/pull/2860)) - - test with Node.js 12 - - test with latest -- Adding console log on sandbox server startup ([#2210](https://github.com/axios/axios/pull/2210)) - - Adding console log on sandbox server startup - - Update server.js - Add server error handling - - Update server.js - Better error message, remove retry. -- Adding tests for method `options` type definitions ([#1996](https://github.com/axios/axios/pull/1996)) - Update tests. -- Add test for redirecting with too large response ([#2695](https://github.com/axios/axios/pull/2695)) -- Fixing unit test failure in Windows OS ([#2601](https://github.com/axios/axios/pull/2601)) -- Fixing issue for HEAD method and gzipped response ([#2666](https://github.com/axios/axios/pull/2666)) -- Fix tests in browsers ([#2748](https://github.com/axios/axios/pull/2748)) -- chore: add `jsdelivr` and `unpkg` support ([#2443](https://github.com/axios/axios/pull/2443)) - -Documentation: - -- Adding support for URLSearchParams in node ([#1900](https://github.com/axios/axios/pull/1900)) - - Adding support for URLSearchParams in node - - Remove un-needed code - - Update utils.js - - Make changes as suggested -- Adding table of content (preview) ([#3050](https://github.com/axios/axios/pull/3050)) - - add toc (preview) - - remove toc in toc - Signed-off-by: Moni - - fix sublinks - - fix indentation - - remove redundant table links - - update caps and indent - - remove axios -- Replace 'blacklist' with 'blocklist' ([#3006](https://github.com/axios/axios/pull/3006)) -- docs(): Detailed config options environment. ([#2088](https://github.com/axios/axios/pull/2088)) - - docs(): Detailed config options environment. - - Update README.md -- Include axios-data-unpacker in ECOSYSTEM.md ([#2080](https://github.com/axios/axios/pull/2080)) -- Allow opening examples in Gitpod ([#1958](https://github.com/axios/axios/pull/1958)) -- Remove axios.all() and axios.spread() from Readme.md ([#2727](https://github.com/axios/axios/pull/2727)) - - remove axios.all(), axios.spread() - - replace example - - axios.all() -> Promise.all() - - axios.spread(function (acct, perms)) -> function (acct, perms) - - add deprecated mark -- Update README.md ([#2887](https://github.com/axios/axios/pull/2887)) - Small change to the data attribute doc of the config. A request body can also be set for DELETE methods but this wasn't mentioned in the documentation (it only mentioned POST, PUT and PATCH). Took my some 10-20 minutes until I realized that I don't need to manipulate the request body with transformRequest in the case of DELETE. -- Include swagger-taxos-codegen in ECOSYSTEM.md ([#2162](https://github.com/axios/axios/pull/2162)) -- Add CDNJS version badge in README.md ([#878](https://github.com/axios/axios/pull/878)) - This badge will show the version on CDNJS! -- Documentation update to clear up ambiguity in code examples ([#2928](https://github.com/axios/axios/pull/2928)) - - Made an adjustment to the documentation to clear up any ambiguity around the use of "fs". This should help clear up that the code examples with "fs" cannot be used on the client side. -- Update README.md about validateStatus ([#2912](https://github.com/axios/axios/pull/2912)) - Rewrote the comment from "Reject only if the status code is greater than or equal to 500" to "Resolve only if the status code is less than 500" -- Updating documentation for usage form-data ([#2805](https://github.com/axios/axios/pull/2805)) - Closes #2049 -- Fixing CHANGELOG.md issue link ([#2784](https://github.com/axios/axios/pull/2784)) -- Include axios-hooks in ECOSYSTEM.md ([#2003](https://github.com/axios/axios/pull/2003)) -- Added Response header access instructions ([#1901](https://github.com/axios/axios/pull/1901)) - - Added Response header access instructions - - Added note about using bracket notation -- Add `onUploadProgress` and `onDownloadProgress` are browser only ([#2763](https://github.com/axios/axios/pull/2763)) - Saw in #928 and #1966 that `onUploadProgress` and `onDownloadProgress` only work in the browser and was missing that from the README. -- Update ' sign to ` in proxy spec ([#2778](https://github.com/axios/axios/pull/2778)) -- Adding jsDelivr link in README ([#1110](https://github.com/axios/axios/pull/1110)) - - Adding jsDelivr link - - Add SRI - - Remove SRI - -Huge thanks to everyone who contributed to this release via code (authors listed -below) or via reviews and triaging on GitHub: - -- Alan Wang -- Alexandru Ungureanu -- Anubhav Srivastava -- Benny Neugebauer -- Cr <631807682@qq.com> -- David -- David Ko -- David Tanner -- Emily Morehouse -- Felipe Martins -- Fonger <5862369+Fonger@users.noreply.github.com> -- Frostack -- George Cheng -- grumblerchester -- Gustavo López -- hexaez <45806662+hexaez@users.noreply.github.com> -- huangzuizui -- Ian Wijma -- Jay -- jeffjing -- jennynju <46782518+jennynju@users.noreply.github.com> -- Jimmy Liao <52391190+jimmy-liao-gogoro@users.noreply.github.com> -- Jonathan Sharpe -- JounQin -- Justin Beckwith -- Kamil Posiadała <3dcreator.pl@gmail.com> -- Lukas Drgon -- marcinx -- Martti Laine -- Michał Zarach -- Moni -- Motonori Iwata <121048+iwata@users.noreply.github.com> -- Nikita Galkin -- Petr Mares -- Philippe Recto -- Remco Haszing -- rockcs1992 -- Ryan Bown -- Samina Fu -- Simone Busoli -- Spencer von der Ohe -- Sven Efftinge -- Taegyeoung Oh -- Taemin Shin -- Thibault Ehrhart <1208424+ehrhart@users.noreply.github.com> -- Xianming Zhong -- Yasu Flores -- Zac Delventhal - -### 0.19.2 (Jan 20, 2020) - -- Remove unnecessary XSS check ([#2679](https://github.com/axios/axios/pull/2679)) (see ([#2646](https://github.com/axios/axios/issues/2646)) for discussion) - -### 0.19.1 (Jan 7, 2020) - -Fixes and Functionality: - -- Fixing invalid agent issue ([#1904](https://github.com/axios/axios/pull/1904)) -- Fix ignore set withCredentials false ([#2582](https://github.com/axios/axios/pull/2582)) -- Delete useless default to hash ([#2458](https://github.com/axios/axios/pull/2458)) -- Fix HTTP/HTTPs agents passing to follow-redirect ([#1904](https://github.com/axios/axios/pull/1904)) -- Fix ignore set withCredentials false ([#2582](https://github.com/axios/axios/pull/2582)) -- Fix CI build failure ([#2570](https://github.com/axios/axios/pull/2570)) -- Remove dependency on is-buffer from package.json ([#1816](https://github.com/axios/axios/pull/1816)) -- Adding options typings ([#2341](https://github.com/axios/axios/pull/2341)) -- Adding Typescript HTTP method definition for LINK and UNLINK. ([#2444](https://github.com/axios/axios/pull/2444)) -- Update dist with newest changes, fixes Custom Attributes issue -- Change syntax to see if build passes ([#2488](https://github.com/axios/axios/pull/2488)) -- Update Webpack + deps, remove now unnecessary polyfills ([#2410](https://github.com/axios/axios/pull/2410)) -- Fix to prevent XSS, throw an error when the URL contains a JS script ([#2464](https://github.com/axios/axios/pull/2464)) -- Add custom timeout error copy in config ([#2275](https://github.com/axios/axios/pull/2275)) -- Add error toJSON example ([#2466](https://github.com/axios/axios/pull/2466)) -- Fixing Vulnerability A Fortify Scan finds a critical Cross-Site Scrip… ([#2451](https://github.com/axios/axios/pull/2451)) -- Fixing subdomain handling on no_proxy ([#2442](https://github.com/axios/axios/pull/2442)) -- Make redirection from HTTP to HTTPS work ([#2426](https://github.com/axios/axios/pull/2426)) and ([#2547](https://github.com/axios/axios/pull/2547)) -- Add toJSON property to AxiosError type ([#2427](https://github.com/axios/axios/pull/2427)) -- Fixing socket hang up error on node side for slow response. ([#1752](https://github.com/axios/axios/pull/1752)) -- Alternative syntax to send data into the body ([#2317](https://github.com/axios/axios/pull/2317)) -- Fixing custom config options ([#2207](https://github.com/axios/axios/pull/2207)) -- Fixing set `config.method` after mergeConfig for Axios.prototype.request ([#2383](https://github.com/axios/axios/pull/2383)) -- Axios create url bug ([#2290](https://github.com/axios/axios/pull/2290)) -- Do not modify config.url when using a relative baseURL (resolves [#1628](https://github.com/axios/axios/issues/1098)) ([#2391](https://github.com/axios/axios/pull/2391)) -- Add typescript HTTP method definition for LINK and UNLINK ([#2444](https://github.com/axios/axios/pull/2444)) - -Internal: - -- Revert "Update Webpack + deps, remove now unnecessary polyfills" ([#2479](https://github.com/axios/axios/pull/2479)) -- Order of if/else blocks is causing unit tests mocking XHR. ([#2201](https://github.com/axios/axios/pull/2201)) -- Add license badge ([#2446](https://github.com/axios/axios/pull/2446)) -- Fix travis CI build [#2386](https://github.com/axios/axios/pull/2386) -- Fix cancellation error on build master. #2290 #2207 ([#2407](https://github.com/axios/axios/pull/2407)) - -Documentation: - -- Fixing typo in CHANGELOG.md: s/Functionallity/Functionality ([#2639](https://github.com/axios/axios/pull/2639)) -- Fix badge, use master branch ([#2538](https://github.com/axios/axios/pull/2538)) -- Fix typo in changelog [#2193](https://github.com/axios/axios/pull/2193) -- Document fix ([#2514](https://github.com/axios/axios/pull/2514)) -- Update docs with no_proxy change, issue #2484 ([#2513](https://github.com/axios/axios/pull/2513)) -- Fixing missing words in docs template ([#2259](https://github.com/axios/axios/pull/2259)) -- 🐛Fix request finally documentation in README ([#2189](https://github.com/axios/axios/pull/2189)) -- updating spelling and adding link to docs ([#2212](https://github.com/axios/axios/pull/2212)) -- docs: minor tweak ([#2404](https://github.com/axios/axios/pull/2404)) -- Update response interceptor docs ([#2399](https://github.com/axios/axios/pull/2399)) -- Update README.md ([#2504](https://github.com/axios/axios/pull/2504)) -- Fix word 'sintaxe' to 'syntax' in README.md ([#2432](https://github.com/axios/axios/pull/2432)) -- updating README: notes on CommonJS autocomplete ([#2256](https://github.com/axios/axios/pull/2256)) -- Fix grammar in README.md ([#2271](https://github.com/axios/axios/pull/2271)) -- Doc fixes, minor examples cleanup ([#2198](https://github.com/axios/axios/pull/2198)) - -### 0.19.0 (May 30, 2019) - -Fixes and Functionality: - -- Added support for no_proxy env variable ([#1693](https://github.com/axios/axios/pull/1693/files)) - Chance Dickson -- Unzip response body only for statuses != 204 ([#1129](https://github.com/axios/axios/pull/1129)) - drawski -- Destroy stream on exceeding maxContentLength (fixes [#1098](https://github.com/axios/axios/issues/1098)) ([#1485](https://github.com/axios/axios/pull/1485)) - Gadzhi Gadzhiev -- Makes Axios error generic to use AxiosResponse ([#1738](https://github.com/axios/axios/pull/1738)) - Suman Lama -- Fixing Mocha tests by locking follow-redirects version to 1.5.10 ([#1993](https://github.com/axios/axios/pull/1993)) - grumblerchester -- Allow uppercase methods in typings. ([#1781](https://github.com/axios/axios/pull/1781)) - Ken Powers -- Fixing building url with hash mark ([#1771](https://github.com/axios/axios/pull/1771)) - Anatoly Ryabov -- This commit fix building url with hash map (fragment identifier) when parameters are present: they must not be added after `#`, because client cut everything after `#` -- Preserve HTTP method when following redirect ([#1758](https://github.com/axios/axios/pull/1758)) - Rikki Gibson -- Add `getUri` signature to TypeScript definition. ([#1736](https://github.com/axios/axios/pull/1736)) - Alexander Trauzzi -- Adding isAxiosError flag to errors thrown by axios ([#1419](https://github.com/axios/axios/pull/1419)) - Ayush Gupta - -Internal: - -- Fixing .eslintrc without extension ([#1789](https://github.com/axios/axios/pull/1789)) - Manoel -- Fix failing SauceLabs tests by updating configuration - Emily Morehouse -- Add issue templates - Emily Morehouse - -Documentation: - -- Consistent coding style in README ([#1787](https://github.com/axios/axios/pull/1787)) - Ali Servet Donmez -- Add information about auth parameter to README ([#2166](https://github.com/axios/axios/pull/2166)) - xlaguna -- Add DELETE to list of methods that allow data as a config option ([#2169](https://github.com/axios/axios/pull/2169)) - Daniela Borges Matos de Carvalho -- Update ECOSYSTEM.md - Add Axios Endpoints ([#2176](https://github.com/axios/axios/pull/2176)) - Renan -- Add r2curl in ECOSYSTEM ([#2141](https://github.com/axios/axios/pull/2141)) - 유용우 / CX -- Update README.md - Add instructions for installing with yarn ([#2036](https://github.com/axios/axios/pull/2036)) - Victor Hermes -- Fixing spacing for README.md ([#2066](https://github.com/axios/axios/pull/2066)) - Josh McCarty -- Update README.md. - Change `.then` to `.finally` in example code ([#2090](https://github.com/axios/axios/pull/2090)) - Omar Cai -- Clarify what values responseType can have in Node ([#2121](https://github.com/axios/axios/pull/2121)) - Tyler Breisacher -- docs(ECOSYSTEM): add axios-api-versioning ([#2020](https://github.com/axios/axios/pull/2020)) - Weffe -- It seems that `responseType: 'blob'` doesn't actually work in Node (when I tried using it, response.data was a string, not a Blob, since Node doesn't have Blobs), so this clarifies that this option should only be used in the browser -- Update README.md. - Add Querystring library note ([#1896](https://github.com/axios/axios/pull/1896)) - Dmitriy Eroshenko -- Add react-hooks-axios to Libraries section of ECOSYSTEM.md ([#1925](https://github.com/axios/axios/pull/1925)) - Cody Chan -- Clarify in README that default timeout is 0 (no timeout) ([#1750](https://github.com/axios/axios/pull/1750)) - Ben Standefer - -### 0.19.0-beta.1 (Aug 9, 2018) - -**NOTE:** This is a beta version of this release. There may be functionality that is broken in -certain browsers, though we suspect that builds are hanging and not erroring. See -https://saucelabs.com/u/axios for the most up-to-date information. - -New Functionality: - -- Add getUri method ([#1712](https://github.com/axios/axios/issues/1712)) -- Add support for no_proxy env variable ([#1693](https://github.com/axios/axios/issues/1693)) -- Add toJSON to decorated Axios errors to facilitate serialization ([#1625](https://github.com/axios/axios/issues/1625)) -- Add second then on axios call ([#1623](https://github.com/axios/axios/issues/1623)) -- Typings: allow custom return types -- Add option to specify character set in responses (with http adapter) - -Fixes: - -- Fix Keep defaults local to instance ([#385](https://github.com/axios/axios/issues/385)) -- Correctly catch exception in http test ([#1475](https://github.com/axios/axios/issues/1475)) -- Fix accept header normalization ([#1698](https://github.com/axios/axios/issues/1698)) -- Fix http adapter to allow HTTPS connections via HTTP ([#959](https://github.com/axios/axios/issues/959)) -- Fix Removes usage of deprecated Buffer constructor. ([#1555](https://github.com/axios/axios/issues/1555), [#1622](https://github.com/axios/axios/issues/1622)) -- Fix defaults to use httpAdapter if available ([#1285](https://github.com/axios/axios/issues/1285)) - - Fixing defaults to use httpAdapter if available - - Use a safer, cross-platform method to detect the Node environment -- Fix Reject promise if request is cancelled by the browser ([#537](https://github.com/axios/axios/issues/537)) -- [Typescript] Fix missing type parameters on delete/head methods -- [NS]: Send `false` flag isStandardBrowserEnv for Nativescript -- Fix missing type parameters on delete/head -- Fix Default method for an instance always overwritten by get -- Fix type error when socketPath option in AxiosRequestConfig -- Capture errors on request data streams -- Decorate resolve and reject to clear timeout in all cases - -Huge thanks to everyone who contributed to this release via code (authors listed -below) or via reviews and triaging on GitHub: - -- Andrew Scott -- Anthony Gauthier -- arpit -- ascott18 -- Benedikt Rötsch -- Chance Dickson -- Dave Stewart -- Deric Cain -- Guillaume Briday -- Jacob Wejendorp -- Jim Lynch -- johntron -- Justin Beckwith -- Justin Beckwith -- Khaled Garbaya -- Lim Jing Rong -- Mark van den Broek -- Martti Laine -- mattridley -- mattridley -- Nicolas Del Valle -- Nilegfx -- pbarbiero -- Rikki Gibson -- Sako Hartounian -- Shane Fitzpatrick -- Stephan Schneider -- Steven -- Tim Garthwaite -- Tim Johns -- Yutaro Miyazaki - -### 0.18.0 (Feb 19, 2018) - -- Adding support for UNIX Sockets when running with Node.js ([#1070](https://github.com/axios/axios/pull/1070)) -- Fixing typings ([#1177](https://github.com/axios/axios/pull/1177)): - - AxiosRequestConfig.proxy: allows type false - - AxiosProxyConfig: added auth field -- Adding function signature in AxiosInstance interface so AxiosInstance can be invoked ([#1192](https://github.com/axios/axios/pull/1192), [#1254](https://github.com/axios/axios/pull/1254)) -- Allowing maxContentLength to pass through to redirected calls as maxBodyLength in follow-redirects config ([#1287](https://github.com/axios/axios/pull/1287)) -- Fixing configuration when using an instance - method can now be set ([#1342](https://github.com/axios/axios/pull/1342)) - -### 0.17.1 (Nov 11, 2017) - -- Fixing issue with web workers ([#1160](https://github.com/axios/axios/pull/1160)) -- Allowing overriding transport ([#1080](https://github.com/axios/axios/pull/1080)) -- Updating TypeScript typings ([#1165](https://github.com/axios/axios/pull/1165), [#1125](https://github.com/axios/axios/pull/1125), [#1131](https://github.com/axios/axios/pull/1131)) - -### 0.17.0 (Oct 21, 2017) - -- **BREAKING** Fixing issue with `baseURL` and interceptors ([#950](https://github.com/axios/axios/pull/950)) -- **BREAKING** Improving handing of duplicate headers ([#874](https://github.com/axios/axios/pull/874)) -- Adding support for disabling proxies ([#691](https://github.com/axios/axios/pull/691)) -- Updating TypeScript typings with generic type parameters ([#1061](https://github.com/axios/axios/pull/1061)) - -### 0.16.2 (Jun 3, 2017) - -- Fixing issue with including `buffer` in bundle ([#887](https://github.com/axios/axios/pull/887)) -- Including underlying request in errors ([#830](https://github.com/axios/axios/pull/830)) -- Convert `method` to lowercase ([#930](https://github.com/axios/axios/pull/930)) - -### 0.16.1 (Apr 8, 2017) - -- Improving HTTP adapter to return last request in case of redirects ([#828](https://github.com/axios/axios/pull/828)) -- Updating `follow-redirects` dependency ([#829](https://github.com/axios/axios/pull/829)) -- Adding support for passing `Buffer` in node ([#773](https://github.com/axios/axios/pull/773)) - -### 0.16.0 (Mar 31, 2017) - -- **BREAKING** Removing `Promise` from axios typings in favor of built-in type declarations ([#480](https://github.com/axios/axios/issues/480)) -- Adding `options` shortcut method ([#461](https://github.com/axios/axios/pull/461)) -- Fixing issue with using `responseType: 'json'` in browsers incompatible with XHR Level 2 ([#654](https://github.com/axios/axios/pull/654)) -- Improving React Native detection ([#731](https://github.com/axios/axios/pull/731)) -- Fixing `combineURLs` to support empty `relativeURL` ([#581](https://github.com/axios/axios/pull/581)) -- Removing `PROTECTION_PREFIX` support ([#561](https://github.com/axios/axios/pull/561)) - -### 0.15.3 (Nov 27, 2016) - -- Fixing issue with custom instances and global defaults ([#443](https://github.com/axios/axios/issues/443)) -- Renaming `axios.d.ts` to `index.d.ts` ([#519](https://github.com/axios/axios/issues/519)) -- Adding `get`, `head`, and `delete` to `defaults.headers` ([#509](https://github.com/axios/axios/issues/509)) -- Fixing issue with `btoa` and IE ([#507](https://github.com/axios/axios/issues/507)) -- Adding support for proxy authentication ([#483](https://github.com/axios/axios/pull/483)) -- Improving HTTP adapter to use `http` protocol by default ([#493](https://github.com/axios/axios/pull/493)) -- Fixing proxy issues ([#491](https://github.com/axios/axios/pull/491)) - -### 0.15.2 (Oct 17, 2016) - -- Fixing issue with calling `cancel` after response has been received ([#482](https://github.com/axios/axios/issues/482)) - -### 0.15.1 (Oct 14, 2016) - -- Fixing issue with UMD ([#485](https://github.com/axios/axios/issues/485)) - -### 0.15.0 (Oct 10, 2016) - -- Adding cancellation support ([#452](https://github.com/axios/axios/pull/452)) -- Moving default adapter to global defaults ([#437](https://github.com/axios/axios/pull/437)) -- Fixing issue with `file` URI scheme ([#440](https://github.com/axios/axios/pull/440)) -- Fixing issue with `params` objects that have no prototype ([#445](https://github.com/axios/axios/pull/445)) - -### 0.14.0 (Aug 27, 2016) - -- **BREAKING** Updating TypeScript definitions ([#419](https://github.com/axios/axios/pull/419)) -- **BREAKING** Replacing `agent` option with `httpAgent` and `httpsAgent` ([#387](https://github.com/axios/axios/pull/387)) -- **BREAKING** Splitting `progress` event handlers into `onUploadProgress` and `onDownloadProgress` ([#423](https://github.com/axios/axios/pull/423)) -- Adding support for `http_proxy` and `https_proxy` environment variables ([#366](https://github.com/axios/axios/pull/366)) -- Fixing issue with `auth` config option and `Authorization` header ([#397](https://github.com/axios/axios/pull/397)) -- Don't set XSRF header if `xsrfCookieName` is `null` ([#406](https://github.com/axios/axios/pull/406)) - -### 0.13.1 (Jul 16, 2016) - -- Fixing issue with response data not being transformed on error ([#378](https://github.com/axios/axios/issues/378)) - -### 0.13.0 (Jul 13, 2016) - -- **BREAKING** Improved error handling ([#345](https://github.com/axios/axios/pull/345)) -- **BREAKING** Response transformer now invoked in dispatcher not adapter ([10eb238](https://github.com/axios/axios/commit/10eb23865101f9347570552c04e9d6211376e25e)) -- **BREAKING** Request adapters now return a `Promise` ([157efd5](https://github.com/axios/axios/commit/157efd5615890301824e3121cc6c9d2f9b21f94a)) -- Fixing issue with `withCredentials` not being overwritten ([#343](https://github.com/axios/axios/issues/343)) -- Fixing regression with request transformer being called before request interceptor ([#352](https://github.com/axios/axios/issues/352)) -- Fixing custom instance defaults ([#341](https://github.com/axios/axios/issues/341)) -- Fixing instances created from `axios.create` to have same API as default axios ([#217](https://github.com/axios/axios/issues/217)) - -### 0.12.0 (May 31, 2016) - -- Adding support for `URLSearchParams` ([#317](https://github.com/axios/axios/pull/317)) -- Adding `maxRedirects` option ([#307](https://github.com/axios/axios/pull/307)) - -### 0.11.1 (May 17, 2016) - -- Fixing IE CORS support ([#313](https://github.com/axios/axios/pull/313)) -- Fixing detection of `FormData` ([#325](https://github.com/axios/axios/pull/325)) -- Adding `Axios` class to exports ([#321](https://github.com/axios/axios/pull/321)) - -### 0.11.0 (Apr 26, 2016) - -- Adding support for Stream with HTTP adapter ([#296](https://github.com/axios/axios/pull/296)) -- Adding support for custom HTTP status code error ranges ([#308](https://github.com/axios/axios/pull/308)) -- Fixing issue with ArrayBuffer ([#299](https://github.com/axios/axios/pull/299)) - -### 0.10.0 (Apr 20, 2016) - -- Fixing issue with some requests sending `undefined` instead of `null` ([#250](https://github.com/axios/axios/pull/250)) -- Fixing basic auth for HTTP adapter ([#252](https://github.com/axios/axios/pull/252)) -- Fixing request timeout for XHR adapter ([#227](https://github.com/axios/axios/pull/227)) -- Fixing IE8 support by using `onreadystatechange` instead of `onload` ([#249](https://github.com/axios/axios/pull/249)) -- Fixing IE9 cross domain requests ([#251](https://github.com/axios/axios/pull/251)) -- Adding `maxContentLength` option ([#275](https://github.com/axios/axios/pull/275)) -- Fixing XHR support for WebWorker environment ([#279](https://github.com/axios/axios/pull/279)) -- Adding request instance to response ([#200](https://github.com/axios/axios/pull/200)) - -### 0.9.1 (Jan 24, 2016) - -- Improving handling of request timeout in node ([#124](https://github.com/axios/axios/issues/124)) -- Fixing network errors not rejecting ([#205](https://github.com/axios/axios/pull/205)) -- Fixing issue with IE rejecting on HTTP 204 ([#201](https://github.com/axios/axios/issues/201)) -- Fixing host/port when following redirects ([#198](https://github.com/axios/axios/pull/198)) - -### 0.9.0 (Jan 18, 2016) - -- Adding support for custom adapters -- Fixing Content-Type header being removed when data is false ([#195](https://github.com/axios/axios/pull/195)) -- Improving XDomainRequest implementation ([#185](https://github.com/axios/axios/pull/185)) -- Improving config merging and order of precedence ([#183](https://github.com/axios/axios/pull/183)) -- Fixing XDomainRequest support for only <= IE9 ([#182](https://github.com/axios/axios/pull/182)) - -### 0.8.1 (Dec 14, 2015) - -- Adding support for passing XSRF token for cross domain requests when using `withCredentials` ([#168](https://github.com/axios/axios/pull/168)) -- Fixing error with format of basic auth header ([#178](https://github.com/axios/axios/pull/173)) -- Fixing error with JSON payloads throwing `InvalidStateError` in some cases ([#174](https://github.com/axios/axios/pull/174)) - -### 0.8.0 (Dec 11, 2015) - -- Adding support for creating instances of axios ([#123](https://github.com/axios/axios/pull/123)) -- Fixing http adapter to use `Buffer` instead of `String` in case of `responseType === 'arraybuffer'` ([#128](https://github.com/axios/axios/pull/128)) -- Adding support for using custom parameter serializer with `paramsSerializer` option ([#121](https://github.com/axios/axios/pull/121)) -- Fixing issue in IE8 caused by `forEach` on `arguments` ([#127](https://github.com/axios/axios/pull/127)) -- Adding support for following redirects in node ([#146](https://github.com/axios/axios/pull/146)) -- Adding support for transparent decompression if `content-encoding` is set ([#149](https://github.com/axios/axios/pull/149)) -- Adding support for transparent XDomainRequest to handle cross domain requests in IE9 ([#140](https://github.com/axios/axios/pull/140)) -- Adding support for HTTP basic auth via Authorization header ([#167](https://github.com/axios/axios/pull/167)) -- Adding support for baseURL option ([#160](https://github.com/axios/axios/pull/160)) - -### 0.7.0 (Sep 29, 2015) - -- Fixing issue with minified bundle in IE8 ([#87](https://github.com/axios/axios/pull/87)) -- Adding support for passing agent in node ([#102](https://github.com/axios/axios/pull/102)) -- Adding support for returning result from `axios.spread` for chaining ([#106](https://github.com/axios/axios/pull/106)) -- Fixing typescript definition ([#105](https://github.com/axios/axios/pull/105)) -- Fixing default timeout config for node ([#112](https://github.com/axios/axios/pull/112)) -- Adding support for use in web workers, and react-native ([#70](https://github.com/axios/axios/issue/70)), ([#98](https://github.com/axios/axios/pull/98)) -- Adding support for fetch like API `axios(url[, config])` ([#116](https://github.com/axios/axios/issues/116)) - -### 0.6.0 (Sep 21, 2015) - -- Removing deprecated success/error aliases -- Fixing issue with array params not being properly encoded ([#49](https://github.com/axios/axios/pull/49)) -- Fixing issue with User-Agent getting overridden ([#69](https://github.com/axios/axios/issues/69)) -- Adding support for timeout config ([#56](https://github.com/axios/axios/issues/56)) -- Removing es6-promise dependency -- Fixing issue preventing `length` to be used as a parameter ([#91](https://github.com/axios/axios/pull/91)) -- Fixing issue with IE8 ([#85](https://github.com/axios/axios/pull/85)) -- Converting build to UMD - -### 0.5.4 (Apr 08, 2015) - -- Fixing issue with FormData not being sent ([#53](https://github.com/axios/axios/issues/53)) - -### 0.5.3 (Apr 07, 2015) - -- Using JSON.parse unconditionally when transforming response string ([#55](https://github.com/axios/axios/issues/55)) - -### 0.5.2 (Mar 13, 2015) - -- Adding support for `statusText` in response ([#46](https://github.com/axios/axios/issues/46)) - -### 0.5.1 (Mar 10, 2015) - -- Fixing issue using strict mode ([#45](https://github.com/axios/axios/issues/45)) -- Fixing issue with standalone build ([#47](https://github.com/axios/axios/issues/47)) - -### 0.5.0 (Jan 23, 2015) - -- Adding support for intercepetors ([#14](https://github.com/axios/axios/issues/14)) -- Updating es6-promise dependency - -### 0.4.2 (Dec 10, 2014) - -- Fixing issue with `Content-Type` when using `FormData` ([#22](https://github.com/axios/axios/issues/22)) -- Adding support for TypeScript ([#25](https://github.com/axios/axios/issues/25)) -- Fixing issue with standalone build ([#29](https://github.com/axios/axios/issues/29)) -- Fixing issue with verbs needing to be capitalized in some browsers ([#30](https://github.com/axios/axios/issues/30)) - -### 0.4.1 (Oct 15, 2014) - -- Adding error handling to request for node.js ([#18](https://github.com/axios/axios/issues/18)) - -### 0.4.0 (Oct 03, 2014) - -- Adding support for `ArrayBuffer` and `ArrayBufferView` ([#10](https://github.com/axios/axios/issues/10)) -- Adding support for utf-8 for node.js ([#13](https://github.com/axios/axios/issues/13)) -- Adding support for SSL for node.js ([#12](https://github.com/axios/axios/issues/12)) -- Fixing incorrect `Content-Type` header ([#9](https://github.com/axios/axios/issues/9)) -- Adding standalone build without bundled es6-promise ([#11](https://github.com/axios/axios/issues/11)) -- Deprecating `success`/`error` in favor of `then`/`catch` - -### 0.3.1 (Sep 16, 2014) - -- Fixing missing post body when using node.js ([#3](https://github.com/axios/axios/issues/3)) - -### 0.3.0 (Sep 16, 2014) - -- Fixing `success` and `error` to properly receive response data as individual arguments ([#8](https://github.com/axios/axios/issues/8)) -- Updating `then` and `catch` to receive response data as a single object ([#6](https://github.com/axios/axios/issues/6)) -- Fixing issue with `all` not working ([#7](https://github.com/axios/axios/issues/7)) - -### 0.2.2 (Sep 14, 2014) - -- Fixing bundling with browserify ([#4](https://github.com/axios/axios/issues/4)) - -### 0.2.1 (Sep 12, 2014) - -- Fixing build problem causing ridiculous file sizes - -### 0.2.0 (Sep 12, 2014) - -- Adding support for `all` and `spread` -- Adding support for node.js ([#1](https://github.com/axios/axios/issues/1)) - -### 0.1.0 (Aug 29, 2014) - -- Initial release diff --git a/node_modules/axios/LICENSE b/node_modules/axios/LICENSE deleted file mode 100644 index d36c80e..0000000 --- a/node_modules/axios/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014-present Matt Zabriskie - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/axios/README.md b/node_modules/axios/README.md deleted file mode 100755 index 620feca..0000000 --- a/node_modules/axios/README.md +++ /dev/null @@ -1,798 +0,0 @@ -# axios - -[![npm version](https://img.shields.io/npm/v/axios.svg?style=flat-square)](https://www.npmjs.org/package/axios) -[![CDNJS](https://img.shields.io/cdnjs/v/axios.svg?style=flat-square)](https://cdnjs.com/libraries/axios) -[![build status](https://img.shields.io/travis/axios/axios/master.svg?style=flat-square)](https://travis-ci.org/axios/axios) -[![code coverage](https://img.shields.io/coveralls/mzabriskie/axios.svg?style=flat-square)](https://coveralls.io/r/mzabriskie/axios) -[![install size](https://packagephobia.now.sh/badge?p=axios)](https://packagephobia.now.sh/result?p=axios) -[![npm downloads](https://img.shields.io/npm/dm/axios.svg?style=flat-square)](http://npm-stat.com/charts.html?package=axios) -[![gitter chat](https://img.shields.io/gitter/room/mzabriskie/axios.svg?style=flat-square)](https://gitter.im/mzabriskie/axios) -[![code helpers](https://www.codetriage.com/axios/axios/badges/users.svg)](https://www.codetriage.com/axios/axios) - -Promise based HTTP client for the browser and node.js -## Table of Contents - - - [Features](#features) - - [Browser Support](#browser-support) - - [Installing](#installing) - - [Example](#example) - - [Axios API](#axios-api) - - [Request method aliases](#request-method-aliases) - - [Concurrency (Deprecated)](#concurrency-deprecated) - - [Creating an instance](#creating-an-instance) - - [Instance methods](#instance-methods) - - [Request Config](#request-config) - - [Response Schema](#response-schema) - - [Config Defaults](#config-defaults) - - [Global axios defaults](#global-axios-defaults) - - [Custom instance defaults](#custom-instance-defaults) - - [Config order of precedence](#config-order-of-precedence) - - [Interceptors](#interceptors) - - [Handling Errors](#handling-errors) - - [Cancellation](#cancellation) - - [Using application/x-www-form-urlencoded format](#using-applicationx-www-form-urlencoded-format) - - [Browser](#browser) - - [Node.js](#nodejs) - - [Query string](#query-string) - - [Form data](#form-data) - - [Semver](#semver) - - [Promises](#promises) - - [TypeScript](#typescript) - - [Resources](#resources) - - [Credits](#credits) - - [License](#license) - -## Features - -- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser -- Make [http](http://nodejs.org/api/http.html) requests from node.js -- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API -- Intercept request and response -- Transform request and response data -- Cancel requests -- Automatic transforms for JSON data -- Client side support for protecting against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) - -## Browser Support - -![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) | ---- | --- | --- | --- | --- | --- | -Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ | - -[![Browser Matrix](https://saucelabs.com/open_sauce/build_matrix/axios.svg)](https://saucelabs.com/u/axios) - -## Installing - -Using npm: - -```bash -$ npm install axios -``` - -Using bower: - -```bash -$ bower install axios -``` - -Using yarn: - -```bash -$ yarn add axios -``` - -Using jsDelivr CDN: - -```html - -``` - -Using unpkg CDN: - -```html - -``` - -## Example - -### note: CommonJS usage -In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with `require()` use the following approach: - -```js -const axios = require('axios').default; - -// axios. will now provide autocomplete and parameter typings -``` - -Performing a `GET` request - -```js -const axios = require('axios'); - -// Make a request for a user with a given ID -axios.get('/user?ID=12345') - .then(function (response) { - // handle success - console.log(response); - }) - .catch(function (error) { - // handle error - console.log(error); - }) - .then(function () { - // always executed - }); - -// Optionally the request above could also be done as -axios.get('/user', { - params: { - ID: 12345 - } - }) - .then(function (response) { - console.log(response); - }) - .catch(function (error) { - console.log(error); - }) - .then(function () { - // always executed - }); - -// Want to use async/await? Add the `async` keyword to your outer function/method. -async function getUser() { - try { - const response = await axios.get('/user?ID=12345'); - console.log(response); - } catch (error) { - console.error(error); - } -} -``` - -> **NOTE:** `async/await` is part of ECMAScript 2017 and is not supported in Internet -> Explorer and older browsers, so use with caution. - -Performing a `POST` request - -```js -axios.post('/user', { - firstName: 'Fred', - lastName: 'Flintstone' - }) - .then(function (response) { - console.log(response); - }) - .catch(function (error) { - console.log(error); - }); -``` - -Performing multiple concurrent requests - -```js -function getUserAccount() { - return axios.get('/user/12345'); -} - -function getUserPermissions() { - return axios.get('/user/12345/permissions'); -} - -Promise.all([getUserAccount(), getUserPermissions()]) - .then(function (results) { - const acct = results[0]; - const perm = results[1]; - }); -``` - -## axios API - -Requests can be made by passing the relevant config to `axios`. - -##### axios(config) - -```js -// Send a POST request -axios({ - method: 'post', - url: '/user/12345', - data: { - firstName: 'Fred', - lastName: 'Flintstone' - } -}); -``` - -```js -// GET request for remote image in node.js -axios({ - method: 'get', - url: 'http://bit.ly/2mTM3nY', - responseType: 'stream' -}) - .then(function (response) { - response.data.pipe(fs.createWriteStream('ada_lovelace.jpg')) - }); -``` - -##### axios(url[, config]) - -```js -// Send a GET request (default method) -axios('/user/12345'); -``` - -### Request method aliases - -For convenience aliases have been provided for all supported request methods. - -##### axios.request(config) -##### axios.get(url[, config]) -##### axios.delete(url[, config]) -##### axios.head(url[, config]) -##### axios.options(url[, config]) -##### axios.post(url[, data[, config]]) -##### axios.put(url[, data[, config]]) -##### axios.patch(url[, data[, config]]) - -###### NOTE -When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config. - -### Concurrency (Deprecated) -Please use `Promise.all` to replace the below functions. - -Helper functions for dealing with concurrent requests. - -axios.all(iterable) -axios.spread(callback) - -### Creating an instance - -You can create a new instance of axios with a custom config. - -##### axios.create([config]) - -```js -const instance = axios.create({ - baseURL: 'https://some-domain.com/api/', - timeout: 1000, - headers: {'X-Custom-Header': 'foobar'} -}); -``` - -### Instance methods - -The available instance methods are listed below. The specified config will be merged with the instance config. - -##### axios#request(config) -##### axios#get(url[, config]) -##### axios#delete(url[, config]) -##### axios#head(url[, config]) -##### axios#options(url[, config]) -##### axios#post(url[, data[, config]]) -##### axios#put(url[, data[, config]]) -##### axios#patch(url[, data[, config]]) -##### axios#getUri([config]) - -## Request Config - -These are the available config options for making requests. Only the `url` is required. Requests will default to `GET` if `method` is not specified. - -```js -{ - // `url` is the server URL that will be used for the request - url: '/user', - - // `method` is the request method to be used when making the request - method: 'get', // default - - // `baseURL` will be prepended to `url` unless `url` is absolute. - // It can be convenient to set `baseURL` for an instance of axios to pass relative URLs - // to methods of that instance. - baseURL: 'https://some-domain.com/api/', - - // `transformRequest` allows changes to the request data before it is sent to the server - // This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE' - // The last function in the array must return a string or an instance of Buffer, ArrayBuffer, - // FormData or Stream - // You may modify the headers object. - transformRequest: [function (data, headers) { - // Do whatever you want to transform the data - - return data; - }], - - // `transformResponse` allows changes to the response data to be made before - // it is passed to then/catch - transformResponse: [function (data) { - // Do whatever you want to transform the data - - return data; - }], - - // `headers` are custom headers to be sent - headers: {'X-Requested-With': 'XMLHttpRequest'}, - - // `params` are the URL parameters to be sent with the request - // Must be a plain object or a URLSearchParams object - params: { - ID: 12345 - }, - - // `paramsSerializer` is an optional function in charge of serializing `params` - // (e.g. https://www.npmjs.com/package/qs, http://api.jquery.com/jquery.param/) - paramsSerializer: function (params) { - return Qs.stringify(params, {arrayFormat: 'brackets'}) - }, - - // `data` is the data to be sent as the request body - // Only applicable for request methods 'PUT', 'POST', 'DELETE , and 'PATCH' - // When no `transformRequest` is set, must be of one of the following types: - // - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams - // - Browser only: FormData, File, Blob - // - Node only: Stream, Buffer - data: { - firstName: 'Fred' - }, - - // syntax alternative to send data into the body - // method post - // only the value is sent, not the key - data: 'Country=Brasil&City=Belo Horizonte', - - // `timeout` specifies the number of milliseconds before the request times out. - // If the request takes longer than `timeout`, the request will be aborted. - timeout: 1000, // default is `0` (no timeout) - - // `withCredentials` indicates whether or not cross-site Access-Control requests - // should be made using credentials - withCredentials: false, // default - - // `adapter` allows custom handling of requests which makes testing easier. - // Return a promise and supply a valid response (see lib/adapters/README.md). - adapter: function (config) { - /* ... */ - }, - - // `auth` indicates that HTTP Basic auth should be used, and supplies credentials. - // This will set an `Authorization` header, overwriting any existing - // `Authorization` custom headers you have set using `headers`. - // Please note that only HTTP Basic auth is configurable through this parameter. - // For Bearer tokens and such, use `Authorization` custom headers instead. - auth: { - username: 'janedoe', - password: 's00pers3cret' - }, - - // `responseType` indicates the type of data that the server will respond with - // options are: 'arraybuffer', 'document', 'json', 'text', 'stream' - // browser only: 'blob' - responseType: 'json', // default - - // `responseEncoding` indicates encoding to use for decoding responses (Node.js only) - // Note: Ignored for `responseType` of 'stream' or client-side requests - responseEncoding: 'utf8', // default - - // `xsrfCookieName` is the name of the cookie to use as a value for xsrf token - xsrfCookieName: 'XSRF-TOKEN', // default - - // `xsrfHeaderName` is the name of the http header that carries the xsrf token value - xsrfHeaderName: 'X-XSRF-TOKEN', // default - - // `onUploadProgress` allows handling of progress events for uploads - // browser only - onUploadProgress: function (progressEvent) { - // Do whatever you want with the native progress event - }, - - // `onDownloadProgress` allows handling of progress events for downloads - // browser only - onDownloadProgress: function (progressEvent) { - // Do whatever you want with the native progress event - }, - - // `maxContentLength` defines the max size of the http response content in bytes allowed in node.js - maxContentLength: 2000, - - // `maxBodyLength` (Node only option) defines the max size of the http request content in bytes allowed - maxBodyLength: 2000, - - // `validateStatus` defines whether to resolve or reject the promise for a given - // HTTP response status code. If `validateStatus` returns `true` (or is set to `null` - // or `undefined`), the promise will be resolved; otherwise, the promise will be - // rejected. - validateStatus: function (status) { - return status >= 200 && status < 300; // default - }, - - // `maxRedirects` defines the maximum number of redirects to follow in node.js. - // If set to 0, no redirects will be followed. - maxRedirects: 5, // default - - // `socketPath` defines a UNIX Socket to be used in node.js. - // e.g. '/var/run/docker.sock' to send requests to the docker daemon. - // Only either `socketPath` or `proxy` can be specified. - // If both are specified, `socketPath` is used. - socketPath: null, // default - - // `httpAgent` and `httpsAgent` define a custom agent to be used when performing http - // and https requests, respectively, in node.js. This allows options to be added like - // `keepAlive` that are not enabled by default. - httpAgent: new http.Agent({ keepAlive: true }), - httpsAgent: new https.Agent({ keepAlive: true }), - - // `proxy` defines the hostname and port of the proxy server. - // You can also define your proxy using the conventional `http_proxy` and - // `https_proxy` environment variables. If you are using environment variables - // for your proxy configuration, you can also define a `no_proxy` environment - // variable as a comma-separated list of domains that should not be proxied. - // Use `false` to disable proxies, ignoring environment variables. - // `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and - // supplies credentials. - // This will set an `Proxy-Authorization` header, overwriting any existing - // `Proxy-Authorization` custom headers you have set using `headers`. - proxy: { - host: '127.0.0.1', - port: 9000, - auth: { - username: 'mikeymike', - password: 'rapunz3l' - } - }, - - // `cancelToken` specifies a cancel token that can be used to cancel the request - // (see Cancellation section below for details) - cancelToken: new CancelToken(function (cancel) { - }), - - // `decompress` indicates whether or not the response body should be decompressed - // automatically. If set to `true` will also remove the 'content-encoding' header - // from the responses objects of all decompressed responses - // - Node only (XHR cannot turn off decompression) - decompress: true // default - -} -``` - -## Response Schema - -The response for a request contains the following information. - -```js -{ - // `data` is the response that was provided by the server - data: {}, - - // `status` is the HTTP status code from the server response - status: 200, - - // `statusText` is the HTTP status message from the server response - statusText: 'OK', - - // `headers` the HTTP headers that the server responded with - // All header names are lower cased and can be accessed using the bracket notation. - // Example: `response.headers['content-type']` - headers: {}, - - // `config` is the config that was provided to `axios` for the request - config: {}, - - // `request` is the request that generated this response - // It is the last ClientRequest instance in node.js (in redirects) - // and an XMLHttpRequest instance in the browser - request: {} -} -``` - -When using `then`, you will receive the response as follows: - -```js -axios.get('/user/12345') - .then(function (response) { - console.log(response.data); - console.log(response.status); - console.log(response.statusText); - console.log(response.headers); - console.log(response.config); - }); -``` - -When using `catch`, or passing a [rejection callback](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) as second parameter of `then`, the response will be available through the `error` object as explained in the [Handling Errors](#handling-errors) section. - -## Config Defaults - -You can specify config defaults that will be applied to every request. - -### Global axios defaults - -```js -axios.defaults.baseURL = 'https://api.example.com'; -axios.defaults.headers.common['Authorization'] = AUTH_TOKEN; -axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; -``` - -### Custom instance defaults - -```js -// Set config defaults when creating the instance -const instance = axios.create({ - baseURL: 'https://api.example.com' -}); - -// Alter defaults after instance has been created -instance.defaults.headers.common['Authorization'] = AUTH_TOKEN; -``` - -### Config order of precedence - -Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults.js](https://github.com/axios/axios/blob/master/lib/defaults.js#L28), then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example. - -```js -// Create an instance using the config defaults provided by the library -// At this point the timeout config value is `0` as is the default for the library -const instance = axios.create(); - -// Override timeout default for the library -// Now all requests using this instance will wait 2.5 seconds before timing out -instance.defaults.timeout = 2500; - -// Override timeout for this request as it's known to take a long time -instance.get('/longRequest', { - timeout: 5000 -}); -``` - -## Interceptors - -You can intercept requests or responses before they are handled by `then` or `catch`. - -```js -// Add a request interceptor -axios.interceptors.request.use(function (config) { - // Do something before request is sent - return config; - }, function (error) { - // Do something with request error - return Promise.reject(error); - }); - -// Add a response interceptor -axios.interceptors.response.use(function (response) { - // Any status code that lie within the range of 2xx cause this function to trigger - // Do something with response data - return response; - }, function (error) { - // Any status codes that falls outside the range of 2xx cause this function to trigger - // Do something with response error - return Promise.reject(error); - }); -``` - -If you need to remove an interceptor later you can. - -```js -const myInterceptor = axios.interceptors.request.use(function () {/*...*/}); -axios.interceptors.request.eject(myInterceptor); -``` - -You can add interceptors to a custom instance of axios. - -```js -const instance = axios.create(); -instance.interceptors.request.use(function () {/*...*/}); -``` - -## Handling Errors - -```js -axios.get('/user/12345') - .catch(function (error) { - if (error.response) { - // The request was made and the server responded with a status code - // that falls out of the range of 2xx - console.log(error.response.data); - console.log(error.response.status); - console.log(error.response.headers); - } else if (error.request) { - // The request was made but no response was received - // `error.request` is an instance of XMLHttpRequest in the browser and an instance of - // http.ClientRequest in node.js - console.log(error.request); - } else { - // Something happened in setting up the request that triggered an Error - console.log('Error', error.message); - } - console.log(error.config); - }); -``` - -Using the `validateStatus` config option, you can define HTTP code(s) that should throw an error. - -```js -axios.get('/user/12345', { - validateStatus: function (status) { - return status < 500; // Resolve only if the status code is less than 500 - } -}) -``` - -Using `toJSON` you get an object with more information about the HTTP error. - -```js -axios.get('/user/12345') - .catch(function (error) { - console.log(error.toJSON()); - }); -``` - -## Cancellation - -You can cancel a request using a *cancel token*. - -> The axios cancel token API is based on the withdrawn [cancelable promises proposal](https://github.com/tc39/proposal-cancelable-promises). - -You can create a cancel token using the `CancelToken.source` factory as shown below: - -```js -const CancelToken = axios.CancelToken; -const source = CancelToken.source(); - -axios.get('/user/12345', { - cancelToken: source.token -}).catch(function (thrown) { - if (axios.isCancel(thrown)) { - console.log('Request canceled', thrown.message); - } else { - // handle error - } -}); - -axios.post('/user/12345', { - name: 'new name' -}, { - cancelToken: source.token -}) - -// cancel the request (the message parameter is optional) -source.cancel('Operation canceled by the user.'); -``` - -You can also create a cancel token by passing an executor function to the `CancelToken` constructor: - -```js -const CancelToken = axios.CancelToken; -let cancel; - -axios.get('/user/12345', { - cancelToken: new CancelToken(function executor(c) { - // An executor function receives a cancel function as a parameter - cancel = c; - }) -}); - -// cancel the request -cancel(); -``` - -> Note: you can cancel several requests with the same cancel token. - -## Using application/x-www-form-urlencoded format - -By default, axios serializes JavaScript objects to `JSON`. To send data in the `application/x-www-form-urlencoded` format instead, you can use one of the following options. - -### Browser - -In a browser, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API as follows: - -```js -const params = new URLSearchParams(); -params.append('param1', 'value1'); -params.append('param2', 'value2'); -axios.post('/foo', params); -``` - -> Note that `URLSearchParams` is not supported by all browsers (see [caniuse.com](http://www.caniuse.com/#feat=urlsearchparams)), but there is a [polyfill](https://github.com/WebReflection/url-search-params) available (make sure to polyfill the global environment). - -Alternatively, you can encode data using the [`qs`](https://github.com/ljharb/qs) library: - -```js -const qs = require('qs'); -axios.post('/foo', qs.stringify({ 'bar': 123 })); -``` - -Or in another way (ES6), - -```js -import qs from 'qs'; -const data = { 'bar': 123 }; -const options = { - method: 'POST', - headers: { 'content-type': 'application/x-www-form-urlencoded' }, - data: qs.stringify(data), - url, -}; -axios(options); -``` - -### Node.js - -#### Query string - -In node.js, you can use the [`querystring`](https://nodejs.org/api/querystring.html) module as follows: - -```js -const querystring = require('querystring'); -axios.post('http://something.com/', querystring.stringify({ foo: 'bar' })); -``` - -or ['URLSearchParams'](https://nodejs.org/api/url.html#url_class_urlsearchparams) from ['url module'](https://nodejs.org/api/url.html) as follows: - -```js -const url = require('url'); -const params = new url.URLSearchParams({ foo: 'bar' }); -axios.post('http://something.com/', params.toString()); -``` - -You can also use the [`qs`](https://github.com/ljharb/qs) library. - -###### NOTE -The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has known issues with that use case (https://github.com/nodejs/node-v0.x-archive/issues/1665). - -#### Form data - -In node.js, you can use the [`form-data`](https://github.com/form-data/form-data) library as follows: - -```js -const FormData = require('form-data'); - -const form = new FormData(); -form.append('my_field', 'my value'); -form.append('my_buffer', new Buffer(10)); -form.append('my_file', fs.createReadStream('/foo/bar.jpg')); - -axios.post('https://example.com', form, { headers: form.getHeaders() }) -``` - -Alternatively, use an interceptor: - -```js -axios.interceptors.request.use(config => { - if (config.data instanceof FormData) { - Object.assign(config.headers, config.data.getHeaders()); - } - return config; -}); -``` - -## Semver - -Until axios reaches a `1.0` release, breaking changes will be released with a new minor version. For example `0.5.1`, and `0.5.4` will have the same API, but `0.6.0` will have breaking changes. - -## Promises - -axios depends on a native ES6 Promise implementation to be [supported](http://caniuse.com/promises). -If your environment doesn't support ES6 Promises, you can [polyfill](https://github.com/jakearchibald/es6-promise). - -## TypeScript -axios includes [TypeScript](http://typescriptlang.org) definitions. -```typescript -import axios from 'axios'; -axios.get('/user?ID=12345'); -``` - -## Resources - -* [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md) -* [Upgrade Guide](https://github.com/axios/axios/blob/master/UPGRADE_GUIDE.md) -* [Ecosystem](https://github.com/axios/axios/blob/master/ECOSYSTEM.md) -* [Contributing Guide](https://github.com/axios/axios/blob/master/CONTRIBUTING.md) -* [Code of Conduct](https://github.com/axios/axios/blob/master/CODE_OF_CONDUCT.md) - -## Credits - -axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) provided in [Angular](https://angularjs.org/). Ultimately axios is an effort to provide a standalone `$http`-like service for use outside of Angular. - -## License - -[MIT](LICENSE) diff --git a/node_modules/axios/UPGRADE_GUIDE.md b/node_modules/axios/UPGRADE_GUIDE.md deleted file mode 100644 index 745e804..0000000 --- a/node_modules/axios/UPGRADE_GUIDE.md +++ /dev/null @@ -1,162 +0,0 @@ -# Upgrade Guide - -### 0.15.x -> 0.16.0 - -#### `Promise` Type Declarations - -The `Promise` type declarations have been removed from the axios typings in favor of the built-in type declarations. If you use axios in a TypeScript project that targets `ES5`, please make sure to include the `es2015.promise` lib. Please see [this post](https://blog.mariusschulz.com/2016/11/25/typescript-2-0-built-in-type-declarations) for details. - -### 0.13.x -> 0.14.0 - -#### TypeScript Definitions - -The axios TypeScript definitions have been updated to match the axios API and use the ES2015 module syntax. - -Please use the following `import` statement to import axios in TypeScript: - -```typescript -import axios from 'axios'; - -axios.get('/foo') - .then(response => console.log(response)) - .catch(error => console.log(error)); -``` - -#### `agent` Config Option - -The `agent` config option has been replaced with two new options: `httpAgent` and `httpsAgent`. Please use them instead. - -```js -{ - // Define a custom agent for HTTP - httpAgent: new http.Agent({ keepAlive: true }), - // Define a custom agent for HTTPS - httpsAgent: new https.Agent({ keepAlive: true }) -} -``` - -#### `progress` Config Option - -The `progress` config option has been replaced with the `onUploadProgress` and `onDownloadProgress` options. - -```js -{ - // Define a handler for upload progress events - onUploadProgress: function (progressEvent) { - // ... - }, - - // Define a handler for download progress events - onDownloadProgress: function (progressEvent) { - // ... - } -} -``` - -### 0.12.x -> 0.13.0 - -The `0.13.0` release contains several changes to custom adapters and error handling. - -#### Error Handling - -Previous to this release an error could either be a server response with bad status code or an actual `Error`. With this release Promise will always reject with an `Error`. In the case that a response was received, the `Error` will also include the response. - -```js -axios.get('/user/12345') - .catch((error) => { - console.log(error.message); - console.log(error.code); // Not always specified - console.log(error.config); // The config that was used to make the request - console.log(error.response); // Only available if response was received from the server - }); -``` - -#### Request Adapters - -This release changes a few things about how request adapters work. Please take note if you are using your own custom adapter. - -1. Response transformer is now called outside of adapter. -2. Request adapter returns a `Promise`. - -This means that you no longer need to invoke `transformData` on response data. You will also no longer receive `resolve` and `reject` as arguments in your adapter. - -Previous code: - -```js -function myAdapter(resolve, reject, config) { - var response = { - data: transformData( - responseData, - responseHeaders, - config.transformResponse - ), - status: request.status, - statusText: request.statusText, - headers: responseHeaders - }; - settle(resolve, reject, response); -} -``` - -New code: - -```js -function myAdapter(config) { - return new Promise(function (resolve, reject) { - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders - }; - settle(resolve, reject, response); - }); -} -``` - -See the related commits for more details: -- [Response transformers](https://github.com/axios/axios/commit/10eb23865101f9347570552c04e9d6211376e25e) -- [Request adapter Promise](https://github.com/axios/axios/commit/157efd5615890301824e3121cc6c9d2f9b21f94a) - -### 0.5.x -> 0.6.0 - -The `0.6.0` release contains mostly bug fixes, but there are a couple things to be aware of when upgrading. - -#### ES6 Promise Polyfill - -Up until the `0.6.0` release ES6 `Promise` was being polyfilled using [es6-promise](https://github.com/jakearchibald/es6-promise). With this release, the polyfill has been removed, and you will need to supply it yourself if your environment needs it. - -```js -require('es6-promise').polyfill(); -var axios = require('axios'); -``` - -This will polyfill the global environment, and only needs to be done once. - -#### `axios.success`/`axios.error` - -The `success`, and `error` aliases were deprecated in [0.4.0](https://github.com/axios/axios/blob/master/CHANGELOG.md#040-oct-03-2014). As of this release they have been removed entirely. Instead please use `axios.then`, and `axios.catch` respectively. - -```js -axios.get('some/url') - .then(function (res) { - /* ... */ - }) - .catch(function (err) { - /* ... */ - }); -``` - -#### UMD - -Previous versions of axios shipped with an AMD, CommonJS, and Global build. This has all been rolled into a single UMD build. - -```js -// AMD -require(['bower_components/axios/dist/axios'], function (axios) { - /* ... */ -}); - -// CommonJS -var axios = require('axios/dist/axios'); -``` diff --git a/node_modules/axios/dist/axios.js b/node_modules/axios/dist/axios.js deleted file mode 100644 index 629fcfd..0000000 --- a/node_modules/axios/dist/axios.js +++ /dev/null @@ -1,1736 +0,0 @@ -/* axios v0.21.0 | (c) 2020 by Matt Zabriskie */ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["axios"] = factory(); - else - root["axios"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - - module.exports = __webpack_require__(1); - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var bind = __webpack_require__(3); - var Axios = __webpack_require__(4); - var mergeConfig = __webpack_require__(22); - var defaults = __webpack_require__(10); - - /** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * @return {Axios} A new instance of Axios - */ - function createInstance(defaultConfig) { - var context = new Axios(defaultConfig); - var instance = bind(Axios.prototype.request, context); - - // Copy axios.prototype to instance - utils.extend(instance, Axios.prototype, context); - - // Copy context to instance - utils.extend(instance, context); - - return instance; - } - - // Create the default instance to be exported - var axios = createInstance(defaults); - - // Expose Axios class to allow class inheritance - axios.Axios = Axios; - - // Factory for creating new instances - axios.create = function create(instanceConfig) { - return createInstance(mergeConfig(axios.defaults, instanceConfig)); - }; - - // Expose Cancel & CancelToken - axios.Cancel = __webpack_require__(23); - axios.CancelToken = __webpack_require__(24); - axios.isCancel = __webpack_require__(9); - - // Expose all/spread - axios.all = function all(promises) { - return Promise.all(promises); - }; - axios.spread = __webpack_require__(25); - - module.exports = axios; - - // Allow use of default import syntax in TypeScript - module.exports.default = axios; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var bind = __webpack_require__(3); - - /*global toString:true*/ - - // utils is a library of generic helper functions non-specific to axios - - var toString = Object.prototype.toString; - - /** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ - function isArray(val) { - return toString.call(val) === '[object Array]'; - } - - /** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ - function isUndefined(val) { - return typeof val === 'undefined'; - } - - /** - * Determine if a value is a Buffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Buffer, otherwise false - */ - function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); - } - - /** - * Determine if a value is an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ - function isArrayBuffer(val) { - return toString.call(val) === '[object ArrayBuffer]'; - } - - /** - * Determine if a value is a FormData - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an FormData, otherwise false - */ - function isFormData(val) { - return (typeof FormData !== 'undefined') && (val instanceof FormData); - } - - /** - * Determine if a value is a view on an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ - function isArrayBufferView(val) { - var result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); - } - return result; - } - - /** - * Determine if a value is a String - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a String, otherwise false - */ - function isString(val) { - return typeof val === 'string'; - } - - /** - * Determine if a value is a Number - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Number, otherwise false - */ - function isNumber(val) { - return typeof val === 'number'; - } - - /** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ - function isObject(val) { - return val !== null && typeof val === 'object'; - } - - /** - * Determine if a value is a plain Object - * - * @param {Object} val The value to test - * @return {boolean} True if value is a plain Object, otherwise false - */ - function isPlainObject(val) { - if (toString.call(val) !== '[object Object]') { - return false; - } - - var prototype = Object.getPrototypeOf(val); - return prototype === null || prototype === Object.prototype; - } - - /** - * Determine if a value is a Date - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ - function isDate(val) { - return toString.call(val) === '[object Date]'; - } - - /** - * Determine if a value is a File - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ - function isFile(val) { - return toString.call(val) === '[object File]'; - } - - /** - * Determine if a value is a Blob - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Blob, otherwise false - */ - function isBlob(val) { - return toString.call(val) === '[object Blob]'; - } - - /** - * Determine if a value is a Function - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ - function isFunction(val) { - return toString.call(val) === '[object Function]'; - } - - /** - * Determine if a value is a Stream - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Stream, otherwise false - */ - function isStream(val) { - return isObject(val) && isFunction(val.pipe); - } - - /** - * Determine if a value is a URLSearchParams object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ - function isURLSearchParams(val) { - return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; - } - - /** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * @returns {String} The String freed of excess whitespace - */ - function trim(str) { - return str.replace(/^\s*/, '').replace(/\s*$/, ''); - } - - /** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - */ - function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || - navigator.product === 'NativeScript' || - navigator.product === 'NS')) { - return false; - } - return ( - typeof window !== 'undefined' && - typeof document !== 'undefined' - ); - } - - /** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ - function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (var i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj); - } - } - } - } - - /** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ - function merge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (isPlainObject(result[key]) && isPlainObject(val)) { - result[key] = merge(result[key], val); - } else if (isPlainObject(val)) { - result[key] = merge({}, val); - } else if (isArray(val)) { - result[key] = val.slice(); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; - } - - /** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * @return {Object} The resulting value of object a - */ - function extend(a, b, thisArg) { - forEach(b, function assignValue(val, key) { - if (thisArg && typeof val === 'function') { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }); - return a; - } - - /** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * @return {string} content value without BOM - */ - function stripBOM(content) { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; - } - - module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isPlainObject: isPlainObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - isFunction: isFunction, - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - extend: extend, - trim: trim, - stripBOM: stripBOM - }; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - - 'use strict'; - - module.exports = function bind(fn, thisArg) { - return function wrap() { - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - return fn.apply(thisArg, args); - }; - }; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var buildURL = __webpack_require__(5); - var InterceptorManager = __webpack_require__(6); - var dispatchRequest = __webpack_require__(7); - var mergeConfig = __webpack_require__(22); - - /** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - */ - function Axios(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() - }; - } - - /** - * Dispatch a request - * - * @param {Object} config The config specific for this request (merged with this.defaults) - */ - Axios.prototype.request = function request(config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof config === 'string') { - config = arguments[1] || {}; - config.url = arguments[0]; - } else { - config = config || {}; - } - - config = mergeConfig(this.defaults, config); - - // Set config.method - if (config.method) { - config.method = config.method.toLowerCase(); - } else if (this.defaults.method) { - config.method = this.defaults.method.toLowerCase(); - } else { - config.method = 'get'; - } - - // Hook up interceptors middleware - var chain = [dispatchRequest, undefined]; - var promise = Promise.resolve(config); - - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - chain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - chain.push(interceptor.fulfilled, interceptor.rejected); - }); - - while (chain.length) { - promise = promise.then(chain.shift(), chain.shift()); - } - - return promise; - }; - - Axios.prototype.getUri = function getUri(config) { - config = mergeConfig(this.defaults, config); - return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); - }; - - // Provide aliases for supported request methods - utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: (config || {}).data - })); - }; - }); - - utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, data, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: data - })); - }; - }); - - module.exports = Axios; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); - } - - /** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @returns {string} The formatted url - */ - module.exports = function buildURL(url, params, paramsSerializer) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - var serializedParams; - if (paramsSerializer) { - serializedParams = paramsSerializer(params); - } else if (utils.isURLSearchParams(params)) { - serializedParams = params.toString(); - } else { - var parts = []; - - utils.forEach(params, function serialize(val, key) { - if (val === null || typeof val === 'undefined') { - return; - } - - if (utils.isArray(val)) { - key = key + '[]'; - } else { - val = [val]; - } - - utils.forEach(val, function parseValue(v) { - if (utils.isDate(v)) { - v = v.toISOString(); - } else if (utils.isObject(v)) { - v = JSON.stringify(v); - } - parts.push(encode(key) + '=' + encode(v)); - }); - }); - - serializedParams = parts.join('&'); - } - - if (serializedParams) { - var hashmarkIndex = url.indexOf('#'); - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; - }; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - function InterceptorManager() { - this.handlers = []; - } - - /** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ - InterceptorManager.prototype.use = function use(fulfilled, rejected) { - this.handlers.push({ - fulfilled: fulfilled, - rejected: rejected - }); - return this.handlers.length - 1; - }; - - /** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - */ - InterceptorManager.prototype.eject = function eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } - }; - - /** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - */ - InterceptorManager.prototype.forEach = function forEach(fn) { - utils.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); - }; - - module.exports = InterceptorManager; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var transformData = __webpack_require__(8); - var isCancel = __webpack_require__(9); - var defaults = __webpack_require__(10); - - /** - * Throws a `Cancel` if cancellation has been requested. - */ - function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } - } - - /** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * @returns {Promise} The Promise to be fulfilled - */ - module.exports = function dispatchRequest(config) { - throwIfCancellationRequested(config); - - // Ensure headers exist - config.headers = config.headers || {}; - - // Transform request data - config.data = transformData( - config.data, - config.headers, - config.transformRequest - ); - - // Flatten headers - config.headers = utils.merge( - config.headers.common || {}, - config.headers[config.method] || {}, - config.headers - ); - - utils.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - function cleanHeaderConfig(method) { - delete config.headers[method]; - } - ); - - var adapter = config.adapter || defaults.adapter; - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = transformData( - response.data, - response.headers, - config.transformResponse - ); - - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData( - reason.response.data, - reason.response.headers, - config.transformResponse - ); - } - } - - return Promise.reject(reason); - }); - }; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - /** - * Transform the data for a request or a response - * - * @param {Object|String} data The data to be transformed - * @param {Array} headers The headers for the request or response - * @param {Array|Function} fns A single function or Array of functions - * @returns {*} The resulting transformed data - */ - module.exports = function transformData(data, headers, fns) { - /*eslint no-param-reassign:0*/ - utils.forEach(fns, function transform(fn) { - data = fn(data, headers); - }); - - return data; - }; - - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - - 'use strict'; - - module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); - }; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var normalizeHeaderName = __webpack_require__(11); - - var DEFAULT_CONTENT_TYPE = { - 'Content-Type': 'application/x-www-form-urlencoded' - }; - - function setContentTypeIfUnset(headers, value) { - if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { - headers['Content-Type'] = value; - } - } - - function getDefaultAdapter() { - var adapter; - if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = __webpack_require__(12); - } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = __webpack_require__(12); - } - return adapter; - } - - var defaults = { - adapter: getDefaultAdapter(), - - transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Accept'); - normalizeHeaderName(headers, 'Content-Type'); - if (utils.isFormData(data) || - utils.isArrayBuffer(data) || - utils.isBuffer(data) || - utils.isStream(data) || - utils.isFile(data) || - utils.isBlob(data) - ) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); - return data.toString(); - } - if (utils.isObject(data)) { - setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); - return JSON.stringify(data); - } - return data; - }], - - transformResponse: [function transformResponse(data) { - /*eslint no-param-reassign:0*/ - if (typeof data === 'string') { - try { - data = JSON.parse(data); - } catch (e) { /* Ignore */ } - } - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - } - }; - - defaults.headers = { - common: { - 'Accept': 'application/json, text/plain, */*' - } - }; - - utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { - defaults.headers[method] = {}; - }); - - utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); - }); - - module.exports = defaults; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - module.exports = function normalizeHeaderName(headers, normalizedName) { - utils.forEach(headers, function processHeader(value, name) { - if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { - headers[normalizedName] = value; - delete headers[name]; - } - }); - }; - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - var settle = __webpack_require__(13); - var cookies = __webpack_require__(16); - var buildURL = __webpack_require__(5); - var buildFullPath = __webpack_require__(17); - var parseHeaders = __webpack_require__(20); - var isURLSameOrigin = __webpack_require__(21); - var createError = __webpack_require__(14); - - module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - - if (utils.isFormData(requestData)) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - - var request = new XMLHttpRequest(); - - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } - - var fullPath = buildFullPath(config.baseURL, config.url); - request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); - - // Set the request timeout in MS - request.timeout = config.timeout; - - // Listen for ready state - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // Clean up request - request = null; - }; - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(createError('Request aborted', config, 'ECONNABORTED', request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(createError('Network Error', config, null, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded'; - if (config.timeoutErrorMessage) { - timeoutErrorMessage = config.timeoutErrorMessage; - } - reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', - request)); - - // Clean up request - request = null; - }; - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } - } - - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - - // Add withCredentials to request if needed - if (!utils.isUndefined(config.withCredentials)) { - request.withCredentials = !!config.withCredentials; - } - - // Add responseType to request if needed - if (config.responseType) { - try { - request.responseType = config.responseType; - } catch (e) { - // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. - // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. - if (config.responseType !== 'json') { - throw e; - } - } - } - - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } - - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (!request) { - return; - } - - request.abort(); - reject(cancel); - // Clean up request - request = null; - }); - } - - if (!requestData) { - requestData = null; - } - - // Send the request - request.send(requestData); - }); - }; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var createError = __webpack_require__(14); - - /** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - */ - module.exports = function settle(resolve, reject, response) { - var validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(createError( - 'Request failed with status code ' + response.status, - response.config, - null, - response.request, - response - )); - } - }; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var enhanceError = __webpack_require__(15); - - /** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The created error. - */ - module.exports = function createError(message, config, code, request, response) { - var error = new Error(message); - return enhanceError(error, config, code, request, response); - }; - - -/***/ }), -/* 15 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Update an Error with the specified config, error code, and response. - * - * @param {Error} error The error to update. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The error. - */ - module.exports = function enhanceError(error, config, code, request, response) { - error.config = config; - if (code) { - error.code = code; - } - - error.request = request; - error.response = response; - error.isAxiosError = true; - - error.toJSON = function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code - }; - }; - return error; - }; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); - - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } - - if (utils.isString(path)) { - cookie.push('path=' + path); - } - - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } - - if (secure === true) { - cookie.push('secure'); - } - - document.cookie = cookie.join('; '); - }, - - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); - } - }; - })() : - - // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() - ); - - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var isAbsoluteURL = __webpack_require__(18); - var combineURLs = __webpack_require__(19); - - /** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * @returns {string} The combined full path - */ - module.exports = function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; - }; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ - module.exports = function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); - }; - - -/***/ }), -/* 19 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * @returns {string} The combined URL - */ - module.exports = function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; - }; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - // Headers whose duplicates are ignored by node - // c.f. https://nodejs.org/api/http.html#http_message_headers - var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' - ]; - - /** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object - */ - module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - - if (!headers) { return parsed; } - - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); - - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - }); - - return parsed; - }; - - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; - - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - var href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() - ); - - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var utils = __webpack_require__(2); - - /** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * @returns {Object} New object resulting from merging config2 to config1 - */ - module.exports = function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - var config = {}; - - var valueFromConfig2Keys = ['url', 'method', 'data']; - var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params']; - var defaultToConfig2Keys = [ - 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', - 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', - 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress', - 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent', - 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding' - ]; - var directMergeKeys = ['validateStatus']; - - function getMergedValue(target, source) { - if (utils.isPlainObject(target) && utils.isPlainObject(source)) { - return utils.merge(target, source); - } else if (utils.isPlainObject(source)) { - return utils.merge({}, source); - } else if (utils.isArray(source)) { - return source.slice(); - } - return source; - } - - function mergeDeepProperties(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(config1[prop], config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - } - - utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(undefined, config2[prop]); - } - }); - - utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties); - - utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(undefined, config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - }); - - utils.forEach(directMergeKeys, function merge(prop) { - if (prop in config2) { - config[prop] = getMergedValue(config1[prop], config2[prop]); - } else if (prop in config1) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - }); - - var axiosKeys = valueFromConfig2Keys - .concat(mergeDeepPropertiesKeys) - .concat(defaultToConfig2Keys) - .concat(directMergeKeys); - - var otherKeys = Object - .keys(config1) - .concat(Object.keys(config2)) - .filter(function filterAxiosKeys(key) { - return axiosKeys.indexOf(key) === -1; - }); - - utils.forEach(otherKeys, mergeDeepProperties); - - return config; - }; - - -/***/ }), -/* 23 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * A `Cancel` is an object that is thrown when an operation is canceled. - * - * @class - * @param {string=} message The message. - */ - function Cancel(message) { - this.message = message; - } - - Cancel.prototype.toString = function toString() { - return 'Cancel' + (this.message ? ': ' + this.message : ''); - }; - - Cancel.prototype.__CANCEL__ = true; - - module.exports = Cancel; - - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __webpack_require__) { - - 'use strict'; - - var Cancel = __webpack_require__(23); - - /** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @class - * @param {Function} executor The executor function. - */ - function CancelToken(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - var resolvePromise; - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - var token = this; - executor(function cancel(message) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new Cancel(message); - resolvePromise(token.reason); - }); - } - - /** - * Throws a `Cancel` if cancellation has been requested. - */ - CancelToken.prototype.throwIfRequested = function throwIfRequested() { - if (this.reason) { - throw this.reason; - } - }; - - /** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ - CancelToken.source = function source() { - var cancel; - var token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token: token, - cancel: cancel - }; - }; - - module.exports = CancelToken; - - -/***/ }), -/* 25 */ -/***/ (function(module, exports) { - - 'use strict'; - - /** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * @returns {Function} - */ - module.exports = function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; - }; - - -/***/ }) -/******/ ]) -}); -; -//# sourceMappingURL=axios.map \ No newline at end of file diff --git a/node_modules/axios/dist/axios.map b/node_modules/axios/dist/axios.map deleted file mode 100644 index c722a64..0000000 --- a/node_modules/axios/dist/axios.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 6b0707aec88359b2feaf","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./lib/core/Axios.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/core/buildFullPath.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/core/mergeConfig.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,yC;;;;;;ACAA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;ACpDA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,aAAa;AACxB,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oCAAmC,OAAO;AAC1C;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAuB,SAAS,GAAG,SAAS;AAC5C,4BAA2B;AAC3B;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,6BAA4B;AAC5B,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;;AAEA,wCAAuC,OAAO;AAC9C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9VA;;AAEA;AACA;AACA;AACA,oBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;;;;;;;ACVA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA,0BAAyB;AACzB,MAAK;AACL;AACA,EAAC;;AAED;AACA;AACA;AACA,iDAAgD;AAChD;AACA;AACA;AACA,MAAK;AACL;AACA,EAAC;;AAED;;;;;;;AC9FA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACrEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB;AACA,aAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;;;;;;;ACnDA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;AAC/B,wCAAuC;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;;;;;;;AC9EA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,cAAc;AACzB,YAAW,MAAM;AACjB,YAAW,eAAe;AAC1B,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACnBA;;AAEA;AACA;AACA;;;;;;;ACJA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAwE;AACxE;AACA;AACA;AACA,wDAAuD;AACvD;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,QAAO,YAAY;AACnB;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;AAED;AACA;AACA,EAAC;;AAED;;;;;;;ACjGA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;;;;;;ACXA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,6CAA4C;AAC5C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;AACT;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;;;;;;AClLA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACxBA;;AAEA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;;;;;;ACjBA;;AAEA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzCA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2CAA0C;AAC1C,UAAS;;AAET;AACA,6DAA4D,wBAAwB;AACpF;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA,mCAAkC;AAClC,gCAA+B,aAAa,EAAE;AAC9C;AACA;AACA,MAAK;AACL;;;;;;;ACpDA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACnBA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;;;;;;ACbA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAiB,eAAe;;AAEhC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;;AAEH;AACA;;;;;;;ACpDA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,eAAc,OAAO;AACrB,iBAAgB,QAAQ;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;;;;;;ACnEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL,4BAA2B;AAC3B,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA;;;;;;;ACtFA;;AAEA;AACA;AACA;AACA;AACA,YAAW,QAAQ;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;;AClBA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;ACxDA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA,YAAW,SAAS;AACpB,cAAa;AACb;AACA;AACA;AACA;AACA;AACA","file":"axios.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6b0707aec88359b2feaf","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 14\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/buildFullPath.js\n// module id = 17\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 18\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 20\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/mergeConfig.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/axios/dist/axios.min.js b/node_modules/axios/dist/axios.min.js deleted file mode 100644 index abdb244..0000000 --- a/node_modules/axios/dist/axios.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* axios v0.21.0 | (c) 2020 by Matt Zabriskie */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.axios=t():e.axios=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e){var t=new i(e),n=s(i.prototype.request,t);return o.extend(n,i.prototype,t),o.extend(n,t),n}var o=n(2),s=n(3),i=n(4),a=n(22),u=n(10),c=r(u);c.Axios=i,c.create=function(e){return r(a(c.defaults,e))},c.Cancel=n(23),c.CancelToken=n(24),c.isCancel=n(9),c.all=function(e){return Promise.all(e)},c.spread=n(25),e.exports=c,e.exports.default=c},function(e,t,n){"use strict";function r(e){return"[object Array]"===R.call(e)}function o(e){return"undefined"==typeof e}function s(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"[object ArrayBuffer]"===R.call(e)}function a(e){return"undefined"!=typeof FormData&&e instanceof FormData}function u(e){var t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function c(e){return"string"==typeof e}function f(e){return"number"==typeof e}function p(e){return null!==e&&"object"==typeof e}function d(e){if("[object Object]"!==R.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Date]"===R.call(e)}function h(e){return"[object File]"===R.call(e)}function m(e){return"[object Blob]"===R.call(e)}function y(e){return"[object Function]"===R.call(e)}function g(e){return p(e)&&y(e.pipe)}function v(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function x(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function w(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)}function b(e,t){if(null!==e&&"undefined"!=typeof e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n=200&&e<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},s.forEach(["delete","get","head"],function(e){u.headers[e]={}}),s.forEach(["post","put","patch"],function(e){u.headers[e]=s.merge(a)}),e.exports=u},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(2),o=n(13),s=n(16),i=n(5),a=n(17),u=n(20),c=n(21),f=n(14);e.exports=function(e){return new Promise(function(t,n){var p=e.data,d=e.headers;r.isFormData(p)&&delete d["Content-Type"];var l=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(h+":"+m)}var y=a(e.baseURL,e.url);if(l.open(e.method.toUpperCase(),i(y,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,l.onreadystatechange=function(){if(l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in l?u(l.getAllResponseHeaders()):null,s=e.responseType&&"text"!==e.responseType?l.response:l.responseText,i={data:s,status:l.status,statusText:l.statusText,headers:r,config:e,request:l};o(t,n,i),l=null}},l.onabort=function(){l&&(n(f("Request aborted",e,"ECONNABORTED",l)),l=null)},l.onerror=function(){n(f("Network Error",e,null,l)),l=null},l.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(f(t,e,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var g=(e.withCredentials||c(y))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;g&&(d[e.xsrfHeaderName]=g)}if("setRequestHeader"in l&&r.forEach(d,function(e,t){"undefined"==typeof p&&"content-type"===t.toLowerCase()?delete d[t]:l.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),e.responseType)try{l.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){l&&(l.abort(),n(e),l=null)}),p||(p=null),l.send(p)})}},function(e,t,n){"use strict";var r=n(14);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(15);e.exports=function(e,t,n,o,s){var i=new Error(e);return r(i,t,n,o,s)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,s,i){var a=[];a.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(o)&&a.push("path="+o),r.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";var r=n(18),o=n(19);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,s,i={};return e?(r.forEach(e.split("\n"),function(e){if(s=e.indexOf(":"),t=r.trim(e.substr(0,s)).toLowerCase(),n=r.trim(e.substr(s+1)),t){if(i[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?i[t]=(i[t]?i[t]:[]).concat([n]):i[t]=i[t]?i[t]+", "+n:n}}),i):i}},function(e,t,n){"use strict";var r=n(2);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){function n(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(s[o]=n(void 0,e[o])):s[o]=n(e[o],t[o])}t=t||{};var s={},i=["url","method","data"],a=["headers","auth","proxy","params"],u=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],c=["validateStatus"];r.forEach(i,function(e){r.isUndefined(t[e])||(s[e]=n(void 0,t[e]))}),r.forEach(a,o),r.forEach(u,function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(s[o]=n(void 0,e[o])):s[o]=n(void 0,t[o])}),r.forEach(c,function(r){r in t?s[r]=n(e[r],t[r]):r in e&&(s[r]=n(void 0,e[r]))});var f=i.concat(a).concat(u).concat(c),p=Object.keys(e).concat(Object.keys(t)).filter(function(e){return f.indexOf(e)===-1});return r.forEach(p,o),s}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(23);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}])}); -//# sourceMappingURL=axios.min.map \ No newline at end of file diff --git a/node_modules/axios/dist/axios.min.map b/node_modules/axios/dist/axios.min.map deleted file mode 100644 index e8a9bab..0000000 --- a/node_modules/axios/dist/axios.min.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///axios.min.js","webpack:///webpack/bootstrap 5db0cd118db1f73a2dc3","webpack:///./index.js","webpack:///./lib/axios.js","webpack:///./lib/utils.js","webpack:///./lib/helpers/bind.js","webpack:///./lib/core/Axios.js","webpack:///./lib/helpers/buildURL.js","webpack:///./lib/core/InterceptorManager.js","webpack:///./lib/core/dispatchRequest.js","webpack:///./lib/core/transformData.js","webpack:///./lib/cancel/isCancel.js","webpack:///./lib/defaults.js","webpack:///./lib/helpers/normalizeHeaderName.js","webpack:///./lib/adapters/xhr.js","webpack:///./lib/core/settle.js","webpack:///./lib/core/createError.js","webpack:///./lib/core/enhanceError.js","webpack:///./lib/helpers/cookies.js","webpack:///./lib/core/buildFullPath.js","webpack:///./lib/helpers/isAbsoluteURL.js","webpack:///./lib/helpers/combineURLs.js","webpack:///./lib/helpers/parseHeaders.js","webpack:///./lib/helpers/isURLSameOrigin.js","webpack:///./lib/core/mergeConfig.js","webpack:///./lib/cancel/Cancel.js","webpack:///./lib/cancel/CancelToken.js","webpack:///./lib/helpers/spread.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","createInstance","defaultConfig","context","Axios","instance","bind","prototype","request","utils","extend","mergeConfig","defaults","axios","create","instanceConfig","Cancel","CancelToken","isCancel","all","promises","Promise","spread","default","isArray","val","toString","isUndefined","isBuffer","constructor","isArrayBuffer","isFormData","FormData","isArrayBufferView","result","ArrayBuffer","isView","buffer","isString","isNumber","isObject","isPlainObject","Object","getPrototypeOf","isDate","isFile","isBlob","isFunction","isStream","pipe","isURLSearchParams","URLSearchParams","trim","str","replace","isStandardBrowserEnv","navigator","product","window","document","forEach","obj","fn","i","l","length","key","hasOwnProperty","merge","assignValue","slice","arguments","a","b","thisArg","stripBOM","content","charCodeAt","args","Array","apply","interceptors","InterceptorManager","response","buildURL","dispatchRequest","config","url","method","toLowerCase","chain","undefined","promise","resolve","interceptor","unshift","fulfilled","rejected","push","then","shift","getUri","params","paramsSerializer","data","encode","encodeURIComponent","serializedParams","parts","v","toISOString","JSON","stringify","join","hashmarkIndex","indexOf","handlers","use","eject","h","throwIfCancellationRequested","cancelToken","throwIfRequested","transformData","headers","transformRequest","common","adapter","transformResponse","reason","reject","fns","value","__CANCEL__","setContentTypeIfUnset","getDefaultAdapter","XMLHttpRequest","process","normalizeHeaderName","DEFAULT_CONTENT_TYPE","Content-Type","parse","e","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","status","Accept","normalizedName","name","toUpperCase","settle","cookies","buildFullPath","parseHeaders","isURLSameOrigin","createError","requestData","requestHeaders","auth","username","password","unescape","Authorization","btoa","fullPath","baseURL","open","onreadystatechange","readyState","responseURL","responseHeaders","getAllResponseHeaders","responseData","responseType","responseText","statusText","onabort","onerror","ontimeout","timeoutErrorMessage","xsrfValue","withCredentials","read","setRequestHeader","onDownloadProgress","addEventListener","onUploadProgress","upload","cancel","abort","send","enhanceError","message","code","error","Error","isAxiosError","toJSON","description","number","fileName","lineNumber","columnNumber","stack","write","expires","path","domain","secure","cookie","Date","toGMTString","match","RegExp","decodeURIComponent","remove","now","isAbsoluteURL","combineURLs","requestedURL","test","relativeURL","ignoreDuplicateOf","parsed","split","line","substr","concat","resolveURL","href","msie","urlParsingNode","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","originURL","userAgent","createElement","location","requestURL","config1","config2","getMergedValue","target","source","mergeDeepProperties","prop","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","axiosKeys","otherKeys","keys","filter","executor","TypeError","resolvePromise","token","callback","arr"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,MAAAD,IAEAD,EAAA,MAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE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A,OAFAzD,GAAAmD,QAAA0M,EAAAP,GAEAzK,IxBs/CM,SAAUnG,EAAQD,GyB3kDxB,YAQA,SAAA8B,GAAAoL,GACA9M,KAAA8M,UAGApL,EAAAT,UAAAmB,SAAA,WACA,gBAAApC,KAAA8M,QAAA,KAAA9M,KAAA8M,QAAA,KAGApL,EAAAT,UAAA8H,YAAA,EAEAlJ,EAAAD,QAAA8B,GzBklDM,SAAU7B,EAAQD,EAASM,G0BpmDjC,YAUA,SAAAyB,GAAAwP,GACA,qBAAAA,GACA,SAAAC,WAAA,+BAGA,IAAAC,EACArR,MAAAsG,QAAA,GAAAvE,SAAA,SAAAwE,GACA8K,EAAA9K,GAGA,IAAA+K,GAAAtR,IACAmR,GAAA,SAAArE,GACAwE,EAAA3I,SAKA2I,EAAA3I,OAAA,GAAAjH,GAAAoL,GACAuE,EAAAC,EAAA3I,WA1BA,GAAAjH,GAAAxB,EAAA,GAiCAyB,GAAAV,UAAAmH,iBAAA,WACA,GAAApI,KAAA2I,OACA,KAAA3I,MAAA2I,QAQAhH,EAAA6O,OAAA,WACA,GAAA9D,GACA4E,EAAA,GAAA3P,GAAA,SAAAlB,GACAiM,EAAAjM,GAEA,QACA6Q,QACA5E,WAIA7M,EAAAD,QAAA+B,G1B2mDM,SAAU9B,EAAQD,G2BnqDxB,YAsBAC,GAAAD,QAAA,SAAA2R,GACA,gBAAAC,GACA,MAAAD,GAAA7L,MAAA,KAAA8L","file":"axios.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"axios\"] = factory();\n\telse\n\t\troot[\"axios\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tmodule.exports = __webpack_require__(1);\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar bind = __webpack_require__(3);\n\tvar Axios = __webpack_require__(4);\n\tvar mergeConfig = __webpack_require__(22);\n\tvar defaults = __webpack_require__(10);\n\t\n\t/**\n\t * Create an instance of Axios\n\t *\n\t * @param {Object} defaultConfig The default config for the instance\n\t * @return {Axios} A new instance of Axios\n\t */\n\tfunction createInstance(defaultConfig) {\n\t var context = new Axios(defaultConfig);\n\t var instance = bind(Axios.prototype.request, context);\n\t\n\t // Copy axios.prototype to instance\n\t utils.extend(instance, Axios.prototype, context);\n\t\n\t // Copy context to instance\n\t utils.extend(instance, context);\n\t\n\t return instance;\n\t}\n\t\n\t// Create the default instance to be exported\n\tvar axios = createInstance(defaults);\n\t\n\t// Expose Axios class to allow class inheritance\n\taxios.Axios = Axios;\n\t\n\t// Factory for creating new instances\n\taxios.create = function create(instanceConfig) {\n\t return createInstance(mergeConfig(axios.defaults, instanceConfig));\n\t};\n\t\n\t// Expose Cancel & CancelToken\n\taxios.Cancel = __webpack_require__(23);\n\taxios.CancelToken = __webpack_require__(24);\n\taxios.isCancel = __webpack_require__(9);\n\t\n\t// Expose all/spread\n\taxios.all = function all(promises) {\n\t return Promise.all(promises);\n\t};\n\taxios.spread = __webpack_require__(25);\n\t\n\tmodule.exports = axios;\n\t\n\t// Allow use of default import syntax in TypeScript\n\tmodule.exports.default = axios;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar bind = __webpack_require__(3);\n\t\n\t/*global toString:true*/\n\t\n\t// utils is a library of generic helper functions non-specific to axios\n\t\n\tvar toString = Object.prototype.toString;\n\t\n\t/**\n\t * Determine if a value is an Array\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Array, otherwise false\n\t */\n\tfunction isArray(val) {\n\t return toString.call(val) === '[object Array]';\n\t}\n\t\n\t/**\n\t * Determine if a value is undefined\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if the value is undefined, otherwise false\n\t */\n\tfunction isUndefined(val) {\n\t return typeof val === 'undefined';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Buffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Buffer, otherwise false\n\t */\n\tfunction isBuffer(val) {\n\t return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n\t && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n\t}\n\t\n\t/**\n\t * Determine if a value is an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBuffer(val) {\n\t return toString.call(val) === '[object ArrayBuffer]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a FormData\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an FormData, otherwise false\n\t */\n\tfunction isFormData(val) {\n\t return (typeof FormData !== 'undefined') && (val instanceof FormData);\n\t}\n\t\n\t/**\n\t * Determine if a value is a view on an ArrayBuffer\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n\t */\n\tfunction isArrayBufferView(val) {\n\t var result;\n\t if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n\t result = ArrayBuffer.isView(val);\n\t } else {\n\t result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Determine if a value is a String\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a String, otherwise false\n\t */\n\tfunction isString(val) {\n\t return typeof val === 'string';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Number\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Number, otherwise false\n\t */\n\tfunction isNumber(val) {\n\t return typeof val === 'number';\n\t}\n\t\n\t/**\n\t * Determine if a value is an Object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is an Object, otherwise false\n\t */\n\tfunction isObject(val) {\n\t return val !== null && typeof val === 'object';\n\t}\n\t\n\t/**\n\t * Determine if a value is a plain Object\n\t *\n\t * @param {Object} val The value to test\n\t * @return {boolean} True if value is a plain Object, otherwise false\n\t */\n\tfunction isPlainObject(val) {\n\t if (toString.call(val) !== '[object Object]') {\n\t return false;\n\t }\n\t\n\t var prototype = Object.getPrototypeOf(val);\n\t return prototype === null || prototype === Object.prototype;\n\t}\n\t\n\t/**\n\t * Determine if a value is a Date\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Date, otherwise false\n\t */\n\tfunction isDate(val) {\n\t return toString.call(val) === '[object Date]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a File\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a File, otherwise false\n\t */\n\tfunction isFile(val) {\n\t return toString.call(val) === '[object File]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Blob\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Blob, otherwise false\n\t */\n\tfunction isBlob(val) {\n\t return toString.call(val) === '[object Blob]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Function\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Function, otherwise false\n\t */\n\tfunction isFunction(val) {\n\t return toString.call(val) === '[object Function]';\n\t}\n\t\n\t/**\n\t * Determine if a value is a Stream\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a Stream, otherwise false\n\t */\n\tfunction isStream(val) {\n\t return isObject(val) && isFunction(val.pipe);\n\t}\n\t\n\t/**\n\t * Determine if a value is a URLSearchParams object\n\t *\n\t * @param {Object} val The value to test\n\t * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n\t */\n\tfunction isURLSearchParams(val) {\n\t return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n\t}\n\t\n\t/**\n\t * Trim excess whitespace off the beginning and end of a string\n\t *\n\t * @param {String} str The String to trim\n\t * @returns {String} The String freed of excess whitespace\n\t */\n\tfunction trim(str) {\n\t return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n\t}\n\t\n\t/**\n\t * Determine if we're running in a standard browser environment\n\t *\n\t * This allows axios to run in a web worker, and react-native.\n\t * Both environments support XMLHttpRequest, but not fully standard globals.\n\t *\n\t * web workers:\n\t * typeof window -> undefined\n\t * typeof document -> undefined\n\t *\n\t * react-native:\n\t * navigator.product -> 'ReactNative'\n\t * nativescript\n\t * navigator.product -> 'NativeScript' or 'NS'\n\t */\n\tfunction isStandardBrowserEnv() {\n\t if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n\t navigator.product === 'NativeScript' ||\n\t navigator.product === 'NS')) {\n\t return false;\n\t }\n\t return (\n\t typeof window !== 'undefined' &&\n\t typeof document !== 'undefined'\n\t );\n\t}\n\t\n\t/**\n\t * Iterate over an Array or an Object invoking a function for each item.\n\t *\n\t * If `obj` is an Array callback will be called passing\n\t * the value, index, and complete array for each item.\n\t *\n\t * If 'obj' is an Object callback will be called passing\n\t * the value, key, and complete object for each property.\n\t *\n\t * @param {Object|Array} obj The object to iterate\n\t * @param {Function} fn The callback to invoke for each item\n\t */\n\tfunction forEach(obj, fn) {\n\t // Don't bother if no value provided\n\t if (obj === null || typeof obj === 'undefined') {\n\t return;\n\t }\n\t\n\t // Force an array if not already something iterable\n\t if (typeof obj !== 'object') {\n\t /*eslint no-param-reassign:0*/\n\t obj = [obj];\n\t }\n\t\n\t if (isArray(obj)) {\n\t // Iterate over array values\n\t for (var i = 0, l = obj.length; i < l; i++) {\n\t fn.call(null, obj[i], i, obj);\n\t }\n\t } else {\n\t // Iterate over object keys\n\t for (var key in obj) {\n\t if (Object.prototype.hasOwnProperty.call(obj, key)) {\n\t fn.call(null, obj[key], key, obj);\n\t }\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * Accepts varargs expecting each argument to be an object, then\n\t * immutably merges the properties of each object and returns result.\n\t *\n\t * When multiple objects contain the same key the later object in\n\t * the arguments list will take precedence.\n\t *\n\t * Example:\n\t *\n\t * ```js\n\t * var result = merge({foo: 123}, {foo: 456});\n\t * console.log(result.foo); // outputs 456\n\t * ```\n\t *\n\t * @param {Object} obj1 Object to merge\n\t * @returns {Object} Result of all merge properties\n\t */\n\tfunction merge(/* obj1, obj2, obj3, ... */) {\n\t var result = {};\n\t function assignValue(val, key) {\n\t if (isPlainObject(result[key]) && isPlainObject(val)) {\n\t result[key] = merge(result[key], val);\n\t } else if (isPlainObject(val)) {\n\t result[key] = merge({}, val);\n\t } else if (isArray(val)) {\n\t result[key] = val.slice();\n\t } else {\n\t result[key] = val;\n\t }\n\t }\n\t\n\t for (var i = 0, l = arguments.length; i < l; i++) {\n\t forEach(arguments[i], assignValue);\n\t }\n\t return result;\n\t}\n\t\n\t/**\n\t * Extends object a by mutably adding to it the properties of object b.\n\t *\n\t * @param {Object} a The object to be extended\n\t * @param {Object} b The object to copy properties from\n\t * @param {Object} thisArg The object to bind function to\n\t * @return {Object} The resulting value of object a\n\t */\n\tfunction extend(a, b, thisArg) {\n\t forEach(b, function assignValue(val, key) {\n\t if (thisArg && typeof val === 'function') {\n\t a[key] = bind(val, thisArg);\n\t } else {\n\t a[key] = val;\n\t }\n\t });\n\t return a;\n\t}\n\t\n\t/**\n\t * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n\t *\n\t * @param {string} content with BOM\n\t * @return {string} content value without BOM\n\t */\n\tfunction stripBOM(content) {\n\t if (content.charCodeAt(0) === 0xFEFF) {\n\t content = content.slice(1);\n\t }\n\t return content;\n\t}\n\t\n\tmodule.exports = {\n\t isArray: isArray,\n\t isArrayBuffer: isArrayBuffer,\n\t isBuffer: isBuffer,\n\t isFormData: isFormData,\n\t isArrayBufferView: isArrayBufferView,\n\t isString: isString,\n\t isNumber: isNumber,\n\t isObject: isObject,\n\t isPlainObject: isPlainObject,\n\t isUndefined: isUndefined,\n\t isDate: isDate,\n\t isFile: isFile,\n\t isBlob: isBlob,\n\t isFunction: isFunction,\n\t isStream: isStream,\n\t isURLSearchParams: isURLSearchParams,\n\t isStandardBrowserEnv: isStandardBrowserEnv,\n\t forEach: forEach,\n\t merge: merge,\n\t extend: extend,\n\t trim: trim,\n\t stripBOM: stripBOM\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function bind(fn, thisArg) {\n\t return function wrap() {\n\t var args = new Array(arguments.length);\n\t for (var i = 0; i < args.length; i++) {\n\t args[i] = arguments[i];\n\t }\n\t return fn.apply(thisArg, args);\n\t };\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar buildURL = __webpack_require__(5);\n\tvar InterceptorManager = __webpack_require__(6);\n\tvar dispatchRequest = __webpack_require__(7);\n\tvar mergeConfig = __webpack_require__(22);\n\t\n\t/**\n\t * Create a new instance of Axios\n\t *\n\t * @param {Object} instanceConfig The default config for the instance\n\t */\n\tfunction Axios(instanceConfig) {\n\t this.defaults = instanceConfig;\n\t this.interceptors = {\n\t request: new InterceptorManager(),\n\t response: new InterceptorManager()\n\t };\n\t}\n\t\n\t/**\n\t * Dispatch a request\n\t *\n\t * @param {Object} config The config specific for this request (merged with this.defaults)\n\t */\n\tAxios.prototype.request = function request(config) {\n\t /*eslint no-param-reassign:0*/\n\t // Allow for axios('example/url'[, config]) a la fetch API\n\t if (typeof config === 'string') {\n\t config = arguments[1] || {};\n\t config.url = arguments[0];\n\t } else {\n\t config = config || {};\n\t }\n\t\n\t config = mergeConfig(this.defaults, config);\n\t\n\t // Set config.method\n\t if (config.method) {\n\t config.method = config.method.toLowerCase();\n\t } else if (this.defaults.method) {\n\t config.method = this.defaults.method.toLowerCase();\n\t } else {\n\t config.method = 'get';\n\t }\n\t\n\t // Hook up interceptors middleware\n\t var chain = [dispatchRequest, undefined];\n\t var promise = Promise.resolve(config);\n\t\n\t this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n\t chain.unshift(interceptor.fulfilled, interceptor.rejected);\n\t });\n\t\n\t this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n\t chain.push(interceptor.fulfilled, interceptor.rejected);\n\t });\n\t\n\t while (chain.length) {\n\t promise = promise.then(chain.shift(), chain.shift());\n\t }\n\t\n\t return promise;\n\t};\n\t\n\tAxios.prototype.getUri = function getUri(config) {\n\t config = mergeConfig(this.defaults, config);\n\t return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n\t};\n\t\n\t// Provide aliases for supported request methods\n\tutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n\t /*eslint func-names:0*/\n\t Axios.prototype[method] = function(url, config) {\n\t return this.request(mergeConfig(config || {}, {\n\t method: method,\n\t url: url,\n\t data: (config || {}).data\n\t }));\n\t };\n\t});\n\t\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t /*eslint func-names:0*/\n\t Axios.prototype[method] = function(url, data, config) {\n\t return this.request(mergeConfig(config || {}, {\n\t method: method,\n\t url: url,\n\t data: data\n\t }));\n\t };\n\t});\n\t\n\tmodule.exports = Axios;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tfunction encode(val) {\n\t return encodeURIComponent(val).\n\t replace(/%3A/gi, ':').\n\t replace(/%24/g, '$').\n\t replace(/%2C/gi, ',').\n\t replace(/%20/g, '+').\n\t replace(/%5B/gi, '[').\n\t replace(/%5D/gi, ']');\n\t}\n\t\n\t/**\n\t * Build a URL by appending params to the end\n\t *\n\t * @param {string} url The base of the url (e.g., http://www.google.com)\n\t * @param {object} [params] The params to be appended\n\t * @returns {string} The formatted url\n\t */\n\tmodule.exports = function buildURL(url, params, paramsSerializer) {\n\t /*eslint no-param-reassign:0*/\n\t if (!params) {\n\t return url;\n\t }\n\t\n\t var serializedParams;\n\t if (paramsSerializer) {\n\t serializedParams = paramsSerializer(params);\n\t } else if (utils.isURLSearchParams(params)) {\n\t serializedParams = params.toString();\n\t } else {\n\t var parts = [];\n\t\n\t utils.forEach(params, function serialize(val, key) {\n\t if (val === null || typeof val === 'undefined') {\n\t return;\n\t }\n\t\n\t if (utils.isArray(val)) {\n\t key = key + '[]';\n\t } else {\n\t val = [val];\n\t }\n\t\n\t utils.forEach(val, function parseValue(v) {\n\t if (utils.isDate(v)) {\n\t v = v.toISOString();\n\t } else if (utils.isObject(v)) {\n\t v = JSON.stringify(v);\n\t }\n\t parts.push(encode(key) + '=' + encode(v));\n\t });\n\t });\n\t\n\t serializedParams = parts.join('&');\n\t }\n\t\n\t if (serializedParams) {\n\t var hashmarkIndex = url.indexOf('#');\n\t if (hashmarkIndex !== -1) {\n\t url = url.slice(0, hashmarkIndex);\n\t }\n\t\n\t url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n\t }\n\t\n\t return url;\n\t};\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tfunction InterceptorManager() {\n\t this.handlers = [];\n\t}\n\t\n\t/**\n\t * Add a new interceptor to the stack\n\t *\n\t * @param {Function} fulfilled The function to handle `then` for a `Promise`\n\t * @param {Function} rejected The function to handle `reject` for a `Promise`\n\t *\n\t * @return {Number} An ID used to remove interceptor later\n\t */\n\tInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n\t this.handlers.push({\n\t fulfilled: fulfilled,\n\t rejected: rejected\n\t });\n\t return this.handlers.length - 1;\n\t};\n\t\n\t/**\n\t * Remove an interceptor from the stack\n\t *\n\t * @param {Number} id The ID that was returned by `use`\n\t */\n\tInterceptorManager.prototype.eject = function eject(id) {\n\t if (this.handlers[id]) {\n\t this.handlers[id] = null;\n\t }\n\t};\n\t\n\t/**\n\t * Iterate over all the registered interceptors\n\t *\n\t * This method is particularly useful for skipping over any\n\t * interceptors that may have become `null` calling `eject`.\n\t *\n\t * @param {Function} fn The function to call for each interceptor\n\t */\n\tInterceptorManager.prototype.forEach = function forEach(fn) {\n\t utils.forEach(this.handlers, function forEachHandler(h) {\n\t if (h !== null) {\n\t fn(h);\n\t }\n\t });\n\t};\n\t\n\tmodule.exports = InterceptorManager;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar transformData = __webpack_require__(8);\n\tvar isCancel = __webpack_require__(9);\n\tvar defaults = __webpack_require__(10);\n\t\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tfunction throwIfCancellationRequested(config) {\n\t if (config.cancelToken) {\n\t config.cancelToken.throwIfRequested();\n\t }\n\t}\n\t\n\t/**\n\t * Dispatch a request to the server using the configured adapter.\n\t *\n\t * @param {object} config The config that is to be used for the request\n\t * @returns {Promise} The Promise to be fulfilled\n\t */\n\tmodule.exports = function dispatchRequest(config) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Ensure headers exist\n\t config.headers = config.headers || {};\n\t\n\t // Transform request data\n\t config.data = transformData(\n\t config.data,\n\t config.headers,\n\t config.transformRequest\n\t );\n\t\n\t // Flatten headers\n\t config.headers = utils.merge(\n\t config.headers.common || {},\n\t config.headers[config.method] || {},\n\t config.headers\n\t );\n\t\n\t utils.forEach(\n\t ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n\t function cleanHeaderConfig(method) {\n\t delete config.headers[method];\n\t }\n\t );\n\t\n\t var adapter = config.adapter || defaults.adapter;\n\t\n\t return adapter(config).then(function onAdapterResolution(response) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Transform response data\n\t response.data = transformData(\n\t response.data,\n\t response.headers,\n\t config.transformResponse\n\t );\n\t\n\t return response;\n\t }, function onAdapterRejection(reason) {\n\t if (!isCancel(reason)) {\n\t throwIfCancellationRequested(config);\n\t\n\t // Transform response data\n\t if (reason && reason.response) {\n\t reason.response.data = transformData(\n\t reason.response.data,\n\t reason.response.headers,\n\t config.transformResponse\n\t );\n\t }\n\t }\n\t\n\t return Promise.reject(reason);\n\t });\n\t};\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t/**\n\t * Transform the data for a request or a response\n\t *\n\t * @param {Object|String} data The data to be transformed\n\t * @param {Array} headers The headers for the request or response\n\t * @param {Array|Function} fns A single function or Array of functions\n\t * @returns {*} The resulting transformed data\n\t */\n\tmodule.exports = function transformData(data, headers, fns) {\n\t /*eslint no-param-reassign:0*/\n\t utils.forEach(fns, function transform(fn) {\n\t data = fn(data, headers);\n\t });\n\t\n\t return data;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = function isCancel(value) {\n\t return !!(value && value.__CANCEL__);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar normalizeHeaderName = __webpack_require__(11);\n\t\n\tvar DEFAULT_CONTENT_TYPE = {\n\t 'Content-Type': 'application/x-www-form-urlencoded'\n\t};\n\t\n\tfunction setContentTypeIfUnset(headers, value) {\n\t if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n\t headers['Content-Type'] = value;\n\t }\n\t}\n\t\n\tfunction getDefaultAdapter() {\n\t var adapter;\n\t if (typeof XMLHttpRequest !== 'undefined') {\n\t // For browsers use XHR adapter\n\t adapter = __webpack_require__(12);\n\t } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n\t // For node use HTTP adapter\n\t adapter = __webpack_require__(12);\n\t }\n\t return adapter;\n\t}\n\t\n\tvar defaults = {\n\t adapter: getDefaultAdapter(),\n\t\n\t transformRequest: [function transformRequest(data, headers) {\n\t normalizeHeaderName(headers, 'Accept');\n\t normalizeHeaderName(headers, 'Content-Type');\n\t if (utils.isFormData(data) ||\n\t utils.isArrayBuffer(data) ||\n\t utils.isBuffer(data) ||\n\t utils.isStream(data) ||\n\t utils.isFile(data) ||\n\t utils.isBlob(data)\n\t ) {\n\t return data;\n\t }\n\t if (utils.isArrayBufferView(data)) {\n\t return data.buffer;\n\t }\n\t if (utils.isURLSearchParams(data)) {\n\t setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n\t return data.toString();\n\t }\n\t if (utils.isObject(data)) {\n\t setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n\t return JSON.stringify(data);\n\t }\n\t return data;\n\t }],\n\t\n\t transformResponse: [function transformResponse(data) {\n\t /*eslint no-param-reassign:0*/\n\t if (typeof data === 'string') {\n\t try {\n\t data = JSON.parse(data);\n\t } catch (e) { /* Ignore */ }\n\t }\n\t return data;\n\t }],\n\t\n\t /**\n\t * A timeout in milliseconds to abort a request. If set to 0 (default) a\n\t * timeout is not created.\n\t */\n\t timeout: 0,\n\t\n\t xsrfCookieName: 'XSRF-TOKEN',\n\t xsrfHeaderName: 'X-XSRF-TOKEN',\n\t\n\t maxContentLength: -1,\n\t maxBodyLength: -1,\n\t\n\t validateStatus: function validateStatus(status) {\n\t return status >= 200 && status < 300;\n\t }\n\t};\n\t\n\tdefaults.headers = {\n\t common: {\n\t 'Accept': 'application/json, text/plain, */*'\n\t }\n\t};\n\t\n\tutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n\t defaults.headers[method] = {};\n\t});\n\t\n\tutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n\t defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n\t});\n\t\n\tmodule.exports = defaults;\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n\t utils.forEach(headers, function processHeader(value, name) {\n\t if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n\t headers[normalizedName] = value;\n\t delete headers[name];\n\t }\n\t });\n\t};\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\tvar settle = __webpack_require__(13);\n\tvar cookies = __webpack_require__(16);\n\tvar buildURL = __webpack_require__(5);\n\tvar buildFullPath = __webpack_require__(17);\n\tvar parseHeaders = __webpack_require__(20);\n\tvar isURLSameOrigin = __webpack_require__(21);\n\tvar createError = __webpack_require__(14);\n\t\n\tmodule.exports = function xhrAdapter(config) {\n\t return new Promise(function dispatchXhrRequest(resolve, reject) {\n\t var requestData = config.data;\n\t var requestHeaders = config.headers;\n\t\n\t if (utils.isFormData(requestData)) {\n\t delete requestHeaders['Content-Type']; // Let the browser set it\n\t }\n\t\n\t var request = new XMLHttpRequest();\n\t\n\t // HTTP basic authentication\n\t if (config.auth) {\n\t var username = config.auth.username || '';\n\t var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n\t requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n\t }\n\t\n\t var fullPath = buildFullPath(config.baseURL, config.url);\n\t request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\t\n\t // Set the request timeout in MS\n\t request.timeout = config.timeout;\n\t\n\t // Listen for ready state\n\t request.onreadystatechange = function handleLoad() {\n\t if (!request || request.readyState !== 4) {\n\t return;\n\t }\n\t\n\t // The request errored out and we didn't get a response, this will be\n\t // handled by onerror instead\n\t // With one exception: request that using file: protocol, most browsers\n\t // will return status as 0 even though it's a successful request\n\t if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n\t return;\n\t }\n\t\n\t // Prepare the response\n\t var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n\t var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n\t var response = {\n\t data: responseData,\n\t status: request.status,\n\t statusText: request.statusText,\n\t headers: responseHeaders,\n\t config: config,\n\t request: request\n\t };\n\t\n\t settle(resolve, reject, response);\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle browser request cancellation (as opposed to a manual cancellation)\n\t request.onabort = function handleAbort() {\n\t if (!request) {\n\t return;\n\t }\n\t\n\t reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle low level network errors\n\t request.onerror = function handleError() {\n\t // Real errors are hidden from us by the browser\n\t // onerror should only fire if it's a network error\n\t reject(createError('Network Error', config, null, request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Handle timeout\n\t request.ontimeout = function handleTimeout() {\n\t var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n\t if (config.timeoutErrorMessage) {\n\t timeoutErrorMessage = config.timeoutErrorMessage;\n\t }\n\t reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n\t request));\n\t\n\t // Clean up request\n\t request = null;\n\t };\n\t\n\t // Add xsrf header\n\t // This is only done if running in a standard browser environment.\n\t // Specifically not if we're in a web worker, or react-native.\n\t if (utils.isStandardBrowserEnv()) {\n\t // Add xsrf header\n\t var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n\t cookies.read(config.xsrfCookieName) :\n\t undefined;\n\t\n\t if (xsrfValue) {\n\t requestHeaders[config.xsrfHeaderName] = xsrfValue;\n\t }\n\t }\n\t\n\t // Add headers to the request\n\t if ('setRequestHeader' in request) {\n\t utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n\t if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n\t // Remove Content-Type if data is undefined\n\t delete requestHeaders[key];\n\t } else {\n\t // Otherwise add header to the request\n\t request.setRequestHeader(key, val);\n\t }\n\t });\n\t }\n\t\n\t // Add withCredentials to request if needed\n\t if (!utils.isUndefined(config.withCredentials)) {\n\t request.withCredentials = !!config.withCredentials;\n\t }\n\t\n\t // Add responseType to request if needed\n\t if (config.responseType) {\n\t try {\n\t request.responseType = config.responseType;\n\t } catch (e) {\n\t // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n\t // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n\t if (config.responseType !== 'json') {\n\t throw e;\n\t }\n\t }\n\t }\n\t\n\t // Handle progress if needed\n\t if (typeof config.onDownloadProgress === 'function') {\n\t request.addEventListener('progress', config.onDownloadProgress);\n\t }\n\t\n\t // Not all browsers support upload events\n\t if (typeof config.onUploadProgress === 'function' && request.upload) {\n\t request.upload.addEventListener('progress', config.onUploadProgress);\n\t }\n\t\n\t if (config.cancelToken) {\n\t // Handle cancellation\n\t config.cancelToken.promise.then(function onCanceled(cancel) {\n\t if (!request) {\n\t return;\n\t }\n\t\n\t request.abort();\n\t reject(cancel);\n\t // Clean up request\n\t request = null;\n\t });\n\t }\n\t\n\t if (!requestData) {\n\t requestData = null;\n\t }\n\t\n\t // Send the request\n\t request.send(requestData);\n\t });\n\t};\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar createError = __webpack_require__(14);\n\t\n\t/**\n\t * Resolve or reject a Promise based on response status.\n\t *\n\t * @param {Function} resolve A function that resolves the promise.\n\t * @param {Function} reject A function that rejects the promise.\n\t * @param {object} response The response.\n\t */\n\tmodule.exports = function settle(resolve, reject, response) {\n\t var validateStatus = response.config.validateStatus;\n\t if (!response.status || !validateStatus || validateStatus(response.status)) {\n\t resolve(response);\n\t } else {\n\t reject(createError(\n\t 'Request failed with status code ' + response.status,\n\t response.config,\n\t null,\n\t response.request,\n\t response\n\t ));\n\t }\n\t};\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar enhanceError = __webpack_require__(15);\n\t\n\t/**\n\t * Create an Error with the specified message, config, error code, request and response.\n\t *\n\t * @param {string} message The error message.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The created error.\n\t */\n\tmodule.exports = function createError(message, config, code, request, response) {\n\t var error = new Error(message);\n\t return enhanceError(error, config, code, request, response);\n\t};\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Update an Error with the specified config, error code, and response.\n\t *\n\t * @param {Error} error The error to update.\n\t * @param {Object} config The config.\n\t * @param {string} [code] The error code (for example, 'ECONNABORTED').\n\t * @param {Object} [request] The request.\n\t * @param {Object} [response] The response.\n\t * @returns {Error} The error.\n\t */\n\tmodule.exports = function enhanceError(error, config, code, request, response) {\n\t error.config = config;\n\t if (code) {\n\t error.code = code;\n\t }\n\t\n\t error.request = request;\n\t error.response = response;\n\t error.isAxiosError = true;\n\t\n\t error.toJSON = function toJSON() {\n\t return {\n\t // Standard\n\t message: this.message,\n\t name: this.name,\n\t // Microsoft\n\t description: this.description,\n\t number: this.number,\n\t // Mozilla\n\t fileName: this.fileName,\n\t lineNumber: this.lineNumber,\n\t columnNumber: this.columnNumber,\n\t stack: this.stack,\n\t // Axios\n\t config: this.config,\n\t code: this.code\n\t };\n\t };\n\t return error;\n\t};\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = (\n\t utils.isStandardBrowserEnv() ?\n\t\n\t // Standard browser envs support document.cookie\n\t (function standardBrowserEnv() {\n\t return {\n\t write: function write(name, value, expires, path, domain, secure) {\n\t var cookie = [];\n\t cookie.push(name + '=' + encodeURIComponent(value));\n\t\n\t if (utils.isNumber(expires)) {\n\t cookie.push('expires=' + new Date(expires).toGMTString());\n\t }\n\t\n\t if (utils.isString(path)) {\n\t cookie.push('path=' + path);\n\t }\n\t\n\t if (utils.isString(domain)) {\n\t cookie.push('domain=' + domain);\n\t }\n\t\n\t if (secure === true) {\n\t cookie.push('secure');\n\t }\n\t\n\t document.cookie = cookie.join('; ');\n\t },\n\t\n\t read: function read(name) {\n\t var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n\t return (match ? decodeURIComponent(match[3]) : null);\n\t },\n\t\n\t remove: function remove(name) {\n\t this.write(name, '', Date.now() - 86400000);\n\t }\n\t };\n\t })() :\n\t\n\t // Non standard browser env (web workers, react-native) lack needed support.\n\t (function nonStandardBrowserEnv() {\n\t return {\n\t write: function write() {},\n\t read: function read() { return null; },\n\t remove: function remove() {}\n\t };\n\t })()\n\t);\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar isAbsoluteURL = __webpack_require__(18);\n\tvar combineURLs = __webpack_require__(19);\n\t\n\t/**\n\t * Creates a new URL by combining the baseURL with the requestedURL,\n\t * only when the requestedURL is not already an absolute URL.\n\t * If the requestURL is absolute, this function returns the requestedURL untouched.\n\t *\n\t * @param {string} baseURL The base URL\n\t * @param {string} requestedURL Absolute or relative URL to combine\n\t * @returns {string} The combined full path\n\t */\n\tmodule.exports = function buildFullPath(baseURL, requestedURL) {\n\t if (baseURL && !isAbsoluteURL(requestedURL)) {\n\t return combineURLs(baseURL, requestedURL);\n\t }\n\t return requestedURL;\n\t};\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Determines whether the specified URL is absolute\n\t *\n\t * @param {string} url The URL to test\n\t * @returns {boolean} True if the specified URL is absolute, otherwise false\n\t */\n\tmodule.exports = function isAbsoluteURL(url) {\n\t // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n\t // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n\t // by any combination of letters, digits, plus, period, or hyphen.\n\t return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n\t};\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Creates a new URL by combining the specified URLs\n\t *\n\t * @param {string} baseURL The base URL\n\t * @param {string} relativeURL The relative URL\n\t * @returns {string} The combined URL\n\t */\n\tmodule.exports = function combineURLs(baseURL, relativeURL) {\n\t return relativeURL\n\t ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n\t : baseURL;\n\t};\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t// Headers whose duplicates are ignored by node\n\t// c.f. https://nodejs.org/api/http.html#http_message_headers\n\tvar ignoreDuplicateOf = [\n\t 'age', 'authorization', 'content-length', 'content-type', 'etag',\n\t 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n\t 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n\t 'referer', 'retry-after', 'user-agent'\n\t];\n\t\n\t/**\n\t * Parse headers into an object\n\t *\n\t * ```\n\t * Date: Wed, 27 Aug 2014 08:58:49 GMT\n\t * Content-Type: application/json\n\t * Connection: keep-alive\n\t * Transfer-Encoding: chunked\n\t * ```\n\t *\n\t * @param {String} headers Headers needing to be parsed\n\t * @returns {Object} Headers parsed into an object\n\t */\n\tmodule.exports = function parseHeaders(headers) {\n\t var parsed = {};\n\t var key;\n\t var val;\n\t var i;\n\t\n\t if (!headers) { return parsed; }\n\t\n\t utils.forEach(headers.split('\\n'), function parser(line) {\n\t i = line.indexOf(':');\n\t key = utils.trim(line.substr(0, i)).toLowerCase();\n\t val = utils.trim(line.substr(i + 1));\n\t\n\t if (key) {\n\t if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n\t return;\n\t }\n\t if (key === 'set-cookie') {\n\t parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n\t } else {\n\t parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n\t }\n\t }\n\t });\n\t\n\t return parsed;\n\t};\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\tmodule.exports = (\n\t utils.isStandardBrowserEnv() ?\n\t\n\t // Standard browser envs have full support of the APIs needed to test\n\t // whether the request URL is of the same origin as current location.\n\t (function standardBrowserEnv() {\n\t var msie = /(msie|trident)/i.test(navigator.userAgent);\n\t var urlParsingNode = document.createElement('a');\n\t var originURL;\n\t\n\t /**\n\t * Parse a URL to discover it's components\n\t *\n\t * @param {String} url The URL to be parsed\n\t * @returns {Object}\n\t */\n\t function resolveURL(url) {\n\t var href = url;\n\t\n\t if (msie) {\n\t // IE needs attribute set twice to normalize properties\n\t urlParsingNode.setAttribute('href', href);\n\t href = urlParsingNode.href;\n\t }\n\t\n\t urlParsingNode.setAttribute('href', href);\n\t\n\t // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n\t return {\n\t href: urlParsingNode.href,\n\t protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n\t host: urlParsingNode.host,\n\t search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n\t hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n\t hostname: urlParsingNode.hostname,\n\t port: urlParsingNode.port,\n\t pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n\t urlParsingNode.pathname :\n\t '/' + urlParsingNode.pathname\n\t };\n\t }\n\t\n\t originURL = resolveURL(window.location.href);\n\t\n\t /**\n\t * Determine if a URL shares the same origin as the current location\n\t *\n\t * @param {String} requestURL The URL to test\n\t * @returns {boolean} True if URL shares the same origin, otherwise false\n\t */\n\t return function isURLSameOrigin(requestURL) {\n\t var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n\t return (parsed.protocol === originURL.protocol &&\n\t parsed.host === originURL.host);\n\t };\n\t })() :\n\t\n\t // Non standard browser envs (web workers, react-native) lack needed support.\n\t (function nonStandardBrowserEnv() {\n\t return function isURLSameOrigin() {\n\t return true;\n\t };\n\t })()\n\t);\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar utils = __webpack_require__(2);\n\t\n\t/**\n\t * Config-specific merge-function which creates a new config-object\n\t * by merging two configuration objects together.\n\t *\n\t * @param {Object} config1\n\t * @param {Object} config2\n\t * @returns {Object} New object resulting from merging config2 to config1\n\t */\n\tmodule.exports = function mergeConfig(config1, config2) {\n\t // eslint-disable-next-line no-param-reassign\n\t config2 = config2 || {};\n\t var config = {};\n\t\n\t var valueFromConfig2Keys = ['url', 'method', 'data'];\n\t var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n\t var defaultToConfig2Keys = [\n\t 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n\t 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n\t 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n\t 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n\t 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n\t ];\n\t var directMergeKeys = ['validateStatus'];\n\t\n\t function getMergedValue(target, source) {\n\t if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n\t return utils.merge(target, source);\n\t } else if (utils.isPlainObject(source)) {\n\t return utils.merge({}, source);\n\t } else if (utils.isArray(source)) {\n\t return source.slice();\n\t }\n\t return source;\n\t }\n\t\n\t function mergeDeepProperties(prop) {\n\t if (!utils.isUndefined(config2[prop])) {\n\t config[prop] = getMergedValue(config1[prop], config2[prop]);\n\t } else if (!utils.isUndefined(config1[prop])) {\n\t config[prop] = getMergedValue(undefined, config1[prop]);\n\t }\n\t }\n\t\n\t utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n\t if (!utils.isUndefined(config2[prop])) {\n\t config[prop] = getMergedValue(undefined, config2[prop]);\n\t }\n\t });\n\t\n\t utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\t\n\t utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n\t if (!utils.isUndefined(config2[prop])) {\n\t config[prop] = getMergedValue(undefined, config2[prop]);\n\t } else if (!utils.isUndefined(config1[prop])) {\n\t config[prop] = getMergedValue(undefined, config1[prop]);\n\t }\n\t });\n\t\n\t utils.forEach(directMergeKeys, function merge(prop) {\n\t if (prop in config2) {\n\t config[prop] = getMergedValue(config1[prop], config2[prop]);\n\t } else if (prop in config1) {\n\t config[prop] = getMergedValue(undefined, config1[prop]);\n\t }\n\t });\n\t\n\t var axiosKeys = valueFromConfig2Keys\n\t .concat(mergeDeepPropertiesKeys)\n\t .concat(defaultToConfig2Keys)\n\t .concat(directMergeKeys);\n\t\n\t var otherKeys = Object\n\t .keys(config1)\n\t .concat(Object.keys(config2))\n\t .filter(function filterAxiosKeys(key) {\n\t return axiosKeys.indexOf(key) === -1;\n\t });\n\t\n\t utils.forEach(otherKeys, mergeDeepProperties);\n\t\n\t return config;\n\t};\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * A `Cancel` is an object that is thrown when an operation is canceled.\n\t *\n\t * @class\n\t * @param {string=} message The message.\n\t */\n\tfunction Cancel(message) {\n\t this.message = message;\n\t}\n\t\n\tCancel.prototype.toString = function toString() {\n\t return 'Cancel' + (this.message ? ': ' + this.message : '');\n\t};\n\t\n\tCancel.prototype.__CANCEL__ = true;\n\t\n\tmodule.exports = Cancel;\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar Cancel = __webpack_require__(23);\n\t\n\t/**\n\t * A `CancelToken` is an object that can be used to request cancellation of an operation.\n\t *\n\t * @class\n\t * @param {Function} executor The executor function.\n\t */\n\tfunction CancelToken(executor) {\n\t if (typeof executor !== 'function') {\n\t throw new TypeError('executor must be a function.');\n\t }\n\t\n\t var resolvePromise;\n\t this.promise = new Promise(function promiseExecutor(resolve) {\n\t resolvePromise = resolve;\n\t });\n\t\n\t var token = this;\n\t executor(function cancel(message) {\n\t if (token.reason) {\n\t // Cancellation has already been requested\n\t return;\n\t }\n\t\n\t token.reason = new Cancel(message);\n\t resolvePromise(token.reason);\n\t });\n\t}\n\t\n\t/**\n\t * Throws a `Cancel` if cancellation has been requested.\n\t */\n\tCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n\t if (this.reason) {\n\t throw this.reason;\n\t }\n\t};\n\t\n\t/**\n\t * Returns an object that contains a new `CancelToken` and a function that, when called,\n\t * cancels the `CancelToken`.\n\t */\n\tCancelToken.source = function source() {\n\t var cancel;\n\t var token = new CancelToken(function executor(c) {\n\t cancel = c;\n\t });\n\t return {\n\t token: token,\n\t cancel: cancel\n\t };\n\t};\n\t\n\tmodule.exports = CancelToken;\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports) {\n\n\t'use strict';\n\t\n\t/**\n\t * Syntactic sugar for invoking a function and expanding an array for arguments.\n\t *\n\t * Common use case would be to use `Function.prototype.apply`.\n\t *\n\t * ```js\n\t * function f(x, y, z) {}\n\t * var args = [1, 2, 3];\n\t * f.apply(null, args);\n\t * ```\n\t *\n\t * With `spread` this example can be re-written.\n\t *\n\t * ```js\n\t * spread(function(x, y, z) {})([1, 2, 3]);\n\t * ```\n\t *\n\t * @param {Function} callback\n\t * @returns {Function}\n\t */\n\tmodule.exports = function spread(callback) {\n\t return function wrap(arr) {\n\t return callback.apply(null, arr);\n\t };\n\t};\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// axios.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 5db0cd118db1f73a2dc3","module.exports = require('./lib/axios');\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./index.js\n// module id = 0\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar bind = require('./helpers/bind');\nvar Axios = require('./core/Axios');\nvar mergeConfig = require('./core/mergeConfig');\nvar defaults = require('./defaults');\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = require('./cancel/Cancel');\naxios.CancelToken = require('./cancel/CancelToken');\naxios.isCancel = require('./cancel/isCancel');\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = require('./helpers/spread');\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/axios.js\n// module id = 1\n// module chunks = 0","'use strict';\n\nvar bind = require('./helpers/bind');\n\n/*global toString:true*/\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.replace(/^\\s*/, '').replace(/\\s*$/, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/utils.js\n// module id = 2\n// module chunks = 0","'use strict';\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/bind.js\n// module id = 3\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/Axios.js\n// module id = 4\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/buildURL.js\n// module id = 5\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/InterceptorManager.js\n// module id = 6\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/dispatchRequest.js\n// module id = 7\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/transformData.js\n// module id = 8\n// module chunks = 0","'use strict';\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/isCancel.js\n// module id = 9\n// module chunks = 0","'use strict';\n\nvar utils = require('./utils');\nvar normalizeHeaderName = require('./helpers/normalizeHeaderName');\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = require('./adapters/xhr');\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = require('./adapters/http');\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) { /* Ignore */ }\n }\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/defaults.js\n// module id = 10\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/normalizeHeaderName.js\n// module id = 11\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\nvar settle = require('./../core/settle');\nvar cookies = require('./../helpers/cookies');\nvar buildURL = require('./../helpers/buildURL');\nvar buildFullPath = require('../core/buildFullPath');\nvar parseHeaders = require('./../helpers/parseHeaders');\nvar isURLSameOrigin = require('./../helpers/isURLSameOrigin');\nvar createError = require('../core/createError');\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/adapters/xhr.js\n// module id = 12\n// module chunks = 0","'use strict';\n\nvar createError = require('./createError');\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/settle.js\n// module id = 13\n// module chunks = 0","'use strict';\n\nvar enhanceError = require('./enhanceError');\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/createError.js\n// module id = 14\n// module chunks = 0","'use strict';\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/enhanceError.js\n// module id = 15\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/cookies.js\n// module id = 16\n// module chunks = 0","'use strict';\n\nvar isAbsoluteURL = require('../helpers/isAbsoluteURL');\nvar combineURLs = require('../helpers/combineURLs');\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/buildFullPath.js\n// module id = 17\n// module chunks = 0","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isAbsoluteURL.js\n// module id = 18\n// module chunks = 0","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/combineURLs.js\n// module id = 19\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/parseHeaders.js\n// module id = 20\n// module chunks = 0","'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/isURLSameOrigin.js\n// module id = 21\n// module chunks = 0","'use strict';\n\nvar utils = require('../utils');\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/core/mergeConfig.js\n// module id = 22\n// module chunks = 0","'use strict';\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/Cancel.js\n// module id = 23\n// module chunks = 0","'use strict';\n\nvar Cancel = require('./Cancel');\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/cancel/CancelToken.js\n// module id = 24\n// module chunks = 0","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/helpers/spread.js\n// module id = 25\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/node_modules/axios/index.d.ts b/node_modules/axios/index.d.ts deleted file mode 100644 index c860d86..0000000 --- a/node_modules/axios/index.d.ts +++ /dev/null @@ -1,160 +0,0 @@ -export interface AxiosTransformer { - (data: any, headers?: any): any; -} - -export interface AxiosAdapter { - (config: AxiosRequestConfig): AxiosPromise; -} - -export interface AxiosBasicCredentials { - username: string; - password: string; -} - -export interface AxiosProxyConfig { - host: string; - port: number; - auth?: { - username: string; - password:string; - }; - protocol?: string; -} - -export type Method = - | 'get' | 'GET' - | 'delete' | 'DELETE' - | 'head' | 'HEAD' - | 'options' | 'OPTIONS' - | 'post' | 'POST' - | 'put' | 'PUT' - | 'patch' | 'PATCH' - | 'purge' | 'PURGE' - | 'link' | 'LINK' - | 'unlink' | 'UNLINK' - -export type ResponseType = - | 'arraybuffer' - | 'blob' - | 'document' - | 'json' - | 'text' - | 'stream' - -export interface AxiosRequestConfig { - url?: string; - method?: Method; - baseURL?: string; - transformRequest?: AxiosTransformer | AxiosTransformer[]; - transformResponse?: AxiosTransformer | AxiosTransformer[]; - headers?: any; - params?: any; - paramsSerializer?: (params: any) => string; - data?: any; - timeout?: number; - timeoutErrorMessage?: string; - withCredentials?: boolean; - adapter?: AxiosAdapter; - auth?: AxiosBasicCredentials; - responseType?: ResponseType; - xsrfCookieName?: string; - xsrfHeaderName?: string; - onUploadProgress?: (progressEvent: any) => void; - onDownloadProgress?: (progressEvent: any) => void; - maxContentLength?: number; - validateStatus?: ((status: number) => boolean) | null; - maxBodyLength?: number; - maxRedirects?: number; - socketPath?: string | null; - httpAgent?: any; - httpsAgent?: any; - proxy?: AxiosProxyConfig | false; - cancelToken?: CancelToken; - decompress?: boolean; -} - -export interface AxiosResponse { - data: T; - status: number; - statusText: string; - headers: any; - config: AxiosRequestConfig; - request?: any; -} - -export interface AxiosError extends Error { - config: AxiosRequestConfig; - code?: string; - request?: any; - response?: AxiosResponse; - isAxiosError: boolean; - toJSON: () => object; -} - -export interface AxiosPromise extends Promise> { -} - -export interface CancelStatic { - new (message?: string): Cancel; -} - -export interface Cancel { - message: string; -} - -export interface Canceler { - (message?: string): void; -} - -export interface CancelTokenStatic { - new (executor: (cancel: Canceler) => void): CancelToken; - source(): CancelTokenSource; -} - -export interface CancelToken { - promise: Promise; - reason?: Cancel; - throwIfRequested(): void; -} - -export interface CancelTokenSource { - token: CancelToken; - cancel: Canceler; -} - -export interface AxiosInterceptorManager { - use(onFulfilled?: (value: V) => V | Promise, onRejected?: (error: any) => any): number; - eject(id: number): void; -} - -export interface AxiosInstance { - (config: AxiosRequestConfig): AxiosPromise; - (url: string, config?: AxiosRequestConfig): AxiosPromise; - defaults: AxiosRequestConfig; - interceptors: { - request: AxiosInterceptorManager; - response: AxiosInterceptorManager; - }; - getUri(config?: AxiosRequestConfig): string; - request> (config: AxiosRequestConfig): Promise; - get>(url: string, config?: AxiosRequestConfig): Promise; - delete>(url: string, config?: AxiosRequestConfig): Promise; - head>(url: string, config?: AxiosRequestConfig): Promise; - options>(url: string, config?: AxiosRequestConfig): Promise; - post>(url: string, data?: any, config?: AxiosRequestConfig): Promise; - put>(url: string, data?: any, config?: AxiosRequestConfig): Promise; - patch>(url: string, data?: any, config?: AxiosRequestConfig): Promise; -} - -export interface AxiosStatic extends AxiosInstance { - create(config?: AxiosRequestConfig): AxiosInstance; - Cancel: CancelStatic; - CancelToken: CancelTokenStatic; - isCancel(value: any): boolean; - all(values: (T | Promise)[]): Promise; - spread(callback: (...args: T[]) => R): (array: T[]) => R; -} - -declare const Axios: AxiosStatic; - -export default Axios; diff --git a/node_modules/axios/index.js b/node_modules/axios/index.js deleted file mode 100644 index 79dfd09..0000000 --- a/node_modules/axios/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/axios'); \ No newline at end of file diff --git a/node_modules/axios/lib/adapters/README.md b/node_modules/axios/lib/adapters/README.md deleted file mode 100644 index 68f1118..0000000 --- a/node_modules/axios/lib/adapters/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# axios // adapters - -The modules under `adapters/` are modules that handle dispatching a request and settling a returned `Promise` once a response is received. - -## Example - -```js -var settle = require('./../core/settle'); - -module.exports = function myAdapter(config) { - // At this point: - // - config has been merged with defaults - // - request transformers have already run - // - request interceptors have already run - - // Make the request using config provided - // Upon response settle the Promise - - return new Promise(function(resolve, reject) { - - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // From here: - // - response transformers will run - // - response interceptors will run - }); -} -``` diff --git a/node_modules/axios/lib/adapters/http.js b/node_modules/axios/lib/adapters/http.js deleted file mode 100755 index 135c93a..0000000 --- a/node_modules/axios/lib/adapters/http.js +++ /dev/null @@ -1,287 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); -var settle = require('./../core/settle'); -var buildFullPath = require('../core/buildFullPath'); -var buildURL = require('./../helpers/buildURL'); -var http = require('http'); -var https = require('https'); -var httpFollow = require('follow-redirects').http; -var httpsFollow = require('follow-redirects').https; -var url = require('url'); -var zlib = require('zlib'); -var pkg = require('./../../package.json'); -var createError = require('../core/createError'); -var enhanceError = require('../core/enhanceError'); - -var isHttps = /https:?/; - -/*eslint consistent-return:0*/ -module.exports = function httpAdapter(config) { - return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) { - var resolve = function resolve(value) { - resolvePromise(value); - }; - var reject = function reject(value) { - rejectPromise(value); - }; - var data = config.data; - var headers = config.headers; - - // Set User-Agent (required by some servers) - // Only set header if it hasn't been set in config - // See https://github.com/axios/axios/issues/69 - if (!headers['User-Agent'] && !headers['user-agent']) { - headers['User-Agent'] = 'axios/' + pkg.version; - } - - if (data && !utils.isStream(data)) { - if (Buffer.isBuffer(data)) { - // Nothing to do... - } else if (utils.isArrayBuffer(data)) { - data = Buffer.from(new Uint8Array(data)); - } else if (utils.isString(data)) { - data = Buffer.from(data, 'utf-8'); - } else { - return reject(createError( - 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', - config - )); - } - - // Add Content-Length header if data exists - headers['Content-Length'] = data.length; - } - - // HTTP basic authentication - var auth = undefined; - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password || ''; - auth = username + ':' + password; - } - - // Parse url - var fullPath = buildFullPath(config.baseURL, config.url); - var parsed = url.parse(fullPath); - var protocol = parsed.protocol || 'http:'; - - if (!auth && parsed.auth) { - var urlAuth = parsed.auth.split(':'); - var urlUsername = urlAuth[0] || ''; - var urlPassword = urlAuth[1] || ''; - auth = urlUsername + ':' + urlPassword; - } - - if (auth) { - delete headers.Authorization; - } - - var isHttpsRequest = isHttps.test(protocol); - var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; - - var options = { - path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''), - method: config.method.toUpperCase(), - headers: headers, - agent: agent, - agents: { http: config.httpAgent, https: config.httpsAgent }, - auth: auth - }; - - if (config.socketPath) { - options.socketPath = config.socketPath; - } else { - options.hostname = parsed.hostname; - options.port = parsed.port; - } - - var proxy = config.proxy; - if (!proxy && proxy !== false) { - var proxyEnv = protocol.slice(0, -1) + '_proxy'; - var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()]; - if (proxyUrl) { - var parsedProxyUrl = url.parse(proxyUrl); - var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY; - var shouldProxy = true; - - if (noProxyEnv) { - var noProxy = noProxyEnv.split(',').map(function trim(s) { - return s.trim(); - }); - - shouldProxy = !noProxy.some(function proxyMatch(proxyElement) { - if (!proxyElement) { - return false; - } - if (proxyElement === '*') { - return true; - } - if (proxyElement[0] === '.' && - parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) { - return true; - } - - return parsed.hostname === proxyElement; - }); - } - - - if (shouldProxy) { - proxy = { - host: parsedProxyUrl.hostname, - port: parsedProxyUrl.port - }; - - if (parsedProxyUrl.auth) { - var proxyUrlAuth = parsedProxyUrl.auth.split(':'); - proxy.auth = { - username: proxyUrlAuth[0], - password: proxyUrlAuth[1] - }; - } - } - } - } - - if (proxy) { - options.hostname = proxy.host; - options.host = proxy.host; - options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : ''); - options.port = proxy.port; - options.path = protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path; - - // Basic proxy authorization - if (proxy.auth) { - var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); - options.headers['Proxy-Authorization'] = 'Basic ' + base64; - } - } - - var transport; - var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true); - if (config.transport) { - transport = config.transport; - } else if (config.maxRedirects === 0) { - transport = isHttpsProxy ? https : http; - } else { - if (config.maxRedirects) { - options.maxRedirects = config.maxRedirects; - } - transport = isHttpsProxy ? httpsFollow : httpFollow; - } - - if (config.maxBodyLength > -1) { - options.maxBodyLength = config.maxBodyLength; - } - - // Create the request - var req = transport.request(options, function handleResponse(res) { - if (req.aborted) return; - - // uncompress the response body transparently if required - var stream = res; - - // return the last request in case of redirects - var lastRequest = res.req || req; - - - // if no content, is HEAD request or decompress disabled we should not decompress - if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) { - switch (res.headers['content-encoding']) { - /*eslint default-case:0*/ - case 'gzip': - case 'compress': - case 'deflate': - // add the unzipper to the body stream processing pipeline - stream = stream.pipe(zlib.createUnzip()); - - // remove the content-encoding in order to not confuse downstream operations - delete res.headers['content-encoding']; - break; - } - } - - var response = { - status: res.statusCode, - statusText: res.statusMessage, - headers: res.headers, - config: config, - request: lastRequest - }; - - if (config.responseType === 'stream') { - response.data = stream; - settle(resolve, reject, response); - } else { - var responseBuffer = []; - stream.on('data', function handleStreamData(chunk) { - responseBuffer.push(chunk); - - // make sure the content length is not over the maxContentLength if specified - if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) { - stream.destroy(); - reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded', - config, null, lastRequest)); - } - }); - - stream.on('error', function handleStreamError(err) { - if (req.aborted) return; - reject(enhanceError(err, config, null, lastRequest)); - }); - - stream.on('end', function handleStreamEnd() { - var responseData = Buffer.concat(responseBuffer); - if (config.responseType !== 'arraybuffer') { - responseData = responseData.toString(config.responseEncoding); - if (!config.responseEncoding || config.responseEncoding === 'utf8') { - responseData = utils.stripBOM(responseData); - } - } - - response.data = responseData; - settle(resolve, reject, response); - }); - } - }); - - // Handle errors - req.on('error', function handleRequestError(err) { - if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return; - reject(enhanceError(err, config, null, req)); - }); - - // Handle request timeout - if (config.timeout) { - // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. - // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. - // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. - // And then these socket which be hang up will devoring CPU little by little. - // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. - req.setTimeout(config.timeout, function handleRequestTimeout() { - req.abort(); - reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', req)); - }); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (req.aborted) return; - - req.abort(); - reject(cancel); - }); - } - - // Send the request - if (utils.isStream(data)) { - data.on('error', function handleStreamError(err) { - reject(enhanceError(err, config, null, req)); - }).pipe(req); - } else { - req.end(data); - } - }); -}; diff --git a/node_modules/axios/lib/adapters/xhr.js b/node_modules/axios/lib/adapters/xhr.js deleted file mode 100644 index 3027752..0000000 --- a/node_modules/axios/lib/adapters/xhr.js +++ /dev/null @@ -1,179 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); -var settle = require('./../core/settle'); -var cookies = require('./../helpers/cookies'); -var buildURL = require('./../helpers/buildURL'); -var buildFullPath = require('../core/buildFullPath'); -var parseHeaders = require('./../helpers/parseHeaders'); -var isURLSameOrigin = require('./../helpers/isURLSameOrigin'); -var createError = require('../core/createError'); - -module.exports = function xhrAdapter(config) { - return new Promise(function dispatchXhrRequest(resolve, reject) { - var requestData = config.data; - var requestHeaders = config.headers; - - if (utils.isFormData(requestData)) { - delete requestHeaders['Content-Type']; // Let the browser set it - } - - var request = new XMLHttpRequest(); - - // HTTP basic authentication - if (config.auth) { - var username = config.auth.username || ''; - var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; - requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password); - } - - var fullPath = buildFullPath(config.baseURL, config.url); - request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); - - // Set the request timeout in MS - request.timeout = config.timeout; - - // Listen for ready state - request.onreadystatechange = function handleLoad() { - if (!request || request.readyState !== 4) { - return; - } - - // The request errored out and we didn't get a response, this will be - // handled by onerror instead - // With one exception: request that using file: protocol, most browsers - // will return status as 0 even though it's a successful request - if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { - return; - } - - // Prepare the response - var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null; - var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response; - var response = { - data: responseData, - status: request.status, - statusText: request.statusText, - headers: responseHeaders, - config: config, - request: request - }; - - settle(resolve, reject, response); - - // Clean up request - request = null; - }; - - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(createError('Request aborted', config, 'ECONNABORTED', request)); - - // Clean up request - request = null; - }; - - // Handle low level network errors - request.onerror = function handleError() { - // Real errors are hidden from us by the browser - // onerror should only fire if it's a network error - reject(createError('Network Error', config, null, request)); - - // Clean up request - request = null; - }; - - // Handle timeout - request.ontimeout = function handleTimeout() { - var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded'; - if (config.timeoutErrorMessage) { - timeoutErrorMessage = config.timeoutErrorMessage; - } - reject(createError(timeoutErrorMessage, config, 'ECONNABORTED', - request)); - - // Clean up request - request = null; - }; - - // Add xsrf header - // This is only done if running in a standard browser environment. - // Specifically not if we're in a web worker, or react-native. - if (utils.isStandardBrowserEnv()) { - // Add xsrf header - var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; - - if (xsrfValue) { - requestHeaders[config.xsrfHeaderName] = xsrfValue; - } - } - - // Add headers to the request - if ('setRequestHeader' in request) { - utils.forEach(requestHeaders, function setRequestHeader(val, key) { - if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') { - // Remove Content-Type if data is undefined - delete requestHeaders[key]; - } else { - // Otherwise add header to the request - request.setRequestHeader(key, val); - } - }); - } - - // Add withCredentials to request if needed - if (!utils.isUndefined(config.withCredentials)) { - request.withCredentials = !!config.withCredentials; - } - - // Add responseType to request if needed - if (config.responseType) { - try { - request.responseType = config.responseType; - } catch (e) { - // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2. - // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. - if (config.responseType !== 'json') { - throw e; - } - } - } - - // Handle progress if needed - if (typeof config.onDownloadProgress === 'function') { - request.addEventListener('progress', config.onDownloadProgress); - } - - // Not all browsers support upload events - if (typeof config.onUploadProgress === 'function' && request.upload) { - request.upload.addEventListener('progress', config.onUploadProgress); - } - - if (config.cancelToken) { - // Handle cancellation - config.cancelToken.promise.then(function onCanceled(cancel) { - if (!request) { - return; - } - - request.abort(); - reject(cancel); - // Clean up request - request = null; - }); - } - - if (!requestData) { - requestData = null; - } - - // Send the request - request.send(requestData); - }); -}; diff --git a/node_modules/axios/lib/axios.js b/node_modules/axios/lib/axios.js deleted file mode 100644 index 8142437..0000000 --- a/node_modules/axios/lib/axios.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var bind = require('./helpers/bind'); -var Axios = require('./core/Axios'); -var mergeConfig = require('./core/mergeConfig'); -var defaults = require('./defaults'); - -/** - * Create an instance of Axios - * - * @param {Object} defaultConfig The default config for the instance - * @return {Axios} A new instance of Axios - */ -function createInstance(defaultConfig) { - var context = new Axios(defaultConfig); - var instance = bind(Axios.prototype.request, context); - - // Copy axios.prototype to instance - utils.extend(instance, Axios.prototype, context); - - // Copy context to instance - utils.extend(instance, context); - - return instance; -} - -// Create the default instance to be exported -var axios = createInstance(defaults); - -// Expose Axios class to allow class inheritance -axios.Axios = Axios; - -// Factory for creating new instances -axios.create = function create(instanceConfig) { - return createInstance(mergeConfig(axios.defaults, instanceConfig)); -}; - -// Expose Cancel & CancelToken -axios.Cancel = require('./cancel/Cancel'); -axios.CancelToken = require('./cancel/CancelToken'); -axios.isCancel = require('./cancel/isCancel'); - -// Expose all/spread -axios.all = function all(promises) { - return Promise.all(promises); -}; -axios.spread = require('./helpers/spread'); - -module.exports = axios; - -// Allow use of default import syntax in TypeScript -module.exports.default = axios; diff --git a/node_modules/axios/lib/cancel/Cancel.js b/node_modules/axios/lib/cancel/Cancel.js deleted file mode 100644 index e0de400..0000000 --- a/node_modules/axios/lib/cancel/Cancel.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict'; - -/** - * A `Cancel` is an object that is thrown when an operation is canceled. - * - * @class - * @param {string=} message The message. - */ -function Cancel(message) { - this.message = message; -} - -Cancel.prototype.toString = function toString() { - return 'Cancel' + (this.message ? ': ' + this.message : ''); -}; - -Cancel.prototype.__CANCEL__ = true; - -module.exports = Cancel; diff --git a/node_modules/axios/lib/cancel/CancelToken.js b/node_modules/axios/lib/cancel/CancelToken.js deleted file mode 100644 index 6b46e66..0000000 --- a/node_modules/axios/lib/cancel/CancelToken.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict'; - -var Cancel = require('./Cancel'); - -/** - * A `CancelToken` is an object that can be used to request cancellation of an operation. - * - * @class - * @param {Function} executor The executor function. - */ -function CancelToken(executor) { - if (typeof executor !== 'function') { - throw new TypeError('executor must be a function.'); - } - - var resolvePromise; - this.promise = new Promise(function promiseExecutor(resolve) { - resolvePromise = resolve; - }); - - var token = this; - executor(function cancel(message) { - if (token.reason) { - // Cancellation has already been requested - return; - } - - token.reason = new Cancel(message); - resolvePromise(token.reason); - }); -} - -/** - * Throws a `Cancel` if cancellation has been requested. - */ -CancelToken.prototype.throwIfRequested = function throwIfRequested() { - if (this.reason) { - throw this.reason; - } -}; - -/** - * Returns an object that contains a new `CancelToken` and a function that, when called, - * cancels the `CancelToken`. - */ -CancelToken.source = function source() { - var cancel; - var token = new CancelToken(function executor(c) { - cancel = c; - }); - return { - token: token, - cancel: cancel - }; -}; - -module.exports = CancelToken; diff --git a/node_modules/axios/lib/cancel/isCancel.js b/node_modules/axios/lib/cancel/isCancel.js deleted file mode 100644 index 051f3ae..0000000 --- a/node_modules/axios/lib/cancel/isCancel.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); -}; diff --git a/node_modules/axios/lib/core/Axios.js b/node_modules/axios/lib/core/Axios.js deleted file mode 100644 index c28c413..0000000 --- a/node_modules/axios/lib/core/Axios.js +++ /dev/null @@ -1,95 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); -var buildURL = require('../helpers/buildURL'); -var InterceptorManager = require('./InterceptorManager'); -var dispatchRequest = require('./dispatchRequest'); -var mergeConfig = require('./mergeConfig'); - -/** - * Create a new instance of Axios - * - * @param {Object} instanceConfig The default config for the instance - */ -function Axios(instanceConfig) { - this.defaults = instanceConfig; - this.interceptors = { - request: new InterceptorManager(), - response: new InterceptorManager() - }; -} - -/** - * Dispatch a request - * - * @param {Object} config The config specific for this request (merged with this.defaults) - */ -Axios.prototype.request = function request(config) { - /*eslint no-param-reassign:0*/ - // Allow for axios('example/url'[, config]) a la fetch API - if (typeof config === 'string') { - config = arguments[1] || {}; - config.url = arguments[0]; - } else { - config = config || {}; - } - - config = mergeConfig(this.defaults, config); - - // Set config.method - if (config.method) { - config.method = config.method.toLowerCase(); - } else if (this.defaults.method) { - config.method = this.defaults.method.toLowerCase(); - } else { - config.method = 'get'; - } - - // Hook up interceptors middleware - var chain = [dispatchRequest, undefined]; - var promise = Promise.resolve(config); - - this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { - chain.unshift(interceptor.fulfilled, interceptor.rejected); - }); - - this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { - chain.push(interceptor.fulfilled, interceptor.rejected); - }); - - while (chain.length) { - promise = promise.then(chain.shift(), chain.shift()); - } - - return promise; -}; - -Axios.prototype.getUri = function getUri(config) { - config = mergeConfig(this.defaults, config); - return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); -}; - -// Provide aliases for supported request methods -utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: (config || {}).data - })); - }; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - /*eslint func-names:0*/ - Axios.prototype[method] = function(url, data, config) { - return this.request(mergeConfig(config || {}, { - method: method, - url: url, - data: data - })); - }; -}); - -module.exports = Axios; diff --git a/node_modules/axios/lib/core/InterceptorManager.js b/node_modules/axios/lib/core/InterceptorManager.js deleted file mode 100644 index 50d667b..0000000 --- a/node_modules/axios/lib/core/InterceptorManager.js +++ /dev/null @@ -1,52 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -function InterceptorManager() { - this.handlers = []; -} - -/** - * Add a new interceptor to the stack - * - * @param {Function} fulfilled The function to handle `then` for a `Promise` - * @param {Function} rejected The function to handle `reject` for a `Promise` - * - * @return {Number} An ID used to remove interceptor later - */ -InterceptorManager.prototype.use = function use(fulfilled, rejected) { - this.handlers.push({ - fulfilled: fulfilled, - rejected: rejected - }); - return this.handlers.length - 1; -}; - -/** - * Remove an interceptor from the stack - * - * @param {Number} id The ID that was returned by `use` - */ -InterceptorManager.prototype.eject = function eject(id) { - if (this.handlers[id]) { - this.handlers[id] = null; - } -}; - -/** - * Iterate over all the registered interceptors - * - * This method is particularly useful for skipping over any - * interceptors that may have become `null` calling `eject`. - * - * @param {Function} fn The function to call for each interceptor - */ -InterceptorManager.prototype.forEach = function forEach(fn) { - utils.forEach(this.handlers, function forEachHandler(h) { - if (h !== null) { - fn(h); - } - }); -}; - -module.exports = InterceptorManager; diff --git a/node_modules/axios/lib/core/README.md b/node_modules/axios/lib/core/README.md deleted file mode 100644 index 253bc48..0000000 --- a/node_modules/axios/lib/core/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# axios // core - -The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are: - -- Dispatching requests -- Managing interceptors -- Handling config diff --git a/node_modules/axios/lib/core/buildFullPath.js b/node_modules/axios/lib/core/buildFullPath.js deleted file mode 100644 index 00b2b05..0000000 --- a/node_modules/axios/lib/core/buildFullPath.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var isAbsoluteURL = require('../helpers/isAbsoluteURL'); -var combineURLs = require('../helpers/combineURLs'); - -/** - * Creates a new URL by combining the baseURL with the requestedURL, - * only when the requestedURL is not already an absolute URL. - * If the requestURL is absolute, this function returns the requestedURL untouched. - * - * @param {string} baseURL The base URL - * @param {string} requestedURL Absolute or relative URL to combine - * @returns {string} The combined full path - */ -module.exports = function buildFullPath(baseURL, requestedURL) { - if (baseURL && !isAbsoluteURL(requestedURL)) { - return combineURLs(baseURL, requestedURL); - } - return requestedURL; -}; diff --git a/node_modules/axios/lib/core/createError.js b/node_modules/axios/lib/core/createError.js deleted file mode 100644 index 933680f..0000000 --- a/node_modules/axios/lib/core/createError.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -var enhanceError = require('./enhanceError'); - -/** - * Create an Error with the specified message, config, error code, request and response. - * - * @param {string} message The error message. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The created error. - */ -module.exports = function createError(message, config, code, request, response) { - var error = new Error(message); - return enhanceError(error, config, code, request, response); -}; diff --git a/node_modules/axios/lib/core/dispatchRequest.js b/node_modules/axios/lib/core/dispatchRequest.js deleted file mode 100644 index c8267ad..0000000 --- a/node_modules/axios/lib/core/dispatchRequest.js +++ /dev/null @@ -1,79 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); -var transformData = require('./transformData'); -var isCancel = require('../cancel/isCancel'); -var defaults = require('../defaults'); - -/** - * Throws a `Cancel` if cancellation has been requested. - */ -function throwIfCancellationRequested(config) { - if (config.cancelToken) { - config.cancelToken.throwIfRequested(); - } -} - -/** - * Dispatch a request to the server using the configured adapter. - * - * @param {object} config The config that is to be used for the request - * @returns {Promise} The Promise to be fulfilled - */ -module.exports = function dispatchRequest(config) { - throwIfCancellationRequested(config); - - // Ensure headers exist - config.headers = config.headers || {}; - - // Transform request data - config.data = transformData( - config.data, - config.headers, - config.transformRequest - ); - - // Flatten headers - config.headers = utils.merge( - config.headers.common || {}, - config.headers[config.method] || {}, - config.headers - ); - - utils.forEach( - ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], - function cleanHeaderConfig(method) { - delete config.headers[method]; - } - ); - - var adapter = config.adapter || defaults.adapter; - - return adapter(config).then(function onAdapterResolution(response) { - throwIfCancellationRequested(config); - - // Transform response data - response.data = transformData( - response.data, - response.headers, - config.transformResponse - ); - - return response; - }, function onAdapterRejection(reason) { - if (!isCancel(reason)) { - throwIfCancellationRequested(config); - - // Transform response data - if (reason && reason.response) { - reason.response.data = transformData( - reason.response.data, - reason.response.headers, - config.transformResponse - ); - } - } - - return Promise.reject(reason); - }); -}; diff --git a/node_modules/axios/lib/core/enhanceError.js b/node_modules/axios/lib/core/enhanceError.js deleted file mode 100644 index b6bc444..0000000 --- a/node_modules/axios/lib/core/enhanceError.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict'; - -/** - * Update an Error with the specified config, error code, and response. - * - * @param {Error} error The error to update. - * @param {Object} config The config. - * @param {string} [code] The error code (for example, 'ECONNABORTED'). - * @param {Object} [request] The request. - * @param {Object} [response] The response. - * @returns {Error} The error. - */ -module.exports = function enhanceError(error, config, code, request, response) { - error.config = config; - if (code) { - error.code = code; - } - - error.request = request; - error.response = response; - error.isAxiosError = true; - - error.toJSON = function toJSON() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code - }; - }; - return error; -}; diff --git a/node_modules/axios/lib/core/mergeConfig.js b/node_modules/axios/lib/core/mergeConfig.js deleted file mode 100644 index 5a2c10c..0000000 --- a/node_modules/axios/lib/core/mergeConfig.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; - -var utils = require('../utils'); - -/** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. - * - * @param {Object} config1 - * @param {Object} config2 - * @returns {Object} New object resulting from merging config2 to config1 - */ -module.exports = function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - var config = {}; - - var valueFromConfig2Keys = ['url', 'method', 'data']; - var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params']; - var defaultToConfig2Keys = [ - 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', - 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', - 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress', - 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent', - 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding' - ]; - var directMergeKeys = ['validateStatus']; - - function getMergedValue(target, source) { - if (utils.isPlainObject(target) && utils.isPlainObject(source)) { - return utils.merge(target, source); - } else if (utils.isPlainObject(source)) { - return utils.merge({}, source); - } else if (utils.isArray(source)) { - return source.slice(); - } - return source; - } - - function mergeDeepProperties(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(config1[prop], config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - } - - utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(undefined, config2[prop]); - } - }); - - utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties); - - utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) { - if (!utils.isUndefined(config2[prop])) { - config[prop] = getMergedValue(undefined, config2[prop]); - } else if (!utils.isUndefined(config1[prop])) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - }); - - utils.forEach(directMergeKeys, function merge(prop) { - if (prop in config2) { - config[prop] = getMergedValue(config1[prop], config2[prop]); - } else if (prop in config1) { - config[prop] = getMergedValue(undefined, config1[prop]); - } - }); - - var axiosKeys = valueFromConfig2Keys - .concat(mergeDeepPropertiesKeys) - .concat(defaultToConfig2Keys) - .concat(directMergeKeys); - - var otherKeys = Object - .keys(config1) - .concat(Object.keys(config2)) - .filter(function filterAxiosKeys(key) { - return axiosKeys.indexOf(key) === -1; - }); - - utils.forEach(otherKeys, mergeDeepProperties); - - return config; -}; diff --git a/node_modules/axios/lib/core/settle.js b/node_modules/axios/lib/core/settle.js deleted file mode 100644 index 886adb0..0000000 --- a/node_modules/axios/lib/core/settle.js +++ /dev/null @@ -1,25 +0,0 @@ -'use strict'; - -var createError = require('./createError'); - -/** - * Resolve or reject a Promise based on response status. - * - * @param {Function} resolve A function that resolves the promise. - * @param {Function} reject A function that rejects the promise. - * @param {object} response The response. - */ -module.exports = function settle(resolve, reject, response) { - var validateStatus = response.config.validateStatus; - if (!response.status || !validateStatus || validateStatus(response.status)) { - resolve(response); - } else { - reject(createError( - 'Request failed with status code ' + response.status, - response.config, - null, - response.request, - response - )); - } -}; diff --git a/node_modules/axios/lib/core/transformData.js b/node_modules/axios/lib/core/transformData.js deleted file mode 100644 index e065362..0000000 --- a/node_modules/axios/lib/core/transformData.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -/** - * Transform the data for a request or a response - * - * @param {Object|String} data The data to be transformed - * @param {Array} headers The headers for the request or response - * @param {Array|Function} fns A single function or Array of functions - * @returns {*} The resulting transformed data - */ -module.exports = function transformData(data, headers, fns) { - /*eslint no-param-reassign:0*/ - utils.forEach(fns, function transform(fn) { - data = fn(data, headers); - }); - - return data; -}; diff --git a/node_modules/axios/lib/defaults.js b/node_modules/axios/lib/defaults.js deleted file mode 100644 index 2b2a1a7..0000000 --- a/node_modules/axios/lib/defaults.js +++ /dev/null @@ -1,98 +0,0 @@ -'use strict'; - -var utils = require('./utils'); -var normalizeHeaderName = require('./helpers/normalizeHeaderName'); - -var DEFAULT_CONTENT_TYPE = { - 'Content-Type': 'application/x-www-form-urlencoded' -}; - -function setContentTypeIfUnset(headers, value) { - if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { - headers['Content-Type'] = value; - } -} - -function getDefaultAdapter() { - var adapter; - if (typeof XMLHttpRequest !== 'undefined') { - // For browsers use XHR adapter - adapter = require('./adapters/xhr'); - } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = require('./adapters/http'); - } - return adapter; -} - -var defaults = { - adapter: getDefaultAdapter(), - - transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Accept'); - normalizeHeaderName(headers, 'Content-Type'); - if (utils.isFormData(data) || - utils.isArrayBuffer(data) || - utils.isBuffer(data) || - utils.isStream(data) || - utils.isFile(data) || - utils.isBlob(data) - ) { - return data; - } - if (utils.isArrayBufferView(data)) { - return data.buffer; - } - if (utils.isURLSearchParams(data)) { - setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); - return data.toString(); - } - if (utils.isObject(data)) { - setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); - return JSON.stringify(data); - } - return data; - }], - - transformResponse: [function transformResponse(data) { - /*eslint no-param-reassign:0*/ - if (typeof data === 'string') { - try { - data = JSON.parse(data); - } catch (e) { /* Ignore */ } - } - return data; - }], - - /** - * A timeout in milliseconds to abort a request. If set to 0 (default) a - * timeout is not created. - */ - timeout: 0, - - xsrfCookieName: 'XSRF-TOKEN', - xsrfHeaderName: 'X-XSRF-TOKEN', - - maxContentLength: -1, - maxBodyLength: -1, - - validateStatus: function validateStatus(status) { - return status >= 200 && status < 300; - } -}; - -defaults.headers = { - common: { - 'Accept': 'application/json, text/plain, */*' - } -}; - -utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { - defaults.headers[method] = {}; -}); - -utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { - defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); -}); - -module.exports = defaults; diff --git a/node_modules/axios/lib/helpers/README.md b/node_modules/axios/lib/helpers/README.md deleted file mode 100644 index 4ae3419..0000000 --- a/node_modules/axios/lib/helpers/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# axios // helpers - -The modules found in `helpers/` should be generic modules that are _not_ specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like: - -- Browser polyfills -- Managing cookies -- Parsing HTTP headers diff --git a/node_modules/axios/lib/helpers/bind.js b/node_modules/axios/lib/helpers/bind.js deleted file mode 100644 index 6147c60..0000000 --- a/node_modules/axios/lib/helpers/bind.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -module.exports = function bind(fn, thisArg) { - return function wrap() { - var args = new Array(arguments.length); - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i]; - } - return fn.apply(thisArg, args); - }; -}; diff --git a/node_modules/axios/lib/helpers/buildURL.js b/node_modules/axios/lib/helpers/buildURL.js deleted file mode 100644 index 31595c3..0000000 --- a/node_modules/axios/lib/helpers/buildURL.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -function encode(val) { - return encodeURIComponent(val). - replace(/%3A/gi, ':'). - replace(/%24/g, '$'). - replace(/%2C/gi, ','). - replace(/%20/g, '+'). - replace(/%5B/gi, '['). - replace(/%5D/gi, ']'); -} - -/** - * Build a URL by appending params to the end - * - * @param {string} url The base of the url (e.g., http://www.google.com) - * @param {object} [params] The params to be appended - * @returns {string} The formatted url - */ -module.exports = function buildURL(url, params, paramsSerializer) { - /*eslint no-param-reassign:0*/ - if (!params) { - return url; - } - - var serializedParams; - if (paramsSerializer) { - serializedParams = paramsSerializer(params); - } else if (utils.isURLSearchParams(params)) { - serializedParams = params.toString(); - } else { - var parts = []; - - utils.forEach(params, function serialize(val, key) { - if (val === null || typeof val === 'undefined') { - return; - } - - if (utils.isArray(val)) { - key = key + '[]'; - } else { - val = [val]; - } - - utils.forEach(val, function parseValue(v) { - if (utils.isDate(v)) { - v = v.toISOString(); - } else if (utils.isObject(v)) { - v = JSON.stringify(v); - } - parts.push(encode(key) + '=' + encode(v)); - }); - }); - - serializedParams = parts.join('&'); - } - - if (serializedParams) { - var hashmarkIndex = url.indexOf('#'); - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; - } - - return url; -}; diff --git a/node_modules/axios/lib/helpers/combineURLs.js b/node_modules/axios/lib/helpers/combineURLs.js deleted file mode 100644 index f1b58a5..0000000 --- a/node_modules/axios/lib/helpers/combineURLs.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -/** - * Creates a new URL by combining the specified URLs - * - * @param {string} baseURL The base URL - * @param {string} relativeURL The relative URL - * @returns {string} The combined URL - */ -module.exports = function combineURLs(baseURL, relativeURL) { - return relativeURL - ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') - : baseURL; -}; diff --git a/node_modules/axios/lib/helpers/cookies.js b/node_modules/axios/lib/helpers/cookies.js deleted file mode 100644 index 5a8a666..0000000 --- a/node_modules/axios/lib/helpers/cookies.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); - - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } - - if (utils.isString(path)) { - cookie.push('path=' + path); - } - - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } - - if (secure === true) { - cookie.push('secure'); - } - - document.cookie = cookie.join('; '); - }, - - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); - } - }; - })() : - - // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() -); diff --git a/node_modules/axios/lib/helpers/deprecatedMethod.js b/node_modules/axios/lib/helpers/deprecatedMethod.js deleted file mode 100644 index ed40965..0000000 --- a/node_modules/axios/lib/helpers/deprecatedMethod.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -/*eslint no-console:0*/ - -/** - * Supply a warning to the developer that a method they are using - * has been deprecated. - * - * @param {string} method The name of the deprecated method - * @param {string} [instead] The alternate method to use if applicable - * @param {string} [docs] The documentation URL to get further details - */ -module.exports = function deprecatedMethod(method, instead, docs) { - try { - console.warn( - 'DEPRECATED method `' + method + '`.' + - (instead ? ' Use `' + instead + '` instead.' : '') + - ' This method will be removed in a future release.'); - - if (docs) { - console.warn('For more information about usage see ' + docs); - } - } catch (e) { /* Ignore */ } -}; diff --git a/node_modules/axios/lib/helpers/isAbsoluteURL.js b/node_modules/axios/lib/helpers/isAbsoluteURL.js deleted file mode 100644 index d33e992..0000000 --- a/node_modules/axios/lib/helpers/isAbsoluteURL.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -/** - * Determines whether the specified URL is absolute - * - * @param {string} url The URL to test - * @returns {boolean} True if the specified URL is absolute, otherwise false - */ -module.exports = function isAbsoluteURL(url) { - // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). - // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed - // by any combination of letters, digits, plus, period, or hyphen. - return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); -}; diff --git a/node_modules/axios/lib/helpers/isURLSameOrigin.js b/node_modules/axios/lib/helpers/isURLSameOrigin.js deleted file mode 100644 index f1d89ad..0000000 --- a/node_modules/axios/lib/helpers/isURLSameOrigin.js +++ /dev/null @@ -1,68 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -module.exports = ( - utils.isStandardBrowserEnv() ? - - // Standard browser envs have full support of the APIs needed to test - // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; - - /** - * Parse a URL to discover it's components - * - * @param {String} url The URL to be parsed - * @returns {Object} - */ - function resolveURL(url) { - var href = url; - - if (msie) { - // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; - } - - originURL = resolveURL(window.location.href); - - /** - * Determine if a URL shares the same origin as the current location - * - * @param {String} requestURL The URL to test - * @returns {boolean} True if URL shares the same origin, otherwise false - */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && - parsed.host === originURL.host); - }; - })() : - - // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() -); diff --git a/node_modules/axios/lib/helpers/normalizeHeaderName.js b/node_modules/axios/lib/helpers/normalizeHeaderName.js deleted file mode 100644 index 738c9fe..0000000 --- a/node_modules/axios/lib/helpers/normalizeHeaderName.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict'; - -var utils = require('../utils'); - -module.exports = function normalizeHeaderName(headers, normalizedName) { - utils.forEach(headers, function processHeader(value, name) { - if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { - headers[normalizedName] = value; - delete headers[name]; - } - }); -}; diff --git a/node_modules/axios/lib/helpers/parseHeaders.js b/node_modules/axios/lib/helpers/parseHeaders.js deleted file mode 100644 index 8af2cc7..0000000 --- a/node_modules/axios/lib/helpers/parseHeaders.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -var utils = require('./../utils'); - -// Headers whose duplicates are ignored by node -// c.f. https://nodejs.org/api/http.html#http_message_headers -var ignoreDuplicateOf = [ - 'age', 'authorization', 'content-length', 'content-type', 'etag', - 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', - 'last-modified', 'location', 'max-forwards', 'proxy-authorization', - 'referer', 'retry-after', 'user-agent' -]; - -/** - * Parse headers into an object - * - * ``` - * Date: Wed, 27 Aug 2014 08:58:49 GMT - * Content-Type: application/json - * Connection: keep-alive - * Transfer-Encoding: chunked - * ``` - * - * @param {String} headers Headers needing to be parsed - * @returns {Object} Headers parsed into an object - */ -module.exports = function parseHeaders(headers) { - var parsed = {}; - var key; - var val; - var i; - - if (!headers) { return parsed; } - - utils.forEach(headers.split('\n'), function parser(line) { - i = line.indexOf(':'); - key = utils.trim(line.substr(0, i)).toLowerCase(); - val = utils.trim(line.substr(i + 1)); - - if (key) { - if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { - return; - } - if (key === 'set-cookie') { - parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); - } else { - parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; - } - } - }); - - return parsed; -}; diff --git a/node_modules/axios/lib/helpers/spread.js b/node_modules/axios/lib/helpers/spread.js deleted file mode 100644 index 25e3cdd..0000000 --- a/node_modules/axios/lib/helpers/spread.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * @returns {Function} - */ -module.exports = function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -}; diff --git a/node_modules/axios/lib/utils.js b/node_modules/axios/lib/utils.js deleted file mode 100644 index 83eb1c6..0000000 --- a/node_modules/axios/lib/utils.js +++ /dev/null @@ -1,351 +0,0 @@ -'use strict'; - -var bind = require('./helpers/bind'); - -/*global toString:true*/ - -// utils is a library of generic helper functions non-specific to axios - -var toString = Object.prototype.toString; - -/** - * Determine if a value is an Array - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Array, otherwise false - */ -function isArray(val) { - return toString.call(val) === '[object Array]'; -} - -/** - * Determine if a value is undefined - * - * @param {Object} val The value to test - * @returns {boolean} True if the value is undefined, otherwise false - */ -function isUndefined(val) { - return typeof val === 'undefined'; -} - -/** - * Determine if a value is a Buffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Buffer, otherwise false - */ -function isBuffer(val) { - return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) - && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val); -} - -/** - * Determine if a value is an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an ArrayBuffer, otherwise false - */ -function isArrayBuffer(val) { - return toString.call(val) === '[object ArrayBuffer]'; -} - -/** - * Determine if a value is a FormData - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an FormData, otherwise false - */ -function isFormData(val) { - return (typeof FormData !== 'undefined') && (val instanceof FormData); -} - -/** - * Determine if a value is a view on an ArrayBuffer - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false - */ -function isArrayBufferView(val) { - var result; - if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { - result = ArrayBuffer.isView(val); - } else { - result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); - } - return result; -} - -/** - * Determine if a value is a String - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a String, otherwise false - */ -function isString(val) { - return typeof val === 'string'; -} - -/** - * Determine if a value is a Number - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Number, otherwise false - */ -function isNumber(val) { - return typeof val === 'number'; -} - -/** - * Determine if a value is an Object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is an Object, otherwise false - */ -function isObject(val) { - return val !== null && typeof val === 'object'; -} - -/** - * Determine if a value is a plain Object - * - * @param {Object} val The value to test - * @return {boolean} True if value is a plain Object, otherwise false - */ -function isPlainObject(val) { - if (toString.call(val) !== '[object Object]') { - return false; - } - - var prototype = Object.getPrototypeOf(val); - return prototype === null || prototype === Object.prototype; -} - -/** - * Determine if a value is a Date - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Date, otherwise false - */ -function isDate(val) { - return toString.call(val) === '[object Date]'; -} - -/** - * Determine if a value is a File - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a File, otherwise false - */ -function isFile(val) { - return toString.call(val) === '[object File]'; -} - -/** - * Determine if a value is a Blob - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Blob, otherwise false - */ -function isBlob(val) { - return toString.call(val) === '[object Blob]'; -} - -/** - * Determine if a value is a Function - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Function, otherwise false - */ -function isFunction(val) { - return toString.call(val) === '[object Function]'; -} - -/** - * Determine if a value is a Stream - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a Stream, otherwise false - */ -function isStream(val) { - return isObject(val) && isFunction(val.pipe); -} - -/** - * Determine if a value is a URLSearchParams object - * - * @param {Object} val The value to test - * @returns {boolean} True if value is a URLSearchParams object, otherwise false - */ -function isURLSearchParams(val) { - return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; -} - -/** - * Trim excess whitespace off the beginning and end of a string - * - * @param {String} str The String to trim - * @returns {String} The String freed of excess whitespace - */ -function trim(str) { - return str.replace(/^\s*/, '').replace(/\s*$/, ''); -} - -/** - * Determine if we're running in a standard browser environment - * - * This allows axios to run in a web worker, and react-native. - * Both environments support XMLHttpRequest, but not fully standard globals. - * - * web workers: - * typeof window -> undefined - * typeof document -> undefined - * - * react-native: - * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' - */ -function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || - navigator.product === 'NativeScript' || - navigator.product === 'NS')) { - return false; - } - return ( - typeof window !== 'undefined' && - typeof document !== 'undefined' - ); -} - -/** - * Iterate over an Array or an Object invoking a function for each item. - * - * If `obj` is an Array callback will be called passing - * the value, index, and complete array for each item. - * - * If 'obj' is an Object callback will be called passing - * the value, key, and complete object for each property. - * - * @param {Object|Array} obj The object to iterate - * @param {Function} fn The callback to invoke for each item - */ -function forEach(obj, fn) { - // Don't bother if no value provided - if (obj === null || typeof obj === 'undefined') { - return; - } - - // Force an array if not already something iterable - if (typeof obj !== 'object') { - /*eslint no-param-reassign:0*/ - obj = [obj]; - } - - if (isArray(obj)) { - // Iterate over array values - for (var i = 0, l = obj.length; i < l; i++) { - fn.call(null, obj[i], i, obj); - } - } else { - // Iterate over object keys - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - fn.call(null, obj[key], key, obj); - } - } - } -} - -/** - * Accepts varargs expecting each argument to be an object, then - * immutably merges the properties of each object and returns result. - * - * When multiple objects contain the same key the later object in - * the arguments list will take precedence. - * - * Example: - * - * ```js - * var result = merge({foo: 123}, {foo: 456}); - * console.log(result.foo); // outputs 456 - * ``` - * - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -function merge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (isPlainObject(result[key]) && isPlainObject(val)) { - result[key] = merge(result[key], val); - } else if (isPlainObject(val)) { - result[key] = merge({}, val); - } else if (isArray(val)) { - result[key] = val.slice(); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; -} - -/** - * Extends object a by mutably adding to it the properties of object b. - * - * @param {Object} a The object to be extended - * @param {Object} b The object to copy properties from - * @param {Object} thisArg The object to bind function to - * @return {Object} The resulting value of object a - */ -function extend(a, b, thisArg) { - forEach(b, function assignValue(val, key) { - if (thisArg && typeof val === 'function') { - a[key] = bind(val, thisArg); - } else { - a[key] = val; - } - }); - return a; -} - -/** - * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) - * - * @param {string} content with BOM - * @return {string} content value without BOM - */ -function stripBOM(content) { - if (content.charCodeAt(0) === 0xFEFF) { - content = content.slice(1); - } - return content; -} - -module.exports = { - isArray: isArray, - isArrayBuffer: isArrayBuffer, - isBuffer: isBuffer, - isFormData: isFormData, - isArrayBufferView: isArrayBufferView, - isString: isString, - isNumber: isNumber, - isObject: isObject, - isPlainObject: isPlainObject, - isUndefined: isUndefined, - isDate: isDate, - isFile: isFile, - isBlob: isBlob, - isFunction: isFunction, - isStream: isStream, - isURLSearchParams: isURLSearchParams, - isStandardBrowserEnv: isStandardBrowserEnv, - forEach: forEach, - merge: merge, - extend: extend, - trim: trim, - stripBOM: stripBOM -}; diff --git a/node_modules/axios/package.json b/node_modules/axios/package.json deleted file mode 100644 index 1b83461..0000000 --- a/node_modules/axios/package.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "_from": "axios@0.21.0", - "_id": "axios@0.21.0", - "_inBundle": false, - "_integrity": "sha512-fmkJBknJKoZwem3/IKSSLpkdNXZeBu5Q7GA/aRsr2btgrptmSCxi2oFjZHqGdK9DoTil9PIHlPIZw2EcRJXRvw==", - "_location": "/axios", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "axios@0.21.0", - "name": "axios", - "escapedName": "axios", - "rawSpec": "0.21.0", - "saveSpec": null, - "fetchSpec": "0.21.0" - }, - "_requiredBy": [ - "/docker-hub-utils" - ], - "_resolved": "https://registry.npmjs.org/axios/-/axios-0.21.0.tgz", - "_shasum": "26df088803a2350dff2c27f96fef99fe49442aca", - "_spec": "axios@0.21.0", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/docker-hub-utils", - "author": { - "name": "Matt Zabriskie" - }, - "browser": { - "./lib/adapters/http.js": "./lib/adapters/xhr.js" - }, - "bugs": { - "url": "https://github.com/axios/axios/issues" - }, - "bundleDependencies": false, - "bundlesize": [ - { - "path": "./dist/axios.min.js", - "threshold": "5kB" - } - ], - "dependencies": { - "follow-redirects": "^1.10.0" - }, - "deprecated": false, - "description": "Promise based HTTP client for the browser and node.js", - "devDependencies": { - "bundlesize": "^0.17.0", - "coveralls": "^3.0.0", - "es6-promise": "^4.2.4", - "grunt": "^1.0.2", - "grunt-banner": "^0.6.0", - "grunt-cli": "^1.2.0", - "grunt-contrib-clean": "^1.1.0", - "grunt-contrib-watch": "^1.0.0", - "grunt-eslint": "^20.1.0", - "grunt-karma": "^2.0.0", - "grunt-mocha-test": "^0.13.3", - "grunt-ts": "^6.0.0-beta.19", - "grunt-webpack": "^1.0.18", - "istanbul-instrumenter-loader": "^1.0.0", - "jasmine-core": "^2.4.1", - "karma": "^1.3.0", - "karma-chrome-launcher": "^2.2.0", - "karma-coverage": "^1.1.1", - "karma-firefox-launcher": "^1.1.0", - "karma-jasmine": "^1.1.1", - "karma-jasmine-ajax": "^0.1.13", - "karma-opera-launcher": "^1.0.0", - "karma-safari-launcher": "^1.0.0", - "karma-sauce-launcher": "^1.2.0", - "karma-sinon": "^1.0.5", - "karma-sourcemap-loader": "^0.3.7", - "karma-webpack": "^1.7.0", - "load-grunt-tasks": "^3.5.2", - "minimist": "^1.2.0", - "mocha": "^5.2.0", - "sinon": "^4.5.0", - "typescript": "^2.8.1", - "url-search-params": "^0.10.0", - "webpack": "^1.13.1", - "webpack-dev-server": "^1.14.1" - }, - "homepage": "https://github.com/axios/axios", - "jsdelivr": "dist/axios.min.js", - "keywords": [ - "xhr", - "http", - "ajax", - "promise", - "node" - ], - "license": "MIT", - "main": "index.js", - "name": "axios", - "repository": { - "type": "git", - "url": "git+https://github.com/axios/axios.git" - }, - "scripts": { - "build": "NODE_ENV=production grunt build", - "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", - "examples": "node ./examples/server.js", - "fix": "eslint --fix lib/**/*.js", - "postversion": "git push && git push --tags", - "preversion": "npm test", - "start": "node ./sandbox/server.js", - "test": "grunt test && bundlesize", - "version": "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json" - }, - "typings": "./index.d.ts", - "unpkg": "dist/axios.min.js", - "version": "0.21.0" -} diff --git a/node_modules/camelcase-keys/index.d.ts b/node_modules/camelcase-keys/index.d.ts deleted file mode 100644 index 8a196b2..0000000 --- a/node_modules/camelcase-keys/index.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -declare namespace camelcaseKeys { - interface Options { - /** - Recurse nested objects and objects in arrays. - - @default false - */ - readonly deep?: boolean; - - /** - Exclude keys from being camel-cased. - - @default [] - */ - readonly exclude?: ReadonlyArray; - - /** - Exclude children at the given object paths in dot-notation from being camel-cased. For example, with an object like `{a: {b: '🦄'}}`, the object path to reach the unicorn is `'a.b'`. - - @default [] - - @example - ``` - camelcaseKeys({ - a_b: 1, - a_c: { - c_d: 1, - c_e: { - e_f: 1 - } - } - }, { - deep: true, - stopPaths: [ - 'a_c.c_e' - ] - }), - // { - // aB: 1, - // aC: { - // cD: 1, - // cE: { - // e_f: 1 - // } - // } - // } - ``` - */ - readonly stopPaths?: ReadonlyArray; - - /** - Uppercase the first character as in `bye-bye` → `ByeBye`. - - @default false - */ - readonly pascalCase?: boolean; - } -} - -/** -Convert object keys to camel case using [`camelcase`](https://github.com/sindresorhus/camelcase). - -@param input - Object or array of objects to camel-case. - -@example -``` -import camelcaseKeys = require('camelcase-keys'); - -// Convert an object -camelcaseKeys({'foo-bar': true}); -//=> {fooBar: true} - -// Convert an array of objects -camelcaseKeys([{'foo-bar': true}, {'bar-foo': false}]); -//=> [{fooBar: true}, {barFoo: false}] - -camelcaseKeys({'foo-bar': true, nested: {unicorn_rainbow: true}}, {deep: true}); -//=> {fooBar: true, nested: {unicornRainbow: true}} - -// Convert object keys to pascal case -camelcaseKeys({'foo-bar': true, nested: {unicorn_rainbow: true}}, {deep: true, pascalCase: true}); -//=> {FooBar: true, Nested: {UnicornRainbow: true}} - -import minimist = require('minimist'); - -const argv = minimist(process.argv.slice(2)); -//=> {_: [], 'foo-bar': true} - -camelcaseKeys(argv); -//=> {_: [], fooBar: true} -``` -*/ -declare function camelcaseKeys>( - input: T, - options?: camelcaseKeys.Options, -): T; - -declare function camelcaseKeys( - input: T, - options?: camelcaseKeys.Options, -): T; - -export = camelcaseKeys; diff --git a/node_modules/camelcase-keys/index.js b/node_modules/camelcase-keys/index.js deleted file mode 100644 index d6349c5..0000000 --- a/node_modules/camelcase-keys/index.js +++ /dev/null @@ -1,77 +0,0 @@ -'use strict'; -const mapObj = require('map-obj'); -const camelCase = require('camelcase'); -const QuickLru = require('quick-lru'); - -const has = (array, key) => array.some(x => { - if (typeof x === 'string') { - return x === key; - } - - x.lastIndex = 0; - return x.test(key); -}); - -const cache = new QuickLru({maxSize: 100000}); - -// Reproduces behavior from `map-obj` -const isObject = value => - typeof value === 'object' && - value !== null && - !(value instanceof RegExp) && - !(value instanceof Error) && - !(value instanceof Date); - -const camelCaseConvert = (input, options) => { - if (!isObject(input)) { - return input; - } - - options = { - deep: false, - pascalCase: false, - ...options - }; - - const {exclude, pascalCase, stopPaths, deep} = options; - - const stopPathsSet = new Set(stopPaths); - - const makeMapper = parentPath => (key, value) => { - if (deep && isObject(value)) { - const path = parentPath === undefined ? key : `${parentPath}.${key}`; - - if (!stopPathsSet.has(path)) { - value = mapObj(value, makeMapper(path)); - } - } - - if (!(exclude && has(exclude, key))) { - const cacheKey = pascalCase ? `${key}_` : key; - - if (cache.has(cacheKey)) { - key = cache.get(cacheKey); - } else { - const ret = camelCase(key, {pascalCase}); - - if (key.length < 100) { // Prevent abuse - cache.set(cacheKey, ret); - } - - key = ret; - } - } - - return [key, value]; - }; - - return mapObj(input, makeMapper(undefined)); -}; - -module.exports = (input, options) => { - if (Array.isArray(input)) { - return Object.keys(input).map(key => camelCaseConvert(input[key], options)); - } - - return camelCaseConvert(input, options); -}; diff --git a/node_modules/camelcase-keys/license b/node_modules/camelcase-keys/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/camelcase-keys/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/camelcase-keys/package.json b/node_modules/camelcase-keys/package.json deleted file mode 100644 index 79d7ae9..0000000 --- a/node_modules/camelcase-keys/package.json +++ /dev/null @@ -1,105 +0,0 @@ -{ - "_from": "camelcase-keys@6.2.2", - "_id": "camelcase-keys@6.2.2", - "_inBundle": false, - "_integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "_location": "/camelcase-keys", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "camelcase-keys@6.2.2", - "name": "camelcase-keys", - "escapedName": "camelcase-keys", - "rawSpec": "6.2.2", - "saveSpec": null, - "fetchSpec": "6.2.2" - }, - "_requiredBy": [ - "/docker-hub-utils" - ], - "_resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "_shasum": "5e755d6ba51aa223ec7d3d52f25778210f9dc3c0", - "_spec": "camelcase-keys@6.2.2", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/docker-hub-utils", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/camelcase-keys/issues" - }, - "bundleDependencies": false, - "dependencies": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - }, - "deprecated": false, - "description": "Convert object keys to camel case", - "devDependencies": { - "ava": "^2.1.0", - "matcha": "^0.7.0", - "tsd": "^0.11.0", - "xo": "^0.25.3" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "funding": "https://github.com/sponsors/sindresorhus", - "homepage": "https://github.com/sindresorhus/camelcase-keys#readme", - "keywords": [ - "map", - "obj", - "object", - "key", - "keys", - "value", - "values", - "val", - "iterate", - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert", - "pascalcase", - "pascal-case", - "deep", - "recurse", - "recursive" - ], - "license": "MIT", - "name": "camelcase-keys", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/camelcase-keys.git" - }, - "scripts": { - "bench": "matcha bench/bench.js", - "test": "xo && ava && tsd" - }, - "version": "6.2.2", - "xo": { - "overrides": [ - { - "files": "bench/bench.js", - "rules": { - "import/no-unresolved": "off" - } - } - ] - } -} diff --git a/node_modules/camelcase-keys/readme.md b/node_modules/camelcase-keys/readme.md deleted file mode 100644 index f0ac0f1..0000000 --- a/node_modules/camelcase-keys/readme.md +++ /dev/null @@ -1,125 +0,0 @@ -# camelcase-keys [![Build Status](https://travis-ci.org/sindresorhus/camelcase-keys.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase-keys) - -> Convert object keys to camel case using [`camelcase`](https://github.com/sindresorhus/camelcase) - -## Install - -``` -$ npm install camelcase-keys -``` - -## Usage - -```js -const camelcaseKeys = require('camelcase-keys'); - -// Convert an object -camelcaseKeys({'foo-bar': true}); -//=> {fooBar: true} - -// Convert an array of objects -camelcaseKeys([{'foo-bar': true}, {'bar-foo': false}]); -//=> [{fooBar: true}, {barFoo: false}] - -camelcaseKeys({'foo-bar': true, nested: {unicorn_rainbow: true}}, {deep: true}); -//=> {fooBar: true, nested: {unicornRainbow: true}} - -camelcaseKeys({a_b: 1, a_c: {c_d: 1, c_e: {e_f: 1}}}, {deep: true, stopPaths: ['a_c.c_e']}), -//=> {aB: 1, aC: {cD: 1, cE: {e_f: 1}}} - -// Convert object keys to pascal case -camelcaseKeys({'foo-bar': true, nested: {unicorn_rainbow: true}}, {deep: true, pascalCase: true}); -//=> {FooBar: true, Nested: {UnicornRainbow: true}} -``` - -```js -const camelcaseKeys = require('camelcase-keys'); - -const argv = require('minimist')(process.argv.slice(2)); -//=> {_: [], 'foo-bar': true} - -camelcaseKeys(argv); -//=> {_: [], fooBar: true} -``` - -## API - -### camelcaseKeys(input, options?) - -#### input - -Type: `object | object[]` - -An object or array of objects to camel-case. - -#### options - -Type: `object` - -##### exclude - -Type: `Array`\ -Default: `[]` - -Exclude keys from being camel-cased. - -##### stopPaths - -Type: `string[]`\ -Default: `[]` - -Exclude children at the given object paths in dot-notation from being camel-cased. For example, with an object like `{a: {b: '🦄'}}`, the object path to reach the unicorn is `'a.b'`. - -```js -camelcaseKeys({ - a_b: 1, - a_c: { - c_d: 1, - c_e: { - e_f: 1 - } - } -}, { - deep: true, - stopPaths: [ - 'a_c.c_e' - ] -}), -/* -{ - aB: 1, - aC: { - cD: 1, - cE: { - e_f: 1 - } - } -} -*/ -``` - -##### deep - -Type: `boolean`\ -Default: `false` - -Recurse nested objects and objects in arrays. - -##### pascalCase - -Type: `boolean`\ -Default: `false` - -Uppercase the first character as in `bye-bye` → `ByeBye`. - -## camelcase-keys for enterprise - -Available as part of the Tidelift Subscription. - -The maintainers of camelcase-keys and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-camelcase-keys?utm_source=npm-camelcase-keys&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) - -## Related - -- [snakecase-keys](https://github.com/bendrucker/snakecase-keys) -- [kebabcase-keys](https://github.com/mattiloh/kebabcase-keys) - diff --git a/node_modules/camelcase/index.d.ts b/node_modules/camelcase/index.d.ts deleted file mode 100644 index 58f2069..0000000 --- a/node_modules/camelcase/index.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -declare namespace camelcase { - interface Options { - /** - Uppercase the first character: `foo-bar` → `FooBar`. - - @default false - */ - readonly pascalCase?: boolean; - } -} - -declare const camelcase: { - /** - Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`. - - @param input - String to convert to camel case. - - @example - ``` - import camelCase = require('camelcase'); - - camelCase('foo-bar'); - //=> 'fooBar' - - camelCase('foo_bar'); - //=> 'fooBar' - - camelCase('Foo-Bar'); - //=> 'fooBar' - - camelCase('Foo-Bar', {pascalCase: true}); - //=> 'FooBar' - - camelCase('--foo.bar', {pascalCase: false}); - //=> 'fooBar' - - camelCase('foo bar'); - //=> 'fooBar' - - console.log(process.argv[3]); - //=> '--foo-bar' - camelCase(process.argv[3]); - //=> 'fooBar' - - camelCase(['foo', 'bar']); - //=> 'fooBar' - - camelCase(['__foo__', '--bar'], {pascalCase: true}); - //=> 'FooBar' - ``` - */ - (input: string | ReadonlyArray, options?: camelcase.Options): string; - - // TODO: Remove this for the next major release, refactor the whole definition to: - // declare function camelcase( - // input: string | ReadonlyArray, - // options?: camelcase.Options - // ): string; - // export = camelcase; - default: typeof camelcase; -}; - -export = camelcase; diff --git a/node_modules/camelcase/index.js b/node_modules/camelcase/index.js deleted file mode 100644 index 579f99b..0000000 --- a/node_modules/camelcase/index.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict'; - -const preserveCamelCase = string => { - let isLastCharLower = false; - let isLastCharUpper = false; - let isLastLastCharUpper = false; - - for (let i = 0; i < string.length; i++) { - const character = string[i]; - - if (isLastCharLower && /[a-zA-Z]/.test(character) && character.toUpperCase() === character) { - string = string.slice(0, i) + '-' + string.slice(i); - isLastCharLower = false; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = true; - i++; - } else if (isLastCharUpper && isLastLastCharUpper && /[a-zA-Z]/.test(character) && character.toLowerCase() === character) { - string = string.slice(0, i - 1) + '-' + string.slice(i - 1); - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = false; - isLastCharLower = true; - } else { - isLastCharLower = character.toLowerCase() === character && character.toUpperCase() !== character; - isLastLastCharUpper = isLastCharUpper; - isLastCharUpper = character.toUpperCase() === character && character.toLowerCase() !== character; - } - } - - return string; -}; - -const camelCase = (input, options) => { - if (!(typeof input === 'string' || Array.isArray(input))) { - throw new TypeError('Expected the input to be `string | string[]`'); - } - - options = Object.assign({ - pascalCase: false - }, options); - - const postProcess = x => options.pascalCase ? x.charAt(0).toUpperCase() + x.slice(1) : x; - - if (Array.isArray(input)) { - input = input.map(x => x.trim()) - .filter(x => x.length) - .join('-'); - } else { - input = input.trim(); - } - - if (input.length === 0) { - return ''; - } - - if (input.length === 1) { - return options.pascalCase ? input.toUpperCase() : input.toLowerCase(); - } - - const hasUpperCase = input !== input.toLowerCase(); - - if (hasUpperCase) { - input = preserveCamelCase(input); - } - - input = input - .replace(/^[_.\- ]+/, '') - .toLowerCase() - .replace(/[_.\- ]+(\w|$)/g, (_, p1) => p1.toUpperCase()) - .replace(/\d+(\w|$)/g, m => m.toUpperCase()); - - return postProcess(input); -}; - -module.exports = camelCase; -// TODO: Remove this for the next major release -module.exports.default = camelCase; diff --git a/node_modules/camelcase/license b/node_modules/camelcase/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/camelcase/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/camelcase/package.json b/node_modules/camelcase/package.json deleted file mode 100644 index f934715..0000000 --- a/node_modules/camelcase/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "camelcase@^5.3.1", - "_id": "camelcase@5.3.1", - "_inBundle": false, - "_integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "_location": "/camelcase", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "camelcase@^5.3.1", - "name": "camelcase", - "escapedName": "camelcase", - "rawSpec": "^5.3.1", - "saveSpec": null, - "fetchSpec": "^5.3.1" - }, - "_requiredBy": [ - "/camelcase-keys" - ], - "_resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "_shasum": "e3c9b31569e106811df242f715725a1f4c494320", - "_spec": "camelcase@^5.3.1", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/camelcase-keys", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/camelcase/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`", - "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.1", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=6" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/camelcase#readme", - "keywords": [ - "camelcase", - "camel-case", - "camel", - "case", - "dash", - "hyphen", - "dot", - "underscore", - "separator", - "string", - "text", - "convert", - "pascalcase", - "pascal-case" - ], - "license": "MIT", - "name": "camelcase", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/camelcase.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "5.3.1" -} diff --git a/node_modules/camelcase/readme.md b/node_modules/camelcase/readme.md deleted file mode 100644 index fde2726..0000000 --- a/node_modules/camelcase/readme.md +++ /dev/null @@ -1,99 +0,0 @@ -# camelcase [![Build Status](https://travis-ci.org/sindresorhus/camelcase.svg?branch=master)](https://travis-ci.org/sindresorhus/camelcase) - -> Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar` - ---- - -
- - Get professional support for 'camelcase' with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
- ---- - -## Install - -``` -$ npm install camelcase -``` - - -## Usage - -```js -const camelCase = require('camelcase'); - -camelCase('foo-bar'); -//=> 'fooBar' - -camelCase('foo_bar'); -//=> 'fooBar' - -camelCase('Foo-Bar'); -//=> 'fooBar' - -camelCase('Foo-Bar', {pascalCase: true}); -//=> 'FooBar' - -camelCase('--foo.bar', {pascalCase: false}); -//=> 'fooBar' - -camelCase('foo bar'); -//=> 'fooBar' - -console.log(process.argv[3]); -//=> '--foo-bar' -camelCase(process.argv[3]); -//=> 'fooBar' - -camelCase(['foo', 'bar']); -//=> 'fooBar' - -camelCase(['__foo__', '--bar'], {pascalCase: true}); -//=> 'FooBar' -``` - - -## API - -### camelCase(input, [options]) - -#### input - -Type: `string` `string[]` - -String to convert to camel case. - -#### options - -Type: `Object` - -##### pascalCase - -Type: `boolean`
-Default: `false` - -Uppercase the first character: `foo-bar` → `FooBar` - - -## Security - -To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. - - -## Related - -- [decamelize](https://github.com/sindresorhus/decamelize) - The inverse of this module -- [uppercamelcase](https://github.com/SamVerschueren/uppercamelcase) - Like this module, but to PascalCase instead of camelCase -- [titleize](https://github.com/sindresorhus/titleize) - Capitalize every word in string -- [humanize-string](https://github.com/sindresorhus/humanize-string) - Convert a camelized/dasherized/underscored string into a humanized one - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/docker-hub-utils/README.md b/node_modules/docker-hub-utils/README.md deleted file mode 100644 index 7799a6d..0000000 --- a/node_modules/docker-hub-utils/README.md +++ /dev/null @@ -1,50 +0,0 @@ -

- - - -

-

- docker-hub-utils -

- -[![CircleCI][circleci-badge]][circleci-link] [![npm][npm-badge]][npm-link] -[![codecov][codecov]][codecov 2] - -### What is this? - -`docker-hub-utils` is an [NPM package][npm-link] (packaged to work both in -`node.js` as well as in the browser), providing utility functions wrapping the -[Docker Hub API][docker 2]. This was created because the native API provides -little to no support for basic operations like filtering queries, and can be -quite verbose when e.g., fetching [Manifest Lists][docker], which is required to -determine which architectures a given image supports. - ---- - -### Currently supported operations - -- Querying top repos by username / organization name. -- Filtering top user / org repositories by date last updated; this is useful - when you're only interested in repositories that have been updated in the past - `N` months / years / etc, a feature missing from the native API. -- Fetching Manifest Lists for any repository image in a single function call, - abstracting away the bearer token authentication dance. - -You can see examples of these operations in use within the -[`docker-hub-graphql-api`][github 2] project, or in this project's test cases. - -[circleci-badge]: - https://circleci.com/gh/jessestuart/docker-hub-utils.svg?style=shield -[circleci-link]: https://circleci.com/gh/jessestuart/docker-hub-utils -[codecov 2]: https://codecov.io/gh/jessestuart/docker-hub-utils -[codecov]: - https://codecov.io/gh/jessestuart/docker-hub-utils/branch/master/graph/badge.svg -[docker 2]: https://docs.docker.com/registry/spec/api/ -[docker]: https://docs.docker.com/registry/spec/manifest-v2-2/ -[github 2]: https://github.com/jessestuart/docker-hub-graphql-api -[github]: https://github.com/jessestuart/multiar.ch -[npm-badge]: https://img.shields.io/npm/v/docker-hub-utils.svg -[npm-link]: https://www.npmjs.com/package/docker-hub-utils diff --git a/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.development.js b/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.development.js deleted file mode 100644 index a20fa37..0000000 --- a/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.development.js +++ /dev/null @@ -1,1191 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } - -var axios = _interopDefault(require('axios')); -var camelcaseKeys = _interopDefault(require('camelcase-keys')); -var luxon = require('luxon'); -var R = _interopDefault(require('ramda')); -var pino = _interopDefault(require('pino')); - -/** - * Union type representing the architecture defined in part of an OCI image's - * manifest list. - * - * As specified in the Docker Manifest spec, any valid GOARCH values are valid - * image architecture values, and vice versa: - * > The platform object describes the platform which the image in the manifest - * > runs on. A full list of valid operating system and architecture values are - * > listed in the Go language documentation for $GOOS and $GOARCH - * @see https://docs.docker.com/registry/spec/manifest-v2-2/#manifest-list-field-descriptions - */ - -(function (Architecture) { - Architecture["i386"] = "386"; - Architecture["amd64"] = "amd64"; - Architecture["arm"] = "arm"; - Architecture["arm64"] = "arm64"; - Architecture["mips"] = "mips"; - Architecture["mips64"] = "mips64"; - Architecture["mips64le"] = "mips64le"; - Architecture["mipsle"] = "mipsle"; - Architecture["ppc64"] = "ppc64"; - Architecture["ppc64le"] = "ppc64le"; - Architecture["s390x"] = "s390x"; - Architecture["wasm"] = "wasm"; -})(exports.Architecture || (exports.Architecture = {})); -/** - * Union type representing the OS defined in part of an OCI image's - * manifest list. - * See the docs for the `Architecture` type above for more info. - */ - - -var OS; - -(function (OS) { - OS["aix"] = "aix"; - OS["android"] = "android"; - OS["darwin"] = "darwin"; - OS["dragonfly"] = "dragonfly"; - OS["freebsd"] = "freebsd"; - OS["illumos"] = "illumos"; - OS["js"] = "js"; - OS["linux"] = "linux"; - OS["netbsd"] = "netbsd"; - OS["openbsd"] = "openbsd"; - OS["plan9"] = "plan9"; - OS["solaris"] = "solaris"; - OS["windows"] = "windows"; -})(OS || (OS = {})); - -(function (ManifestMediaType) { - ManifestMediaType["Manifest"] = "application/vnd.docker.distribution.manifest.v2+json"; - ManifestMediaType["ManifestList"] = "application/vnd.docker.distribution.manifest.list.v2+json"; -})(exports.ManifestMediaType || (exports.ManifestMediaType = {})); - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function () { - var self = this, - args = arguments; - return new Promise(function (resolve, reject) { - var gen = fn.apply(self, args); - - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); - } - - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); - } - - _next(undefined); - }); - }; -} - -function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; -} - -var runtime_1 = createCommonjsModule(function (module) { -/** - * Copyright (c) 2014-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -var runtime = (function (exports) { - - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined$1; // More compressible than void 0. - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - - function define(obj, key, value) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - return obj[key]; - } - try { - // IE 8 has a broken Object.defineProperty that only works on DOM objects. - define({}, ""); - } catch (err) { - define = function(obj, key, value) { - return obj[key] = value; - }; - } - - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); - - // The ._invoke method unifies the implementations of the .next, - // .throw, and .return methods. - generator._invoke = makeInvokeMethod(innerFn, self, context); - - return generator; - } - exports.wrap = wrap; - - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; - } - } - - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; - - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; - - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - - // This is a polyfill for %IteratorPrototype% for environments that - // don't natively support it. - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function () { - return this; - }; - - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && - NativeIteratorPrototype !== Op && - hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - // This environment has a native %IteratorPrototype%; use it instead - // of the polyfill. - IteratorPrototype = NativeIteratorPrototype; - } - - var Gp = GeneratorFunctionPrototype.prototype = - Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunction.displayName = define( - GeneratorFunctionPrototype, - toStringTagSymbol, - "GeneratorFunction" - ); - - // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function(method) { - define(prototype, method, function(arg) { - return this._invoke(method, arg); - }); - }); - } - - exports.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor - ? ctor === GeneratorFunction || - // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" - : false; - }; - - exports.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - define(genFun, toStringTagSymbol, "GeneratorFunction"); - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - - // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `hasOwn.call(value, "__await")` to determine if the yielded value is - // meant to be awaited. - exports.awrap = function(arg) { - return { __await: arg }; - }; - - function AsyncIterator(generator, PromiseImpl) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && - typeof value === "object" && - hasOwn.call(value, "__await")) { - return PromiseImpl.resolve(value.__await).then(function(value) { - invoke("next", value, resolve, reject); - }, function(err) { - invoke("throw", err, resolve, reject); - }); - } - - return PromiseImpl.resolve(value).then(function(unwrapped) { - // When a yielded Promise is resolved, its final value becomes - // the .value of the Promise<{value,done}> result for the - // current iteration. - result.value = unwrapped; - resolve(result); - }, function(error) { - // If a rejected Promise was yielded, throw the rejection back - // into the async generator function so it can be handled there. - return invoke("throw", error, resolve, reject); - }); - } - } - - var previousPromise; - - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new PromiseImpl(function(resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } - - return previousPromise = - // If enqueue has been called before, then we want to wait until - // all previous Promises have been resolved before calling invoke, - // so that results are always delivered in the correct order. If - // enqueue has not been called before, then it is important to - // call invoke immediately, without waiting on a callback to fire, - // so that the async generator function has the opportunity to do - // any necessary setup in a predictable way. This predictability - // is why the Promise constructor synchronously invokes its - // executor callback, and why async functions synchronously - // execute code before the first await. Since we implement simple - // async functions in terms of async generators, it is especially - // important to get this right, even though it requires care. - previousPromise ? previousPromise.then( - callInvokeWithMethodAndArg, - // Avoid propagating failures to Promises returned by later - // invocations of the iterator. - callInvokeWithMethodAndArg - ) : callInvokeWithMethodAndArg(); - } - - // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; - } - - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; - exports.AsyncIterator = AsyncIterator; - - // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) { - if (PromiseImpl === void 0) PromiseImpl = Promise; - - var iter = new AsyncIterator( - wrap(innerFn, outerFn, self, tryLocsList), - PromiseImpl - ); - - return exports.isGeneratorFunction(outerFn) - ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function(result) { - return result.done ? result.value : iter.next(); - }); - }; - - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } - - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; - } - - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); - } - - context.method = method; - context.arg = arg; - - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - - if (context.method === "next") { - // Setting context._sent for legacy support of Babel's - // function.sent implementation. - context.sent = context._sent = context.arg; - - } else if (context.method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } - - context.dispatchException(context.arg); - - } else if (context.method === "return") { - context.abrupt("return", context.arg); - } - - state = GenStateExecuting; - - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done - ? GenStateCompleted - : GenStateSuspendedYield; - - if (record.arg === ContinueSentinel) { - continue; - } - - return { - value: record.arg, - done: context.done - }; - - } else if (record.type === "throw") { - state = GenStateCompleted; - // Dispatch the exception by looping back around to the - // context.dispatchException(context.arg) call above. - context.method = "throw"; - context.arg = record.arg; - } - } - }; - } - - // Call delegate.iterator[context.method](context.arg) and handle the - // result, either by returning a { value, done } result from the - // delegate iterator, or by modifying context.method and context.arg, - // setting context.delegate to null, and returning the ContinueSentinel. - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined$1) { - // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. - context.delegate = null; - - if (context.method === "throw") { - // Note: ["return"] must be used for ES3 parsing compatibility. - if (delegate.iterator["return"]) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined$1; - maybeInvokeDelegate(delegate, context); - - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; - } - } - - context.method = "throw"; - context.arg = new TypeError( - "The iterator does not provide a 'throw' method"); - } - - return ContinueSentinel; - } - - var record = tryCatch(method, delegate.iterator, context.arg); - - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - - var info = record.arg; - - if (! info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } - - if (info.done) { - // Assign the result of the finished delegate to the temporary - // variable specified by delegate.resultName (see delegateYield). - context[delegate.resultName] = info.value; - - // Resume execution at the desired location (see delegateYield). - context.next = delegate.nextLoc; - - // If context.method was "throw" but the delegate handled the - // exception, let the outer generator proceed normally. If - // context.method was "next", forget context.arg since it has been - // "consumed" by the delegate iterator. If context.method was - // "return", allow the original .return call to continue in the - // outer generator. - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined$1; - } - - } else { - // Re-yield the result returned by the delegate method. - return info; - } - - // The delegate iterator is finished, so forget it and continue with - // the outer generator. - context.delegate = null; - return ContinueSentinel; - } - - // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - defineIteratorMethods(Gp); - - define(Gp, toStringTagSymbol, "Generator"); - - // A Generator should always return itself as the iterator object when the - // @@iterator function is called on it. Some browsers' implementations of the - // iterator prototype chain incorrectly implement this, causing the Generator - // object to not be returned from this call. This ensures that doesn't happen. - // See https://github.com/facebook/regenerator/issues/274 for more details. - Gp[iteratorSymbol] = function() { - return this; - }; - - Gp.toString = function() { - return "[object Generator]"; - }; - - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; - - if (1 in locs) { - entry.catchLoc = locs[1]; - } - - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - - this.tryEntries.push(entry); - } - - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - - exports.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; - }; - - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - - if (typeof iterable.next === "function") { - return iterable; - } - - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - - next.value = undefined$1; - next.done = true; - - return next; - }; - - return next.next = next; - } - } - - // Return an iterator with no values. - return { next: doneResult }; - } - exports.values = values; - - function doneResult() { - return { value: undefined$1, done: true }; - } - - Context.prototype = { - constructor: Context, - - reset: function(skipTempReset) { - this.prev = 0; - this.next = 0; - // Resetting context._sent for legacy support of Babel's - // function.sent implementation. - this.sent = this._sent = undefined$1; - this.done = false; - this.delegate = null; - - this.method = "next"; - this.arg = undefined$1; - - this.tryEntries.forEach(resetTryEntry); - - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && - hasOwn.call(this, name) && - !isNaN(+name.slice(1))) { - this[name] = undefined$1; - } - } - } - }, - - stop: function() { - this.done = true; - - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - - return this.rval; - }, - - dispatchException: function(exception) { - if (this.done) { - throw exception; - } - - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined$1; - } - - return !! caught; - } - - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } - - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else { - throw new Error("try statement without catch or finally"); - } - } - } - }, - - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && - this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - - if (finallyEntry && - (type === "break" || - type === "continue") && - finallyEntry.tryLoc <= arg && - arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } - - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - - return this.complete(record); - }, - - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } - - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - - return ContinueSentinel; - }, - - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); - }, - - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined$1; - } - - return ContinueSentinel; - } - }; - - // Regardless of whether this script is executing as a CommonJS module - // or not, return the runtime object so that we can declare the variable - // regeneratorRuntime in the outer scope, which allows this module to be - // injected easily by `bin/regenerator --include-runtime script.js`. - return exports; - -}( - // If this script is executing as a CommonJS module, use module.exports - // as the regeneratorRuntime namespace. Otherwise create a new empty - // object. Either way, the resulting object will be used to initialize - // the regeneratorRuntime variable at the top of this file. - module.exports -)); - -try { - regeneratorRuntime = runtime; -} catch (accidentalStrictMode) { - // This module should not be running in strict mode, so the above - // assignment should always work unless something is misconfigured. Just - // in case runtime.js accidentally runs in strict mode, we can escape - // strict mode using a global Function call. This could conceivably fail - // if a Content Security Policy forbids using Function, but in that case - // the proper solution is to fix the accidental strict mode problem. If - // you've misconfigured your bundler to force strict mode and applied a - // CSP to forbid Function, and you're not willing to fix either of those - // problems, please detail your unique predicament in a GitHub issue. - Function("r", "regeneratorRuntime = r")(runtime); -} -}); - -var log = /*#__PURE__*/ -pino({ - base: null, - useLevelLabels: true -}); - -var DOCKER_HUB_API_ROOT = 'https://hub.docker.com/v2/'; -var DOCKER_HUB_API_AUTH_URL = 'https://auth.docker.io/token'; - -/** - * Currently only supports fetching the manifest for the `latest` tag; in - * reality, we can pass any valid content digest[1] to retrieve the manifest(s) - * for that image. - * - * [1]: https://github.com/opencontainers/distribution-spec/blob/master/spec.md#content-digests - */ - -var createManifestListURL = function createManifestListURL(_ref) { - var repo = _ref.repo; - return "https://registry-1.docker.io/v2/" + repo.user + "/" + repo.name + "/manifests/latest"; -}; - -var createUserReposListURL = function createUserReposListURL(user) { - return DOCKER_HUB_API_ROOT + "repositories/" + user; -}; -/** - * The OCI distribution spec requires a unique token for each repo manifest queried. - */ - - -var fetchDockerHubToken = -/*#__PURE__*/ -function () { - var _ref2 = - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - runtime_1.mark(function _callee(repo) { - var name, user, tokenRequest, token; - return runtime_1.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - name = repo.name, user = repo.user; - _context.next = 3; - return axios.get(DOCKER_HUB_API_AUTH_URL, { - params: { - scope: "repository:" + user + "/" + name + ":pull", - service: 'registry.docker.io' - } - }); - - case 3: - tokenRequest = _context.sent; - token = R.path(['data', 'token'], tokenRequest); - - if (token) { - _context.next = 7; - break; - } - - throw new Error('Unable to retrieve auth token from registry.'); - - case 7: - return _context.abrupt("return", token); - - case 8: - case "end": - return _context.stop(); - } - } - }, _callee); - })); - - return function fetchDockerHubToken(_x) { - return _ref2.apply(this, arguments); - }; -}(); -/** - * Pure function that massages the Docker Hub API response into the - * format we want to return. e.g., only extracting certain fields; - * converting snake_case to camelCase, etc. - */ - -var extractRepositoryDetails = function extractRepositoryDetails(repos, lastUpdatedSince) { - if (!repos || R.isEmpty(repos)) { - return []; - } - - var parsedRepos = camelcaseKeys(repos); - - if (R.isNil(lastUpdatedSince)) { - return parsedRepos; - } - - return parsedRepos.filter(function (repo) { - return luxon.DateTime.fromISO(repo.lastUpdated) < lastUpdatedSince; - }); -}; -/** - * Query a single repository given a repo name and username. - * - * @param user The DockerHub username or org name to query for. - * @param name The DockerHub repo name -- restrict to this single repo. - */ - -var queryRepo = -/*#__PURE__*/ -function () { - var _ref4 = - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - runtime_1.mark(function _callee2(_ref3) { - var name, user, repoResult, repo; - return runtime_1.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - name = _ref3.name, user = _ref3.user; - _context2.next = 3; - return axios.request({ - url: DOCKER_HUB_API_ROOT + "repositories/" + user + "/" + name + "/" - }); - - case 3: - repoResult = _context2.sent; - repo = R.prop('data', repoResult); - - if (!(repoResult.status !== 200 || !repo || R.isEmpty(repo))) { - _context2.next = 7; - break; - } - - return _context2.abrupt("return"); - - case 7: - return _context2.abrupt("return", camelcaseKeys(repo)); - - case 8: - case "end": - return _context2.stop(); - } - } - }, _callee2); - })); - - return function queryRepo(_x2) { - return _ref4.apply(this, arguments); - }; -}(); -/** - * Top-level function for querying repositories. - * - * @TODO Rename to just `queryRepos`. - * - * @param user The DockerHub username or org name to query for. - * @param numRepos The number of repos to query (max 100). - * @param lastUpdatedSince Filter by the DateTime at which a repo was last updated. - */ - -var queryTopRepos = -/*#__PURE__*/ -function () { - var _ref6 = - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - runtime_1.mark(function _callee3(_ref5) { - var lastUpdatedSince, _ref5$numRepos, numRepos, user, listReposURL, repoResults, repos; - - return runtime_1.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - lastUpdatedSince = _ref5.lastUpdatedSince, _ref5$numRepos = _ref5.numRepos, numRepos = _ref5$numRepos === void 0 ? 100 : _ref5$numRepos, user = _ref5.user; - - if (!(numRepos > 100)) { - _context3.next = 3; - break; - } - - throw new RangeError('Number of repos to query cannot exceed 100.'); - - case 3: - listReposURL = createUserReposListURL(user); - _context3.next = 6; - return axios.get(listReposURL, { - params: { - page: 1, - page_size: numRepos - } - }); - - case 6: - repoResults = _context3.sent; - repos = R.path(['data', 'results'], repoResults); - return _context3.abrupt("return", extractRepositoryDetails(repos, lastUpdatedSince)); - - case 9: - case "end": - return _context3.stop(); - } - } - }, _callee3); - })); - - return function queryTopRepos(_x3) { - return _ref6.apply(this, arguments); - }; -}(); -/** - * Query image tags. - */ - -var queryTags = -/*#__PURE__*/ -function () { - var _ref7 = - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - runtime_1.mark(function _callee4(repo) { - var repoUrl, tagsUrl, tagsResults, tags; - return runtime_1.wrap(function _callee4$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - repoUrl = createUserReposListURL(repo.user); - tagsUrl = repoUrl + "/" + repo.name + "/tags?page_size=100"; - _context4.next = 4; - return axios.get(tagsUrl); - - case 4: - tagsResults = _context4.sent; - tags = R.path(['data', 'results'], tagsResults); - - if (!(!tags || R.isEmpty(tags))) { - _context4.next = 8; - break; - } - - return _context4.abrupt("return"); - - case 8: - return _context4.abrupt("return", camelcaseKeys(tags)); - - case 9: - case "end": - return _context4.stop(); - } - } - }, _callee4); - })); - - return function queryTags(_x4) { - return _ref7.apply(this, arguments); - }; -}(); -/** - * Queries the Docker Hub API to retrieve a "fat manifest", an object of - * `Content-Type` `application/vnd.docker.distribution.manifest.list.v2+json/`. - * Read up on the Manifest v2, Schema 2 Spec in more detail: - * @see https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md - * Or the shiny new OCI distribution spec which builds on it: - * @see https://github.com/opencontainers/distribution-spec/blob/f67bc11ba3a083a9c62f8fa53ad14c5bcf2116af/spec.md - */ - -var fetchManifestList = -/*#__PURE__*/ -function () { - var _ref8 = - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - runtime_1.mark(function _callee5(repo) { - var token, manifestListURL, manifestListResponse; - return runtime_1.wrap(function _callee5$(_context5) { - while (1) { - switch (_context5.prev = _context5.next) { - case 0: - _context5.next = 2; - return fetchDockerHubToken(repo); - - case 2: - token = _context5.sent; - manifestListURL = createManifestListURL({ - repo: repo - }); - _context5.next = 6; - return axios.get(manifestListURL, { - headers: { - Accept: 'application/vnd.docker.distribution.manifest.list.v2+json', - Authorization: "Bearer " + token - } - }); - - case 6: - manifestListResponse = _context5.sent; - - if (!(manifestListResponse.data.schemaVersion === 1)) { - _context5.next = 10; - break; - } - - log.info('Schema version 1 is unsupported.', repo.name); - return _context5.abrupt("return"); - - case 10: - return _context5.abrupt("return", R.path(['data'], manifestListResponse)); - - case 11: - case "end": - return _context5.stop(); - } - } - }, _callee5); - })); - - return function fetchManifestList(_x5) { - return _ref8.apply(this, arguments); - }; -}(); - -exports.DOCKER_HUB_API_AUTH_URL = DOCKER_HUB_API_AUTH_URL; -exports.DOCKER_HUB_API_ROOT = DOCKER_HUB_API_ROOT; -exports.extractRepositoryDetails = extractRepositoryDetails; -exports.fetchDockerHubToken = fetchDockerHubToken; -exports.fetchManifestList = fetchManifestList; -exports.queryRepo = queryRepo; -exports.queryTags = queryTags; -exports.queryTopRepos = queryTopRepos; -//# sourceMappingURL=docker-hub-utils.cjs.development.js.map diff --git a/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.development.js.map b/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.development.js.map deleted file mode 100644 index b522b19..0000000 --- a/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.development.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"docker-hub-utils.cjs.development.js","sources":["../src/types/DockerHubRepo.ts","../node_modules/regenerator-runtime/runtime.js","../src/utils/log.ts","../src/utils/constants.ts","../src/services/DockerHubAPI.ts"],"sourcesContent":["/**\n * This is a direct representation of what we get back from the `/repositories`\n * API call.\n */\nexport interface DockerHubAPIRepo {\n readonly can_edit: boolean\n readonly description: string\n readonly is_automated: boolean\n readonly is_migrated: boolean\n readonly is_private: boolean\n readonly last_updated: string\n readonly name: string\n readonly namespace: string\n readonly pull_count: number\n readonly repository_type: string\n readonly star_count: number\n readonly status: number\n readonly user: string\n}\n\n/**\n * Union type representing the architecture defined in part of an OCI image's\n * manifest list.\n *\n * As specified in the Docker Manifest spec, any valid GOARCH values are valid\n * image architecture values, and vice versa:\n * > The platform object describes the platform which the image in the manifest\n * > runs on. A full list of valid operating system and architecture values are\n * > listed in the Go language documentation for $GOOS and $GOARCH\n * @see https://docs.docker.com/registry/spec/manifest-v2-2/#manifest-list-field-descriptions\n */\nexport enum Architecture {\n i386 = '386',\n amd64 = 'amd64',\n arm = 'arm',\n arm64 = 'arm64',\n mips = 'mips',\n mips64 = 'mips64',\n mips64le = 'mips64le',\n mipsle = 'mipsle',\n ppc64 = 'ppc64',\n ppc64le = 'ppc64le',\n s390x = 's390x',\n wasm = 'wasm',\n}\n\n/**\n * Union type representing the OS defined in part of an OCI image's\n * manifest list.\n * See the docs for the `Architecture` type above for more info.\n */\nexport enum OS {\n aix = 'aix',\n android = 'android',\n darwin = 'darwin',\n dragonfly = 'dragonfly',\n freebsd = 'freebsd',\n illumos = 'illumos',\n js = 'js',\n linux = 'linux',\n netbsd = 'netbsd',\n openbsd = 'openbsd',\n plan9 = 'plan9',\n solaris = 'solaris',\n windows = 'windows',\n}\n\nexport enum ManifestMediaType {\n Manifest = 'application/vnd.docker.distribution.manifest.v2+json',\n ManifestList = 'application/vnd.docker.distribution.manifest.list.v2+json',\n}\n\n/**\n * Yes, there's *way* more information contained in the manifest / \"fat\"\n * manifestList than just architectures, but I find this to be the most\n * relevant section for my projects. PR's welcome.\n */\nexport interface DockerManifest {\n readonly digest: string\n readonly mediaType: ManifestMediaType\n readonly platform: Array<{\n architecture: Architecture\n os: OS\n }>\n readonly schemaVersion: 1 | 2 | number\n}\n\nexport interface DockerManifestList {\n readonly manifests: DockerManifest[]\n readonly mediaType: ManifestMediaType\n readonly schemaVersion: 1 | 2 | any\n}\n\nexport interface DockerHubRepo {\n // ========================\n // Main fields of interest\n // ========================\n readonly description: string | null | undefined\n readonly lastUpdated: string\n readonly name: string\n readonly pullCount: number\n readonly starCount: number\n readonly user: string\n\n // Manifest type *may* be nested within this interface, but is usually\n // fetched and returned separately.\n readonly manifestList?: DockerManifestList\n readonly tags?: Tag[]\n\n // =============================================\n // Other stuff that comes down through the API,\n // that some may find useful\n // =============================================\n readonly canEdit?: boolean\n readonly isAutomated?: boolean\n readonly isMigrated?: boolean\n readonly isPrivate?: boolean\n readonly namespace?: string\n readonly repositoryType?: string\n readonly status?: number\n}\n\nexport interface Tag {\n creator: number\n fullSize: number\n id: number\n images: TagElement[]\n lastUpdated: string\n lastUpdater: number\n lastUpdaterUsername: string\n name: string\n repository: number\n v2: boolean\n}\n\nexport interface TagElement {\n architecture: Architecture\n digest: string\n features: string\n os: OS\n size: number\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","import pino from 'pino'\n\nexport default pino({ base: null, useLevelLabels: true })\n","export const DOCKER_CLOUD_URL = 'https://cloud.docker.com/repository/docker/'\nexport const DOCKER_HUB_API_ROOT = 'https://hub.docker.com/v2/'\nexport const DOCKER_HUB_API_AUTH_URL = 'https://auth.docker.io/token'\n","import axios from 'axios'\nimport camelcaseKeys from 'camelcase-keys'\nimport { DateTime } from 'luxon'\nimport R from 'ramda'\nimport log from '../utils/log'\n\nimport {\n DockerHubAPIRepo,\n DockerHubRepo,\n DockerManifestList,\n Tag,\n} from '../types/DockerHubRepo'\nimport {\n DOCKER_HUB_API_AUTH_URL,\n DOCKER_HUB_API_ROOT,\n} from '../utils/constants'\n\n/**\n * Currently only supports fetching the manifest for the `latest` tag; in\n * reality, we can pass any valid content digest[1] to retrieve the manifest(s)\n * for that image.\n *\n * [1]: https://github.com/opencontainers/distribution-spec/blob/master/spec.md#content-digests\n */\nconst createManifestListURL = ({ repo }: { repo: DockerHubRepo }): string =>\n `https://registry-1.docker.io/v2/${repo.user}/${repo.name}/manifests/latest`\n\nconst createUserReposListURL = (user: string): string =>\n `${DOCKER_HUB_API_ROOT}repositories/${user}`\n\n/**\n * The OCI distribution spec requires a unique token for each repo manifest queried.\n */\nexport const fetchDockerHubToken = async (\n repo: DockerHubRepo,\n): Promise => {\n const { name, user } = repo\n const tokenRequest = await axios.get(DOCKER_HUB_API_AUTH_URL, {\n params: {\n scope: `repository:${user}/${name}:pull`,\n service: 'registry.docker.io',\n },\n })\n\n const token: string | undefined = R.path(['data', 'token'], tokenRequest)\n if (!token) {\n throw new Error('Unable to retrieve auth token from registry.')\n }\n return token\n}\n\n/**\n * Pure function that massages the Docker Hub API response into the\n * format we want to return. e.g., only extracting certain fields;\n * converting snake_case to camelCase, etc.\n */\nexport const extractRepositoryDetails = (\n repos: DockerHubAPIRepo[],\n lastUpdatedSince?: DateTime,\n): DockerHubRepo[] => {\n if (!repos || R.isEmpty(repos)) {\n return []\n }\n\n const parsedRepos: DockerHubRepo[] = (camelcaseKeys(\n repos,\n ) as unknown) as DockerHubRepo[]\n\n if (R.isNil(lastUpdatedSince)) {\n return parsedRepos\n }\n\n return parsedRepos.filter(\n repo => DateTime.fromISO(repo.lastUpdated) < lastUpdatedSince,\n )\n}\n\n/**\n * Query a single repository given a repo name and username.\n *\n * @param user The DockerHub username or org name to query for.\n * @param name The DockerHub repo name -- restrict to this single repo.\n */\nexport const queryRepo = async ({\n name,\n user,\n}: {\n name: string\n user: string\n}): Promise => {\n const repoResult = await axios.request({\n url: `${DOCKER_HUB_API_ROOT}repositories/${user}/${name}/`,\n })\n const repo: DockerHubRepo | undefined = R.prop('data', repoResult)\n if (repoResult.status !== 200 || !repo || R.isEmpty(repo)) {\n return\n }\n return (camelcaseKeys(repo) as unknown) as DockerHubRepo\n}\n\n/**\n * Top-level function for querying repositories.\n *\n * @TODO Rename to just `queryRepos`.\n *\n * @param user The DockerHub username or org name to query for.\n * @param numRepos The number of repos to query (max 100).\n * @param lastUpdatedSince Filter by the DateTime at which a repo was last updated.\n */\nexport const queryTopRepos = async ({\n lastUpdatedSince,\n numRepos = 100,\n user,\n}: {\n lastUpdatedSince?: DateTime\n numRepos?: number\n user: string\n}): Promise => {\n if (numRepos > 100) {\n throw new RangeError('Number of repos to query cannot exceed 100.')\n }\n\n const listReposURL = createUserReposListURL(user)\n const repoResults = await axios.get(listReposURL, {\n params: { page: 1, page_size: numRepos },\n })\n const repos: DockerHubAPIRepo[] = R.path(\n ['data', 'results'],\n repoResults,\n ) as DockerHubAPIRepo[]\n\n return extractRepositoryDetails(repos, lastUpdatedSince)\n}\n\n/**\n * Query image tags.\n */\nexport const queryTags = async (\n repo: DockerHubRepo,\n): Promise => {\n const repoUrl = createUserReposListURL(repo.user)\n const tagsUrl = `${repoUrl}/${repo.name}/tags?page_size=100`\n const tagsResults = await axios.get(tagsUrl)\n const tags = R.path(['data', 'results'], tagsResults)\n if (!tags || R.isEmpty(tags)) {\n return\n }\n // @ts-ignore\n return camelcaseKeys(tags)\n}\n\n/**\n * Queries the Docker Hub API to retrieve a \"fat manifest\", an object of\n * `Content-Type` `application/vnd.docker.distribution.manifest.list.v2+json/`.\n * Read up on the Manifest v2, Schema 2 Spec in more detail:\n * @see https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md\n * Or the shiny new OCI distribution spec which builds on it:\n * @see https://github.com/opencontainers/distribution-spec/blob/f67bc11ba3a083a9c62f8fa53ad14c5bcf2116af/spec.md\n */\nexport const fetchManifestList = async (\n repo: DockerHubRepo,\n): Promise => {\n // Docker Hub requires a unique token for each repo manifest queried.\n const token = await fetchDockerHubToken(repo)\n\n const manifestListURL = createManifestListURL({ repo })\n const manifestListResponse = await axios.get(manifestListURL, {\n headers: {\n Accept: 'application/vnd.docker.distribution.manifest.list.v2+json',\n Authorization: `Bearer ${token}`,\n },\n })\n // For now, just ignore legacy V1 schema manifests. They have an entirely\n // different response shape and it's not worth mucking up the schema to\n // support a legacy format.\n if (manifestListResponse.data.schemaVersion === 1) {\n log.info('Schema version 1 is unsupported.', repo.name)\n return\n }\n\n return R.path(['data'], manifestListResponse)\n}\n"],"names":["Architecture","OS","ManifestMediaType","undefined","pino","base","useLevelLabels","DOCKER_HUB_API_ROOT","DOCKER_HUB_API_AUTH_URL","createManifestListURL","repo","user","name","createUserReposListURL","fetchDockerHubToken","axios","get","params","scope","service","tokenRequest","token","R","path","Error","extractRepositoryDetails","repos","lastUpdatedSince","isEmpty","parsedRepos","camelcaseKeys","isNil","filter","DateTime","fromISO","lastUpdated","queryRepo","request","url","repoResult","prop","status","queryTopRepos","numRepos","RangeError","listReposURL","page","page_size","repoResults","queryTags","repoUrl","tagsUrl","tagsResults","tags","fetchManifestList","manifestListURL","headers","Accept","Authorization","manifestListResponse","data","schemaVersion","log","info"],"mappings":";;;;;;;;;;;;AAoBA;;;;;;;;;;;;AAWA,WAAYA;AACVA,EAAAA,oBAAA,QAAA;AACAA,EAAAA,qBAAA,UAAA;AACAA,EAAAA,mBAAA,QAAA;AACAA,EAAAA,qBAAA,UAAA;AACAA,EAAAA,oBAAA,SAAA;AACAA,EAAAA,sBAAA,WAAA;AACAA,EAAAA,wBAAA,aAAA;AACAA,EAAAA,sBAAA,WAAA;AACAA,EAAAA,qBAAA,UAAA;AACAA,EAAAA,uBAAA,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,oBAAjB,CArBwB;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAAH;;AAAA,kBAAjBL,iBAAiB;AAAA;AAAA;AAAA,GAAvB;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.production.min.js b/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.production.min.js deleted file mode 100644 index 2837737..0000000 --- a/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.production.min.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var r,e,n,o=t(require("axios")),i=t(require("camelcase-keys")),a=require("luxon"),u=t(require("ramda")),s=t(require("pino"));function c(t,r,e,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void e(t)}u.done?r(s):Promise.resolve(s).then(n,o)}function p(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var i=t.apply(r,e);function a(t){c(i,n,o,a,u,"next",t)}function u(t){c(i,n,o,a,u,"throw",t)}a(void 0)}))}}(r=exports.Architecture||(exports.Architecture={})).i386="386",r.amd64="amd64",r.arm="arm",r.arm64="arm64",r.mips="mips",r.mips64="mips64",r.mips64le="mips64le",r.mipsle="mipsle",r.ppc64="ppc64",r.ppc64le="ppc64le",r.s390x="s390x",r.wasm="wasm",function(t){t.aix="aix",t.android="android",t.darwin="darwin",t.dragonfly="dragonfly",t.freebsd="freebsd",t.illumos="illumos",t.js="js",t.linux="linux",t.netbsd="netbsd",t.openbsd="openbsd",t.plan9="plan9",t.solaris="solaris",t.windows="windows"}(e||(e={})),(n=exports.ManifestMediaType||(exports.ManifestMediaType={})).Manifest="application/vnd.docker.distribution.manifest.v2+json",n.ManifestList="application/vnd.docker.distribution.manifest.list.v2+json";var f,l=(function(t){var r=function(t){var r=Object.prototype,e=r.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function s(t,r,e,n){var o=Object.create((r&&r.prototype instanceof f?r:f).prototype),i=new L(n||[]);return o._invoke=function(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=w(a,e);if(u){if(u===p)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var s=c(t,r,e);if("normal"===s.type){if(n=e.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:e.done}}"throw"===s.type&&(n="completed",e.method="throw",e.arg=s.arg)}}}(t,e,i),o}function c(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var p={};function f(){}function l(){}function h(){}var d={};d[o]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(E([])));y&&y!==r&&e.call(y,o)&&(d=y);var m=h.prototype=f.prototype=Object.create(d);function g(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function x(t,r){var n;this._invoke=function(o,i){function a(){return new r((function(n,a){!function n(o,i,a,u){var s=c(t[o],t,i);if("throw"!==s.type){var p=s.arg,f=p.value;return f&&"object"==typeof f&&e.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):r.resolve(f).then((function(t){p.value=t,a(p)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function w(t,r){var e=t.iterator[r.method];if(void 0===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=void 0,w(t,r),"throw"===r.method))return p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=c(e,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,p;var o=n.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,p):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function b(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function k(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function E(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=e.call(i,"catchLoc"),s=e.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&e.call(o,"finallyLoc")&&this.prev=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),k(e),p}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;k(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,e){return this.delegate={iterator:E(t),resultName:r,nextLoc:e},"next"===this.method&&(this.arg=void 0),p}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}}(f={exports:{}}),f.exports),h=s({base:null,useLevelLabels:!0}),d=function(t){var r=t.repo;return"https://registry-1.docker.io/v2/"+r.user+"/"+r.name+"/manifests/latest"},v=function(t){return"https://hub.docker.com/v2/repositories/"+t},y=function(){var t=p(l.mark((function t(r){var e,n,i;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.name,n=r.user,t.next=3,o.get("https://auth.docker.io/token",{params:{scope:"repository:"+n+"/"+e+":pull",service:"registry.docker.io"}});case 3:if(i=u.path(["data","token"],t.sent)){t.next=7;break}throw new Error("Unable to retrieve auth token from registry.");case 7:return t.abrupt("return",i);case 8:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}(),m=function(t,r){if(!t||u.isEmpty(t))return[];var e=i(t);return u.isNil(r)?e:e.filter((function(t){return a.DateTime.fromISO(t.lastUpdated)100)){t.next=3;break}throw new RangeError("Number of repos to query cannot exceed 100.");case 3:return s=v(a),t.next=6,o.get(s,{params:{page:1,page_size:i}});case 6:return c=u.path(["data","results"],t.sent),t.abrupt("return",m(c,e));case 9:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}(),w=function(){var t=p(l.mark((function t(r){var e,n,a;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=v(r.user),n=e+"/"+r.name+"/tags?page_size=100",t.next=4,o.get(n);case 4:if((a=u.path(["data","results"],t.sent))&&!u.isEmpty(a)){t.next=8;break}return t.abrupt("return");case 8:return t.abrupt("return",i(a));case 9:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}(),b=function(){var t=p(l.mark((function t(r){var e,n,i;return l.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,y(r);case 2:return e=t.sent,n=d({repo:r}),t.next=6,o.get(n,{headers:{Accept:"application/vnd.docker.distribution.manifest.list.v2+json",Authorization:"Bearer "+e}});case 6:if(1!==(i=t.sent).data.schemaVersion){t.next=10;break}return h.info("Schema version 1 is unsupported.",r.name),t.abrupt("return");case 10:return t.abrupt("return",u.path(["data"],i));case 11:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}();exports.DOCKER_HUB_API_AUTH_URL="https://auth.docker.io/token",exports.DOCKER_HUB_API_ROOT="https://hub.docker.com/v2/",exports.extractRepositoryDetails=m,exports.fetchDockerHubToken=y,exports.fetchManifestList=b,exports.queryRepo=g,exports.queryTags=w,exports.queryTopRepos=x; -//# sourceMappingURL=docker-hub-utils.cjs.production.min.js.map diff --git a/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.production.min.js.map b/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.production.min.js.map deleted file mode 100644 index 84b911d..0000000 --- a/node_modules/docker-hub-utils/dist/docker-hub-utils.cjs.production.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"docker-hub-utils.cjs.production.min.js","sources":["../src/types/DockerHubRepo.ts","../node_modules/regenerator-runtime/runtime.js","../src/utils/log.ts","../src/services/DockerHubAPI.ts","../src/utils/constants.ts"],"sourcesContent":["/**\n * This is a direct representation of what we get back from the `/repositories`\n * API call.\n */\nexport interface DockerHubAPIRepo {\n readonly can_edit: boolean\n readonly description: string\n readonly is_automated: boolean\n readonly is_migrated: boolean\n readonly is_private: boolean\n readonly last_updated: string\n readonly name: string\n readonly namespace: string\n readonly pull_count: number\n readonly repository_type: string\n readonly star_count: number\n readonly status: number\n readonly user: string\n}\n\n/**\n * Union type representing the architecture defined in part of an OCI image's\n * manifest list.\n *\n * As specified in the Docker Manifest spec, any valid GOARCH values are valid\n * image architecture values, and vice versa:\n * > The platform object describes the platform which the image in the manifest\n * > runs on. A full list of valid operating system and architecture values are\n * > listed in the Go language documentation for $GOOS and $GOARCH\n * @see https://docs.docker.com/registry/spec/manifest-v2-2/#manifest-list-field-descriptions\n */\nexport enum Architecture {\n i386 = '386',\n amd64 = 'amd64',\n arm = 'arm',\n arm64 = 'arm64',\n mips = 'mips',\n mips64 = 'mips64',\n mips64le = 'mips64le',\n mipsle = 'mipsle',\n ppc64 = 'ppc64',\n ppc64le = 'ppc64le',\n s390x = 's390x',\n wasm = 'wasm',\n}\n\n/**\n * Union type representing the OS defined in part of an OCI image's\n * manifest list.\n * See the docs for the `Architecture` type above for more info.\n */\nexport enum OS {\n aix = 'aix',\n android = 'android',\n darwin = 'darwin',\n dragonfly = 'dragonfly',\n freebsd = 'freebsd',\n illumos = 'illumos',\n js = 'js',\n linux = 'linux',\n netbsd = 'netbsd',\n openbsd = 'openbsd',\n plan9 = 'plan9',\n solaris = 'solaris',\n windows = 'windows',\n}\n\nexport enum ManifestMediaType {\n Manifest = 'application/vnd.docker.distribution.manifest.v2+json',\n ManifestList = 'application/vnd.docker.distribution.manifest.list.v2+json',\n}\n\n/**\n * Yes, there's *way* more information contained in the manifest / \"fat\"\n * manifestList than just architectures, but I find this to be the most\n * relevant section for my projects. PR's welcome.\n */\nexport interface DockerManifest {\n readonly digest: string\n readonly mediaType: ManifestMediaType\n readonly platform: Array<{\n architecture: Architecture\n os: OS\n }>\n readonly schemaVersion: 1 | 2 | number\n}\n\nexport interface DockerManifestList {\n readonly manifests: DockerManifest[]\n readonly mediaType: ManifestMediaType\n readonly schemaVersion: 1 | 2 | any\n}\n\nexport interface DockerHubRepo {\n // ========================\n // Main fields of interest\n // ========================\n readonly description: string | null | undefined\n readonly lastUpdated: string\n readonly name: string\n readonly pullCount: number\n readonly starCount: number\n readonly user: string\n\n // Manifest type *may* be nested within this interface, but is usually\n // fetched and returned separately.\n readonly manifestList?: DockerManifestList\n readonly tags?: Tag[]\n\n // =============================================\n // Other stuff that comes down through the API,\n // that some may find useful\n // =============================================\n readonly canEdit?: boolean\n readonly isAutomated?: boolean\n readonly isMigrated?: boolean\n readonly isPrivate?: boolean\n readonly namespace?: string\n readonly repositoryType?: string\n readonly status?: number\n}\n\nexport interface Tag {\n creator: number\n fullSize: number\n id: number\n images: TagElement[]\n lastUpdated: string\n lastUpdater: number\n lastUpdaterUsername: string\n name: string\n repository: number\n v2: boolean\n}\n\nexport interface TagElement {\n architecture: Architecture\n digest: string\n features: string\n os: OS\n size: number\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","import pino from 'pino'\n\nexport default pino({ base: null, useLevelLabels: true })\n","import axios from 'axios'\nimport camelcaseKeys from 'camelcase-keys'\nimport { DateTime } from 'luxon'\nimport R from 'ramda'\nimport log from '../utils/log'\n\nimport {\n DockerHubAPIRepo,\n DockerHubRepo,\n DockerManifestList,\n Tag,\n} from '../types/DockerHubRepo'\nimport {\n DOCKER_HUB_API_AUTH_URL,\n DOCKER_HUB_API_ROOT,\n} from '../utils/constants'\n\n/**\n * Currently only supports fetching the manifest for the `latest` tag; in\n * reality, we can pass any valid content digest[1] to retrieve the manifest(s)\n * for that image.\n *\n * [1]: https://github.com/opencontainers/distribution-spec/blob/master/spec.md#content-digests\n */\nconst createManifestListURL = ({ repo }: { repo: DockerHubRepo }): string =>\n `https://registry-1.docker.io/v2/${repo.user}/${repo.name}/manifests/latest`\n\nconst createUserReposListURL = (user: string): string =>\n `${DOCKER_HUB_API_ROOT}repositories/${user}`\n\n/**\n * The OCI distribution spec requires a unique token for each repo manifest queried.\n */\nexport const fetchDockerHubToken = async (\n repo: DockerHubRepo,\n): Promise => {\n const { name, user } = repo\n const tokenRequest = await axios.get(DOCKER_HUB_API_AUTH_URL, {\n params: {\n scope: `repository:${user}/${name}:pull`,\n service: 'registry.docker.io',\n },\n })\n\n const token: string | undefined = R.path(['data', 'token'], tokenRequest)\n if (!token) {\n throw new Error('Unable to retrieve auth token from registry.')\n }\n return token\n}\n\n/**\n * Pure function that massages the Docker Hub API response into the\n * format we want to return. e.g., only extracting certain fields;\n * converting snake_case to camelCase, etc.\n */\nexport const extractRepositoryDetails = (\n repos: DockerHubAPIRepo[],\n lastUpdatedSince?: DateTime,\n): DockerHubRepo[] => {\n if (!repos || R.isEmpty(repos)) {\n return []\n }\n\n const parsedRepos: DockerHubRepo[] = (camelcaseKeys(\n repos,\n ) as unknown) as DockerHubRepo[]\n\n if (R.isNil(lastUpdatedSince)) {\n return parsedRepos\n }\n\n return parsedRepos.filter(\n repo => DateTime.fromISO(repo.lastUpdated) < lastUpdatedSince,\n )\n}\n\n/**\n * Query a single repository given a repo name and username.\n *\n * @param user The DockerHub username or org name to query for.\n * @param name The DockerHub repo name -- restrict to this single repo.\n */\nexport const queryRepo = async ({\n name,\n user,\n}: {\n name: string\n user: string\n}): Promise => {\n const repoResult = await axios.request({\n url: `${DOCKER_HUB_API_ROOT}repositories/${user}/${name}/`,\n })\n const repo: DockerHubRepo | undefined = R.prop('data', repoResult)\n if (repoResult.status !== 200 || !repo || R.isEmpty(repo)) {\n return\n }\n return (camelcaseKeys(repo) as unknown) as DockerHubRepo\n}\n\n/**\n * Top-level function for querying repositories.\n *\n * @TODO Rename to just `queryRepos`.\n *\n * @param user The DockerHub username or org name to query for.\n * @param numRepos The number of repos to query (max 100).\n * @param lastUpdatedSince Filter by the DateTime at which a repo was last updated.\n */\nexport const queryTopRepos = async ({\n lastUpdatedSince,\n numRepos = 100,\n user,\n}: {\n lastUpdatedSince?: DateTime\n numRepos?: number\n user: string\n}): Promise => {\n if (numRepos > 100) {\n throw new RangeError('Number of repos to query cannot exceed 100.')\n }\n\n const listReposURL = createUserReposListURL(user)\n const repoResults = await axios.get(listReposURL, {\n params: { page: 1, page_size: numRepos },\n })\n const repos: DockerHubAPIRepo[] = R.path(\n ['data', 'results'],\n repoResults,\n ) as DockerHubAPIRepo[]\n\n return extractRepositoryDetails(repos, lastUpdatedSince)\n}\n\n/**\n * Query image tags.\n */\nexport const queryTags = async (\n repo: DockerHubRepo,\n): Promise => {\n const repoUrl = createUserReposListURL(repo.user)\n const tagsUrl = `${repoUrl}/${repo.name}/tags?page_size=100`\n const tagsResults = await axios.get(tagsUrl)\n const tags = R.path(['data', 'results'], tagsResults)\n if (!tags || R.isEmpty(tags)) {\n return\n }\n // @ts-ignore\n return camelcaseKeys(tags)\n}\n\n/**\n * Queries the Docker Hub API to retrieve a \"fat manifest\", an object of\n * `Content-Type` `application/vnd.docker.distribution.manifest.list.v2+json/`.\n * Read up on the Manifest v2, Schema 2 Spec in more detail:\n * @see https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md\n * Or the shiny new OCI distribution spec which builds on it:\n * @see https://github.com/opencontainers/distribution-spec/blob/f67bc11ba3a083a9c62f8fa53ad14c5bcf2116af/spec.md\n */\nexport const fetchManifestList = async (\n repo: DockerHubRepo,\n): Promise => {\n // Docker Hub requires a unique token for each repo manifest queried.\n const token = await fetchDockerHubToken(repo)\n\n const manifestListURL = createManifestListURL({ repo })\n const manifestListResponse = await axios.get(manifestListURL, {\n headers: {\n Accept: 'application/vnd.docker.distribution.manifest.list.v2+json',\n Authorization: `Bearer ${token}`,\n },\n })\n // For now, just ignore legacy V1 schema manifests. They have an entirely\n // different response shape and it's not worth mucking up the schema to\n // support a legacy format.\n if (manifestListResponse.data.schemaVersion === 1) {\n log.info('Schema version 1 is unsupported.', repo.name)\n return\n }\n\n return R.path(['data'], manifestListResponse)\n}\n","export const DOCKER_CLOUD_URL = 'https://cloud.docker.com/repository/docker/'\nexport const DOCKER_HUB_API_ROOT = 'https://hub.docker.com/v2/'\nexport const DOCKER_HUB_API_AUTH_URL = 'https://auth.docker.io/token'\n"],"names":["Architecture","OS","ManifestMediaType","runtime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","generator","create","Generator","context","Context","_invoke","state","method","arg","Error","undefined","done","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","resolve","reject","invoke","result","__await","then","unwrapped","error","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","doneResult","constructor","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","toString","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","Function","pino","base","useLevelLabels","createManifestListURL","repo","user","createUserReposListURL","DOCKER_HUB_API_ROOT","fetchDockerHubToken","axios","get","params","scope","service","token","R","path","extractRepositoryDetails","repos","lastUpdatedSince","isEmpty","parsedRepos","camelcaseKeys","isNil","filter","DateTime","fromISO","lastUpdated","queryRepo","request","url","prop","repoResult","status","queryTopRepos","numRepos","RangeError","listReposURL","page","page_size","queryTags","repoUrl","tagsUrl","tags","fetchManifestList","manifestListURL","headers","Accept","Authorization","manifestListResponse","data","schemaVersion","log"],"mappings":"8IA+BYA,EAoBAC,EAgBAC,kbApCAF,EAAAA,uBAAAA,qCAEVA,gBACAA,YACAA,gBACAA,cACAA,kBACAA,sBACAA,kBACAA,gBACAA,oBACAA,gBACAA,cAQF,SAAYC,GACVA,YACAA,oBACAA,kBACAA,wBACAA,oBACAA,oBACAA,UACAA,gBACAA,kBACAA,oBACAA,gBACAA,oBACAA,oBAbF,CAAYA,IAAAA,QAgBAC,EAAAA,4BAAAA,+FAEVA,gGC9DF,IAAIC,EAAW,SAAUC,GAGvB,IAAIC,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eAEZC,EAA4B,mBAAXC,OAAwBA,OAAS,GAClDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAE/C,SAASC,EAAOC,EAAKC,EAAKC,GAOxB,OANAf,OAAOgB,eAAeH,EAAKC,EAAK,CAC9BC,MAAOA,EACPE,YAAY,EACZC,cAAc,EACdC,UAAU,IAELN,EAAIC,GAEb,IAEEF,EAAO,GAAI,IACX,MAAOQ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B,WAASC,QAAQtB,EAAKuB,aAAeR,MAUpCS,EAAS,2BAAG,gGACvBhE,IAAAA,KACAyC,IAAAA,cAKyBI,EAAMoB,QAAQ,CACrCC,IAAQvB,0CAAmCF,MAAQzC,kBAE/CwC,EAAkCW,EAAEgB,KAAK,OAHzCC,UAIoB,MAAtBA,EAAWC,QAAmB7B,IAAQW,EAAEK,QAAQhB,6EAG5CkB,EAAclB,kGAdF,GA0BT8B,EAAa,2BAAG,gGAC3Bf,IAAAA,iBAEAd,IAAAA,QADA8B,gBAAAA,UAAW,OAOI,2BACP,IAAIC,WAAW,6DAGjBC,EAAe/B,EAAuBD,YAClBI,EAAMC,IAAI2B,EAAc,CAChD1B,OAAQ,CAAE2B,KAAM,EAAGC,UAAWJ,mBAE1BjB,EAA4BH,EAAEC,KAClC,CAAC,OAAQ,qCAIJC,EAAyBC,EAAOC,kGAtBf,GA4BbqB,EAAS,2BAAG,WACvBpC,mFAEMqC,EAAUnC,EAAuBF,EAAKC,MACtCqC,EAAaD,MAAWrC,EAAKxC,oCACT6C,EAAMC,IAAIgC,cAC9BC,EAAO5B,EAAEC,KAAK,CAAC,OAAQ,sBAChBD,EAAEK,QAAQuB,6EAIhBrB,EAAcqB,kGAXD,GAsBTC,EAAiB,2BAAG,WAC/BxC,4FAGoBI,EAAoBJ,iBAAlCU,SAEA+B,EAAkB1C,EAAsB,CAAEC,KAAAA,aACbK,EAAMC,IAAImC,EAAiB,CAC5DC,QAAS,CACPC,OAAQ,4DACRC,wBAAyBlC,eAMmB,KAT1CmC,UASmBC,KAAKC,sCAC5BC,EAAInH,KAAK,mCAAoCmE,EAAKxC,0DAI7CmD,EAAEC,KAAK,CAAC,QAASiC,mGArBI,mCC7JS,2DADJ"} \ No newline at end of file diff --git a/node_modules/docker-hub-utils/dist/docker-hub-utils.esm.js b/node_modules/docker-hub-utils/dist/docker-hub-utils.esm.js deleted file mode 100644 index 9336494..0000000 --- a/node_modules/docker-hub-utils/dist/docker-hub-utils.esm.js +++ /dev/null @@ -1,1181 +0,0 @@ -import axios from 'axios'; -import camelcaseKeys from 'camelcase-keys'; -import { DateTime } from 'luxon'; -import R from 'ramda'; -import pino from 'pino'; - -/** - * Union type representing the architecture defined in part of an OCI image's - * manifest list. - * - * As specified in the Docker Manifest spec, any valid GOARCH values are valid - * image architecture values, and vice versa: - * > The platform object describes the platform which the image in the manifest - * > runs on. A full list of valid operating system and architecture values are - * > listed in the Go language documentation for $GOOS and $GOARCH - * @see https://docs.docker.com/registry/spec/manifest-v2-2/#manifest-list-field-descriptions - */ -var Architecture; - -(function (Architecture) { - Architecture["i386"] = "386"; - Architecture["amd64"] = "amd64"; - Architecture["arm"] = "arm"; - Architecture["arm64"] = "arm64"; - Architecture["mips"] = "mips"; - Architecture["mips64"] = "mips64"; - Architecture["mips64le"] = "mips64le"; - Architecture["mipsle"] = "mipsle"; - Architecture["ppc64"] = "ppc64"; - Architecture["ppc64le"] = "ppc64le"; - Architecture["s390x"] = "s390x"; - Architecture["wasm"] = "wasm"; -})(Architecture || (Architecture = {})); -/** - * Union type representing the OS defined in part of an OCI image's - * manifest list. - * See the docs for the `Architecture` type above for more info. - */ - - -var OS; - -(function (OS) { - OS["aix"] = "aix"; - OS["android"] = "android"; - OS["darwin"] = "darwin"; - OS["dragonfly"] = "dragonfly"; - OS["freebsd"] = "freebsd"; - OS["illumos"] = "illumos"; - OS["js"] = "js"; - OS["linux"] = "linux"; - OS["netbsd"] = "netbsd"; - OS["openbsd"] = "openbsd"; - OS["plan9"] = "plan9"; - OS["solaris"] = "solaris"; - OS["windows"] = "windows"; -})(OS || (OS = {})); - -var ManifestMediaType; - -(function (ManifestMediaType) { - ManifestMediaType["Manifest"] = "application/vnd.docker.distribution.manifest.v2+json"; - ManifestMediaType["ManifestList"] = "application/vnd.docker.distribution.manifest.list.v2+json"; -})(ManifestMediaType || (ManifestMediaType = {})); - -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - Promise.resolve(value).then(_next, _throw); - } -} - -function _asyncToGenerator(fn) { - return function () { - var self = this, - args = arguments; - return new Promise(function (resolve, reject) { - var gen = fn.apply(self, args); - - function _next(value) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); - } - - function _throw(err) { - asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); - } - - _next(undefined); - }); - }; -} - -function createCommonjsModule(fn, module) { - return module = { exports: {} }, fn(module, module.exports), module.exports; -} - -var runtime_1 = createCommonjsModule(function (module) { -/** - * Copyright (c) 2014-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -var runtime = (function (exports) { - - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined$1; // More compressible than void 0. - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - - function define(obj, key, value) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); - return obj[key]; - } - try { - // IE 8 has a broken Object.defineProperty that only works on DOM objects. - define({}, ""); - } catch (err) { - define = function(obj, key, value) { - return obj[key] = value; - }; - } - - function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); - - // The ._invoke method unifies the implementations of the .next, - // .throw, and .return methods. - generator._invoke = makeInvokeMethod(innerFn, self, context); - - return generator; - } - exports.wrap = wrap; - - // Try/catch helper to minimize deoptimizations. Returns a completion - // record like context.tryEntries[i].completion. This interface could - // have been (and was previously) designed to take a closure to be - // invoked without arguments, but in all the cases we care about we - // already have an existing method we want to call, so there's no need - // to create a new function object. We can even get away with assuming - // the method takes exactly one argument, since that happens to be true - // in every case, so we don't have to touch the arguments object. The - // only additional allocation required is the completion record, which - // has a stable shape and so hopefully should be cheap to allocate. - function tryCatch(fn, obj, arg) { - try { - return { type: "normal", arg: fn.call(obj, arg) }; - } catch (err) { - return { type: "throw", arg: err }; - } - } - - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; - - // Returning this object from the innerFn has the same effect as - // breaking out of the dispatch switch statement. - var ContinueSentinel = {}; - - // Dummy constructor functions that we use as the .constructor and - // .constructor.prototype properties for functions that return Generator - // objects. For full spec compliance, you may wish to configure your - // minifier not to mangle the names of these two functions. - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - - // This is a polyfill for %IteratorPrototype% for environments that - // don't natively support it. - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function () { - return this; - }; - - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && - NativeIteratorPrototype !== Op && - hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - // This environment has a native %IteratorPrototype%; use it instead - // of the polyfill. - IteratorPrototype = NativeIteratorPrototype; - } - - var Gp = GeneratorFunctionPrototype.prototype = - Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunction.displayName = define( - GeneratorFunctionPrototype, - toStringTagSymbol, - "GeneratorFunction" - ); - - // Helper for defining the .next, .throw, and .return methods of the - // Iterator interface in terms of a single ._invoke method. - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function(method) { - define(prototype, method, function(arg) { - return this._invoke(method, arg); - }); - }); - } - - exports.isGeneratorFunction = function(genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor - ? ctor === GeneratorFunction || - // For the native GeneratorFunction constructor, the best we can - // do is to check its .name property. - (ctor.displayName || ctor.name) === "GeneratorFunction" - : false; - }; - - exports.mark = function(genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - define(genFun, toStringTagSymbol, "GeneratorFunction"); - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - - // Within the body of any async function, `await x` is transformed to - // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `hasOwn.call(value, "__await")` to determine if the yielded value is - // meant to be awaited. - exports.awrap = function(arg) { - return { __await: arg }; - }; - - function AsyncIterator(generator, PromiseImpl) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && - typeof value === "object" && - hasOwn.call(value, "__await")) { - return PromiseImpl.resolve(value.__await).then(function(value) { - invoke("next", value, resolve, reject); - }, function(err) { - invoke("throw", err, resolve, reject); - }); - } - - return PromiseImpl.resolve(value).then(function(unwrapped) { - // When a yielded Promise is resolved, its final value becomes - // the .value of the Promise<{value,done}> result for the - // current iteration. - result.value = unwrapped; - resolve(result); - }, function(error) { - // If a rejected Promise was yielded, throw the rejection back - // into the async generator function so it can be handled there. - return invoke("throw", error, resolve, reject); - }); - } - } - - var previousPromise; - - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new PromiseImpl(function(resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } - - return previousPromise = - // If enqueue has been called before, then we want to wait until - // all previous Promises have been resolved before calling invoke, - // so that results are always delivered in the correct order. If - // enqueue has not been called before, then it is important to - // call invoke immediately, without waiting on a callback to fire, - // so that the async generator function has the opportunity to do - // any necessary setup in a predictable way. This predictability - // is why the Promise constructor synchronously invokes its - // executor callback, and why async functions synchronously - // execute code before the first await. Since we implement simple - // async functions in terms of async generators, it is especially - // important to get this right, even though it requires care. - previousPromise ? previousPromise.then( - callInvokeWithMethodAndArg, - // Avoid propagating failures to Promises returned by later - // invocations of the iterator. - callInvokeWithMethodAndArg - ) : callInvokeWithMethodAndArg(); - } - - // Define the unified helper method that is used to implement .next, - // .throw, and .return (see defineIteratorMethods). - this._invoke = enqueue; - } - - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; - exports.AsyncIterator = AsyncIterator; - - // Note that simple async functions are implemented on top of - // AsyncIterator objects; they just return a Promise for the value of - // the final result produced by the iterator. - exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) { - if (PromiseImpl === void 0) PromiseImpl = Promise; - - var iter = new AsyncIterator( - wrap(innerFn, outerFn, self, tryLocsList), - PromiseImpl - ); - - return exports.isGeneratorFunction(outerFn) - ? iter // If outerFn is a generator, return the full iterator. - : iter.next().then(function(result) { - return result.done ? result.value : iter.next(); - }); - }; - - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } - - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; - } - - // Be forgiving, per 25.3.3.3.3 of the spec: - // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume - return doneResult(); - } - - context.method = method; - context.arg = arg; - - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - - if (context.method === "next") { - // Setting context._sent for legacy support of Babel's - // function.sent implementation. - context.sent = context._sent = context.arg; - - } else if (context.method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } - - context.dispatchException(context.arg); - - } else if (context.method === "return") { - context.abrupt("return", context.arg); - } - - state = GenStateExecuting; - - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - // If an exception is thrown from innerFn, we leave state === - // GenStateExecuting and loop back for another invocation. - state = context.done - ? GenStateCompleted - : GenStateSuspendedYield; - - if (record.arg === ContinueSentinel) { - continue; - } - - return { - value: record.arg, - done: context.done - }; - - } else if (record.type === "throw") { - state = GenStateCompleted; - // Dispatch the exception by looping back around to the - // context.dispatchException(context.arg) call above. - context.method = "throw"; - context.arg = record.arg; - } - } - }; - } - - // Call delegate.iterator[context.method](context.arg) and handle the - // result, either by returning a { value, done } result from the - // delegate iterator, or by modifying context.method and context.arg, - // setting context.delegate to null, and returning the ContinueSentinel. - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined$1) { - // A .throw or .return when the delegate iterator has no .throw - // method always terminates the yield* loop. - context.delegate = null; - - if (context.method === "throw") { - // Note: ["return"] must be used for ES3 parsing compatibility. - if (delegate.iterator["return"]) { - // If the delegate iterator has a return method, give it a - // chance to clean up. - context.method = "return"; - context.arg = undefined$1; - maybeInvokeDelegate(delegate, context); - - if (context.method === "throw") { - // If maybeInvokeDelegate(context) changed context.method from - // "return" to "throw", let that override the TypeError below. - return ContinueSentinel; - } - } - - context.method = "throw"; - context.arg = new TypeError( - "The iterator does not provide a 'throw' method"); - } - - return ContinueSentinel; - } - - var record = tryCatch(method, delegate.iterator, context.arg); - - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - - var info = record.arg; - - if (! info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } - - if (info.done) { - // Assign the result of the finished delegate to the temporary - // variable specified by delegate.resultName (see delegateYield). - context[delegate.resultName] = info.value; - - // Resume execution at the desired location (see delegateYield). - context.next = delegate.nextLoc; - - // If context.method was "throw" but the delegate handled the - // exception, let the outer generator proceed normally. If - // context.method was "next", forget context.arg since it has been - // "consumed" by the delegate iterator. If context.method was - // "return", allow the original .return call to continue in the - // outer generator. - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined$1; - } - - } else { - // Re-yield the result returned by the delegate method. - return info; - } - - // The delegate iterator is finished, so forget it and continue with - // the outer generator. - context.delegate = null; - return ContinueSentinel; - } - - // Define Generator.prototype.{next,throw,return} in terms of the - // unified ._invoke helper method. - defineIteratorMethods(Gp); - - define(Gp, toStringTagSymbol, "Generator"); - - // A Generator should always return itself as the iterator object when the - // @@iterator function is called on it. Some browsers' implementations of the - // iterator prototype chain incorrectly implement this, causing the Generator - // object to not be returned from this call. This ensures that doesn't happen. - // See https://github.com/facebook/regenerator/issues/274 for more details. - Gp[iteratorSymbol] = function() { - return this; - }; - - Gp.toString = function() { - return "[object Generator]"; - }; - - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; - - if (1 in locs) { - entry.catchLoc = locs[1]; - } - - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - - this.tryEntries.push(entry); - } - - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - - function Context(tryLocsList) { - // The root entry object (effectively a try statement without a catch - // or a finally block) gives us a place to store values thrown from - // locations where there is no enclosing try statement. - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - - exports.keys = function(object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - - // Rather than returning an object with a next method, we keep - // things simple and return the next function itself. - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - - // To avoid creating an additional object, we just hang the .value - // and .done properties off the next function object itself. This - // also ensures that the minifier will not anonymize the function. - next.done = true; - return next; - }; - }; - - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - - if (typeof iterable.next === "function") { - return iterable; - } - - if (!isNaN(iterable.length)) { - var i = -1, next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - - next.value = undefined$1; - next.done = true; - - return next; - }; - - return next.next = next; - } - } - - // Return an iterator with no values. - return { next: doneResult }; - } - exports.values = values; - - function doneResult() { - return { value: undefined$1, done: true }; - } - - Context.prototype = { - constructor: Context, - - reset: function(skipTempReset) { - this.prev = 0; - this.next = 0; - // Resetting context._sent for legacy support of Babel's - // function.sent implementation. - this.sent = this._sent = undefined$1; - this.done = false; - this.delegate = null; - - this.method = "next"; - this.arg = undefined$1; - - this.tryEntries.forEach(resetTryEntry); - - if (!skipTempReset) { - for (var name in this) { - // Not sure about the optimal order of these conditions: - if (name.charAt(0) === "t" && - hasOwn.call(this, name) && - !isNaN(+name.slice(1))) { - this[name] = undefined$1; - } - } - } - }, - - stop: function() { - this.done = true; - - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - - return this.rval; - }, - - dispatchException: function(exception) { - if (this.done) { - throw exception; - } - - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - - if (caught) { - // If the dispatched exception was caught by a catch block, - // then let that catch block handle the exception normally. - context.method = "next"; - context.arg = undefined$1; - } - - return !! caught; - } - - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - - if (entry.tryLoc === "root") { - // Exception thrown outside of any try block that could handle - // it, so set the completion value of the entire function to - // throw the exception. - return handle("end"); - } - - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - - } else { - throw new Error("try statement without catch or finally"); - } - } - } - }, - - abrupt: function(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && - hasOwn.call(entry, "finallyLoc") && - this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - - if (finallyEntry && - (type === "break" || - type === "continue") && - finallyEntry.tryLoc <= arg && - arg <= finallyEntry.finallyLoc) { - // Ignore the finally entry if control is not jumping to a - // location outside the try/catch block. - finallyEntry = null; - } - - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - - return this.complete(record); - }, - - complete: function(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } - - if (record.type === "break" || - record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - - return ContinueSentinel; - }, - - finish: function(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - - "catch": function(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - - // The context.catch method must only be called with a location - // argument that corresponds to a known catch block. - throw new Error("illegal catch attempt"); - }, - - delegateYield: function(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - - if (this.method === "next") { - // Deliberately forget the last sent value so that we don't - // accidentally pass it on to the delegate. - this.arg = undefined$1; - } - - return ContinueSentinel; - } - }; - - // Regardless of whether this script is executing as a CommonJS module - // or not, return the runtime object so that we can declare the variable - // regeneratorRuntime in the outer scope, which allows this module to be - // injected easily by `bin/regenerator --include-runtime script.js`. - return exports; - -}( - // If this script is executing as a CommonJS module, use module.exports - // as the regeneratorRuntime namespace. Otherwise create a new empty - // object. Either way, the resulting object will be used to initialize - // the regeneratorRuntime variable at the top of this file. - module.exports -)); - -try { - regeneratorRuntime = runtime; -} catch (accidentalStrictMode) { - // This module should not be running in strict mode, so the above - // assignment should always work unless something is misconfigured. Just - // in case runtime.js accidentally runs in strict mode, we can escape - // strict mode using a global Function call. This could conceivably fail - // if a Content Security Policy forbids using Function, but in that case - // the proper solution is to fix the accidental strict mode problem. If - // you've misconfigured your bundler to force strict mode and applied a - // CSP to forbid Function, and you're not willing to fix either of those - // problems, please detail your unique predicament in a GitHub issue. - Function("r", "regeneratorRuntime = r")(runtime); -} -}); - -var log = /*#__PURE__*/ -pino({ - base: null, - useLevelLabels: true -}); - -var DOCKER_HUB_API_ROOT = 'https://hub.docker.com/v2/'; -var DOCKER_HUB_API_AUTH_URL = 'https://auth.docker.io/token'; - -/** - * Currently only supports fetching the manifest for the `latest` tag; in - * reality, we can pass any valid content digest[1] to retrieve the manifest(s) - * for that image. - * - * [1]: https://github.com/opencontainers/distribution-spec/blob/master/spec.md#content-digests - */ - -var createManifestListURL = function createManifestListURL(_ref) { - var repo = _ref.repo; - return "https://registry-1.docker.io/v2/" + repo.user + "/" + repo.name + "/manifests/latest"; -}; - -var createUserReposListURL = function createUserReposListURL(user) { - return DOCKER_HUB_API_ROOT + "repositories/" + user; -}; -/** - * The OCI distribution spec requires a unique token for each repo manifest queried. - */ - - -var fetchDockerHubToken = -/*#__PURE__*/ -function () { - var _ref2 = - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - runtime_1.mark(function _callee(repo) { - var name, user, tokenRequest, token; - return runtime_1.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - name = repo.name, user = repo.user; - _context.next = 3; - return axios.get(DOCKER_HUB_API_AUTH_URL, { - params: { - scope: "repository:" + user + "/" + name + ":pull", - service: 'registry.docker.io' - } - }); - - case 3: - tokenRequest = _context.sent; - token = R.path(['data', 'token'], tokenRequest); - - if (token) { - _context.next = 7; - break; - } - - throw new Error('Unable to retrieve auth token from registry.'); - - case 7: - return _context.abrupt("return", token); - - case 8: - case "end": - return _context.stop(); - } - } - }, _callee); - })); - - return function fetchDockerHubToken(_x) { - return _ref2.apply(this, arguments); - }; -}(); -/** - * Pure function that massages the Docker Hub API response into the - * format we want to return. e.g., only extracting certain fields; - * converting snake_case to camelCase, etc. - */ - -var extractRepositoryDetails = function extractRepositoryDetails(repos, lastUpdatedSince) { - if (!repos || R.isEmpty(repos)) { - return []; - } - - var parsedRepos = camelcaseKeys(repos); - - if (R.isNil(lastUpdatedSince)) { - return parsedRepos; - } - - return parsedRepos.filter(function (repo) { - return DateTime.fromISO(repo.lastUpdated) < lastUpdatedSince; - }); -}; -/** - * Query a single repository given a repo name and username. - * - * @param user The DockerHub username or org name to query for. - * @param name The DockerHub repo name -- restrict to this single repo. - */ - -var queryRepo = -/*#__PURE__*/ -function () { - var _ref4 = - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - runtime_1.mark(function _callee2(_ref3) { - var name, user, repoResult, repo; - return runtime_1.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - name = _ref3.name, user = _ref3.user; - _context2.next = 3; - return axios.request({ - url: DOCKER_HUB_API_ROOT + "repositories/" + user + "/" + name + "/" - }); - - case 3: - repoResult = _context2.sent; - repo = R.prop('data', repoResult); - - if (!(repoResult.status !== 200 || !repo || R.isEmpty(repo))) { - _context2.next = 7; - break; - } - - return _context2.abrupt("return"); - - case 7: - return _context2.abrupt("return", camelcaseKeys(repo)); - - case 8: - case "end": - return _context2.stop(); - } - } - }, _callee2); - })); - - return function queryRepo(_x2) { - return _ref4.apply(this, arguments); - }; -}(); -/** - * Top-level function for querying repositories. - * - * @TODO Rename to just `queryRepos`. - * - * @param user The DockerHub username or org name to query for. - * @param numRepos The number of repos to query (max 100). - * @param lastUpdatedSince Filter by the DateTime at which a repo was last updated. - */ - -var queryTopRepos = -/*#__PURE__*/ -function () { - var _ref6 = - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - runtime_1.mark(function _callee3(_ref5) { - var lastUpdatedSince, _ref5$numRepos, numRepos, user, listReposURL, repoResults, repos; - - return runtime_1.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - lastUpdatedSince = _ref5.lastUpdatedSince, _ref5$numRepos = _ref5.numRepos, numRepos = _ref5$numRepos === void 0 ? 100 : _ref5$numRepos, user = _ref5.user; - - if (!(numRepos > 100)) { - _context3.next = 3; - break; - } - - throw new RangeError('Number of repos to query cannot exceed 100.'); - - case 3: - listReposURL = createUserReposListURL(user); - _context3.next = 6; - return axios.get(listReposURL, { - params: { - page: 1, - page_size: numRepos - } - }); - - case 6: - repoResults = _context3.sent; - repos = R.path(['data', 'results'], repoResults); - return _context3.abrupt("return", extractRepositoryDetails(repos, lastUpdatedSince)); - - case 9: - case "end": - return _context3.stop(); - } - } - }, _callee3); - })); - - return function queryTopRepos(_x3) { - return _ref6.apply(this, arguments); - }; -}(); -/** - * Query image tags. - */ - -var queryTags = -/*#__PURE__*/ -function () { - var _ref7 = - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - runtime_1.mark(function _callee4(repo) { - var repoUrl, tagsUrl, tagsResults, tags; - return runtime_1.wrap(function _callee4$(_context4) { - while (1) { - switch (_context4.prev = _context4.next) { - case 0: - repoUrl = createUserReposListURL(repo.user); - tagsUrl = repoUrl + "/" + repo.name + "/tags?page_size=100"; - _context4.next = 4; - return axios.get(tagsUrl); - - case 4: - tagsResults = _context4.sent; - tags = R.path(['data', 'results'], tagsResults); - - if (!(!tags || R.isEmpty(tags))) { - _context4.next = 8; - break; - } - - return _context4.abrupt("return"); - - case 8: - return _context4.abrupt("return", camelcaseKeys(tags)); - - case 9: - case "end": - return _context4.stop(); - } - } - }, _callee4); - })); - - return function queryTags(_x4) { - return _ref7.apply(this, arguments); - }; -}(); -/** - * Queries the Docker Hub API to retrieve a "fat manifest", an object of - * `Content-Type` `application/vnd.docker.distribution.manifest.list.v2+json/`. - * Read up on the Manifest v2, Schema 2 Spec in more detail: - * @see https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md - * Or the shiny new OCI distribution spec which builds on it: - * @see https://github.com/opencontainers/distribution-spec/blob/f67bc11ba3a083a9c62f8fa53ad14c5bcf2116af/spec.md - */ - -var fetchManifestList = -/*#__PURE__*/ -function () { - var _ref8 = - /*#__PURE__*/ - _asyncToGenerator( - /*#__PURE__*/ - runtime_1.mark(function _callee5(repo) { - var token, manifestListURL, manifestListResponse; - return runtime_1.wrap(function _callee5$(_context5) { - while (1) { - switch (_context5.prev = _context5.next) { - case 0: - _context5.next = 2; - return fetchDockerHubToken(repo); - - case 2: - token = _context5.sent; - manifestListURL = createManifestListURL({ - repo: repo - }); - _context5.next = 6; - return axios.get(manifestListURL, { - headers: { - Accept: 'application/vnd.docker.distribution.manifest.list.v2+json', - Authorization: "Bearer " + token - } - }); - - case 6: - manifestListResponse = _context5.sent; - - if (!(manifestListResponse.data.schemaVersion === 1)) { - _context5.next = 10; - break; - } - - log.info('Schema version 1 is unsupported.', repo.name); - return _context5.abrupt("return"); - - case 10: - return _context5.abrupt("return", R.path(['data'], manifestListResponse)); - - case 11: - case "end": - return _context5.stop(); - } - } - }, _callee5); - })); - - return function fetchManifestList(_x5) { - return _ref8.apply(this, arguments); - }; -}(); - -export { Architecture, DOCKER_HUB_API_AUTH_URL, DOCKER_HUB_API_ROOT, ManifestMediaType, extractRepositoryDetails, fetchDockerHubToken, fetchManifestList, queryRepo, queryTags, queryTopRepos }; -//# sourceMappingURL=docker-hub-utils.esm.js.map diff --git a/node_modules/docker-hub-utils/dist/docker-hub-utils.esm.js.map b/node_modules/docker-hub-utils/dist/docker-hub-utils.esm.js.map deleted file mode 100644 index eabc3e8..0000000 --- a/node_modules/docker-hub-utils/dist/docker-hub-utils.esm.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"docker-hub-utils.esm.js","sources":["../src/types/DockerHubRepo.ts","../node_modules/regenerator-runtime/runtime.js","../src/utils/log.ts","../src/utils/constants.ts","../src/services/DockerHubAPI.ts"],"sourcesContent":["/**\n * This is a direct representation of what we get back from the `/repositories`\n * API call.\n */\nexport interface DockerHubAPIRepo {\n readonly can_edit: boolean\n readonly description: string\n readonly is_automated: boolean\n readonly is_migrated: boolean\n readonly is_private: boolean\n readonly last_updated: string\n readonly name: string\n readonly namespace: string\n readonly pull_count: number\n readonly repository_type: string\n readonly star_count: number\n readonly status: number\n readonly user: string\n}\n\n/**\n * Union type representing the architecture defined in part of an OCI image's\n * manifest list.\n *\n * As specified in the Docker Manifest spec, any valid GOARCH values are valid\n * image architecture values, and vice versa:\n * > The platform object describes the platform which the image in the manifest\n * > runs on. A full list of valid operating system and architecture values are\n * > listed in the Go language documentation for $GOOS and $GOARCH\n * @see https://docs.docker.com/registry/spec/manifest-v2-2/#manifest-list-field-descriptions\n */\nexport enum Architecture {\n i386 = '386',\n amd64 = 'amd64',\n arm = 'arm',\n arm64 = 'arm64',\n mips = 'mips',\n mips64 = 'mips64',\n mips64le = 'mips64le',\n mipsle = 'mipsle',\n ppc64 = 'ppc64',\n ppc64le = 'ppc64le',\n s390x = 's390x',\n wasm = 'wasm',\n}\n\n/**\n * Union type representing the OS defined in part of an OCI image's\n * manifest list.\n * See the docs for the `Architecture` type above for more info.\n */\nexport enum OS {\n aix = 'aix',\n android = 'android',\n darwin = 'darwin',\n dragonfly = 'dragonfly',\n freebsd = 'freebsd',\n illumos = 'illumos',\n js = 'js',\n linux = 'linux',\n netbsd = 'netbsd',\n openbsd = 'openbsd',\n plan9 = 'plan9',\n solaris = 'solaris',\n windows = 'windows',\n}\n\nexport enum ManifestMediaType {\n Manifest = 'application/vnd.docker.distribution.manifest.v2+json',\n ManifestList = 'application/vnd.docker.distribution.manifest.list.v2+json',\n}\n\n/**\n * Yes, there's *way* more information contained in the manifest / \"fat\"\n * manifestList than just architectures, but I find this to be the most\n * relevant section for my projects. PR's welcome.\n */\nexport interface DockerManifest {\n readonly digest: string\n readonly mediaType: ManifestMediaType\n readonly platform: Array<{\n architecture: Architecture\n os: OS\n }>\n readonly schemaVersion: 1 | 2 | number\n}\n\nexport interface DockerManifestList {\n readonly manifests: DockerManifest[]\n readonly mediaType: ManifestMediaType\n readonly schemaVersion: 1 | 2 | any\n}\n\nexport interface DockerHubRepo {\n // ========================\n // Main fields of interest\n // ========================\n readonly description: string | null | undefined\n readonly lastUpdated: string\n readonly name: string\n readonly pullCount: number\n readonly starCount: number\n readonly user: string\n\n // Manifest type *may* be nested within this interface, but is usually\n // fetched and returned separately.\n readonly manifestList?: DockerManifestList\n readonly tags?: Tag[]\n\n // =============================================\n // Other stuff that comes down through the API,\n // that some may find useful\n // =============================================\n readonly canEdit?: boolean\n readonly isAutomated?: boolean\n readonly isMigrated?: boolean\n readonly isPrivate?: boolean\n readonly namespace?: string\n readonly repositoryType?: string\n readonly status?: number\n}\n\nexport interface Tag {\n creator: number\n fullSize: number\n id: number\n images: TagElement[]\n lastUpdated: string\n lastUpdater: number\n lastUpdaterUsername: string\n name: string\n repository: number\n v2: boolean\n}\n\nexport interface TagElement {\n architecture: Architecture\n digest: string\n features: string\n os: OS\n size: number\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","import pino from 'pino'\n\nexport default pino({ base: null, useLevelLabels: true })\n","export const DOCKER_CLOUD_URL = 'https://cloud.docker.com/repository/docker/'\nexport const DOCKER_HUB_API_ROOT = 'https://hub.docker.com/v2/'\nexport const DOCKER_HUB_API_AUTH_URL = 'https://auth.docker.io/token'\n","import axios from 'axios'\nimport camelcaseKeys from 'camelcase-keys'\nimport { DateTime } from 'luxon'\nimport R from 'ramda'\nimport log from '../utils/log'\n\nimport {\n DockerHubAPIRepo,\n DockerHubRepo,\n DockerManifestList,\n Tag,\n} from '../types/DockerHubRepo'\nimport {\n DOCKER_HUB_API_AUTH_URL,\n DOCKER_HUB_API_ROOT,\n} from '../utils/constants'\n\n/**\n * Currently only supports fetching the manifest for the `latest` tag; in\n * reality, we can pass any valid content digest[1] to retrieve the manifest(s)\n * for that image.\n *\n * [1]: https://github.com/opencontainers/distribution-spec/blob/master/spec.md#content-digests\n */\nconst createManifestListURL = ({ repo }: { repo: DockerHubRepo }): string =>\n `https://registry-1.docker.io/v2/${repo.user}/${repo.name}/manifests/latest`\n\nconst createUserReposListURL = (user: string): string =>\n `${DOCKER_HUB_API_ROOT}repositories/${user}`\n\n/**\n * The OCI distribution spec requires a unique token for each repo manifest queried.\n */\nexport const fetchDockerHubToken = async (\n repo: DockerHubRepo,\n): Promise => {\n const { name, user } = repo\n const tokenRequest = await axios.get(DOCKER_HUB_API_AUTH_URL, {\n params: {\n scope: `repository:${user}/${name}:pull`,\n service: 'registry.docker.io',\n },\n })\n\n const token: string | undefined = R.path(['data', 'token'], tokenRequest)\n if (!token) {\n throw new Error('Unable to retrieve auth token from registry.')\n }\n return token\n}\n\n/**\n * Pure function that massages the Docker Hub API response into the\n * format we want to return. e.g., only extracting certain fields;\n * converting snake_case to camelCase, etc.\n */\nexport const extractRepositoryDetails = (\n repos: DockerHubAPIRepo[],\n lastUpdatedSince?: DateTime,\n): DockerHubRepo[] => {\n if (!repos || R.isEmpty(repos)) {\n return []\n }\n\n const parsedRepos: DockerHubRepo[] = (camelcaseKeys(\n repos,\n ) as unknown) as DockerHubRepo[]\n\n if (R.isNil(lastUpdatedSince)) {\n return parsedRepos\n }\n\n return parsedRepos.filter(\n repo => DateTime.fromISO(repo.lastUpdated) < lastUpdatedSince,\n )\n}\n\n/**\n * Query a single repository given a repo name and username.\n *\n * @param user The DockerHub username or org name to query for.\n * @param name The DockerHub repo name -- restrict to this single repo.\n */\nexport const queryRepo = async ({\n name,\n user,\n}: {\n name: string\n user: string\n}): Promise => {\n const repoResult = await axios.request({\n url: `${DOCKER_HUB_API_ROOT}repositories/${user}/${name}/`,\n })\n const repo: DockerHubRepo | undefined = R.prop('data', repoResult)\n if (repoResult.status !== 200 || !repo || R.isEmpty(repo)) {\n return\n }\n return (camelcaseKeys(repo) as unknown) as DockerHubRepo\n}\n\n/**\n * Top-level function for querying repositories.\n *\n * @TODO Rename to just `queryRepos`.\n *\n * @param user The DockerHub username or org name to query for.\n * @param numRepos The number of repos to query (max 100).\n * @param lastUpdatedSince Filter by the DateTime at which a repo was last updated.\n */\nexport const queryTopRepos = async ({\n lastUpdatedSince,\n numRepos = 100,\n user,\n}: {\n lastUpdatedSince?: DateTime\n numRepos?: number\n user: string\n}): Promise => {\n if (numRepos > 100) {\n throw new RangeError('Number of repos to query cannot exceed 100.')\n }\n\n const listReposURL = createUserReposListURL(user)\n const repoResults = await axios.get(listReposURL, {\n params: { page: 1, page_size: numRepos },\n })\n const repos: DockerHubAPIRepo[] = R.path(\n ['data', 'results'],\n repoResults,\n ) as DockerHubAPIRepo[]\n\n return extractRepositoryDetails(repos, lastUpdatedSince)\n}\n\n/**\n * Query image tags.\n */\nexport const queryTags = async (\n repo: DockerHubRepo,\n): Promise => {\n const repoUrl = createUserReposListURL(repo.user)\n const tagsUrl = `${repoUrl}/${repo.name}/tags?page_size=100`\n const tagsResults = await axios.get(tagsUrl)\n const tags = R.path(['data', 'results'], tagsResults)\n if (!tags || R.isEmpty(tags)) {\n return\n }\n // @ts-ignore\n return camelcaseKeys(tags)\n}\n\n/**\n * Queries the Docker Hub API to retrieve a \"fat manifest\", an object of\n * `Content-Type` `application/vnd.docker.distribution.manifest.list.v2+json/`.\n * Read up on the Manifest v2, Schema 2 Spec in more detail:\n * @see https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md\n * Or the shiny new OCI distribution spec which builds on it:\n * @see https://github.com/opencontainers/distribution-spec/blob/f67bc11ba3a083a9c62f8fa53ad14c5bcf2116af/spec.md\n */\nexport const fetchManifestList = async (\n repo: DockerHubRepo,\n): Promise => {\n // Docker Hub requires a unique token for each repo manifest queried.\n const token = await fetchDockerHubToken(repo)\n\n const manifestListURL = createManifestListURL({ repo })\n const manifestListResponse = await axios.get(manifestListURL, {\n headers: {\n Accept: 'application/vnd.docker.distribution.manifest.list.v2+json',\n Authorization: `Bearer ${token}`,\n },\n })\n // For now, just ignore legacy V1 schema manifests. They have an entirely\n // different response shape and it's not worth mucking up the schema to\n // support a legacy format.\n if (manifestListResponse.data.schemaVersion === 1) {\n log.info('Schema version 1 is unsupported.', repo.name)\n return\n }\n\n return R.path(['data'], manifestListResponse)\n}\n"],"names":["Architecture","OS","ManifestMediaType","undefined","pino","base","useLevelLabels","DOCKER_HUB_API_ROOT","DOCKER_HUB_API_AUTH_URL","createManifestListURL","repo","user","name","createUserReposListURL","fetchDockerHubToken","axios","get","params","scope","service","tokenRequest","token","R","path","Error","extractRepositoryDetails","repos","lastUpdatedSince","isEmpty","parsedRepos","camelcaseKeys","isNil","filter","DateTime","fromISO","lastUpdated","queryRepo","request","url","repoResult","prop","status","queryTopRepos","numRepos","RangeError","listReposURL","page","page_size","repoResults","queryTags","repoUrl","tagsUrl","tagsResults","tags","fetchManifestList","manifestListURL","headers","Accept","Authorization","manifestListResponse","data","schemaVersion","log","info"],"mappings":";;;;;;AAoBA;;;;;;;;;;;IAWYA;;AAAZ,WAAYA;AACVA,EAAAA,oBAAA,QAAA;AACAA,EAAAA,qBAAA,UAAA;AACAA,EAAAA,mBAAA,QAAA;AACAA,EAAAA,qBAAA,UAAA;AACAA,EAAAA,oBAAA,SAAA;AACAA,EAAAA,sBAAA,WAAA;AACAA,EAAAA,wBAAA,aAAA;AACAA,EAAAA,sBAAA,WAAA;AACAA,EAAAA,qBAAA,UAAA;AACAA,EAAAA,uBAAA,YAAA;AACAA,EAAAA,qBAAA,UAAA;AACAA,EAAAA,oBAAA,SAAA;AACD,CAbD,EAAYA,YAAY,KAAZA,YAAY,KAAA,CAAxB;AAeA;;;;;;;AAKA,IAAYC,EAAZ;;AAAA,WAAYA;AACVA,EAAAA,SAAA,QAAA;AACAA,EAA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ils/dist/index.d.ts deleted file mode 100644 index 9c5ed26..0000000 --- a/node_modules/docker-hub-utils/dist/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Architecture, DockerHubAPIRepo, DockerHubRepo, DockerManifest, DockerManifestList, ManifestMediaType, Tag } from './types/DockerHubRepo'; -import { extractRepositoryDetails, fetchDockerHubToken, fetchManifestList, queryRepo, queryTags, queryTopRepos } from './services/DockerHubAPI'; -import { DOCKER_HUB_API_AUTH_URL, DOCKER_HUB_API_ROOT } from './utils/constants'; -export { Architecture, DockerHubAPIRepo, DockerHubRepo, DockerManifest, DockerManifestList, ManifestMediaType, Tag, }; -export { extractRepositoryDetails, fetchDockerHubToken, fetchManifestList, queryRepo, queryTags, queryTopRepos, }; -export { DOCKER_HUB_API_ROOT, DOCKER_HUB_API_AUTH_URL }; diff --git a/node_modules/docker-hub-utils/dist/index.js b/node_modules/docker-hub-utils/dist/index.js deleted file mode 100644 index a54c906..0000000 --- a/node_modules/docker-hub-utils/dist/index.js +++ /dev/null @@ -1,8 +0,0 @@ - -'use strict' - -if (process.env.NODE_ENV === 'production') { - module.exports = require('./docker-hub-utils.cjs.production.min.js') -} else { - module.exports = require('./docker-hub-utils.cjs.development.js') -} diff --git a/node_modules/docker-hub-utils/dist/services/DockerHubAPI.d.ts b/node_modules/docker-hub-utils/dist/services/DockerHubAPI.d.ts deleted file mode 100644 index 64a0cfe..0000000 --- a/node_modules/docker-hub-utils/dist/services/DockerHubAPI.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { DateTime } from 'luxon'; -import { DockerHubAPIRepo, DockerHubRepo, DockerManifestList, Tag } from '../types/DockerHubRepo'; -/** - * The OCI distribution spec requires a unique token for each repo manifest queried. - */ -export declare const fetchDockerHubToken: (repo: DockerHubRepo) => Promise; -/** - * Pure function that massages the Docker Hub API response into the - * format we want to return. e.g., only extracting certain fields; - * converting snake_case to camelCase, etc. - */ -export declare const extractRepositoryDetails: (repos: DockerHubAPIRepo[], lastUpdatedSince?: DateTime | undefined) => DockerHubRepo[]; -/** - * Query a single repository given a repo name and username. - * - * @param user The DockerHub username or org name to query for. - * @param name The DockerHub repo name -- restrict to this single repo. - */ -export declare const queryRepo: ({ name, user, }: { - name: string; - user: string; -}) => Promise; -/** - * Top-level function for querying repositories. - * - * @TODO Rename to just `queryRepos`. - * - * @param user The DockerHub username or org name to query for. - * @param numRepos The number of repos to query (max 100). - * @param lastUpdatedSince Filter by the DateTime at which a repo was last updated. - */ -export declare const queryTopRepos: ({ lastUpdatedSince, numRepos, user, }: { - lastUpdatedSince?: DateTime | undefined; - numRepos?: number | undefined; - user: string; -}) => Promise; -/** - * Query image tags. - */ -export declare const queryTags: (repo: DockerHubRepo) => Promise; -/** - * Queries the Docker Hub API to retrieve a "fat manifest", an object of - * `Content-Type` `application/vnd.docker.distribution.manifest.list.v2+json/`. - * Read up on the Manifest v2, Schema 2 Spec in more detail: - * @see https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md - * Or the shiny new OCI distribution spec which builds on it: - * @see https://github.com/opencontainers/distribution-spec/blob/f67bc11ba3a083a9c62f8fa53ad14c5bcf2116af/spec.md - */ -export declare const fetchManifestList: (repo: DockerHubRepo) => Promise; diff --git a/node_modules/docker-hub-utils/dist/types/DockerHubRepo.d.ts b/node_modules/docker-hub-utils/dist/types/DockerHubRepo.d.ts deleted file mode 100644 index ea3f39b..0000000 --- a/node_modules/docker-hub-utils/dist/types/DockerHubRepo.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -/** - * This is a direct representation of what we get back from the `/repositories` - * API call. - */ -export interface DockerHubAPIRepo { - readonly can_edit: boolean; - readonly description: string; - readonly is_automated: boolean; - readonly is_migrated: boolean; - readonly is_private: boolean; - readonly last_updated: string; - readonly name: string; - readonly namespace: string; - readonly pull_count: number; - readonly repository_type: string; - readonly star_count: number; - readonly status: number; - readonly user: string; -} -/** - * Union type representing the architecture defined in part of an OCI image's - * manifest list. - * - * As specified in the Docker Manifest spec, any valid GOARCH values are valid - * image architecture values, and vice versa: - * > The platform object describes the platform which the image in the manifest - * > runs on. A full list of valid operating system and architecture values are - * > listed in the Go language documentation for $GOOS and $GOARCH - * @see https://docs.docker.com/registry/spec/manifest-v2-2/#manifest-list-field-descriptions - */ -export declare enum Architecture { - i386 = "386", - amd64 = "amd64", - arm = "arm", - arm64 = "arm64", - mips = "mips", - mips64 = "mips64", - mips64le = "mips64le", - mipsle = "mipsle", - ppc64 = "ppc64", - ppc64le = "ppc64le", - s390x = "s390x", - wasm = "wasm" -} -/** - * Union type representing the OS defined in part of an OCI image's - * manifest list. - * See the docs for the `Architecture` type above for more info. - */ -export declare enum OS { - aix = "aix", - android = "android", - darwin = "darwin", - dragonfly = "dragonfly", - freebsd = "freebsd", - illumos = "illumos", - js = "js", - linux = "linux", - netbsd = "netbsd", - openbsd = "openbsd", - plan9 = "plan9", - solaris = "solaris", - windows = "windows" -} -export declare enum ManifestMediaType { - Manifest = "application/vnd.docker.distribution.manifest.v2+json", - ManifestList = "application/vnd.docker.distribution.manifest.list.v2+json" -} -/** - * Yes, there's *way* more information contained in the manifest / "fat" - * manifestList than just architectures, but I find this to be the most - * relevant section for my projects. PR's welcome. - */ -export interface DockerManifest { - readonly digest: string; - readonly mediaType: ManifestMediaType; - readonly platform: Array<{ - architecture: Architecture; - os: OS; - }>; - readonly schemaVersion: 1 | 2 | number; -} -export interface DockerManifestList { - readonly manifests: DockerManifest[]; - readonly mediaType: ManifestMediaType; - readonly schemaVersion: 1 | 2 | any; -} -export interface DockerHubRepo { - readonly description: string | null | undefined; - readonly lastUpdated: string; - readonly name: string; - readonly pullCount: number; - readonly starCount: number; - readonly user: string; - readonly manifestList?: DockerManifestList; - readonly tags?: Tag[]; - readonly canEdit?: boolean; - readonly isAutomated?: boolean; - readonly isMigrated?: boolean; - readonly isPrivate?: boolean; - readonly namespace?: string; - readonly repositoryType?: string; - readonly status?: number; -} -export interface Tag { - creator: number; - fullSize: number; - id: number; - images: TagElement[]; - lastUpdated: string; - lastUpdater: number; - lastUpdaterUsername: string; - name: string; - repository: number; - v2: boolean; -} -export interface TagElement { - architecture: Architecture; - digest: string; - features: string; - os: OS; - size: number; -} diff --git a/node_modules/docker-hub-utils/dist/utils/constants.d.ts b/node_modules/docker-hub-utils/dist/utils/constants.d.ts deleted file mode 100644 index 2af7a97..0000000 --- a/node_modules/docker-hub-utils/dist/utils/constants.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const DOCKER_CLOUD_URL = "https://cloud.docker.com/repository/docker/"; -export declare const DOCKER_HUB_API_ROOT = "https://hub.docker.com/v2/"; -export declare const DOCKER_HUB_API_AUTH_URL = "https://auth.docker.io/token"; diff --git a/node_modules/docker-hub-utils/dist/utils/log.d.ts b/node_modules/docker-hub-utils/dist/utils/log.d.ts deleted file mode 100644 index 05398da..0000000 --- a/node_modules/docker-hub-utils/dist/utils/log.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import pino from 'pino'; -declare const _default: pino.Logger; -export default _default; diff --git a/node_modules/docker-hub-utils/package.json b/node_modules/docker-hub-utils/package.json deleted file mode 100644 index 71ab88e..0000000 --- a/node_modules/docker-hub-utils/package.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "_from": "docker-hub-utils@1.10.37", - "_id": "docker-hub-utils@1.10.37", - "_inBundle": false, - "_integrity": "sha512-hkqoB2RqWcvyJbNjTjGDAWW2YRaf6kmsUcPdoGcrj8rzf9r1/18cwx+4k26qPDVyC3iKI4S/8ZWa0mM1VnhUrg==", - "_location": "/docker-hub-utils", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "docker-hub-utils@1.10.37", - "name": "docker-hub-utils", - "escapedName": "docker-hub-utils", - "rawSpec": "1.10.37", - "saveSpec": null, - "fetchSpec": "1.10.37" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/docker-hub-utils/-/docker-hub-utils-1.10.37.tgz", - "_shasum": "2fc944510714a3558a25311ac838e5fbd99e75bf", - "_spec": "docker-hub-utils@1.10.37", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package", - "author": { - "name": "Jesse Stuart", - "email": "hi@jessestuart.com" - }, - "bugs": { - "url": "https://github.com/jessestuart/docker-hub-utils/issues" - }, - "bundleDependencies": false, - "dependencies": { - "axios": "0.21.0", - "camelcase-keys": "6.2.2", - "luxon": "1.25.0", - "pino": "5.17.0", - "ramda": "0.27.1" - }, - "deprecated": false, - "description": "Typescript / Node utilities for interacting with the Docker Hub API.", - "devDependencies": { - "@semantic-release/git": "9.0.0", - "@types/jest": "25.2.3", - "@types/luxon": "1.25.0", - "@types/node": "13.13.28", - "@types/pino": "5.20.0", - "@types/ramda": "0.27.30", - "@typescript-eslint/eslint-plugin": "2.34.0", - "@typescript-eslint/parser": "2.34.0", - "codecov": "3.8.0", - "concurrently": "5.3.0", - "eslint": "6.8.0", - "eslint-config-prettier": "6.14.0", - "eslint-plugin-import": "2.22.1", - "eslint-plugin-prettier": "3.1.4", - "husky": "4.3.0", - "jest": "25.5.4", - "jest-junit": "10.0.0", - "nodemon": "2.0.6", - "prettier": "1.19.1", - "pretty-quick": "2.0.2", - "semantic-release": "17.2.1", - "source-map-support": "0.5.19", - "ts-jest": "25.5.1", - "tsdx": "0.14.1", - "tslib": "1.14.1", - "tslint": "6.1.3", - "tslint-config-prettier": "1.18.0", - "typedoc": "0.19.2", - "typescript": "3.9.7" - }, - "files": [ - "dist" - ], - "homepage": "https://github.com/jessestuart/docker-hub-utils", - "husky": { - "hooks": { - "pre-commit": "pretty-quick --staged" - } - }, - "keywords": [ - "api", - "docker", - "docker-hub", - "typescript", - "utils", - "wrapper-api" - ], - "license": "MIT", - "main": "dist/index.js", - "module": "dist/docker-hub-utils.esm.js", - "name": "docker-hub-utils", - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git+https://github.com/jessestuart/docker-hub-utils.git" - }, - "scripts": { - "build": "tsdx build", - "ci": "JEST_JUNIT_OUTPUT=reports/junit/js-test-results.xml jest --ci --runInBand --coverage --reporters=default --reporters=jest-junit", - "docs": "typedoc --mode modules --out public", - "lint": "eslint --quiet src/ --ext ts,tsx", - "prepublishOnly": "yarn build", - "push": "yarn build && yalc push", - "rebuild": "rm -rf dist/* && yarn build", - "release": "yarn rebuild && semantic-release", - "start": "tsdx watch", - "test": "yarn jest --cache --coverage" - }, - "typings": "dist/index.d.ts", - "version": "1.10.37" -} diff --git a/node_modules/fast-redact/.travis.yml b/node_modules/fast-redact/.travis.yml deleted file mode 100644 index f8c1e83..0000000 --- a/node_modules/fast-redact/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -sudo: false -node_js: - - 6 - - 8 - - 10 - - 11 -script: - - npm run ci diff --git a/node_modules/fast-redact/LICENSE b/node_modules/fast-redact/LICENSE deleted file mode 100644 index e1c643e..0000000 --- a/node_modules/fast-redact/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2019-2020 David Mark Clements - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/node_modules/fast-redact/benchmark/index.js b/node_modules/fast-redact/benchmark/index.js deleted file mode 100644 index b599492..0000000 --- a/node_modules/fast-redact/benchmark/index.js +++ /dev/null @@ -1,207 +0,0 @@ -'use strict' -const bench = require('fastbench') -const fastRedact = require('..') - -const censorFn = (v) => v + '.' -const censorFnWithPath = (v, p) => v + '.' + p - -const noir = require('pino-noir')(['aa.b.c']) -const redactNoSerialize = fastRedact({ paths: ['ab.b.c'], serialize: false }) -const redactNoSerializeRestore = fastRedact({ paths: ['ac.b.c'], serialize: false }) -const noirWild = require('pino-noir')(['ad.b.*']) -const redactWildNoSerialize = fastRedact({ paths: ['ae.b.*'], serialize: false }) -const redactWildNoSerializeRestore = fastRedact({ paths: ['af.b.*'], serialize: false }) -const redactIntermediateWildNoSerialize = fastRedact({ paths: ['ag.*.c'], serialize: false }) -const redactIntermediateWildNoSerializeRestore = fastRedact({ paths: ['ah.*.c'], serialize: false }) -const noirJSONSerialize = require('pino-noir')(['aj.b.c']) // `ai` used in pure JSON test. -const redact = fastRedact({ paths: ['ak.b.c'] }) -const noirWildJSONSerialize = require('pino-noir')(['al.b.c']) -const redactWild = fastRedact({ paths: ['am.b.*'] }) -const redactIntermediateWild = fastRedact({ paths: ['an.*.c'] }) -const redactIntermediateWildMatchWildOutcome = fastRedact({ paths: ['ao.*.c', 'ao.*.b', 'ao.*.a'] }) -const redactStaticMatchWildOutcome = fastRedact({ paths: ['ap.b.c', 'ap.d.a', 'ap.d.b', 'ap.d.c'] }) -const noirCensorFunction = require('pino-noir')(['aq.b.*'], censorFn) -const redactCensorFunction = fastRedact({ paths: ['ar.b.*'], censor: censorFn, serialize: false }) -const redactIntermediateWildCensorFunction = fastRedact({ paths: ['as.*.c'], censor: censorFn, serialize: false }) -const redactCensorFunctionWithPath = fastRedact({ paths: ['at.d.b'], censor: censorFn, serialize: false }) -const redactWildCensorFunctionWithPath = fastRedact({ paths: ['au.d.*'], censor: censorFnWithPath, serialize: false }) -const redactIntermediateWildCensorFunctionWithPath = fastRedact({ paths: ['av.*.c'], censorFnWithPath, serialize: false }) - -const getObj = (outerKey) => ({ - [outerKey]: { - b: { - c: 's' - }, - d: { - a: 's', - b: 's', - c: 's' - } - } -}) - -const max = 500 - -var run = bench([ - function benchNoirV2 (cb) { - const obj = getObj('aa') - for (var i = 0; i < max; i++) { - noir.aa(obj.aa) - } - setImmediate(cb) - }, - function benchFastRedact (cb) { - const obj = getObj('ab') - for (var i = 0; i < max; i++) { - redactNoSerialize(obj) - } - setImmediate(cb) - }, - function benchFastRedactRestore (cb) { - const obj = getObj('ac') - for (var i = 0; i < max; i++) { - redactNoSerializeRestore(obj) - redactNoSerializeRestore.restore(obj) - } - setImmediate(cb) - }, - function benchNoirV2Wild (cb) { - const obj = getObj('ad') - for (var i = 0; i < max; i++) { - noirWild.ad(obj.ad) - } - setImmediate(cb) - }, - function benchFastRedactWild (cb) { - const obj = getObj('ae') - for (var i = 0; i < max; i++) { - redactWildNoSerialize(obj) - } - setImmediate(cb) - }, - function benchFastRedactWildRestore (cb) { - const obj = getObj('af') - for (var i = 0; i < max; i++) { - redactWildNoSerializeRestore(obj) - redactWildNoSerializeRestore.restore(obj) - } - setImmediate(cb) - }, - function benchFastRedactIntermediateWild (cb) { - const obj = getObj('ag') - for (var i = 0; i < max; i++) { - redactIntermediateWildNoSerialize(obj) - } - setImmediate(cb) - }, - function benchFastRedactIntermediateWildRestore (cb) { - const obj = getObj('ah') - for (var i = 0; i < max; i++) { - redactIntermediateWildNoSerializeRestore(obj) - redactIntermediateWildNoSerializeRestore.restore(obj) - } - setImmediate(cb) - }, - function benchJSONStringify (cb) { - const obj = getObj('ai') - for (var i = 0; i < max; i++) { - JSON.stringify(obj) - } - setImmediate(cb) - }, - function benchNoirV2Serialize (cb) { - const obj = getObj('aj') - for (var i = 0; i < max; i++) { - noirJSONSerialize.aj(obj.aj) - JSON.stringify(obj) - } - setImmediate(cb) - }, - function benchFastRedactSerialize (cb) { - const obj = getObj('ak') - for (var i = 0; i < max; i++) { - redact(obj) - } - setImmediate(cb) - }, - function benchNoirV2WildSerialize (cb) { - const obj = getObj('al') - for (var i = 0; i < max; i++) { - noirWildJSONSerialize.al(obj.al) - JSON.stringify(obj) - } - setImmediate(cb) - }, - function benchFastRedactWildSerialize (cb) { - const obj = getObj('am') - for (var i = 0; i < max; i++) { - redactWild(obj) - } - setImmediate(cb) - }, - function benchFastRedactIntermediateWildSerialize (cb) { - const obj = getObj('an') - for (var i = 0; i < max; i++) { - redactIntermediateWild(obj) - } - setImmediate(cb) - }, - function benchFastRedactIntermediateWildMatchWildOutcomeSerialize (cb) { - const obj = getObj('ao') - for (var i = 0; i < max; i++) { - redactIntermediateWildMatchWildOutcome(obj) - } - setImmediate(cb) - }, - function benchFastRedactStaticMatchWildOutcomeSerialize (cb) { - const obj = getObj('ap') - for (var i = 0; i < max; i++) { - redactStaticMatchWildOutcome(obj) - } - setImmediate(cb) - }, - function benchNoirV2CensorFunction (cb) { - const obj = getObj('aq') - for (var i = 0; i < max; i++) { - noirCensorFunction.aq(obj.aq) - } - setImmediate(cb) - }, - function benchFastRedactCensorFunction (cb) { - const obj = getObj('ar') - for (var i = 0; i < max; i++) { - redactCensorFunction(obj) - } - setImmediate(cb) - }, - function benchFastRedactCensorFunctionIntermediateWild (cb) { - const obj = getObj('as') - for (var i = 0; i < max; i++) { - redactIntermediateWildCensorFunction(obj) - } - setImmediate(cb) - }, - function benchFastRedactCensorFunctionWithPath (cb) { - const obj = getObj('at') - for (var i = 0; i < max; i++) { - redactCensorFunctionWithPath(obj) - } - setImmediate(cb) - }, - function benchFastRedactWildCensorFunctionWithPath (cb) { - const obj = getObj('au') - for (var i = 0; i < max; i++) { - redactWildCensorFunctionWithPath(obj) - } - setImmediate(cb) - }, - function benchFastRedactIntermediateWildCensorFunctionWithPath (cb) { - const obj = getObj('av') - for (var i = 0; i < max; i++) { - redactIntermediateWildCensorFunctionWithPath(obj) - } - setImmediate(cb) - } -], 500) - -run(run) diff --git a/node_modules/fast-redact/example/default-usage.js b/node_modules/fast-redact/example/default-usage.js deleted file mode 100644 index d74cfaf..0000000 --- a/node_modules/fast-redact/example/default-usage.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict' -const fastRedact = require('..') -const fauxRequest = { - headers: { - host: 'http://example.com', - cookie: `oh oh we don't want this exposed in logs in etc.`, - referer: `if we're cool maybe we'll even redact this` - } -} -const redact = fastRedact({ - paths: ['headers.cookie', 'headers.referer'] -}) - -console.log(redact(fauxRequest)) diff --git a/node_modules/fast-redact/example/intermediate-wildcard-array.js b/node_modules/fast-redact/example/intermediate-wildcard-array.js deleted file mode 100644 index 2b4e1f8..0000000 --- a/node_modules/fast-redact/example/intermediate-wildcard-array.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' -const fastRedact = require('..') -const redact = fastRedact({ paths: ['a[*].c.d'] }) -const obj = { - a: [ - { c: { d: 'hide me', e: 'leave me be' } }, - { c: { d: 'and me', f: 'I want to live' } }, - { c: { d: 'and also I', g: 'I want to run in a stream' } } - ] -} -console.log(redact(obj)) diff --git a/node_modules/fast-redact/example/serialize-false.js b/node_modules/fast-redact/example/serialize-false.js deleted file mode 100644 index 80d0a9a..0000000 --- a/node_modules/fast-redact/example/serialize-false.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' -const fastRedact = require('..') -const redact = fastRedact({ - paths: ['a'], - serialize: false -}) -const o = { a: 1, b: 2 } -console.log(redact(o) === o) -console.log(o) -console.log(redact.restore(o) === o) -console.log(o) diff --git a/node_modules/fast-redact/example/serialize-function.js b/node_modules/fast-redact/example/serialize-function.js deleted file mode 100644 index 2fc9fbd..0000000 --- a/node_modules/fast-redact/example/serialize-function.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict' -const fastRedact = require('..') -const redact = fastRedact({ paths: ['a'], serialize: (o) => JSON.stringify(o, 0, 2) }) -console.log(redact({ a: 1, b: 2 })) diff --git a/node_modules/fast-redact/example/top-wildcard-object.js b/node_modules/fast-redact/example/top-wildcard-object.js deleted file mode 100644 index 2c91895..0000000 --- a/node_modules/fast-redact/example/top-wildcard-object.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' -const fastRedact = require('..') -const redact = fastRedact({ paths: ['*.c.d'] }) -const obj = { - x: { c: { d: 'hide me', e: 'leave me be' } }, - y: { c: { d: 'and me', f: 'I want to live' } }, - z: { c: { d: 'and also I', g: 'I want to run in a stream' } } -} -console.log(redact(obj)) diff --git a/node_modules/fast-redact/index.js b/node_modules/fast-redact/index.js deleted file mode 100644 index 9a13ac2..0000000 --- a/node_modules/fast-redact/index.js +++ /dev/null @@ -1,56 +0,0 @@ -'use strict' - -const validator = require('./lib/validator') -const parse = require('./lib/parse') -const redactor = require('./lib/redactor') -const restorer = require('./lib/restorer') -const { groupRedact, nestedRedact } = require('./lib/modifiers') -const state = require('./lib/state') -const rx = require('./lib/rx') -const validate = validator() -const noop = (o) => o -noop.restore = noop - -const DEFAULT_CENSOR = '[REDACTED]' -fastRedact.rx = rx -fastRedact.validator = validator - -module.exports = fastRedact - -function fastRedact (opts = {}) { - const paths = Array.from(new Set(opts.paths || [])) - const serialize = 'serialize' in opts ? ( - opts.serialize === false ? opts.serialize - : (typeof opts.serialize === 'function' ? opts.serialize : JSON.stringify) - ) : JSON.stringify - const remove = opts.remove - if (remove === true && serialize !== JSON.stringify) { - throw Error('fast-redact – remove option may only be set when serializer is JSON.stringify') - } - const censor = remove === true - ? undefined - : 'censor' in opts ? opts.censor : DEFAULT_CENSOR - - const isCensorFct = typeof censor === 'function' - const censorFctTakesPath = isCensorFct && censor.length > 1 - - if (paths.length === 0) return serialize || noop - - validate({ paths, serialize, censor }) - - const { wildcards, wcLen, secret } = parse({ paths, censor }) - - const compileRestore = restorer({ secret, wcLen }) - const strict = 'strict' in opts ? opts.strict : true - - return redactor({ secret, wcLen, serialize, strict, isCensorFct, censorFctTakesPath }, state({ - secret, - censor, - compileRestore, - serialize, - groupRedact, - nestedRedact, - wildcards, - wcLen - })) -} diff --git a/node_modules/fast-redact/lib/modifiers.js b/node_modules/fast-redact/lib/modifiers.js deleted file mode 100644 index 42c16f7..0000000 --- a/node_modules/fast-redact/lib/modifiers.js +++ /dev/null @@ -1,113 +0,0 @@ -'use strict' - -module.exports = { - groupRedact, - groupRestore, - nestedRedact, - nestedRestore -} - -function groupRestore ({ keys, values, target }) { - if (target == null) return - const length = keys.length - for (var i = 0; i < length; i++) { - const k = keys[i] - target[k] = values[i] - } -} - -function groupRedact (o, path, censor, isCensorFct, censorFctTakesPath) { - const target = get(o, path) - if (target == null) return { keys: null, values: null, target: null, flat: true } - const keys = Object.keys(target) - const keysLength = keys.length - const pathLength = path.length - const pathWithKey = censorFctTakesPath ? [...path] : undefined - const values = new Array(keysLength) - - for (var i = 0; i < keysLength; i++) { - const key = keys[i] - values[i] = target[key] - - if (censorFctTakesPath) { - pathWithKey[pathLength] = key - target[key] = censor(target[key], pathWithKey) - } else if (isCensorFct) { - target[key] = censor(target[key]) - } else { - target[key] = censor - } - } - return { keys, values, target, flat: true } -} - -function nestedRestore (arr) { - const length = arr.length - for (var i = 0; i < length; i++) { - const { key, target, value } = arr[i] - target[key] = value - } -} - -function nestedRedact (store, o, path, ns, censor, isCensorFct, censorFctTakesPath) { - const target = get(o, path) - if (target == null) return - const keys = Object.keys(target) - const keysLength = keys.length - for (var i = 0; i < keysLength; i++) { - const key = keys[i] - const { value, parent, exists } = - specialSet(target, key, path, ns, censor, isCensorFct, censorFctTakesPath) - - if (exists === true && parent !== null) { - store.push({ key: ns[ns.length - 1], target: parent, value }) - } - } - return store -} - -function has (obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop) -} - -function specialSet (o, k, path, afterPath, censor, isCensorFct, censorFctTakesPath) { - const afterPathLen = afterPath.length - const lastPathIndex = afterPathLen - 1 - const originalKey = k - var i = -1 - var n - var nv - var ov - var oov = null - var exists = true - ov = n = o[k] - if (typeof n !== 'object') return { value: null, parent: null, exists } - while (n != null && ++i < afterPathLen) { - k = afterPath[i] - oov = ov - if (!(k in n)) { - exists = false - break - } - ov = n[k] - nv = (i !== lastPathIndex) - ? ov - : (isCensorFct - ? (censorFctTakesPath ? censor(ov, [...path, originalKey, ...afterPath]) : censor(ov)) - : censor) - n[k] = (has(n, k) && nv === ov) || (nv === undefined && censor !== undefined) ? n[k] : nv - n = n[k] - if (typeof n !== 'object') break - } - return { value: ov, parent: oov, exists } -} - -function get (o, p) { - var i = -1 - var l = p.length - var n = o - while (n != null && ++i < l) { - n = n[p[i]] - } - return n -} diff --git a/node_modules/fast-redact/lib/parse.js b/node_modules/fast-redact/lib/parse.js deleted file mode 100644 index ccbd980..0000000 --- a/node_modules/fast-redact/lib/parse.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict' - -const rx = require('./rx') - -module.exports = parse - -function parse ({ paths }) { - const wildcards = [] - var wcLen = 0 - const secret = paths.reduce(function (o, strPath, ix) { - var path = strPath.match(rx).map((p) => p.replace(/'|"|`/g, '')) - const leadingBracket = strPath[0] === '[' - path = path.map((p) => { - if (p[0] === '[') return p.substr(1, p.length - 2) - else return p - }) - const star = path.indexOf('*') - if (star > -1) { - const before = path.slice(0, star) - const beforeStr = before.join('.') - const after = path.slice(star + 1, path.length) - if (after.indexOf('*') > -1) throw Error('fast-redact – Only one wildcard per path is supported') - const nested = after.length > 0 - wcLen++ - wildcards.push({ - before, - beforeStr, - after, - nested - }) - } else { - o[strPath] = { - path: path, - val: undefined, - precensored: false, - circle: '', - escPath: JSON.stringify(strPath), - leadingBracket: leadingBracket - } - } - return o - }, {}) - - return { wildcards, wcLen, secret } -} diff --git a/node_modules/fast-redact/lib/redactor.js b/node_modules/fast-redact/lib/redactor.js deleted file mode 100644 index af58885..0000000 --- a/node_modules/fast-redact/lib/redactor.js +++ /dev/null @@ -1,99 +0,0 @@ -'use strict' - -const rx = require('./rx') - -module.exports = redactor - -function redactor ({ secret, serialize, wcLen, strict, isCensorFct, censorFctTakesPath }, state) { - /* eslint-disable-next-line */ - const redact = Function('o', ` - if (typeof o !== 'object' || o == null) { - ${strictImpl(strict, serialize)} - } - const { censor, secret } = this - ${redactTmpl(secret, isCensorFct, censorFctTakesPath)} - this.compileRestore() - ${dynamicRedactTmpl(wcLen > 0, isCensorFct, censorFctTakesPath)} - ${resultTmpl(serialize)} - `).bind(state) - - if (serialize === false) { - redact.restore = (o) => state.restore(o) - } - - return redact -} - -function redactTmpl (secret, isCensorFct, censorFctTakesPath) { - return Object.keys(secret).map((path) => { - const { escPath, leadingBracket, path: arrPath } = secret[path] - const skip = leadingBracket ? 1 : 0 - const delim = leadingBracket ? '' : '.' - const hops = [] - var match - while ((match = rx.exec(path)) !== null) { - const [ , ix ] = match - const { index, input } = match - if (index > skip) hops.push(input.substring(0, index - (ix ? 0 : 1))) - } - var existence = hops.map((p) => `o${delim}${p}`).join(' && ') - if (existence.length === 0) existence += `o${delim}${path} != null` - else existence += ` && o${delim}${path} != null` - - const circularDetection = ` - switch (true) { - ${hops.reverse().map((p) => ` - case o${delim}${p} === censor: - secret[${escPath}].circle = ${JSON.stringify(p)} - break - `).join('\n')} - } - ` - - const censorArgs = censorFctTakesPath - ? `val, ${JSON.stringify(arrPath)}` - : `val` - - return ` - if (${existence}) { - const val = o${delim}${path} - if (val === censor) { - secret[${escPath}].precensored = true - } else { - secret[${escPath}].val = val - o${delim}${path} = ${isCensorFct ? `censor(${censorArgs})` : 'censor'} - ${circularDetection} - } - } - ` - }).join('\n') -} - -function dynamicRedactTmpl (hasWildcards, isCensorFct, censorFctTakesPath) { - return hasWildcards === true ? ` - { - const { wildcards, wcLen, groupRedact, nestedRedact } = this - for (var i = 0; i < wcLen; i++) { - const { before, beforeStr, after, nested } = wildcards[i] - if (nested === true) { - secret[beforeStr] = secret[beforeStr] || [] - nestedRedact(secret[beforeStr], o, before, after, censor, ${isCensorFct}, ${censorFctTakesPath}) - } else secret[beforeStr] = groupRedact(o, before, censor, ${isCensorFct}, ${censorFctTakesPath}) - } - } - ` : '' -} - -function resultTmpl (serialize) { - return serialize === false ? `return o` : ` - var s = this.serialize(o) - this.restore(o) - return s - ` -} - -function strictImpl (strict, serialize) { - return strict === true - ? `throw Error('fast-redact: primitives cannot be redacted')` - : serialize === false ? `return o` : `return this.serialize(o)` -} diff --git a/node_modules/fast-redact/lib/restorer.js b/node_modules/fast-redact/lib/restorer.js deleted file mode 100644 index 5871a9c..0000000 --- a/node_modules/fast-redact/lib/restorer.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict' - -const { groupRestore, nestedRestore } = require('./modifiers') - -module.exports = restorer - -function restorer ({ secret, wcLen }) { - return function compileRestore () { - if (this.restore) return - const paths = Object.keys(secret) - .filter((path) => secret[path].precensored === false) - const resetters = resetTmpl(secret, paths) - const hasWildcards = wcLen > 0 - const state = hasWildcards ? { secret, groupRestore, nestedRestore } : { secret } - /* eslint-disable-next-line */ - this.restore = Function( - 'o', - restoreTmpl(resetters, paths, hasWildcards) - ).bind(state) - } -} - -/** - * Mutates the original object to be censored by restoring its original values - * prior to censoring. - * - * @param {object} secret Compiled object describing which target fields should - * be censored and the field states. - * @param {string[]} paths The list of paths to censor as provided at - * initialization time. - * - * @returns {string} String of JavaScript to be used by `Function()`. The - * string compiles to the function that does the work in the description. - */ -function resetTmpl (secret, paths) { - return paths.map((path) => { - const { circle, escPath, leadingBracket } = secret[path] - const delim = leadingBracket ? '' : '.' - const reset = circle - ? `o.${circle} = secret[${escPath}].val` - : `o${delim}${path} = secret[${escPath}].val` - const clear = `secret[${escPath}].val = undefined` - return ` - if (secret[${escPath}].val !== undefined) { - try { ${reset} } catch (e) {} - ${clear} - } - ` - }).join('') -} - -function restoreTmpl (resetters, paths, hasWildcards) { - const dynamicReset = hasWildcards === true ? ` - const keys = Object.keys(secret) - const len = keys.length - for (var i = ${paths.length}; i < len; i++) { - const k = keys[i] - const o = secret[k] - if (o.flat === true) this.groupRestore(o) - else this.nestedRestore(o) - secret[k] = null - } - ` : '' - - return ` - const secret = this.secret - ${resetters} - ${dynamicReset} - return o - ` -} diff --git a/node_modules/fast-redact/lib/rx.js b/node_modules/fast-redact/lib/rx.js deleted file mode 100644 index b25be27..0000000 --- a/node_modules/fast-redact/lib/rx.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' - -module.exports = /[^.[\]]+|\[((?:.)*?)\]/g - -/* -Regular expression explanation: - -Alt 1: /[^.[\]]+/ - Match one or more characters that are *not* a dot (.) - opening square bracket ([) or closing square bracket (]) - -Alt 2: /\[((?:.)*?)\]/ - If the char IS dot or square bracket, then create a capture - group (which will be capture group $1) that matches anything - within square brackets. Expansion is lazy so it will - stop matching as soon as the first closing bracket is met `]` - (rather than continuing to match until the final closing bracket). -*/ diff --git a/node_modules/fast-redact/lib/state.js b/node_modules/fast-redact/lib/state.js deleted file mode 100644 index eb36065..0000000 --- a/node_modules/fast-redact/lib/state.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict' - -module.exports = state - -function state (o) { - const { - secret, - censor, - compileRestore, - serialize, - groupRedact, - nestedRedact, - wildcards, - wcLen - } = o - const builder = [{ secret, censor, compileRestore }] - if (serialize !== false) builder.push({ serialize }) - if (wcLen > 0) builder.push({ groupRedact, nestedRedact, wildcards, wcLen }) - return Object.assign(...builder) -} diff --git a/node_modules/fast-redact/lib/validator.js b/node_modules/fast-redact/lib/validator.js deleted file mode 100644 index 024ac91..0000000 --- a/node_modules/fast-redact/lib/validator.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict' - -const { createContext, runInContext } = require('vm') - -module.exports = validator - -function validator (opts = {}) { - const { - ERR_PATHS_MUST_BE_STRINGS = () => 'fast-redact - Paths must be (non-empty) strings', - ERR_INVALID_PATH = (s) => `fast-redact – Invalid path (${s})` - } = opts - - return function validate ({ paths }) { - paths.forEach((s) => { - if (typeof s !== 'string') { - throw Error(ERR_PATHS_MUST_BE_STRINGS()) - } - try { - if (/〇/.test(s)) throw Error() - const proxy = new Proxy({}, { get: () => proxy, set: () => { throw Error() } }) - const expr = (s[0] === '[' ? '' : '.') + s.replace(/^\*/, '〇').replace(/\.\*/g, '.〇').replace(/\[\*\]/g, '[〇]') - if (/\n|\r|;/.test(expr)) throw Error() - if (/\/\*/.test(expr)) throw Error() - runInContext(` - (function () { - 'use strict' - o${expr} - if ([o${expr}].length !== 1) throw Error() - })() - `, createContext({ o: proxy, 〇: null }), { - codeGeneration: { strings: false, wasm: false } - }) - } catch (e) { - throw Error(ERR_INVALID_PATH(s)) - } - }) - } -} diff --git a/node_modules/fast-redact/package.json b/node_modules/fast-redact/package.json deleted file mode 100644 index a88b565..0000000 --- a/node_modules/fast-redact/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "fast-redact@^2.0.0", - "_id": "fast-redact@2.1.0", - "_inBundle": false, - "_integrity": "sha512-0LkHpTLyadJavq9sRzzyqIoMZemWli77K2/MGOkafrR64B9ItrvZ9aT+jluvNDsv0YEHjSNhlMBtbokuoqii4A==", - "_location": "/fast-redact", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fast-redact@^2.0.0", - "name": "fast-redact", - "escapedName": "fast-redact", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "/pino" - ], - "_resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-2.1.0.tgz", - "_shasum": "dfe3c1ca69367fb226f110aa4ec10ec85462ffdf", - "_spec": "fast-redact@^2.0.0", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/pino", - "author": { - "name": "David Mark Clements", - "email": "david.clements@nearform.com" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/fast-redact/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "very fast object redaction", - "devDependencies": { - "fastbench": "^1.0.1", - "pino-noir": "^2.2.1", - "snazzy": "^8.0.0", - "standard": "^12.0.1", - "tap": "^12.5.2" - }, - "directories": { - "example": "example", - "lib": "lib", - "test": "test" - }, - "engines": { - "node": ">=6" - }, - "homepage": "https://github.com/davidmarkclements/fast-redact#readme", - "keywords": [ - "redact", - "censor", - "performance", - "performant", - "gdpr", - "fast", - "speed", - "serialize", - "stringify" - ], - "license": "MIT", - "main": "index.js", - "name": "fast-redact", - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/fast-redact.git" - }, - "scripts": { - "bench": "node benchmark", - "ci": "tap --cov --100 test", - "cov": "tap --cov test", - "cov-ui": "tap --coverage-report=html test", - "posttest": "standard index.js 'lib/*.js' 'example/*.js' benchmark/index.js test/index.js | snazzy", - "test": "tap test" - }, - "version": "2.1.0" -} diff --git a/node_modules/fast-redact/readme.md b/node_modules/fast-redact/readme.md deleted file mode 100644 index cb116bd..0000000 --- a/node_modules/fast-redact/readme.md +++ /dev/null @@ -1,280 +0,0 @@ -# fast-redact - -very fast object redaction - -[![Build Status](https://travis-ci.org/davidmarkclements/fast-redact.svg?branch=master)](https://travis-ci.org/davidmarkclements/fast-redact) - -## Default Usage - -By default, `fast-redact` serializes an object with `JSON.stringify`, censoring any -data at paths specified: - -```js -const fastRedact = require('fast-redact') -const fauxRequest = { - headers: { - host: 'http://example.com', - cookie: `oh oh we don't want this exposed in logs in etc.`, - referer: `if we're cool maybe we'll even redact this` - } -} -const redact = fastRedact({ - paths: ['headers.cookie', 'headers.referer'] -}) - -console.log(redact(fauxRequest)) -// {"headers":{"host":"http://example.com","cookie":"[REDACTED]","referer":"[REDACTED]"}} -``` - -## API - -### `require('fast-redact')({paths, censor, serialize}) => Function` - -When called without any options, or with a zero length `paths` array, -`fast-redact` will return `JSON.stringify` or the `serialize` option, if set. - -#### `paths` – `Array` - -An array of strings describing the nested location of a key in an object. - -The syntax follows that of the EcmaScript specification, that is any JavaScript -path is accepted – both bracket and dot notation is supported. For instance in -each of the following cases, the `c` property will be redacted: `a.b.c`,`a['b'].c`, -`a["b"].c`, `a[``b``].c`. Since bracket notation is supported, array indices are also -supported `a[0].b` would redact the `b` key in the first object of the `a` array. - -Leading brackets are also allowed, for instance `["a"].b.c` will work. - -##### Wildcards - -In addition to static paths, asterisk wildcards are also supported. - -When an asterisk is place in the final position it will redact all keys within the -parent object. For instance `a.b.*` will redact all keys in the `b` object. Similarly -for arrays `a.b[*]` will redact all elements of an array (in truth it actually doesn't matter -whether `b` is in an object or array in either case, both notation styles will work). - -When an asterisk is in an intermediate or first position, the paths following the asterisk will -be redacted for every object within the parent. - -For example: - -```js -const fastRedact = require('fast-redact') -const redact = fastRedact({paths: ['*.c.d']}) -const obj = { - x: {c: {d: 'hide me', e: 'leave me be'}}, - y: {c: {d: 'and me', f: 'I want to live'}}, - z: {c: {d: 'and also I', g: 'I want to run in a stream'}} -} -console.log(redact(obj)) -// {"x":{"c":{"d":"[REDACTED]","e":"leave me be"}},"y":{"c":{"d":"[REDACTED]","f":"I want to live"}},"z":{"c":{"d":"[REDACTED]","g":"I want to run in a stream"}}} -``` - -Another example with a nested array: - -```js -const fastRedact = require('..') -const redact = fastRedact({paths: ['a[*].c.d']}) -const obj = { - a: [ - {c: {d: 'hide me', e: 'leave me be'}}, - {c: {d: 'and me', f: 'I want to live'}}, - {c: {d: 'and also I', g: 'I want to run in a stream'}} - ] -} -console.log(redact(obj)) -// {"a":[{"c":{"d":"[REDACTED]","e":"leave me be"}},{"c":{"d":"[REDACTED]","f":"I want to live"}},{"c":{"d":"[REDACTED]","g":"I want to run in a stream"}}]} -``` - -#### `remove` - `Boolean` - `[false]` - -The `remove` option, when set to `true` will cause keys to be removed from the -serialized output. - -Since the implementation exploits the fact that `undefined` keys are ignored -by `JSON.stringify` the `remove` option may *only* be used when `JSON.stringify` -is the serializer (this is the default) – otherwise `fast-redact` will throw. - -If supplying a custom serializer that has the same behavior (removing keys -with `undefined` values), this restriction can be bypassed by explicitly setting -the `censor` to `undefined`. - - -#### `censor` – `` – `('[REDACTED]')` - -This is the value which overwrites redacted properties. - -Setting `censor` to `undefined` will cause properties to removed as long as this is -the behavior of the `serializer` – which defaults to `JSON.stringify`, which does -remove `undefined` properties. - -Setting `censor` to a function will cause `fast-redact` to invoke it with the original -value. The output of the `censor` function sets the redacted value. -Please note that asynchronous functions are not supported. - -#### `serialize` – `Function | Boolean` – `(JSON.stringify)` - -The `serialize` option may either be a function or a boolean. If a function is supplied, this -will be used to `serialize` the redacted object. It's important to understand that for -performance reasons `fast-redact` *mutates* the original object, then serializes, then -restores the original values. So the object passed to the serializer is the exact same -object passed to the redacting function. - -The `serialize` option as a function example: - -```js -const fastRedact = require('fast-redact') -const redact = fastRedact({ - paths: ['a'], - serialize: (o) => JSON.stringify(o, 0, 2) -}) -console.log(redact({a: 1, b: 2})) -// { -// "a": "[REDACTED]", -// "b": 2 -// } -``` - -For advanced usage the `serialize` option can be set to `false`. When `serialize` is set to `false`, -instead of the serialized object, the output of the redactor function will be the mutated object -itself (this is the exact same as the object passed in). In addition a `restore` method is supplied -on the redactor function allowing the redacted keys to be restored with the original data. - -```js -const fastRedact = require('fast-redact') -const redact = fastRedact({ - paths: ['a'], - serialize: false -}) -const o = {a: 1, b: 2} -console.log(redact(o) === o) // true -console.log(o) // { a: '[REDACTED]', b: 2 } -console.log(redact.restore(o) === o) // true -console.log(o) // { a: 1, b: 2 } -``` - -#### `strict` – `Boolean` - `[true]` -The `strict` option, when set to `true`, will cause the redactor function to throw if instead -of an object it finds a primitive. When `strict` is set to `false`, the redactor function -will treat the primitive value as having already been redacted, and return it serialized (with -`JSON.stringify` or the user's custom `serialize` function), or as-is if the `serialize` option -was set to false. - -## Approach - -In order to achieve lowest cost/highest performance redaction `fast-redact` -creates and compiles a function (using the `Function` constructor) on initialization. -It's important to distinguish this from the dangers of a runtime eval, no user input -is involved in creating the string that compiles into the function. This is as safe -as writing code normally and having it compiled by V8 in the usual way. - -Thanks to changes in V8 in recent years, state can be injected into compiled functions -using `bind` at very low cost (whereas `bind` used to be expensive, and getting state -into a compiled function by any means was difficult without a performance penalty). - -For static paths, this function simply checks that the path exists and then overwrites -with the censor. Wildcard paths are processed with normal functions that iterate over -the object redacting values as necessary. - -It's important to note, that the original object is mutated – for performance reasons -a copy is not made. See [rfdc](https://github.com/davidmarkclements/rfdc) (Really Fast -Deep Clone) for the fastest known way to clone – it's not nearly close enough in speed -to editing the original object, serializing and then restoring values. - -A `restore` function is also created and compiled to put the original state back on -to the object after redaction. This means that in the default usage case, the operation -is essentially atomic - the object is mutated, serialized and restored internally which -avoids any state management issues. - -## Caveat - -As mentioned in approach, the `paths` array input is dynamically compiled into a function -at initialization time. While the `paths` array is vigourously tested for any developer -errors, it's strongly recommended against allowing user input to directly supply any -paths to redact. It can't be guaranteed that allowing user input for `paths` couldn't -feasibly expose an attack vector. - -## Benchmarks - -The fastest known predecessor to `fast-redact` is the non-generic [`pino-noir`](http://npm.im/pino-noir) -library (which was also written by myself). - -In the direct calling case, `fast-redact` is ~30x faster than `pino-noir`, however a more realistic -comparison is overhead on `JSON.stringify`. - -For a static redaction case (no wildcards) `pino-noir` adds ~25% overhead on top of `JSON.stringify` -whereas `fast-redact` adds ~1% overhead. - -In the basic last-position wildcard case,`fast-redact` is ~12% faster than `pino-noir`. - -The `pino-noir` module does not support intermediate wildcards, but `fast-redact` does, -the cost of an intermediate wildcard that results in two keys over two nested objects -being redacted is about 25% overhead on `JSON.stringify`. The cost of an intermediate -wildcard that results in four keys across two objects being redacted is about 55% overhead -on `JSON.stringify` and ~50% more expensive that explicitly declaring the keys. - -```sh -npm run bench -``` - -``` -benchNoirV2*500: 59.108ms -benchFastRedact*500: 2.483ms -benchFastRedactRestore*500: 10.904ms -benchNoirV2Wild*500: 91.399ms -benchFastRedactWild*500: 21.200ms -benchFastRedactWildRestore*500: 27.304ms -benchFastRedactIntermediateWild*500: 92.304ms -benchFastRedactIntermediateWildRestore*500: 107.047ms -benchJSONStringify*500: 210.573ms -benchNoirV2Serialize*500: 281.148ms -benchFastRedactSerialize*500: 215.845ms -benchNoirV2WildSerialize*500: 281.168ms -benchFastRedactWildSerialize*500: 247.140ms -benchFastRedactIntermediateWildSerialize*500: 333.722ms -benchFastRedactIntermediateWildMatchWildOutcomeSerialize*500: 463.667ms -benchFastRedactStaticMatchWildOutcomeSerialize*500: 239.293ms -``` - -## Tests - -``` -npm test -``` - -``` - 224 passing (499.544ms) -``` - -### Coverage - -``` -npm run cov -``` - -``` ------------------|----------|----------|----------|----------|-------------------| -File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | ------------------|----------|----------|----------|----------|-------------------| -All files | 100 | 100 | 100 | 100 | | - fast-redact | 100 | 100 | 100 | 100 | | - index.js | 100 | 100 | 100 | 100 | | - fast-redact/lib | 100 | 100 | 100 | 100 | | - modifiers.js | 100 | 100 | 100 | 100 | | - parse.js | 100 | 100 | 100 | 100 | | - redactor.js | 100 | 100 | 100 | 100 | | - restorer.js | 100 | 100 | 100 | 100 | | - rx.js | 100 | 100 | 100 | 100 | | - state.js | 100 | 100 | 100 | 100 | | - validator.js | 100 | 100 | 100 | 100 | | ------------------|----------|----------|----------|----------|-------------------| -``` - -## License - -MIT - -## Acknowledgements - -Sponsored by [nearForm](http://www.nearform.com) diff --git a/node_modules/fast-redact/test/index.js b/node_modules/fast-redact/test/index.js deleted file mode 100644 index 2747924..0000000 --- a/node_modules/fast-redact/test/index.js +++ /dev/null @@ -1,1031 +0,0 @@ -'use strict' - -const { test } = require('tap') -const fastRedact = require('..') - -const censor = '[REDACTED]' -const censorFct = value => !value ? value : 'xxx' + value.substr(-2) -const censorWithPath = (v, p) => p.join('.') + ' ' + censorFct(v) - -test('returns no-op when passed no paths [serialize: false]', ({ end, doesNotThrow }) => { - const redact = fastRedact({ paths: [], serialize: false }) - doesNotThrow(() => redact({})) - doesNotThrow(() => { - const o = redact({}) - redact.restore(o) - }) - end() -}) - -test('returns serializer when passed no paths [serialize: default]', ({ end, is }) => { - is(fastRedact({ paths: [] }), JSON.stringify) - is(fastRedact(), JSON.stringify) - end() -}) - -test('throws when passed non-object using defaults', ({ end, throws }) => { - const redact = fastRedact({ paths: ['a.b.c'] }) - throws(() => redact(1)) - end() -}) - -test('throws when passed non-object number using [strict: true]', ({ end, throws }) => { - const redact = fastRedact({ paths: ['a.b.c'], strict: true }) - throws(() => redact(1)) - end() -}) - -test('returns JSON.stringified value when passed non-object using [strict: false] and no serialize option', ({ end, is, doesNotThrow }) => { - const redactDefaultSerialize = fastRedact({ paths: ['a.b.c'], strict: false }) - - // expectedOutputs holds `JSON.stringify`ied versions of each primitive. - // We write them out explicitly though to make the test a bit clearer. - const primitives = [null, undefined, 'A', 1, false] - const expectedOutputs = ['null', undefined, '"A"', '1', 'false'] - - primitives.forEach((it, i) => { - doesNotThrow(() => redactDefaultSerialize(it)) - const res = redactDefaultSerialize(it) - is(res, expectedOutputs[i]) - }) - - end() -}) - -test('returns custom serialized value when passed non-object using [strict: false, serialize: fn]', ({ end, is, doesNotThrow }) => { - const customSerialize = (v) => `Hello ${v}!` - const redactCustomSerialize = fastRedact({ - paths: ['a.b.c'], - strict: false, - serialize: customSerialize - }) - - const primitives = [null, undefined, 'A', 1, false] - - primitives.forEach((it) => { - doesNotThrow(() => redactCustomSerialize(it)) - const res = redactCustomSerialize(it) - is(res, customSerialize(it)) - }) - - end() -}) - -test('returns original value when passed non-object using [strict: false, serialize: false]', ({ end, is, doesNotThrow }) => { - const redactSerializeFalse = fastRedact({ - paths: ['a.b.c'], - strict: false, - serialize: false - }) - - const primitives = [null, undefined, 'A', 1, false] - - primitives.forEach((it) => { - doesNotThrow(() => redactSerializeFalse(it)) - const res = redactSerializeFalse(it) - is(res, it) - }) - - end() -}) - -test('throws if a path is not a string', ({ end, throws }) => { - const invalidTypeMsg = 'fast-redact - Paths must be (non-empty) strings' - throws((e) => { - fastRedact({ paths: [1] }) - }, Error(invalidTypeMsg)) - throws((e) => { - fastRedact({ paths: [null] }) - }, Error(invalidTypeMsg)) - throws((e) => { - fastRedact({ paths: [undefined] }) - }, Error(invalidTypeMsg)) - throws((e) => { - fastRedact({ paths: [{}] }) - }, Error(invalidTypeMsg)) - throws((e) => { - fastRedact({ paths: [[null]] }) - }, Error(invalidTypeMsg)) - end() -}) - -test('throws when passed illegal paths', ({ end, throws }) => { - const err = (s) => Error(`fast-redact – Invalid path (${s})`) - throws((e) => { - fastRedact({ paths: ['@'] }) - }, err('@')) - throws((e) => { - fastRedact({ paths: ['0'] }) - }, err('0')) - throws((e) => { - fastRedact({ paths: ['〇'] }) - }, err('〇')) - throws((e) => { - fastRedact({ paths: ['a.1.c'] }) - }, err('a.1.c')) - throws((e) => { - fastRedact({ paths: ['a..c'] }) - }, err('a..c')) - throws((e) => { - fastRedact({ paths: ['1..c'] }) - }, err('1..c')) - throws((e) => { - fastRedact({ paths: ['a = b'] }) - }, err('a = b')) - throws((e) => { - fastRedact({ paths: ['a(b)'] }) - }, err('a(b)')) - throws((e) => { - fastRedact({ paths: ['//a.b.c'] }) - }, err('//a.b.c')) - throws((e) => { - fastRedact({ paths: ['\\a.b.c'] }) - }, err('\\a.b.c')) - throws((e) => { - fastRedact({ paths: ['a.#.c'] }) - }, err('a.#.c')) - throws((e) => { - fastRedact({ paths: ['~~a.b.c'] }) - }, err('~~a.b.c')) - throws((e) => { - fastRedact({ paths: ['^a.b.c'] }) - }, err('^a.b.c')) - throws((e) => { - fastRedact({ paths: ['a + b'] }) - }, err('a + b')) - throws((e) => { - fastRedact({ paths: ['return a + b'] }) - }, err('return a + b')) - throws((e) => { - fastRedact({ paths: ['a / b'] }) - }, err('a / b')) - throws((e) => { - fastRedact({ paths: ['a * b'] }) - }, err('a * b')) - throws((e) => { - fastRedact({ paths: ['a - b'] }) - }, err('a - b')) - throws((e) => { - fastRedact({ paths: ['a ** b'] }) - }, err('a ** b')) - throws((e) => { - fastRedact({ paths: ['a % b'] }) - }, err('a % b')) - throws((e) => { - fastRedact({ paths: ['a.b*.c'] }) - }, err('a.b*.c')) - throws((e) => { - fastRedact({ paths: ['a;global.foo = "bar"'] }) - }, err('a;global.foo = "bar"')) - throws((e) => { - fastRedact({ paths: ['a;while(1){}'] }) - }, err('a;while(1){}')) - throws((e) => { - fastRedact({ paths: ['a//'] }) - }, err('a//')) - throws((e) => { - fastRedact({ paths: ['a/*foo*/'] }) - }, err('a/*foo*/')) - throws((e) => { - fastRedact({ paths: ['a,o.b'] }) - }, err('a,o.b')) - throws((e) => { - fastRedact({ paths: ['a = o.b'] }) - }, err('a = o.b')) - throws((e) => { - fastRedact({ paths: ['a\n'] }) - }, err('a\n')) - throws((e) => { - fastRedact({ paths: ['a\r'] }) - }, err('a\r')) - throws((e) => { - fastRedact({ paths: [''] }) - }, err('')) - throws((e) => { - fastRedact({ paths: ['[""""]'] }) - }, err('[""""]')) - end() -}) - -test('throws if more than one wildcard in a path', ({ end, throws }) => { - throws(() => { - fastRedact({ paths: ['a.*.x.*'], serialize: false }) - }, Error('fast-redact – Only one wildcard per path is supported')) - end() -}) - -test('throws if a custom serializer is used and remove is true', ({ end, throws }) => { - throws(() => { - fastRedact({ paths: ['a'], serialize: (o) => o, remove: true }) - }, Error('fast-redact – remove option may only be set when serializer is JSON.stringify')) - end() -}) - -test('throws if serialize is false and remove is true', ({ end, throws }) => { - throws(() => { - fastRedact({ paths: ['a'], serialize: false, remove: true }) - }, Error('fast-redact – remove option may only be set when serializer is JSON.stringify')) - end() -}) - -test('supports path segments that aren\'t identifiers if bracketed', ({ end, strictSame }) => { - const redactSerializeFalse = fastRedact({ - paths: ['a[""]', 'a["x-y"]', 'a[\'"y"\']', "a['\\'x\\'']"], - serialize: false, - censor: 'X' - }) - - const res = redactSerializeFalse({ a: { '': 'Hi!', 'x-y': 'Hi!', '"y"': 'Hi!', "'x'": 'Hi!' } }) - strictSame(res, { a: { '': 'X', 'x-y': 'X', '"y"': 'X', "'x'": 'X' } }) - end() -}) - -test('supports consecutive bracketed path segments', ({ end, strictSame }) => { - const redactSerializeFalse = fastRedact({ - paths: ['a[""]["y"]'], - serialize: false, - censor: 'X' - }) - - const res = redactSerializeFalse({ a: { '': { 'y': 'Hi!' } } }) - strictSame(res, { a: { '': { 'y': 'X' } } }) - end() -}) - -test('supports leading bracketed widcard', ({ end, strictSame }) => { - const redactSerializeFalse = fastRedact({ - paths: ['[*]["y"]'], - serialize: false, - censor: 'X' - }) - - const res = redactSerializeFalse({ 'x': { 'y': 'Hi!' } }) - strictSame(res, { 'x': { 'y': 'X' } }) - end() -}) - -test('masks according to supplied censor', ({ end, is }) => { - const censor = 'test' - const redact = fastRedact({ paths: ['a'], censor, serialize: false }) - is(redact({ a: 'a' }).a, censor) - end() -}) - -test('redact.restore function is available when serialize is false', ({ end, is }) => { - const censor = 'test' - const redact = fastRedact({ paths: ['a'], censor, serialize: false }) - is(typeof redact.restore, 'function') - end() -}) - -test('redact.restore function places original values back in place', ({ end, is }) => { - const censor = 'test' - const redact = fastRedact({ paths: ['a'], censor, serialize: false }) - const o = { a: 'a' } - redact(o) - is(o.a, censor) - redact.restore(o) - is(o.a, 'a') - end() -}) - -test('masks according to supplied censor function', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], censor: censorFct, serialize: false }) - is(redact({ a: '0123456' }).a, 'xxx56') - end() -}) - -test('masks according to supplied censor function with wildcards', ({ end, is }) => { - const redact = fastRedact({ paths: '*', censor: censorFct, serialize: false }) - is(redact({ a: '0123456' }).a, 'xxx56') - end() -}) - -test('masks according to supplied censor function with nested wildcards', ({ end, is }) => { - const redact = fastRedact({ paths: ['*.b'], censor: censorFct, serialize: false }) - is(redact({ a: { b: '0123456' } }).a.b, 'xxx56') - is(redact({ c: { b: '0123456', d: 'pristine' } }).c.b, 'xxx56') - is(redact({ c: { b: '0123456', d: 'pristine' } }).c.d, 'pristine') - end() -}) - -test('masks according to supplied censor-with-path function', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], censor: censorWithPath, serialize: false }) - is(redact({ a: '0123456' }).a, 'a xxx56') - end() -}) - -test('masks according to supplied censor-with-path function with wildcards', ({ end, is }) => { - const redact = fastRedact({ paths: '*', censor: censorWithPath, serialize: false }) - is(redact({ a: '0123456' }).a, 'a xxx56') - end() -}) - -test('masks according to supplied censor-with-path function with nested wildcards', ({ end, is }) => { - const redact = fastRedact({ paths: ['*.b'], censor: censorWithPath, serialize: false }) - is(redact({ a: { b: '0123456' } }).a.b, 'a.b xxx56') - is(redact({ c: { b: '0123456', d: 'pristine' } }).c.b, 'c.b xxx56') - is(redact({ c: { b: '0123456', d: 'pristine' } }).c.d, 'pristine') - end() -}) - -test('redact.restore function places original values back in place with censor function', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], censor: censorFct, serialize: false }) - const o = { a: 'qwerty' } - redact(o) - is(o.a, 'xxxty') - redact.restore(o) - is(o.a, 'qwerty') - end() -}) - -test('serializes with JSON.stringify by default', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'] }) - const o = { a: 'a' } - is(redact(o), `{"a":"${censor}"}`) - is(o.a, 'a') - end() -}) - -test('removes during serialization instead of redacting when remove option is true', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], remove: true }) - const o = { a: 'a', b: 'b' } - is(redact(o), `{"b":"b"}`) - is(o.a, 'a') - end() -}) - -test('serializes with JSON.stringify if serialize is true', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], serialize: true }) - const o = { a: 'a' } - is(redact(o), `{"a":"${censor}"}`) - is(o.a, 'a') - end() -}) - -test('serializes with JSON.stringify if serialize is not a function', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], serialize: {} }) - const o = { a: 'a' } - is(redact(o), `{"a":"${censor}"}`) - is(o.a, 'a') - end() -}) - -test('serializes with custom serializer if supplied', ({ end, is }) => { - const redact = fastRedact({ paths: ['a'], serialize: (o) => JSON.stringify(o, 0, 2) }) - const o = { a: 'a' } - is(redact(o), `{\n "a": "${censor}"\n}`) - is(o.a, 'a') - end() -}) - -test('redacts parent keys', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - end() -}) - -test('supports paths with array indexes', ({ end, same }) => { - const redact = fastRedact({ paths: ['insideArray.like[3].this'], serialize: false }) - same(redact({ insideArray: { like: ['a', 'b', 'c', { this: { foo: 'meow' } }] } }), { insideArray: { like: ['a', 'b', 'c', { this: censor }] } }) - end() -}) - -test('censor may be any type, including function', ({ end, same }) => { - const redactToString = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: 'censor', serialize: false }) - const redactToUndefined = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: undefined, serialize: false }) - const sym = Symbol('sym') - const redactToSymbol = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: sym, serialize: false }) - const redactToNumber = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: 0, serialize: false }) - const redactToBoolean = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: false, serialize: false }) - const redactToNull = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: null, serialize: false }) - const redactToObject = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: { redacted: true }, serialize: false }) - const redactToArray = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: ['redacted'], serialize: false }) - const redactToBuffer = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: Buffer.from('redacted'), serialize: false }) - const redactToError = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: Error('redacted'), serialize: false }) - const redactToFunction = fastRedact({ paths: ['a.b.c', 'a.b.d.*'], censor: () => 'redacted', serialize: false }) - same(redactToString({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: 'censor', d: { x: 'censor', y: 'censor' } } } }) - same(redactToUndefined({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: undefined, d: { x: undefined, y: undefined } } } }) - same(redactToSymbol({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: sym, d: { x: sym, y: sym } } } }) - same(redactToNumber({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: 0, d: { x: 0, y: 0 } } } }) - same(redactToBoolean({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: false, d: { x: false, y: false } } } }) - same(redactToNull({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: null, d: { x: null, y: null } } } }) - same(redactToObject({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: { redacted: true }, d: { x: { redacted: true }, y: { redacted: true } } } } }) - same(redactToArray({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: ['redacted'], d: { x: ['redacted'], y: ['redacted'] } } } }) - same(redactToBuffer({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: Buffer.from('redacted'), d: { x: Buffer.from('redacted'), y: Buffer.from('redacted') } } } }) - same(redactToError({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: Error('redacted'), d: { x: Error('redacted'), y: Error('redacted') } } } }) - same(redactToFunction({ a: { b: { c: 's', d: { x: 's', y: 's' } } } }), { a: { b: { c: 'redacted', d: { x: 'redacted', y: 'redacted' } } } }) - end() -}) - -test('supports multiple paths from the same root', ({ end, same }) => { - const redact = fastRedact({ paths: ['deep.bar.shoe', 'deep.baz.shoe', 'deep.foo', 'deep.not.there.sooo', 'deep.fum.shoe'], serialize: false }) - same(redact({ deep: { bar: 'hmm', baz: { shoe: { k: 1 } }, foo: {}, fum: { shoe: 'moo' } } }), { deep: { bar: 'hmm', baz: { shoe: censor }, foo: censor, fum: { shoe: censor } } }) - end() -}) - -test('supports strings in bracket notation paths (single quote)', ({ end, is }) => { - const redact = fastRedact({ paths: [`a['@#!='].c`], serialize: false }) - const result = redact({ a: { '@#!=': { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a['@#!='].c, censor) - end() -}) - -test('supports strings in bracket notation paths (double quote)', ({ end, is }) => { - const redact = fastRedact({ paths: [`a["@#!="].c`], serialize: false }) - const result = redact({ a: { '@#!=': { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a['@#!='].c, censor) - end() -}) - -test('supports strings in bracket notation paths (backtick quote)', ({ end, is }) => { - const redact = fastRedact({ paths: ['a[`@#!=`].c'], serialize: false }) - const result = redact({ a: { '@#!=': { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a['@#!='].c, censor) - end() -}) - -test('allows * within a bracket notation string', ({ end, is }) => { - const redact = fastRedact({ paths: ['a["*"].c'], serialize: false }) - const result = redact({ a: { '*': { c: 's', x: 1 } } }) - is(result.a['*'].c, censor) - is(result.a['*'].x, 1) - end() -}) - -test('redacts parent keys – restore', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - redact.restore(result) - is(result.a.b.c, 's') - end() -}) - -test('handles null proto objects', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c'], serialize: false }) - const result = redact({ __proto__: null, a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - end() -}) - -test('handles null proto objects – restore', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c'], serialize: false }) - const result = redact({ __proto__: null, a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - redact.restore(result, 's') - is(result.a.b.c, 's') - end() -}) - -test('handles paths that do not match object structure', ({ end, same }) => { - const redact = fastRedact({ paths: ['x.y.z'], serialize: false }) - same(redact({ a: { b: { c: 's' } } }), { a: { b: { c: 's' } } }) - end() -}) - -test('ignores missing paths in object', ({ end, same }) => { - const redact = fastRedact({ paths: ['a.b.c', 'a.z.d', 'a.b.z'], serialize: false }) - same(redact({ a: { b: { c: 's' } } }), { a: { b: { c: censor } } }) - end() -}) - -test('ignores missing paths in object – restore', ({ end, doesNotThrow }) => { - const redact = fastRedact({ paths: ['a.b.c', 'a.z.d', 'a.b.z'], serialize: false }) - const o = { a: { b: { c: 's' } } } - redact(o) - doesNotThrow(() => { - redact.restore(o) - }) - - end() -}) - -test('gracefully handles primitives that match intermediate keys in paths', ({ end, same }) => { - const redact = fastRedact({ paths: ['a.b.c', 'a.b.c.d'], serialize: false }) - same(redact({ a: { b: null } }), { a: { b: null } }) - same(redact({ a: { b: 's' } }), { a: { b: 's' } }) - same(redact({ a: { b: 1 } }), { a: { b: 1 } }) - same(redact({ a: { b: undefined } }), { a: { b: undefined } }) - same(redact({ a: { b: true } }), { a: { b: true } }) - const sym = Symbol('sym') - same(redact({ a: { b: sym } }), { a: { b: sym } }) - end() -}) - -test('handles circulars', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.baz'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar } - bar.baz = bar - o.bar.baz = o.bar - same(redact(o), { a: 1, bar: { b: 2, baz: censor } }) - end() -}) - -test('handles circulars – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.baz'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar } - bar.baz = bar - o.bar.baz = o.bar - is(o.bar.baz, bar) - redact(o) - is(o.bar.baz, censor) - redact.restore(o) - is(o.bar.baz, bar) - end() -}) - -test('handles circulars and cross references – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.baz', 'cf.bar'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar, cf: { bar } } - bar.baz = bar - o.bar.baz = o.bar - is(o.bar.baz, bar) - is(o.cf.bar, bar) - redact(o) - is(o.bar.baz, censor) - is(o.cf.bar, censor) - redact.restore(o) - is(o.bar.baz, bar) - is(o.cf.bar, bar) - end() -}) - -test('ultimate wildcards – shallow', ({ end, same }) => { - const redact = fastRedact({ paths: ['test.*'], serialize: false }) - same(redact({ test: { baz: 1, bar: 'private' } }), { test: { baz: censor, bar: censor } }) - end() -}) - -test('ultimate wildcards – deep', ({ end, same }) => { - const redact = fastRedact({ paths: ['deep.bar.baz.ding.*'], serialize: false }) - same(redact({ deep: { a: 1, bar: { b: 2, baz: { c: 3, ding: { d: 4, e: 5, f: 'six' } } } } }), { deep: { a: 1, bar: { b: 2, baz: { c: 3, ding: { d: censor, e: censor, f: censor } } } } }) - end() -}) - -test('ultimate wildcards - array – shallow', ({ end, same }) => { - const redact = fastRedact({ paths: ['array[*]'], serialize: false }) - same(redact({ array: ['a', 'b', 'c', 'd'] }), { array: [censor, censor, censor, censor] }) - end() -}) - -test('ultimate wildcards – array – deep', ({ end, same }) => { - const redact = fastRedact({ paths: ['deepArray.down.here[*]'], serialize: false }) - same(redact({ deepArray: { down: { here: ['a', 'b', 'c'] } } }), { deepArray: { down: { here: [censor, censor, censor] } } }) - end() -}) - -test('ultimate wildcards – array – single index', ({ end, same }) => { - const redact = fastRedact({ paths: ['insideArray.like[3].this.*'], serialize: false }) - same(redact({ insideArray: { like: ['a', 'b', 'c', { this: { foo: 'meow' } }] } }), { insideArray: { like: ['a', 'b', 'c', { this: { foo: censor } }] } }) - end() -}) - -test('ultimate wildcards - handles null proto objects', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c'], serialize: false }) - const result = redact({ __proto__: null, a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - end() -}) - -test('ultimate wildcards - handles paths that do not match object structure', ({ end, same }) => { - const redact = fastRedact({ paths: ['x.y.z'], serialize: false }) - same(redact({ a: { b: { c: 's' } } }), { a: { b: { c: 's' } } }) - end() -}) - -test('ultimate wildcards - gracefully handles primitives that match intermediate keys in paths', ({ end, same }) => { - const redact = fastRedact({ paths: ['a.b.c', 'a.b.c.d'], serialize: false }) - same(redact({ a: { b: null } }), { a: { b: null } }) - same(redact({ a: { b: 's' } }), { a: { b: 's' } }) - same(redact({ a: { b: 1 } }), { a: { b: 1 } }) - same(redact({ a: { b: undefined } }), { a: { b: undefined } }) - same(redact({ a: { b: true } }), { a: { b: true } }) - const sym = Symbol('sym') - same(redact({ a: { b: sym } }), { a: { b: sym } }) - end() -}) - -test('ultimate wildcards – handles circulars', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.*'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar } - bar.baz = bar - o.bar.baz = o.bar - same(redact(o), { a: 1, bar: { b: censor, baz: censor } }) - end() -}) - -test('ultimate wildcards – handles circulars – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.*'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar } - bar.baz = bar - o.bar.baz = o.bar - is(o.bar.baz, bar) - redact(o) - is(o.bar.baz, censor) - redact.restore(o) - is(o.bar.baz, bar) - end() -}) - -test('ultimate wildcards – handles circulars and cross references – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.*', 'cf.*'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar, cf: { bar } } - bar.baz = bar - o.bar.baz = o.bar - is(o.bar.baz, bar) - is(o.cf.bar, bar) - redact(o) - is(o.bar.baz, censor) - is(o.cf.bar, censor) - redact.restore(o) - is(o.bar.baz, bar) - is(o.cf.bar, bar) - end() -}) - -test('static + wildcards', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c', 'a.d.*', 'a.b.z.*'], serialize: false }) - const result = redact({ a: { b: { c: 's', z: { x: 's', y: 's' } }, d: { a: 's', b: 's', c: 's' } } }) - - is(result.a.b.c, censor) - is(result.a.d.a, censor) - is(result.a.d.b, censor) - is(result.a.d.c, censor) - is(result.a.b.z.x, censor) - is(result.a.b.z.y, censor) - end() -}) - -test('static + wildcards reuse', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.c', 'a.d.*'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - - is(result.a.b.c, censor) - is(result.a.d.a, censor) - is(result.a.d.b, censor) - is(result.a.d.c, censor) - - redact.restore(result) - - const result2 = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result2.a.b.c, censor) - is(result2.a.d.a, censor) - is(result2.a.d.b, censor) - is(result2.a.d.c, censor) - - redact.restore(result2) - end() -}) - -test('parent wildcard – first position', ({ end, is }) => { - const redact = fastRedact({ paths: ['*.c'], serialize: false }) - const result = redact({ b: { c: 's' }, d: { a: 's', b: 's', c: 's' } }) - is(result.b.c, censor) - is(result.d.a, 's') - is(result.d.b, 's') - is(result.d.c, censor) - end() -}) - -test('parent wildcard – one following key', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.c'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - is(result.a.d.a, 's') - is(result.a.d.b, 's') - is(result.a.d.c, censor) - end() -}) - -test('restore parent wildcard – one following key', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.c'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - redact.restore(result) - is(result.a.b.c, 's') - is(result.a.d.a, 's') - is(result.a.d.b, 's') - is(result.a.d.c, 's') - end() -}) - -test('parent wildcard – one following key – reuse', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.c'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - is(result.a.d.a, 's') - is(result.a.d.b, 's') - is(result.a.d.c, censor) - const result2 = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result2.a.b.c, censor) - is(result2.a.d.a, 's') - is(result2.a.d.b, 's') - is(result2.a.d.c, censor) - redact.restore(result2) - end() -}) - -test('parent wildcard – two following keys', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.x.c'], serialize: false }) - const result = redact({ a: { b: { x: { c: 's' } }, d: { x: { a: 's', b: 's', c: 's' } } } }) - is(result.a.b.x.c, censor) - is(result.a.d.x.a, 's') - is(result.a.d.x.b, 's') - is(result.a.d.x.c, censor) - end() -}) - -test('parent wildcard – two following keys – reuse', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.x.c'], serialize: false }) - const result = redact({ a: { b: { x: { c: 's' } }, d: { x: { a: 's', b: 's', c: 's' } } } }) - is(result.a.b.x.c, censor) - is(result.a.d.x.a, 's') - is(result.a.d.x.b, 's') - is(result.a.d.x.c, censor) - redact.restore(result) - const result2 = redact({ a: { b: { x: { c: 's' } }, d: { x: { a: 's', b: 's', c: 's' } } } }) - is(result2.a.b.x.c, censor) - is(result2.a.d.x.a, 's') - is(result2.a.d.x.b, 's') - is(result2.a.d.x.c, censor) - end() -}) - -test('restore parent wildcard – two following keys', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.x.c'], serialize: false }) - const result = redact({ a: { b: { x: { c: 's' } }, d: { x: { a: 's', b: 's', c: 's' } } } }) - redact.restore(result) - is(result.a.b.x.c, 's') - is(result.a.d.x.a, 's') - is(result.a.d.x.b, 's') - is(result.a.d.x.c, 's') - end() -}) - -test('parent wildcard - array', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b[*].x'], serialize: false }) - const result = redact({ a: { b: [{ x: 1 }, { a: 2 }], d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b[0].x, censor) - is(result.a.b[1].a, 2) - is(result.a.d.a, 's') - is(result.a.d.b, 's') - end() -}) - -test('parent wildcards – array – single index', ({ end, same }) => { - const redact = fastRedact({ paths: ['insideArray.like[3].*.foo'], serialize: false }) - same(redact({ insideArray: { like: ['a', 'b', 'c', { this: { foo: 'meow' } }] } }), { insideArray: { like: ['a', 'b', 'c', { this: { foo: censor } }] } }) - end() -}) - -test('parent wildcards - handles null proto objects', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.c'], serialize: false }) - const result = redact({ __proto__: null, a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result.a.b.c, censor) - end() -}) - -test('parent wildcards - handles paths that do not match object structure', ({ end, same }) => { - const redact = fastRedact({ paths: ['a.*.y.z'], serialize: false }) - same(redact({ a: { b: { c: 's' } } }), { a: { b: { c: 's' } } }) - end() -}) - -test('parent wildcards - gracefully handles primitives that match intermediate keys in paths', ({ end, same }) => { - const redact = fastRedact({ paths: ['a.*.c'], serialize: false }) - same(redact({ a: { b: null } }), { a: { b: null } }) - same(redact({ a: { b: 's' } }), { a: { b: 's' } }) - same(redact({ a: { b: 1 } }), { a: { b: 1 } }) - same(redact({ a: { b: undefined } }), { a: { b: undefined } }) - same(redact({ a: { b: true } }), { a: { b: true } }) - const sym = Symbol('sym') - same(redact({ a: { b: sym } }), { a: { b: sym } }) - end() -}) - -test('parent wildcards – handles circulars', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['x.*.baz'], serialize: false }) - const bar = { b: 2 } - const o = { x: { a: 1, bar } } - bar.baz = bar - o.x.bar.baz = o.x.bar - same(redact(o), { x: { a: 1, bar: { b: 2, baz: censor } } }) - end() -}) - -test('parent wildcards – handles circulars – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['x.*.baz'], serialize: false }) - const bar = { b: 2 } - const o = { x: { a: 1, bar } } - bar.baz = bar - o.x.bar.baz = o.x.bar - is(o.x.bar.baz, bar) - redact(o) - is(o.x.a, 1) - is(o.x.bar.baz, censor) - redact.restore(o) - is(o.x.bar.baz, bar) - end() -}) - -test('parent wildcards – handles circulars and cross references – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['x.*.baz', 'x.*.cf.bar'], serialize: false }) - const bar = { b: 2 } - const o = { x: { a: 1, bar, y: { cf: { bar } } } } - bar.baz = bar - o.x.bar.baz = o.x.bar - is(o.x.bar.baz, bar) - is(o.x.y.cf.bar, bar) - redact(o) - is(o.x.bar.baz, censor) - is(o.x.y.cf.bar, censor) - redact.restore(o) - is(o.x.bar.baz, bar) - is(o.x.y.cf.bar, bar) - end() -}) - -test('parent wildcards – handles missing paths', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['z.*.baz'] }) - const o = { a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } } - is(redact(o), JSON.stringify(o)) - end() -}) - -test('ultimate wildcards – handles missing paths', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['z.*'] }) - const o = { a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } } - is(redact(o), JSON.stringify(o)) - end() -}) - -test('parent wildcards – removes during serialization instead of redacting when remove option is true', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.*.c'], remove: true }) - const o = { a: { b: { c: 'c' }, x: { c: 1 } } } - is(redact(o), `{"a":{"b":{},"x":{}}}`) - end() -}) - -test('ultimate wildcards – removes during serialization instead of redacting when remove option is true', ({ end, is }) => { - const redact = fastRedact({ paths: ['a.b.*'], remove: true }) - const o = { a: { b: { c: 'c' }, x: { c: 1 } } } - is(redact(o), `{"a":{"b":{},"x":{"c":1}}}`) - end() -}) - -test('supports leading bracket notation', ({ end, is }) => { - const redact = fastRedact({ paths: ['["a"].b.c'] }) - const o = { a: { b: { c: 'd' } } } - is(redact(o), `{"a":{"b":{"c":"${censor}"}}}`) - end() -}) - -test('supports leading bracket notation containing non-legal keyword characters', ({ end, is }) => { - const redact = fastRedact({ paths: ['["a-x"].b.c'] }) - const o = { 'a-x': { b: { c: 'd' } } } - is(redact(o), `{"a-x":{"b":{"c":"${censor}"}}}`) - end() -}) - -test('supports single leading bracket', ({ end, is }) => { - const censor = 'test' - const redact = fastRedact({ paths: ['["a"]'], censor, serialize: false }) - is(redact({ a: 'a' }).a, censor) - end() -}) - -test('supports single leading bracket containing non-legal keyword characters', ({ end, is }) => { - const censor = 'test' - const redact = fastRedact({ paths: ['["a-x"]'], censor, serialize: false }) - is(redact({ 'a-x': 'a' })['a-x'], censor) - end() -}) - -test('(leading brackets) ultimate wildcards – handles circulars and cross references – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['bar.baz.*', 'cf.*'], serialize: false }) - const bar = { b: 2 } - const o = { a: 1, bar, cf: { bar } } - bar.baz = bar - o.bar.baz = o.bar - is(o.bar.baz, bar) - is(o.cf.bar, bar) - redact(o) - is(o.bar.baz, censor) - is(o.cf.bar, censor) - redact.restore(o) - is(o.bar.baz, bar) - is(o.cf.bar, bar) - end() -}) - -test('(leading brackets) parent wildcards – handles circulars and cross references – restore', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['["x"].*.baz', '["x"].*.cf.bar'], serialize: false }) - const bar = { b: 2 } - const o = { x: { a: 1, bar, y: { cf: { bar } } } } - bar.baz = bar - o.x.bar.baz = o.x.bar - is(o.x.bar.baz, bar) - is(o.x.y.cf.bar, bar) - redact(o) - is(o.x.bar.baz, censor) - is(o.x.y.cf.bar, censor) - redact.restore(o) - is(o.x.bar.baz, bar) - is(o.x.y.cf.bar, bar) - end() -}) - -test('(leading brackets) ultimate wildcards – handles missing paths', ({ end, is, same }) => { - const redact = fastRedact({ paths: ['["z"].*'] }) - const o = { a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } } - is(redact(o), JSON.stringify(o)) - end() -}) - -test('(leading brackets) static + wildcards reuse', ({ end, is }) => { - const redact = fastRedact({ paths: ['["a"].b.c', '["a"].d.*'], serialize: false }) - const result = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - - is(result.a.b.c, censor) - is(result.a.d.a, censor) - is(result.a.d.b, censor) - is(result.a.d.c, censor) - - redact.restore(result) - - const result2 = redact({ a: { b: { c: 's' }, d: { a: 's', b: 's', c: 's' } } }) - is(result2.a.b.c, censor) - is(result2.a.d.a, censor) - is(result2.a.d.b, censor) - is(result2.a.d.c, censor) - - redact.restore(result2) - end() -}) - -test('correctly restores original object when a path does not match object', ({ end, is }) => { - const redact = fastRedact({ paths: ['foo.bar'], strict: false }) - const o = {} - is(redact({ foo: o }), '{"foo":{}}') - is(o.hasOwnProperty('bar'), false) - end() -}) - -test('correctly restores original object when a matching path has value of `undefined`', ({ end, is }) => { - const redact = fastRedact({ paths: ['foo.bar'], strict: false }) - const o = { bar: undefined } - is(redact({ foo: o }), '{"foo":{}}') - is(o.hasOwnProperty('bar'), true) - is(o.bar, undefined) - end() -}) - -test('handles multiple paths with leading brackets', ({ end, is }) => { - const redact = fastRedact({ paths: ['["x-y"]', '["y-x"]'] }) - const o = { 'x-y': 'test', 'y-x': 'test2' } - is(redact(o), '{"x-y":"[REDACTED]","y-x":"[REDACTED]"}') - end() -}) - -test('handles objects with and then without target paths', ({ end, is }) => { - const redact = fastRedact({ paths: ['test'] }) - const o1 = { test: 'check' } - const o2 = {} - is(redact(o1), '{"test":"[REDACTED]"}') - is(redact(o2), '{}') - // run each check twice to ensure no mutations - is(redact(o1), '{"test":"[REDACTED]"}') - is(redact(o2), '{}') - is('test' in o1, true) - is('test' in o2, false) - end() -}) - -test('handles leading wildcards and null values', ({ end, is }) => { - const redact = fastRedact({ paths: ['*.test'] }) - const o = { prop: null } - is(redact(o), '{"prop":null}') - is(o.prop, null) - end() -}) - -test('handles keys with dots', ({ end, is }) => { - const redactSingleQ = fastRedact({ paths: [`a['b.c']`], serialize: false }) - const redactDoubleQ = fastRedact({ paths: [`a["b.c"]`], serialize: false }) - const redactBacktickQ = fastRedact({ paths: ['a[`b.c`]'], serialize: false }) - const redactNum = fastRedact({ paths: [`a[-1.2]`], serialize: false }) - const redactLeading = fastRedact({ paths: [`["b.c"]`], serialize: false }) - is(redactSingleQ({ a: { 'b.c': 'x', '-1.2': 'x' } }).a['b.c'], censor) - is(redactDoubleQ({ a: { 'b.c': 'x', '-1.2': 'x' } }).a['b.c'], censor) - is(redactBacktickQ({ a: { 'b.c': 'x', '-1.2': 'x' } }).a['b.c'], censor) - is(redactNum({ a: { 'b.c': 'x', '-1.2': 'x' } }).a['-1.2'], censor) - is(redactLeading({ 'b.c': 'x', '-1.2': 'x' })['b.c'], censor) - end() -}) diff --git a/node_modules/fast-safe-stringify/.travis.yml b/node_modules/fast-safe-stringify/.travis.yml deleted file mode 100644 index 2b06d25..0000000 --- a/node_modules/fast-safe-stringify/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -sudo: false -node_js: -- '4' -- '6' -- '8' -- '9' -- '10' diff --git a/node_modules/fast-safe-stringify/CHANGELOG.md b/node_modules/fast-safe-stringify/CHANGELOG.md deleted file mode 100644 index 55f2d08..0000000 --- a/node_modules/fast-safe-stringify/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# Changelog - -## v.2.0.0 - -Features - -- Added stable-stringify (see documentation) -- Support replacer -- Support spacer -- toJSON support without forceDecirc property -- Improved performance - -Breaking changes - -- Manipulating the input value in a `toJSON` function is not possible anymore in - all cases (see documentation) -- Dropped support for e.g. IE8 and Node.js < 4 diff --git a/node_modules/fast-safe-stringify/LICENSE b/node_modules/fast-safe-stringify/LICENSE deleted file mode 100644 index d310c2d..0000000 --- a/node_modules/fast-safe-stringify/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 David Mark Clements -Copyright (c) 2017 David Mark Clements & Matteo Collina -Copyright (c) 2018 David Mark Clements, Matteo Collina & Ruben Bridgewater - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/fast-safe-stringify/benchmark.js b/node_modules/fast-safe-stringify/benchmark.js deleted file mode 100644 index 7ba5e9f..0000000 --- a/node_modules/fast-safe-stringify/benchmark.js +++ /dev/null @@ -1,137 +0,0 @@ -const Benchmark = require('benchmark') -const suite = new Benchmark.Suite() -const { inspect } = require('util') -const jsonStringifySafe = require('json-stringify-safe') -const fastSafeStringify = require('./') - -const array = new Array(10).fill(0).map((_, i) => i) -const obj = { foo: array } -const circ = JSON.parse(JSON.stringify(obj)) -circ.o = { obj: circ, array } -const circGetters = JSON.parse(JSON.stringify(obj)) -Object.assign(circGetters, { get o () { return { obj: circGetters, array } } }) - -const deep = require('./package.json') -deep.deep = JSON.parse(JSON.stringify(deep)) -deep.deep.deep = JSON.parse(JSON.stringify(deep)) -deep.deep.deep.deep = JSON.parse(JSON.stringify(deep)) -deep.array = array - -const deepCirc = JSON.parse(JSON.stringify(deep)) -deepCirc.deep.deep.deep.circ = deepCirc -deepCirc.deep.deep.circ = deepCirc -deepCirc.deep.circ = deepCirc -deepCirc.array = array - -const deepCircGetters = JSON.parse(JSON.stringify(deep)) -for (let i = 0; i < 10; i++) { - deepCircGetters[i.toString()] = { - deep: { - deep: { - get circ () { return deep.deep }, - deep: { get circ () { return deep.deep.deep } } - }, - get circ () { return deep } - }, - get array () { return array } - } -} - -const deepCircNonCongifurableGetters = JSON.parse(JSON.stringify(deep)) -Object.defineProperty(deepCircNonCongifurableGetters.deep.deep.deep, 'circ', { - get: () => deepCircNonCongifurableGetters, - enumerable: true, - configurable: false -}) -Object.defineProperty(deepCircNonCongifurableGetters.deep.deep, 'circ', { - get: () => deepCircNonCongifurableGetters, - enumerable: true, - configurable: false -}) -Object.defineProperty(deepCircNonCongifurableGetters.deep, 'circ', { - get: () => deepCircNonCongifurableGetters, - enumerable: true, - configurable: false -}) -Object.defineProperty(deepCircNonCongifurableGetters, 'array', { - get: () => array, - enumerable: true, - configurable: false -}) - -suite.add('util.inspect: simple object ', function () { - inspect(obj, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: circular ', function () { - inspect(circ, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: circular getters ', function () { - inspect(circGetters, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: deep ', function () { - inspect(deep, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: deep circular ', function () { - inspect(deepCirc, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: large deep circular getters ', function () { - inspect(deepCircGetters, { showHidden: false, depth: null }) -}) -suite.add('util.inspect: deep non-conf circular getters', function () { - inspect(deepCircNonCongifurableGetters, { showHidden: false, depth: null }) -}) - -suite.add('\njson-stringify-safe: simple object ', function () { - jsonStringifySafe(obj) -}) -suite.add('json-stringify-safe: circular ', function () { - jsonStringifySafe(circ) -}) -suite.add('json-stringify-safe: circular getters ', function () { - jsonStringifySafe(circGetters) -}) -suite.add('json-stringify-safe: deep ', function () { - jsonStringifySafe(deep) -}) -suite.add('json-stringify-safe: deep circular ', function () { - jsonStringifySafe(deepCirc) -}) -suite.add('json-stringify-safe: large deep circular getters ', function () { - jsonStringifySafe(deepCircGetters) -}) -suite.add('json-stringify-safe: deep non-conf circular getters', function () { - jsonStringifySafe(deepCircNonCongifurableGetters) -}) - -suite.add('\nfast-safe-stringify: simple object ', function () { - fastSafeStringify(obj) -}) -suite.add('fast-safe-stringify: circular ', function () { - fastSafeStringify(circ) -}) -suite.add('fast-safe-stringify: circular getters ', function () { - fastSafeStringify(circGetters) -}) -suite.add('fast-safe-stringify: deep ', function () { - fastSafeStringify(deep) -}) -suite.add('fast-safe-stringify: deep circular ', function () { - fastSafeStringify(deepCirc) -}) -suite.add('fast-safe-stringify: large deep circular getters ', function () { - fastSafeStringify(deepCircGetters) -}) -suite.add('fast-safe-stringify: deep non-conf circular getters', function () { - fastSafeStringify(deepCircNonCongifurableGetters) -}) - -// add listeners -suite.on('cycle', function (event) { - console.log(String(event.target)) -}) - -suite.on('complete', function () { - console.log('\nFastest is ' + this.filter('fastest').map('name')) -}) - -suite.run({ delay: 1, minSamples: 150 }) diff --git a/node_modules/fast-safe-stringify/index.d.ts b/node_modules/fast-safe-stringify/index.d.ts deleted file mode 100644 index 56f6865..0000000 --- a/node_modules/fast-safe-stringify/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare function stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string; - -declare namespace stringify { - export function stable(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string; - export function stableStringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string; -} - -export default stringify; diff --git a/node_modules/fast-safe-stringify/index.js b/node_modules/fast-safe-stringify/index.js deleted file mode 100644 index 670698d..0000000 --- a/node_modules/fast-safe-stringify/index.js +++ /dev/null @@ -1,161 +0,0 @@ -module.exports = stringify -stringify.default = stringify -stringify.stable = deterministicStringify -stringify.stableStringify = deterministicStringify - -var arr = [] -var replacerStack = [] - -// Regular stringify -function stringify (obj, replacer, spacer) { - decirc(obj, '', [], undefined) - var res - if (replacerStack.length === 0) { - res = JSON.stringify(obj, replacer, spacer) - } else { - res = JSON.stringify(obj, replaceGetterValues(replacer), spacer) - } - while (arr.length !== 0) { - var part = arr.pop() - if (part.length === 4) { - Object.defineProperty(part[0], part[1], part[3]) - } else { - part[0][part[1]] = part[2] - } - } - return res -} -function decirc (val, k, stack, parent) { - var i - if (typeof val === 'object' && val !== null) { - for (i = 0; i < stack.length; i++) { - if (stack[i] === val) { - var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k) - if (propertyDescriptor.get !== undefined) { - if (propertyDescriptor.configurable) { - Object.defineProperty(parent, k, { value: '[Circular]' }) - arr.push([parent, k, val, propertyDescriptor]) - } else { - replacerStack.push([val, k]) - } - } else { - parent[k] = '[Circular]' - arr.push([parent, k, val]) - } - return - } - } - stack.push(val) - // Optimize for Arrays. Big arrays could kill the performance otherwise! - if (Array.isArray(val)) { - for (i = 0; i < val.length; i++) { - decirc(val[i], i, stack, val) - } - } else { - var keys = Object.keys(val) - for (i = 0; i < keys.length; i++) { - var key = keys[i] - decirc(val[key], key, stack, val) - } - } - stack.pop() - } -} - -// Stable-stringify -function compareFunction (a, b) { - if (a < b) { - return -1 - } - if (a > b) { - return 1 - } - return 0 -} - -function deterministicStringify (obj, replacer, spacer) { - var tmp = deterministicDecirc(obj, '', [], undefined) || obj - var res - if (replacerStack.length === 0) { - res = JSON.stringify(tmp, replacer, spacer) - } else { - res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer) - } - while (arr.length !== 0) { - var part = arr.pop() - if (part.length === 4) { - Object.defineProperty(part[0], part[1], part[3]) - } else { - part[0][part[1]] = part[2] - } - } - return res -} - -function deterministicDecirc (val, k, stack, parent) { - var i - if (typeof val === 'object' && val !== null) { - for (i = 0; i < stack.length; i++) { - if (stack[i] === val) { - var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k) - if (propertyDescriptor.get !== undefined) { - if (propertyDescriptor.configurable) { - Object.defineProperty(parent, k, { value: '[Circular]' }) - arr.push([parent, k, val, propertyDescriptor]) - } else { - replacerStack.push([val, k]) - } - } else { - parent[k] = '[Circular]' - arr.push([parent, k, val]) - } - return - } - } - if (typeof val.toJSON === 'function') { - return - } - stack.push(val) - // Optimize for Arrays. Big arrays could kill the performance otherwise! - if (Array.isArray(val)) { - for (i = 0; i < val.length; i++) { - deterministicDecirc(val[i], i, stack, val) - } - } else { - // Create a temporary object in the required way - var tmp = {} - var keys = Object.keys(val).sort(compareFunction) - for (i = 0; i < keys.length; i++) { - var key = keys[i] - deterministicDecirc(val[key], key, stack, val) - tmp[key] = val[key] - } - if (parent !== undefined) { - arr.push([parent, k, val]) - parent[k] = tmp - } else { - return tmp - } - } - stack.pop() - } -} - -// wraps replacer function to handle values we couldn't replace -// and mark them as [Circular] -function replaceGetterValues (replacer) { - replacer = replacer !== undefined ? replacer : function (k, v) { return v } - return function (key, val) { - if (replacerStack.length > 0) { - for (var i = 0; i < replacerStack.length; i++) { - var part = replacerStack[i] - if (part[1] === key && part[0] === val) { - val = '[Circular]' - replacerStack.splice(i, 1) - break - } - } - } - return replacer.call(this, key, val) - } -} diff --git a/node_modules/fast-safe-stringify/package.json b/node_modules/fast-safe-stringify/package.json deleted file mode 100644 index 528f5c9..0000000 --- a/node_modules/fast-safe-stringify/package.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "_from": "fast-safe-stringify@^2.0.7", - "_id": "fast-safe-stringify@2.0.7", - "_inBundle": false, - "_integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", - "_location": "/fast-safe-stringify", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "fast-safe-stringify@^2.0.7", - "name": "fast-safe-stringify", - "escapedName": "fast-safe-stringify", - "rawSpec": "^2.0.7", - "saveSpec": null, - "fetchSpec": "^2.0.7" - }, - "_requiredBy": [ - "/pino" - ], - "_resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", - "_shasum": "124aa885899261f68aedb42a7c080de9da608743", - "_spec": "fast-safe-stringify@^2.0.7", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/pino", - "author": { - "name": "David Mark Clements" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/fast-safe-stringify/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Ruben Bridgewater" - }, - { - "name": "Matteo Collina" - }, - { - "name": "Ben Gourley" - }, - { - "name": "Gabriel Lesperance" - }, - { - "name": "Alex Liu" - }, - { - "name": "Christoph Walcher" - }, - { - "name": "Nicholas Young" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "Safely and quickly serialize JavaScript objects", - "devDependencies": { - "benchmark": "^2.1.4", - "clone": "^2.1.0", - "json-stringify-safe": "^5.0.1", - "standard": "^11.0.0", - "tap": "^12.0.0" - }, - "homepage": "https://github.com/davidmarkclements/fast-safe-stringify#readme", - "keywords": [ - "stable", - "stringify", - "JSON", - "JSON.stringify", - "safe", - "serialize" - ], - "license": "MIT", - "main": "index.js", - "name": "fast-safe-stringify", - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/fast-safe-stringify.git" - }, - "scripts": { - "benchmark": "node benchmark.js", - "test": "standard && tap --no-esm test.js test-stable.js" - }, - "typings": "index", - "version": "2.0.7" -} diff --git a/node_modules/fast-safe-stringify/readme.md b/node_modules/fast-safe-stringify/readme.md deleted file mode 100644 index 51ed1fb..0000000 --- a/node_modules/fast-safe-stringify/readme.md +++ /dev/null @@ -1,154 +0,0 @@ -# fast-safe-stringify - -Safe and fast serialization alternative to [JSON.stringify][]. - -Gracefully handles circular structures instead of throwing. - -Provides a deterministic ("stable") version as well that will also gracefully -handle circular structures. See the example below for further information. - -## Usage - -The same as [JSON.stringify][]. - -`stringify(value[, replacer[, space]])` - -```js -const safeStringify = require('fast-safe-stringify') -const o = { a: 1 } -o.o = o - -console.log(safeStringify(o)) -// '{"a":1,"o":"[Circular]"}' -console.log(JSON.stringify(o)) -// TypeError: Converting circular structure to JSON - -function replacer(key, value) { - console.log('Key:', JSON.stringify(key), 'Value:', JSON.stringify(value)) - // Remove the circular structure - if (value === '[Circular]') { - return - } - return value -} -const serialized = safeStringify(o, replacer, 2) -// Key: "" Value: {"a":1,"o":"[Circular]"} -// Key: "a" Value: 1 -// Key: "o" Value: "[Circular]" -console.log(serialized) -// { -// "a": 1 -// } -``` - -Using the deterministic version also works the same: - -```js -const safeStringify = require('fast-safe-stringify') -const o = { b: 1, a: 0 } -o.o = o - -console.log(safeStringify(o)) -// '{"b":1,"a":0,"o":"[Circular]"}' -console.log(safeStringify.stableStringify(o)) -// '{"a":0,"b":1,"o":"[Circular]"}' -console.log(JSON.stringify(o)) -// TypeError: Converting circular structure to JSON -``` - -A faster and side-effect free implementation is available in the -[safe-stable-stringify][] module. However it is still considered experimental -due to a new and more complex implementation. - -## Differences to JSON.stringify - -In general the behavior is identical to [JSON.stringify][]. The [`replacer`][] -and [`space`][] options are also available. - -A few exceptions exist to [JSON.stringify][] while using [`toJSON`][] or -[`replacer`][]: - -### Regular safe stringify - -- Manipulating a circular structure of the passed in value in a `toJSON` or the - `replacer` is not possible! It is possible for any other value and property. - -- In case a circular structure is detected and the [`replacer`][] is used it - will receive the string `[Circular]` as the argument instead of the circular - object itself. - -### Deterministic ("stable") safe stringify - -- Manipulating the input object either in a [`toJSON`][] or the [`replacer`][] - function will not have any effect on the output. The output entirely relies on - the shape the input value had at the point passed to the stringify function! - -- In case a circular structure is detected and the [`replacer`][] is used it - will receive the string `[Circular]` as the argument instead of the circular - object itself. - -A side effect free variation without these limitations can be found as well -([`safe-stable-stringify`][]). It is also faster than the current -implementation. It is still considered experimental due to a new and more -complex implementation. - -## Benchmarks - -Although not JSON, the Node.js `util.inspect` method can be used for similar -purposes (e.g. logging) and also handles circular references. - -Here we compare `fast-safe-stringify` with some alternatives: -(Lenovo T450s with a i7-5600U CPU using Node.js 8.9.4) - -```md -fast-safe-stringify: simple object x 1,121,497 ops/sec ±0.75% (97 runs sampled) -fast-safe-stringify: circular x 560,126 ops/sec ±0.64% (96 runs sampled) -fast-safe-stringify: deep x 32,472 ops/sec ±0.57% (95 runs sampled) -fast-safe-stringify: deep circular x 32,513 ops/sec ±0.80% (92 runs sampled) - -util.inspect: simple object x 272,837 ops/sec ±1.48% (90 runs sampled) -util.inspect: circular x 116,896 ops/sec ±1.19% (95 runs sampled) -util.inspect: deep x 19,382 ops/sec ±0.66% (92 runs sampled) -util.inspect: deep circular x 18,717 ops/sec ±0.63% (96 runs sampled) - -json-stringify-safe: simple object x 233,621 ops/sec ±0.97% (94 runs sampled) -json-stringify-safe: circular x 110,409 ops/sec ±1.85% (95 runs sampled) -json-stringify-safe: deep x 8,705 ops/sec ±0.87% (96 runs sampled) -json-stringify-safe: deep circular x 8,336 ops/sec ±2.20% (93 runs sampled) -``` - -For stable stringify comparisons, see the performance benchmarks in the -[`safe-stable-stringify`][] readme. - -## Protip - -Whether `fast-safe-stringify` or alternatives are used: if the use case -consists of deeply nested objects without circular references the following -pattern will give best results. -Shallow or one level nested objects on the other hand will slow down with it. -It is entirely dependant on the use case. - -```js -const stringify = require('fast-safe-stringify') - -function tryJSONStringify (obj) { - try { return JSON.stringify(obj) } catch (_) {} -} - -const serializedString = tryJSONStringify(deep) || stringify(deep) -``` - -## Acknowledgements - -Sponsored by [nearForm](http://nearform.com) - -## License - -MIT - -[`replacer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The%20replacer%20parameter -[`safe-stable-stringify`]: https://github.com/BridgeAR/safe-stable-stringify -[`space`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#The%20space%20argument -[`toJSON`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON()_behavior -[benchmark]: https://github.com/epoberezkin/fast-json-stable-stringify/blob/67f688f7441010cfef91a6147280cc501701e83b/benchmark -[JSON.stringify]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify diff --git a/node_modules/fast-safe-stringify/test-stable.js b/node_modules/fast-safe-stringify/test-stable.js deleted file mode 100644 index 93d8bc4..0000000 --- a/node_modules/fast-safe-stringify/test-stable.js +++ /dev/null @@ -1,311 +0,0 @@ -const test = require('tap').test -const fss = require('./').stable -const clone = require('clone') -const s = JSON.stringify - -test('circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.circle = fixture - const expected = s( - { circle: '[Circular]', name: 'Tywin Lannister' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular getter reference to root', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - - const expected = s( - { circle: '[Circular]', name: 'Tywin Lannister' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.id = { circle: fixture } - const expected = s( - { id: { circle: '[Circular]' }, name: 'Tywin Lannister' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('child circular reference', function (assert) { - const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } } - fixture.child.dinklage = fixture.child - const expected = s({ - child: { - dinklage: '[Circular]', name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested child circular reference', function (assert) { - const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } } - fixture.child.actor = { dinklage: fixture.child } - const expected = s({ - child: { - actor: { dinklage: '[Circular]' }, name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular objects in an array', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.hand = [fixture, fixture] - const expected = s({ - hand: ['[Circular]', '[Circular]'], name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular references in an array', function (assert) { - const fixture = { - name: 'Tywin Lannister', - offspring: [{ name: 'Tyrion Lannister' }, { name: 'Cersei Lannister' }] - } - fixture.offspring[0].dinklage = fixture.offspring[0] - fixture.offspring[1].headey = fixture.offspring[1] - - const expected = s({ - name: 'Tywin Lannister', - offspring: [ - { dinklage: '[Circular]', name: 'Tyrion Lannister' }, - { headey: '[Circular]', name: 'Cersei Lannister' } - ] - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular arrays', function (assert) { - const fixture = [] - fixture.push(fixture, fixture) - const expected = s(['[Circular]', '[Circular]']) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular arrays', function (assert) { - const fixture = [] - fixture.push( - { name: 'Jon Snow', bastards: fixture }, - { name: 'Ramsay Bolton', bastards: fixture } - ) - const expected = s([ - { bastards: '[Circular]', name: 'Jon Snow' }, - { bastards: '[Circular]', name: 'Ramsay Bolton' } - ]) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('repeated non-circular references in objects', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = { - motherOfDragons: daenerys, - queenOfMeereen: daenerys - } - const expected = s(fixture) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('repeated non-circular references in arrays', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = [daenerys, daenerys] - const expected = s(fixture) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('double child circular reference', function (assert) { - // create circular reference - const child = { name: 'Tyrion Lannister' } - child.dinklage = child - - // include it twice in the fixture - const fixture = { name: 'Tywin Lannister', childA: child, childB: child } - const cloned = clone(fixture) - const expected = s({ - childA: { - dinklage: '[Circular]', name: 'Tyrion Lannister' - }, - childB: { - dinklage: '[Circular]', name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister' - }) - const actual = fss(fixture) - assert.is(actual, expected) - - // check if the fixture has not been modified - assert.deepEqual(fixture, cloned) - assert.end() -}) - -test('child circular reference with toJSON', function (assert) { - // Create a test object that has an overriden `toJSON` property - TestObject.prototype.toJSON = function () { return { special: 'case' } } - function TestObject (content) {} - - // Creating a simple circular object structure - const parentObject = {} - parentObject.childObject = new TestObject() - parentObject.childObject.parentObject = parentObject - - // Creating a simple circular object structure - const otherParentObject = new TestObject() - otherParentObject.otherChildObject = {} - otherParentObject.otherChildObject.otherParentObject = otherParentObject - - // Making sure our original tests work - assert.deepEqual(parentObject.childObject.parentObject, parentObject) - assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject) - - // Should both be idempotent - assert.equal(fss(parentObject), '{"childObject":{"special":"case"}}') - assert.equal(fss(otherParentObject), '{"special":"case"}') - - // Therefore the following assertion should be `true` - assert.deepEqual(parentObject.childObject.parentObject, parentObject) - assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject) - - assert.end() -}) - -test('null object', function (assert) { - const expected = s(null) - const actual = fss(null) - assert.is(actual, expected) - assert.end() -}) - -test('null property', function (assert) { - const expected = s({ f: null }) - const actual = fss({ f: null }) - assert.is(actual, expected) - assert.end() -}) - -test('nested child circular reference in toJSON', function (assert) { - var circle = { some: 'data' } - circle.circle = circle - var a = { - b: { - toJSON: function () { - a.b = 2 - return '[Redacted]' - } - }, - baz: { - circle, - toJSON: function () { - a.baz = circle - return '[Redacted]' - } - } - } - var o = { - a, - bar: a - } - - const expected = s({ - a: { - b: '[Redacted]', - baz: '[Redacted]' - }, - bar: { - // TODO: This is a known limitation of the current implementation. - // The ideal result would be: - // - // b: 2, - // baz: { - // circle: '[Circular]', - // some: 'data' - // } - // - b: '[Redacted]', - baz: '[Redacted]' - } - }) - const actual = fss(o) - assert.is(actual, expected) - assert.end() -}) - -test('circular getters are restored when stringified', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - fss(fixture) - - assert.is(fixture.circle, fixture) - assert.end() -}) - -test('non-configurable circular getters use a replacer instead of markers', function (assert) { - const fixture = { name: 'Tywin Lannister' } - Object.defineProperty(fixture, 'circle', { - configurable: false, - get: function () { return fixture }, - enumerable: true - }) - - fss(fixture) - - assert.is(fixture.circle, fixture) - assert.end() -}) - -test('getter child circular reference', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', - get dinklage () { return fixture.child } - }, - get self () { return fixture } - } - - const expected = s({ - child: { - dinklage: '[Circular]', name: 'Tyrion Lannister' - }, - name: 'Tywin Lannister', - self: '[Circular]' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) diff --git a/node_modules/fast-safe-stringify/test.js b/node_modules/fast-safe-stringify/test.js deleted file mode 100644 index 7da5821..0000000 --- a/node_modules/fast-safe-stringify/test.js +++ /dev/null @@ -1,304 +0,0 @@ -const test = require('tap').test -const fss = require('./') -const clone = require('clone') -const s = JSON.stringify - -test('circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.circle = fixture - const expected = s( - { name: 'Tywin Lannister', circle: '[Circular]' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular getter reference to root', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - const expected = s( - { name: 'Tywin Lannister', circle: '[Circular]' } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular reference to root', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.id = { circle: fixture } - const expected = s( - { name: 'Tywin Lannister', id: { circle: '[Circular]' } } - ) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('child circular reference', function (assert) { - const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } } - fixture.child.dinklage = fixture.child - const expected = s({ - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', dinklage: '[Circular]' - } - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested child circular reference', function (assert) { - const fixture = { name: 'Tywin Lannister', child: { name: 'Tyrion Lannister' } } - fixture.child.actor = { dinklage: fixture.child } - const expected = s({ - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', actor: { dinklage: '[Circular]' } - } - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular objects in an array', function (assert) { - const fixture = { name: 'Tywin Lannister' } - fixture.hand = [fixture, fixture] - const expected = s({ - name: 'Tywin Lannister', hand: ['[Circular]', '[Circular]'] - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular references in an array', function (assert) { - const fixture = { - name: 'Tywin Lannister', - offspring: [{ name: 'Tyrion Lannister' }, { name: 'Cersei Lannister' }] - } - fixture.offspring[0].dinklage = fixture.offspring[0] - fixture.offspring[1].headey = fixture.offspring[1] - - const expected = s({ - name: 'Tywin Lannister', - offspring: [ - { name: 'Tyrion Lannister', dinklage: '[Circular]' }, - { name: 'Cersei Lannister', headey: '[Circular]' } - ] - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('circular arrays', function (assert) { - const fixture = [] - fixture.push(fixture, fixture) - const expected = s(['[Circular]', '[Circular]']) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('nested circular arrays', function (assert) { - const fixture = [] - fixture.push( - { name: 'Jon Snow', bastards: fixture }, - { name: 'Ramsay Bolton', bastards: fixture } - ) - const expected = s([ - { name: 'Jon Snow', bastards: '[Circular]' }, - { name: 'Ramsay Bolton', bastards: '[Circular]' } - ]) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('repeated non-circular references in objects', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = { - motherOfDragons: daenerys, - queenOfMeereen: daenerys - } - const expected = s(fixture) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('repeated non-circular references in arrays', function (assert) { - const daenerys = { name: 'Daenerys Targaryen' } - const fixture = [daenerys, daenerys] - const expected = s(fixture) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) - -test('double child circular reference', function (assert) { - // create circular reference - const child = { name: 'Tyrion Lannister' } - child.dinklage = child - - // include it twice in the fixture - const fixture = { name: 'Tywin Lannister', childA: child, childB: child } - const cloned = clone(fixture) - const expected = s({ - name: 'Tywin Lannister', - childA: { - name: 'Tyrion Lannister', dinklage: '[Circular]' - }, - childB: { - name: 'Tyrion Lannister', dinklage: '[Circular]' - } - }) - const actual = fss(fixture) - assert.is(actual, expected) - - // check if the fixture has not been modified - assert.deepEqual(fixture, cloned) - assert.end() -}) - -test('child circular reference with toJSON', function (assert) { - // Create a test object that has an overriden `toJSON` property - TestObject.prototype.toJSON = function () { return { special: 'case' } } - function TestObject (content) {} - - // Creating a simple circular object structure - const parentObject = {} - parentObject.childObject = new TestObject() - parentObject.childObject.parentObject = parentObject - - // Creating a simple circular object structure - const otherParentObject = new TestObject() - otherParentObject.otherChildObject = {} - otherParentObject.otherChildObject.otherParentObject = otherParentObject - - // Making sure our original tests work - assert.deepEqual(parentObject.childObject.parentObject, parentObject) - assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject) - - // Should both be idempotent - assert.equal(fss(parentObject), '{"childObject":{"special":"case"}}') - assert.equal(fss(otherParentObject), '{"special":"case"}') - - // Therefore the following assertion should be `true` - assert.deepEqual(parentObject.childObject.parentObject, parentObject) - assert.deepEqual(otherParentObject.otherChildObject.otherParentObject, otherParentObject) - - assert.end() -}) - -test('null object', function (assert) { - const expected = s(null) - const actual = fss(null) - assert.is(actual, expected) - assert.end() -}) - -test('null property', function (assert) { - const expected = s({ f: null }) - const actual = fss({ f: null }) - assert.is(actual, expected) - assert.end() -}) - -test('nested child circular reference in toJSON', function (assert) { - const circle = { some: 'data' } - circle.circle = circle - const a = { - b: { - toJSON: function () { - a.b = 2 - return '[Redacted]' - } - }, - baz: { - circle, - toJSON: function () { - a.baz = circle - return '[Redacted]' - } - } - } - const o = { - a, - bar: a - } - - const expected = s({ - a: { - b: '[Redacted]', - baz: '[Redacted]' - }, - bar: { - b: 2, - baz: { - some: 'data', - circle: '[Circular]' - } - } - }) - const actual = fss(o) - assert.is(actual, expected) - assert.end() -}) - -test('circular getters are restored when stringified', function (assert) { - const fixture = { - name: 'Tywin Lannister', - get circle () { - return fixture - } - } - fss(fixture) - - assert.is(fixture.circle, fixture) - assert.end() -}) - -test('non-configurable circular getters use a replacer instead of markers', function (assert) { - const fixture = { name: 'Tywin Lannister' } - Object.defineProperty(fixture, 'circle', { - configurable: false, - get: function () { return fixture }, - enumerable: true - }) - - fss(fixture) - - assert.is(fixture.circle, fixture) - assert.end() -}) - -test('getter child circular reference are replaced instead of marked', function (assert) { - const fixture = { - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', - get dinklage () { return fixture.child } - }, - get self () { return fixture } - } - - const expected = s({ - name: 'Tywin Lannister', - child: { - name: 'Tyrion Lannister', dinklage: '[Circular]' - }, - self: '[Circular]' - }) - const actual = fss(fixture) - assert.is(actual, expected) - assert.end() -}) diff --git a/node_modules/flatstr/LICENSE b/node_modules/flatstr/LICENSE deleted file mode 100644 index b5d3b6e..0000000 --- a/node_modules/flatstr/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 David Mark Clements - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/flatstr/alt-benchmark.js b/node_modules/flatstr/alt-benchmark.js deleted file mode 100644 index b9eb819..0000000 --- a/node_modules/flatstr/alt-benchmark.js +++ /dev/null @@ -1,234 +0,0 @@ -'use strict' -var nul = process.platform === 'win32' ? '\\\\.\\NUL' : '/dev/null' -var bench = require('fastbench') -var stream = require('fs').createWriteStream(nul) -var alt0 = require('./') -var largeStr = JSON.stringify(require('./package.json')) -largeStr += largeStr -largeStr += largeStr - -var run = bench([ - function alt0ManySmallConcats (cb) { - stream.write(alt0(makeStr('a', 200))) - setImmediate(cb) - }, - function alt1ManySmallConcats (cb) { - stream.write(alt1(makeStr('a', 200))) - setImmediate(cb) - }, - function alt2ManySmallConcats (cb) { - stream.write(alt2(makeStr('a', 200))) - setImmediate(cb) - }, - function alt3ManySmallConcats (cb) { - stream.write(alt3(makeStr('a', 200))) - setImmediate(cb) - }, - function alt4ManySmallConcats (cb) { - stream.write(alt4(makeStr('a', 200))) - setImmediate(cb) - }, - function alt5ManySmallConcats (cb) { - stream.write(alt5(makeStr('a', 200))) - setImmediate(cb) - }, - function alt6ManySmallConcats (cb) { - stream.write(alt6(makeStr('a', 200))) - setImmediate(cb) - }, - function alt7ManySmallConcats (cb) { - stream.write(alt7(makeStr('a', 200))) - setImmediate(cb) - }, - function alt8ManySmallConcats (cb) { - stream.write(alt8(makeStr('a', 200))) - setImmediate(cb) - }, - function alt9ManySmallConcats (cb) { - stream.write(alt9(makeStr('a', 200))) - setImmediate(cb) - }, - function alt0SeveralLargeConcats (cb) { - stream.write(alt0(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt1SeveralLargeConcats (cb) { - stream.write(alt1(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt2SeveralLargeConcats (cb) { - stream.write(alt2(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt3SeveralLargeConcats (cb) { - stream.write(alt3(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt4SeveralLargeConcats (cb) { - stream.write(alt4(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt5SeveralLargeConcats (cb) { - stream.write(alt5(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt6SeveralLargeConcats (cb) { - stream.write(alt6(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt7SeveralLargeConcats (cb) { - stream.write(alt7(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt8SeveralLargeConcats (cb) { - stream.write(alt8(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt9SeveralLargeConcats (cb) { - stream.write(alt9(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function alt0ExponentialSmallConcats (cb) { - stream.write(alt0(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt1ExponentialSmallConcats (cb) { - stream.write(alt1(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt2ExponentialSmallConcats (cb) { - stream.write(alt2(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt3ExponentialSmallConcats (cb) { - stream.write(alt3(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt4ExponentialSmallConcats (cb) { - stream.write(alt4(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt5ExponentialSmallConcats (cb) { - stream.write(alt5(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt6ExponentialSmallConcats (cb) { - stream.write(alt6(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt7ExponentialSmallConcats (cb) { - stream.write(alt7(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt8ExponentialSmallConcats (cb) { - stream.write(alt8(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt9ExponentialSmallConcats (cb) { - stream.write(alt9(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function alt0ExponentialLargeConcats (cb) { - stream.write(alt0(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt1ExponentialLargeConcats (cb) { - stream.write(alt1(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt2ExponentialLargeConcats (cb) { - stream.write(alt2(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt3ExponentialLargeConcats (cb) { - stream.write(alt3(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt4ExponentialLargeConcats (cb) { - stream.write(alt4(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt5ExponentialLargeConcats (cb) { - stream.write(alt5(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt6ExponentialLargeConcats (cb) { - stream.write(alt6(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt7ExponentialLargeConcats (cb) { - stream.write(alt7(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt8ExponentialLargeConcats (cb) { - stream.write(alt8(makeExpoStr(largeStr, 7))) - setImmediate(cb) - }, - function alt9ExponentialLargeConcats (cb) { - stream.write(alt9(makeExpoStr(largeStr, 7))) - setImmediate(cb) - } -], 10000) - -run(run) - -var rx = /()/ -function alt1 (s) { - rx.test(s) - return s -} -function alt2 (s) { - rx.exec(s) - return s -} - -function alt3 (s) { - s | 0 - return s -} - -function alt4 (s) { - ~s - return s -} - -function alt5 (s) { - escape(s) - return s -} - -function alt6 (s) { - unescape(s) - return s -} - -function alt7 (s) { - parseInt(s, 10) - return s -} - -function alt8 (s) { - parseFloat(s) - return s -} - -function alt9 (s) { - alt9[s] = null - return s -} - -function makeStr (str, concats) { - var s = '' - while (concats--) { - s += str - } - return s -} - -function makeExpoStr (str, concats) { - var s = str - while (concats--) { - s += s - } - return s -} diff --git a/node_modules/flatstr/benchmark.js b/node_modules/flatstr/benchmark.js deleted file mode 100644 index b2122c7..0000000 --- a/node_modules/flatstr/benchmark.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict' -var nul = process.platform === 'win32' ? '\\\\.\\NUL' : '/dev/null' -var bench = require('fastbench') -var stream = require('fs').createWriteStream(nul) -var flatstr = require('./') -var largeStr = JSON.stringify(require('./package.json')) -largeStr += largeStr -largeStr += largeStr - -var run = bench([ - function unflattenedManySmallConcats (cb) { - stream.write(makeStr('a', 200)) - setImmediate(cb) - }, - function flattenedManySmallConcats (cb) { - stream.write(flatstr(makeStr('a', 200))) - setImmediate(cb) - }, - function unflattenedSeveralLargeConcats (cb) { - stream.write(makeStr(largeStr, 10)) - setImmediate(cb) - }, - function flattenedSeveralLargeConcats (cb) { - stream.write(flatstr(makeStr(largeStr, 10))) - setImmediate(cb) - }, - function unflattenedExponentialSmallConcats (cb) { - stream.write(makeExpoStr('a', 12)) - setImmediate(cb) - }, - function flattenedExponentialSmallConcats (cb) { - stream.write(flatstr(makeExpoStr('a', 12))) - setImmediate(cb) - }, - function unflattenedExponentialLargeConcats (cb) { - stream.write(makeExpoStr(largeStr, 7)) - setImmediate(cb) - }, - function flattenedExponentialLargeConcats (cb) { - stream.write(flatstr(makeExpoStr(largeStr, 7))) - setImmediate(cb) - } -], 10000) - -run(run) - -function makeStr (str, concats) { - var s = '' - while (concats--) { - s += str - } - return s -} - -function makeExpoStr (str, concats) { - var s = str - while (concats--) { - s += s - } - return s -} diff --git a/node_modules/flatstr/index.js b/node_modules/flatstr/index.js deleted file mode 100644 index 0513eb1..0000000 --- a/node_modules/flatstr/index.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict' - -// You may be tempted to copy and paste this, -// but take a look at the commit history first, -// this is a moving target so relying on the module -// is the best way to make sure the optimization -// method is kept up to date and compatible with -// every Node version. - -function flatstr (s) { - s | 0 - return s -} - -module.exports = flatstr \ No newline at end of file diff --git a/node_modules/flatstr/package.json b/node_modules/flatstr/package.json deleted file mode 100644 index b403596..0000000 --- a/node_modules/flatstr/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "_from": "flatstr@^1.0.12", - "_id": "flatstr@1.0.12", - "_inBundle": false, - "_integrity": "sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==", - "_location": "/flatstr", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "flatstr@^1.0.12", - "name": "flatstr", - "escapedName": "flatstr", - "rawSpec": "^1.0.12", - "saveSpec": null, - "fetchSpec": "^1.0.12" - }, - "_requiredBy": [ - "/pino", - "/sonic-boom" - ], - "_resolved": "https://registry.npmjs.org/flatstr/-/flatstr-1.0.12.tgz", - "_shasum": "c2ba6a08173edbb6c9640e3055b95e287ceb5931", - "_spec": "flatstr@^1.0.12", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/pino", - "author": { - "name": "David Mark Clements" - }, - "browser": { - "v8": "./v8" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/flatstr/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Flattens the underlying C structures of a concatenated JavaScript string", - "devDependencies": { - "fastbench": "^1.0.1", - "tap": "^12.0.1" - }, - "homepage": "https://github.com/davidmarkclements/flatstr#readme", - "license": "MIT", - "main": "index.js", - "name": "flatstr", - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/flatstr.git" - }, - "tags": [ - "perf", - "performance", - "strings", - "concatenation" - ], - "version": "1.0.12" -} diff --git a/node_modules/flatstr/readme.md b/node_modules/flatstr/readme.md deleted file mode 100644 index d8b77b3..0000000 --- a/node_modules/flatstr/readme.md +++ /dev/null @@ -1,82 +0,0 @@ -# flatstr - -Flattens the underlying C structures of a concatenated JavaScript string - -## About - -If you're doing lots of string concatenation and then writing that -string somewhere, you may find that passing your string through -`flatstr` vastly improves performance. - -## Usage - -```js -var flatstr = require('flatstr') -flatstr(someHeavilyConcatenatedString) -``` - -## Benchmarks - -Benchmarks test flat vs non-flat strings being written to -an `fs.WriteStream`. - -``` -unflattenedManySmallConcats*10000: 147.540ms -flattenedManySmallConcats*10000: 105.994ms -unflattenedSeveralLargeConcats*10000: 287.901ms -flattenedSeveralLargeConcats*10000: 226.121ms -unflattenedExponentialSmallConcats*10000: 410.533ms -flattenedExponentialSmallConcats*10000: 219.973ms -unflattenedExponentialLargeConcats*10000: 2774.230ms -flattenedExponentialLargeConcats*10000: 1862.815ms -``` - -In each case, flattened strings win, -here's the performance gains from using `flatstr` - -``` -ManySmallConcats: 28% -SeveralLargeConcats: 21% -ExponentialSmallConcats: 46% -ExponentialLargeConcats: 33% -``` - -## How does it work - -In the v8 C++ layer, JavaScript strings can be represented in two ways. - -1. As an array -2. As a tree - -When JavaScript strings are concatenated, tree structures are used -to represent them. For the concat operation, this is cheaper than -reallocating a larger array. However, performing other operations -on the tree structures can become costly (particularly where lots of -concatenation has occurred). - -V8 has a a method called `String::Flatten`which converts the tree into a C array. This method is typically called before operations that walk through the bytes of the string (for instance, when testing against a regular expression). It may also be called if a string is accessed many times over, -as an optimization on the string. However, strings aren't always flattened. One example is when we pass a string into a `WriteStream`, at some point the string will be converted to a buffer, and this may be expensive if the underlying representation is a tree. - -`String::Flatten` is not exposed as a JavaScript function, but it can be triggered as a side effect. - -There are several ways to indirectly call `String::Flatten` (see `alt-benchmark.js`), -but coercion to a number appears to be (one of) the cheapest. - -However since Node 10 the V8 version has stopped using Flatten in all -places identified. Thus the code has been updated to seamlessly -use the native runtime function `%FlattenString` without having to use -the `--allow-natives-syntax` flag directly. - -One final note: calling flatstr too much can in fact negatively effect performance. For instance, don't call it every time you concat (if that -was performant, v8 wouldn't be using trees in the first place). The best -place to use flatstr is just prior to passing it to an API that eventually -runs non-v8 code (such as `fs.WriteStream`, or perhaps `xhr` or DOM apis in the browser). - - -## Acknowledgements - -* Sponsored by nearForm - -## License - -MIT diff --git a/node_modules/flatstr/test.js b/node_modules/flatstr/test.js deleted file mode 100644 index 50efe8c..0000000 --- a/node_modules/flatstr/test.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict' -var test = require('tap').test -var flatstr = require('.') - -test('does not throw', function (t) { - t.doesNotThrow(() => { - flatstr('abc') - }) - t.doesNotThrow(() => { - flatstr({}) - }) - t.doesNotThrow(() => { - flatstr(1) - }) - t.doesNotThrow(() => { - flatstr(null) - }) - t.end() -}) - -test('returns the same value that was passed in', function (t) { - var o = {} - t.is(flatstr('abc'), 'abc') - t.is(flatstr(o), o) - t.end() -}) diff --git a/node_modules/follow-redirects/LICENSE b/node_modules/follow-redirects/LICENSE deleted file mode 100644 index 742cbad..0000000 --- a/node_modules/follow-redirects/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright 2014–present Olivier Lalonde , James Talmage , Ruben Verborgh - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/follow-redirects/README.md b/node_modules/follow-redirects/README.md deleted file mode 100644 index b16430f..0000000 --- a/node_modules/follow-redirects/README.md +++ /dev/null @@ -1,148 +0,0 @@ -## Follow Redirects - -Drop-in replacement for Node's `http` and `https` modules that automatically follows redirects. - -[![npm version](https://img.shields.io/npm/v/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) -[![Build Status](https://travis-ci.org/follow-redirects/follow-redirects.svg?branch=master)](https://travis-ci.org/follow-redirects/follow-redirects) -[![Coverage Status](https://coveralls.io/repos/follow-redirects/follow-redirects/badge.svg?branch=master)](https://coveralls.io/r/follow-redirects/follow-redirects?branch=master) -[![npm downloads](https://img.shields.io/npm/dm/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) -[![Sponsor on GitHub](https://img.shields.io/static/v1?label=Sponsor&message=%F0%9F%92%96&logo=GitHub)](https://github.com/sponsors/RubenVerborgh) - -`follow-redirects` provides [request](https://nodejs.org/api/http.html#http_http_request_options_callback) and [get](https://nodejs.org/api/http.html#http_http_get_options_callback) - methods that behave identically to those found on the native [http](https://nodejs.org/api/http.html#http_http_request_options_callback) and [https](https://nodejs.org/api/https.html#https_https_request_options_callback) - modules, with the exception that they will seamlessly follow redirects. - -```javascript -const { http, https } = require('follow-redirects'); - -http.get('http://bit.ly/900913', response => { - response.on('data', chunk => { - console.log(chunk); - }); -}).on('error', err => { - console.error(err); -}); -``` - -You can inspect the final redirected URL through the `responseUrl` property on the `response`. -If no redirection happened, `responseUrl` is the original request URL. - -```javascript -const request = https.request({ - host: 'bitly.com', - path: '/UHfDGO', -}, response => { - console.log(response.responseUrl); - // 'http://duckduckgo.com/robots.txt' -}); -request.end(); -``` - -## Options -### Global options -Global options are set directly on the `follow-redirects` module: - -```javascript -const followRedirects = require('follow-redirects'); -followRedirects.maxRedirects = 10; -followRedirects.maxBodyLength = 20 * 1024 * 1024; // 20 MB -``` - -The following global options are supported: - -- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted. - -- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted. - -### Per-request options -Per-request options are set by passing an `options` object: - -```javascript -const url = require('url'); -const { http, https } = require('follow-redirects'); - -const options = url.parse('http://bit.ly/900913'); -options.maxRedirects = 10; -options.beforeRedirect = (options, { headers }) => { - // Use this to adjust the request options upon redirecting, - // to inspect the latest response headers, - // or to cancel the request by throwing an error - if (options.hostname === "example.com") { - options.auth = "user:password"; - } -}; -http.request(options); -``` - -In addition to the [standard HTTP](https://nodejs.org/api/http.html#http_http_request_options_callback) and [HTTPS options](https://nodejs.org/api/https.html#https_https_request_options_callback), -the following per-request options are supported: -- `followRedirects` (default: `true`) – whether redirects should be followed. - -- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted. - -- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted. - -- `beforeRedirect` (default: `undefined`) – optionally change the request `options` on redirects, or abort the request by throwing an error. - -- `agents` (default: `undefined`) – sets the `agent` option per protocol, since HTTP and HTTPS use different agents. Example value: `{ http: new http.Agent(), https: new https.Agent() }` - -- `trackRedirects` (default: `false`) – whether to store the redirected response details into the `redirects` array on the response object. - - -### Advanced usage -By default, `follow-redirects` will use the Node.js default implementations -of [`http`](https://nodejs.org/api/http.html) -and [`https`](https://nodejs.org/api/https.html). -To enable features such as caching and/or intermediate request tracking, -you might instead want to wrap `follow-redirects` around custom protocol implementations: - -```javascript -const { http, https } = require('follow-redirects').wrap({ - http: require('your-custom-http'), - https: require('your-custom-https'), -}); -``` - -Such custom protocols only need an implementation of the `request` method. - -## Browser Usage - -Due to the way the browser works, -the `http` and `https` browser equivalents perform redirects by default. - -By requiring `follow-redirects` this way: -```javascript -const http = require('follow-redirects/http'); -const https = require('follow-redirects/https'); -``` -you can easily tell webpack and friends to replace -`follow-redirect` by the built-in versions: - -```json -{ - "follow-redirects/http" : "http", - "follow-redirects/https" : "https" -} -``` - -## Contributing - -Pull Requests are always welcome. Please [file an issue](https://github.com/follow-redirects/follow-redirects/issues) - detailing your proposal before you invest your valuable time. Additional features and bug fixes should be accompanied - by tests. You can run the test suite locally with a simple `npm test` command. - -## Debug Logging - -`follow-redirects` uses the excellent [debug](https://www.npmjs.com/package/debug) for logging. To turn on logging - set the environment variable `DEBUG=follow-redirects` for debug output from just this module. When running the test - suite it is sometimes advantageous to set `DEBUG=*` to see output from the express server as well. - -## Authors - -- [Ruben Verborgh](https://ruben.verborgh.org/) -- [Olivier Lalonde](mailto:olalonde@gmail.com) -- [James Talmage](mailto:james@talmage.io) - -## License - -[MIT License](https://github.com/follow-redirects/follow-redirects/blob/master/LICENSE) diff --git a/node_modules/follow-redirects/debug.js b/node_modules/follow-redirects/debug.js deleted file mode 100644 index 4c1fa24..0000000 --- a/node_modules/follow-redirects/debug.js +++ /dev/null @@ -1,9 +0,0 @@ -var debug; -try { - /* eslint global-require: off */ - debug = require("debug")("follow-redirects"); -} -catch (error) { - debug = function () { /* */ }; -} -module.exports = debug; diff --git a/node_modules/follow-redirects/http.js b/node_modules/follow-redirects/http.js deleted file mode 100644 index 695e356..0000000 --- a/node_modules/follow-redirects/http.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./").http; diff --git a/node_modules/follow-redirects/https.js b/node_modules/follow-redirects/https.js deleted file mode 100644 index d21c921..0000000 --- a/node_modules/follow-redirects/https.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./").https; diff --git a/node_modules/follow-redirects/index.js b/node_modules/follow-redirects/index.js deleted file mode 100644 index ae42ba2..0000000 --- a/node_modules/follow-redirects/index.js +++ /dev/null @@ -1,498 +0,0 @@ -var url = require("url"); -var URL = url.URL; -var http = require("http"); -var https = require("https"); -var Writable = require("stream").Writable; -var assert = require("assert"); -var debug = require("./debug"); - -// Create handlers that pass events from native requests -var eventHandlers = Object.create(null); -["abort", "aborted", "connect", "error", "socket", "timeout"].forEach(function (event) { - eventHandlers[event] = function (arg1, arg2, arg3) { - this._redirectable.emit(event, arg1, arg2, arg3); - }; -}); - -// Error types with codes -var RedirectionError = createErrorType( - "ERR_FR_REDIRECTION_FAILURE", - "" -); -var TooManyRedirectsError = createErrorType( - "ERR_FR_TOO_MANY_REDIRECTS", - "Maximum number of redirects exceeded" -); -var MaxBodyLengthExceededError = createErrorType( - "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", - "Request body larger than maxBodyLength limit" -); -var WriteAfterEndError = createErrorType( - "ERR_STREAM_WRITE_AFTER_END", - "write after end" -); - -// An HTTP(S) request that can be redirected -function RedirectableRequest(options, responseCallback) { - // Initialize the request - Writable.call(this); - this._sanitizeOptions(options); - this._options = options; - this._ended = false; - this._ending = false; - this._redirectCount = 0; - this._redirects = []; - this._requestBodyLength = 0; - this._requestBodyBuffers = []; - - // Attach a callback if passed - if (responseCallback) { - this.on("response", responseCallback); - } - - // React to responses of native requests - var self = this; - this._onNativeResponse = function (response) { - self._processResponse(response); - }; - - // Perform the first request - this._performRequest(); -} -RedirectableRequest.prototype = Object.create(Writable.prototype); - -// Writes buffered data to the current native request -RedirectableRequest.prototype.write = function (data, encoding, callback) { - // Writing is not allowed if end has been called - if (this._ending) { - throw new WriteAfterEndError(); - } - - // Validate input and shift parameters if necessary - if (!(typeof data === "string" || typeof data === "object" && ("length" in data))) { - throw new TypeError("data should be a string, Buffer or Uint8Array"); - } - if (typeof encoding === "function") { - callback = encoding; - encoding = null; - } - - // Ignore empty buffers, since writing them doesn't invoke the callback - // https://github.com/nodejs/node/issues/22066 - if (data.length === 0) { - if (callback) { - callback(); - } - return; - } - // Only write when we don't exceed the maximum body length - if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { - this._requestBodyLength += data.length; - this._requestBodyBuffers.push({ data: data, encoding: encoding }); - this._currentRequest.write(data, encoding, callback); - } - // Error when we exceed the maximum body length - else { - this.emit("error", new MaxBodyLengthExceededError()); - this.abort(); - } -}; - -// Ends the current native request -RedirectableRequest.prototype.end = function (data, encoding, callback) { - // Shift parameters if necessary - if (typeof data === "function") { - callback = data; - data = encoding = null; - } - else if (typeof encoding === "function") { - callback = encoding; - encoding = null; - } - - // Write data if needed and end - if (!data) { - this._ended = this._ending = true; - this._currentRequest.end(null, null, callback); - } - else { - var self = this; - var currentRequest = this._currentRequest; - this.write(data, encoding, function () { - self._ended = true; - currentRequest.end(null, null, callback); - }); - this._ending = true; - } -}; - -// Sets a header value on the current native request -RedirectableRequest.prototype.setHeader = function (name, value) { - this._options.headers[name] = value; - this._currentRequest.setHeader(name, value); -}; - -// Clears a header value on the current native request -RedirectableRequest.prototype.removeHeader = function (name) { - delete this._options.headers[name]; - this._currentRequest.removeHeader(name); -}; - -// Global timeout for all underlying requests -RedirectableRequest.prototype.setTimeout = function (msecs, callback) { - if (callback) { - this.once("timeout", callback); - } - - if (this.socket) { - startTimer(this, msecs); - } - else { - var self = this; - this._currentRequest.once("socket", function () { - startTimer(self, msecs); - }); - } - - this.once("response", clearTimer); - this.once("error", clearTimer); - - return this; -}; - -function startTimer(request, msecs) { - clearTimeout(request._timeout); - request._timeout = setTimeout(function () { - request.emit("timeout"); - }, msecs); -} - -function clearTimer() { - clearTimeout(this._timeout); -} - -// Proxy all other public ClientRequest methods -[ - "abort", "flushHeaders", "getHeader", - "setNoDelay", "setSocketKeepAlive", -].forEach(function (method) { - RedirectableRequest.prototype[method] = function (a, b) { - return this._currentRequest[method](a, b); - }; -}); - -// Proxy all public ClientRequest properties -["aborted", "connection", "socket"].forEach(function (property) { - Object.defineProperty(RedirectableRequest.prototype, property, { - get: function () { return this._currentRequest[property]; }, - }); -}); - -RedirectableRequest.prototype._sanitizeOptions = function (options) { - // Ensure headers are always present - if (!options.headers) { - options.headers = {}; - } - - // Since http.request treats host as an alias of hostname, - // but the url module interprets host as hostname plus port, - // eliminate the host property to avoid confusion. - if (options.host) { - // Use hostname if set, because it has precedence - if (!options.hostname) { - options.hostname = options.host; - } - delete options.host; - } - - // Complete the URL object when necessary - if (!options.pathname && options.path) { - var searchPos = options.path.indexOf("?"); - if (searchPos < 0) { - options.pathname = options.path; - } - else { - options.pathname = options.path.substring(0, searchPos); - options.search = options.path.substring(searchPos); - } - } -}; - - -// Executes the next native request (initial or redirect) -RedirectableRequest.prototype._performRequest = function () { - // Load the native protocol - var protocol = this._options.protocol; - var nativeProtocol = this._options.nativeProtocols[protocol]; - if (!nativeProtocol) { - this.emit("error", new TypeError("Unsupported protocol " + protocol)); - return; - } - - // If specified, use the agent corresponding to the protocol - // (HTTP and HTTPS use different types of agents) - if (this._options.agents) { - var scheme = protocol.substr(0, protocol.length - 1); - this._options.agent = this._options.agents[scheme]; - } - - // Create the native request - var request = this._currentRequest = - nativeProtocol.request(this._options, this._onNativeResponse); - this._currentUrl = url.format(this._options); - - // Set up event handlers - request._redirectable = this; - for (var event in eventHandlers) { - /* istanbul ignore else */ - if (event) { - request.on(event, eventHandlers[event]); - } - } - - // End a redirected request - // (The first request must be ended explicitly with RedirectableRequest#end) - if (this._isRedirect) { - // Write the request entity and end. - var i = 0; - var self = this; - var buffers = this._requestBodyBuffers; - (function writeNext(error) { - // Only write if this request has not been redirected yet - /* istanbul ignore else */ - if (request === self._currentRequest) { - // Report any write errors - /* istanbul ignore if */ - if (error) { - self.emit("error", error); - } - // Write the next buffer if there are still left - else if (i < buffers.length) { - var buffer = buffers[i++]; - /* istanbul ignore else */ - if (!request.finished) { - request.write(buffer.data, buffer.encoding, writeNext); - } - } - // End the request if `end` has been called on us - else if (self._ended) { - request.end(); - } - } - }()); - } -}; - -// Processes a response from the current native request -RedirectableRequest.prototype._processResponse = function (response) { - // Store the redirected response - var statusCode = response.statusCode; - if (this._options.trackRedirects) { - this._redirects.push({ - url: this._currentUrl, - headers: response.headers, - statusCode: statusCode, - }); - } - - // RFC7231§6.4: The 3xx (Redirection) class of status code indicates - // that further action needs to be taken by the user agent in order to - // fulfill the request. If a Location header field is provided, - // the user agent MAY automatically redirect its request to the URI - // referenced by the Location field value, - // even if the specific status code is not understood. - var location = response.headers.location; - if (location && this._options.followRedirects !== false && - statusCode >= 300 && statusCode < 400) { - // Abort the current request - this._currentRequest.removeAllListeners(); - this._currentRequest.on("error", noop); - this._currentRequest.abort(); - // Discard the remainder of the response to avoid waiting for data - response.destroy(); - - // RFC7231§6.4: A client SHOULD detect and intervene - // in cyclical redirections (i.e., "infinite" redirection loops). - if (++this._redirectCount > this._options.maxRedirects) { - this.emit("error", new TooManyRedirectsError()); - return; - } - - // RFC7231§6.4: Automatic redirection needs to done with - // care for methods not known to be safe, […] - // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change - // the request method from POST to GET for the subsequent request. - if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || - // RFC7231§6.4.4: The 303 (See Other) status code indicates that - // the server is redirecting the user agent to a different resource […] - // A user agent can perform a retrieval request targeting that URI - // (a GET or HEAD request if using HTTP) […] - (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { - this._options.method = "GET"; - // Drop a possible entity and headers related to it - this._requestBodyBuffers = []; - removeMatchingHeaders(/^content-/i, this._options.headers); - } - - // Drop the Host header, as the redirect might lead to a different host - var previousHostName = removeMatchingHeaders(/^host$/i, this._options.headers) || - url.parse(this._currentUrl).hostname; - - // Create the redirected request - var redirectUrl = url.resolve(this._currentUrl, location); - debug("redirecting to", redirectUrl); - this._isRedirect = true; - var redirectUrlParts = url.parse(redirectUrl); - Object.assign(this._options, redirectUrlParts); - - // Drop the Authorization header if redirecting to another host - if (redirectUrlParts.hostname !== previousHostName) { - removeMatchingHeaders(/^authorization$/i, this._options.headers); - } - - // Evaluate the beforeRedirect callback - if (typeof this._options.beforeRedirect === "function") { - var responseDetails = { headers: response.headers }; - try { - this._options.beforeRedirect.call(null, this._options, responseDetails); - } - catch (err) { - this.emit("error", err); - return; - } - this._sanitizeOptions(this._options); - } - - // Perform the redirected request - try { - this._performRequest(); - } - catch (cause) { - var error = new RedirectionError("Redirected request failed: " + cause.message); - error.cause = cause; - this.emit("error", error); - } - } - else { - // The response is not a redirect; return it as-is - response.responseUrl = this._currentUrl; - response.redirects = this._redirects; - this.emit("response", response); - - // Clean up - this._requestBodyBuffers = []; - } -}; - -// Wraps the key/value object of protocols with redirect functionality -function wrap(protocols) { - // Default settings - var exports = { - maxRedirects: 21, - maxBodyLength: 10 * 1024 * 1024, - }; - - // Wrap each protocol - var nativeProtocols = {}; - Object.keys(protocols).forEach(function (scheme) { - var protocol = scheme + ":"; - var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; - var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); - - // Executes a request, following redirects - wrappedProtocol.request = function (input, options, callback) { - // Parse parameters - if (typeof input === "string") { - var urlStr = input; - try { - input = urlToOptions(new URL(urlStr)); - } - catch (err) { - /* istanbul ignore next */ - input = url.parse(urlStr); - } - } - else if (URL && (input instanceof URL)) { - input = urlToOptions(input); - } - else { - callback = options; - options = input; - input = { protocol: protocol }; - } - if (typeof options === "function") { - callback = options; - options = null; - } - - // Set defaults - options = Object.assign({ - maxRedirects: exports.maxRedirects, - maxBodyLength: exports.maxBodyLength, - }, input, options); - options.nativeProtocols = nativeProtocols; - - assert.equal(options.protocol, protocol, "protocol mismatch"); - debug("options", options); - return new RedirectableRequest(options, callback); - }; - - // Executes a GET request, following redirects - wrappedProtocol.get = function (input, options, callback) { - var request = wrappedProtocol.request(input, options, callback); - request.end(); - return request; - }; - }); - return exports; -} - -/* istanbul ignore next */ -function noop() { /* empty */ } - -// from https://github.com/nodejs/node/blob/master/lib/internal/url.js -function urlToOptions(urlObject) { - var options = { - protocol: urlObject.protocol, - hostname: urlObject.hostname.startsWith("[") ? - /* istanbul ignore next */ - urlObject.hostname.slice(1, -1) : - urlObject.hostname, - hash: urlObject.hash, - search: urlObject.search, - pathname: urlObject.pathname, - path: urlObject.pathname + urlObject.search, - href: urlObject.href, - }; - if (urlObject.port !== "") { - options.port = Number(urlObject.port); - } - return options; -} - -function removeMatchingHeaders(regex, headers) { - var lastValue; - for (var header in headers) { - if (regex.test(header)) { - lastValue = headers[header]; - delete headers[header]; - } - } - return lastValue; -} - -function createErrorType(code, defaultMessage) { - function CustomError(message) { - Error.captureStackTrace(this, this.constructor); - this.message = message || defaultMessage; - } - CustomError.prototype = new Error(); - CustomError.prototype.constructor = CustomError; - CustomError.prototype.name = "Error [" + code + "]"; - CustomError.prototype.code = code; - return CustomError; -} - -// Exports -module.exports = wrap({ http: http, https: https }); -module.exports.wrap = wrap; diff --git a/node_modules/follow-redirects/package.json b/node_modules/follow-redirects/package.json deleted file mode 100644 index 376388d..0000000 --- a/node_modules/follow-redirects/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_from": "follow-redirects@^1.10.0", - "_id": "follow-redirects@1.13.0", - "_inBundle": false, - "_integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==", - "_location": "/follow-redirects", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "follow-redirects@^1.10.0", - "name": "follow-redirects", - "escapedName": "follow-redirects", - "rawSpec": "^1.10.0", - "saveSpec": null, - "fetchSpec": "^1.10.0" - }, - "_requiredBy": [ - "/axios" - ], - "_resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "_shasum": "b42e8d93a2a7eea5ed88633676d6597bc8e384db", - "_spec": "follow-redirects@^1.10.0", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/axios", - "author": { - "name": "Ruben Verborgh", - "email": "ruben@verborgh.org", - "url": "https://ruben.verborgh.org/" - }, - "bugs": { - "url": "https://github.com/follow-redirects/follow-redirects/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Olivier Lalonde", - "email": "olalonde@gmail.com", - "url": "http://www.syskall.com" - }, - { - "name": "James Talmage", - "email": "james@talmage.io" - } - ], - "deprecated": false, - "description": "HTTP and HTTPS modules that follow redirects.", - "devDependencies": { - "concat-stream": "^2.0.0", - "eslint": "^5.16.0", - "express": "^4.16.4", - "lolex": "^3.1.0", - "mocha": "^6.0.2", - "nyc": "^14.1.1" - }, - "engines": { - "node": ">=4.0" - }, - "files": [ - "*.js" - ], - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "homepage": "https://github.com/follow-redirects/follow-redirects", - "keywords": [ - "http", - "https", - "url", - "redirect", - "client", - "location", - "utility" - ], - "license": "MIT", - "main": "index.js", - "name": "follow-redirects", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/follow-redirects/follow-redirects.git" - }, - "scripts": { - "lint": "eslint *.js test", - "mocha": "nyc mocha", - "test": "npm run lint && npm run mocha" - }, - "version": "1.13.0" -} diff --git a/node_modules/luxon/CHANGELOG.md b/node_modules/luxon/CHANGELOG.md deleted file mode 100644 index c39fb4f..0000000 --- a/node_modules/luxon/CHANGELOG.md +++ /dev/null @@ -1,513 +0,0 @@ -# Changelog - -## 1.25.0 - - * fix fromFormat with Intl formats containing non-breaking spaces - * Support higher precisision in ISO milliseconds - * Some fixes for 00:30 timezones - * Fix some throwOnInvalid for invalid Intervals - * Various doc fixes - * Fix Interval#isSame for empty intervals - * Mark package as side effect-free - * Add support for intervals with a large number of seconds - -## 1.24.1 (2020-05-04) - - * Remove erroneous `console.log` call - -## 1.24.0 (2020-05-03) - - * Update polyfills for pollyfilled build - -## 1.23.0 (2020-04-02) - - * Allow minus sign prefix when creating Duration from ISO - -## 1.22.2 (2020-03-25) - - * Added more details to error messages for type errors - -## 1.22.1 (2020-03-19) - - * Added support for ISO basic format to DateTime#toISO - -## 1.22.0 (2020-01-26) - - * Fix setZone's handling of pre-1970 dates with milisecond components - * Fix keepLocalTime for large jumps near the target zone's DST - * Fix cache perf for toRelative() - -## 1.21.3 (2019-11-28) - - * Fix parsing of meridiems in macro tokens in newer versions of v8 - -## 1.21.2 (2019-11-18) - - * Fix bug in Chrome Canary that threw off time zone calculations - -## 1.21.1 (2019-11-03) - - * Fix for quarter parsing - * Some documentation updates - -## 1.21.0 (2019-10-30) - - * Added quarter support to the parser - * Fix some rounding issues in ISO formatting - -## 1.20.0 (2019-10-29) - - * Added Duration#mapUnits - * added Interval#toISODate and Interval#toISOTime - * Some documentation fixes - -## 1.19.3 - - * Cache offset values - * Fix handling of negative sub 1-hour offsets - -## 1.19.2 - - * Speculative fix for Node 6 - -## 1.19.1 - - * Fix Intl.DateTimeFormat usage for polyfills - -## 1.19.0 - - * Interval#splitAt now ignores input dates outside the interval - * Don't allow decimals in DateTime creation - -## 1.18.2 - - * Fix handling of decimals in DateTime#plus and #minus - -## 1.18.1 - - * Fix validity when adding or subtracting time that exceeds Date max/min boundaries - -## 1.18.0 - - * Add support for macro tokens in the parser - -## 1.17.2 - - * Fix issue with `toRelative` using `style: short` with plural days - -## 1.17.1 - - * Reject out-of-range numbers in DateTime.fromMillis - * Reject 0s in ISO date inputs - -## 1.17.0 - - * DateTime.min and DateTime.max throw if they get the wrong kind of arguments - * Fixed throwOnInvalid logic for Interval - * Added `DATETIME_MED_WITH_WEEKDAY` preset - -## 1.16.1 - - * Catch errors trying to use Intl in weird versions of IE 11 - -## 1.16.0 - - * Fixed locale default logic for `DateTime#toFormat("ZZZZ") - -## 1.15.0 - - * Added `formatOffset` to Zones - -## 1.14.0 - - * Allow the zone argument to Interval.fromISO with duration components - * Ignore the zone argument to Duration factory methods - -## 1.13.3 - - * Fix keepLocalTime calculations that span offset changes - -## 1.13.2 - - * Fixed ISO formatting for dates > 999 - -## 1.13.1 - - * Performance improvements for regex parsing - -## 1.13.0 - - * Support numberSystem in fromFormat - * Fix validity for bad initial zone specifiers - -## 1.12.1 - - * Fix cross-month diffs in some scenarios - * Fix time zone parsing when the time zone isn't at the end - * Memoize IANA zone creation - -## 1.12.0 - - * Add some explicit CDN support to the NPM package - * Add week token to duration ISO support - * Lots of cleanup and test coverage changes - -## 1.11.4 - - * `setZone("local")` now returns the defaultZone if it is set - * Fixes for the polyfilled build - -## 1.11.3 - - * Allow 24:00 in ISO (and other) strings - * Fix some bugs with the typecheck functions like `DateTime.isDateTime()` - -## 1.11.2 - - * Fixed handling of some characters in fromFormat literal sections - * Hanlde string values in object arguments to DateTime methods - * Fixed toRelativeCalendar's handling of zones in the base date - -## 1.11.1 - - * Fix DateTime#plus() when spanning across AD 100 - -## 1.11.0 - - * Fix low-year handling for IANA zones - * `DateTime#toLocal()` now uses the default locale - * Fix zero duration formatting - * Many documentation fixes - -## 1.10.0 - -- Fix endOf("day") during DSTs (#399) -- Add `Interval#mapEndpoints (#400) -- Add `DateTime#zone` and `Info.normalizeZone` (#404) - -## 1.9.0 - -- Add `DateTime#toRelative` and `DateTime#toRelativeCalendar` - -## 1.8.3 - -- Allow "UTC" in the zone position of `fromSQL` -- Force `isDateTime` and `isDuration` to return booleans in all cases - -## 1.8.2 - -- Trim leading \u200e characters from offset names in Edge 16 and 17 - -## 1.8.1 - -- Add `DateTime.fromSeconds` and `DateTime#toSeconds` - -## 1.7.1 - -- Floor the seconds instead of rounding them when outputting the 'X' format -- Change the options to toLocale to override the configuration (the previous options were essentially ignored) - -## 1.6.2 - -- Fixing merge error that resulted in bad error messages - -## 1.6.0 - -- **midly breaking** Rework negative durations -- Fix handling weekdays at the end of leap week years -- Add isDuration, isDateTime, and isInterval -- Fix handling of Luxon object arguments passed from other execution contexts - -## 1.5.0 - -- Improved error message -- Added DateTime#invalidExplanation, Duration#invalidExplanation, Interval#invalidExplanation to provide more details on invalid objects - -## 1.4.6 - -- Cache Intl objects for an 85x speed up on basic operations using non-en locales - -## 1.4.5 - -- Fix minified builds - -## 1.4.4 - -- Fix hour formatting in RFC822 strings -- Interval.fromISO accepts formats with durations - -## 1.4.3 - -Removal accidentally-introduced runtime dependency - -## 1.4.2 - -- Handle locale strings with BCP 47 extensions. Especially helpful for environments with funky default locales -- Support for [weekYear]-W[weekNumber] ISO 8601 strings - -## 1.4.1 - -- Empty diffs now have all the asked-for units in them, set at 0 -- Duration operations perserve the superset of units - -## 1.4.0 - -- Add x and X to toFormat for formatting Epoch seconds and Epoch milliseconds -- Parser allows a wider range of IANA zone specifiers -- BREAKING: Etc/GMT+10 is now interpreted as UTC-10, per spec - -## 1.3.3 - -Documentation fixes - -## 1.3.2 - -- DateTime.fromMillis will throw if passed a non-number -- Fixes for type checking across JS contexts - -## 1.3.1 - -- Include milliseconds in Duration#toISO -- Avoid deprecation warning from DateTime#inspect in Node 10 - -## 1.3.0 - -- **mildly breaking change** Duration.toFormat now floors its outputs instead of rounding them (see #224) -- Added 'floor' option to Duration.toFormat and deprecated the 'round' option -- Added `Dateime.toBSON` -- Fixed infinite loop when passing invalid or zero-length durations to Interval#splitBy -- Added better error handling to Duration.fromObject() - -## 1.2.1 - -- 222x speed-up in DateTime creation for non-en locales -- Added `DateTime#toMillis` alias for `DateTime#valueOf` -- Fixed types on zone exports - -## 1.2.0 - -- Export Zone classes -- Fix `endOf` and `startOf` for quarters -- Change `toFormat("Z")` to return a number for UTC -- Allow "GTM" as an argument to `setZone` - -## 1.1.0 - -- Support for zone names with more than two components -- Fixed long-term-accurate conversions for months -- Added `weeksInWeekYear` - -## 1.0.0 - -- The big one-oh. No changes from 0.5.8. - -## 0.5.8 - -- Large perf improvements for `DateTime#toFormat()`, when using non-intl numbers - -## 0.5.7 - -- Added AMD build to the NPM package -- Large performance improvements to technical formatting (e.g. `DateTime#toISO`) - -## 0.5.6 - -- Refactor internals -- Added support for fractional seconds in `Duration.fromISO` -- Added browser global to the NPM package - -## 0.5.5 - -- Best-we-can-do fix for `DateTime#toLocaleString()` for fixed-offset zones when showing the zone name in the output -- Fixed `Duration#shiftTo` for unormalized Durations that need a rollup cascade - -## 0.5.4 - -- Fix default locales in Node -- Fix prototype to help with React inspection -- Improve REPL output for Durations in Node - -## 0.5.3 - -- Remove errant ICU runtime dep (again) - -## 0.5.2 - -- Remove comments from minified builds (introduced by 0.5.1) - -## 0.5.1 - -- Fixed minified builds (oops) -- Fix computation of fractional parts of diffs - -## 0.5.0 - -- `isBefore()` returns true for the end of the interval, consistent with being half-open -- `zoneName` now rturns `null` for invalid DateTimes -- Added quarter support -- Adding a month to Jan 31 gives Feb 28/29 - -## 0.4.0 - -- Always round down to the nearest millisecond when parsing - -## 0.3.1 - -- Fixed `toLocaleString` for fixed-offset zones in the absence of Intl -- Added `Info.isValidIANAZone` -- Made malformed zone specifiers result in invalid DateTime instances - -## 0.3.0 - -- Rename DateTime.fromString to DateTime.fromFormat (leaving deprecated DateTime.fromString) -- Rename DateTime.fromStringExplain to DateTime.fromFormatExplain (leaving deprecated DateTime.fromStringExplain) -- Support Etc/GMT IANA zones -- Perf fixes for zones -- Rework build infrastructure - -## 0.2.12 - -- Fix DateTime.fromObject's handling of default zones -- Change `keepCalendarTime` to `keepLocalTime` - -## 0.2.11 - -- Handle no arguments in `DateTime.min` and `DateTime.max` -- Documentation fixes - -## 0.2.10 - -- Fix bug where Durations could sometimes mutate - -## 0.2.9 - -- Fix `DateTime.fromMillis(0)` more thoroughly - -## 0.2.8 - -- Fix sourcemaps - -## 0.2.7 - -- Fix `DateTime.fromMillis(0)` - -## 0.2.6 - -- Fix 'h' and 'hh' `toFormat` tokens for midnight - -## 0.2.5 - -- Better `shiftTo` behavior for durations with floating point components - -## 0.2.4 - -- Fix `toHTTP` to use 24-hour hours -- Tighten up regular expressions -- Various documentation fixes - -## 0.2.3 - -- Fixes for `diff` with multiple units - -## 0.2.2 - -- Fixes for `fromSQL`, `toSQL`, `toSQLTime`, and `toSQLDate` -- Add `includeOffset` option to `toISO` and `toISOTime` - -## 0.2.1 - -- Add `module` field to package.json - -## 0.2.0 - -- Remove polyfills from main builds -- Update compilation toolchain to target builds more exactly -- Fix IE in polyfill build - -## 0.1.0 - -- Add `.fromSQL`, `#toSQL`, `#toSQLTime`, `#toSQLDate` -- Fix AM/PM parsing -- Major perf improvements -- Default to system locale when using macro formats in `#toFormat` -- `.fromISO` accepts standalone times -- See https://github.com/moment/luxon/issues/93 for important news concerning field accessibility - -## 0.0.22 - -- Add 'u' formatting and parsing -- Add 'y', 'yyyyy', and 'yyyyyy' parsing tokens -- Add 'yyyyyy' formatting token -- Better error messages for missing arguments to `DateTime.fromString` - -## 0.0.21 - -- Fix zones for Edge - -## 0.0.20 - -- Fix `fromISO` to accept various levels of subsecond precision - -## 0.0.19 - -- Fixed parsing for ordinals -- Made parsing stricter - -## 0.0.18 - -- Fixed formatting for non-hour aligned fixed-offset zones -- Fixed longterm conversion accuracy option in diffs -- Fixed invalid handling in `Interval#set` - -## 0.0.17 - -- Fixing formatting for fixed-offset zones - -## 0.0.16 - -- Fixes for IE 9 & 10 - -## 0.0.15 - -- Fixing busted release 0.0.14 - -## 0.0.13 - -- toLocaleString() and others default to the system's locale -- support for ISO week durations in `Duration.fromISO` - -## 0.0.12 - -- Improve non-Intl fallbacks for toLocaleString -- Fix `offsetNameShort` and `offsetNameLong` for non-Intl environments -- Added `weekdayShort`, `weekdayLong`, `monthShort`, `monthLong` DateTime getters - -## 0.0.10 - -- Only include build dir in NPM module - -## 0.0.9 - -- Move to Moment Github org - -## 0.0.8 - -- The local zone can now report its IANA name -- Fixed parsing bug for `yy` and `kk` -- Improved test coverage - -## 0.0.7 - -- Added `toLocaleParts` -- Slightly more friendly month/weekday parsing -- Default locale setting - -## 0.0.6 - -- Stricter `toJSDate` -- `fromISO` now supports `year` and `year-month` formats -- More graceful degradation in the absence of platform features - -## 0.0.5 - -Experimental, but now broadly useful. diff --git a/node_modules/luxon/README.md b/node_modules/luxon/README.md deleted file mode 100644 index feaaeab..0000000 --- a/node_modules/luxon/README.md +++ /dev/null @@ -1,54 +0,0 @@ -# Luxon - -[![MIT License][license-image]][license] [![Build Status][travis-image]][travis-url] [![NPM version][npm-version-image]][npm-url] [![Coverage Status][test-coverage-image]][test-coverage-url] [![Doc coverage][doc-coverage-image]][doc-url] [![PRs welcome][contributing-image]][contributing-url] - -Luxon is a library for working with dates and times in Javascript. - -```js -DateTime.local().setZone('America/New_York').minus({ weeks: 1 }).endOf('day').toISO(); -``` - -## Features - * DateTime, Duration, and Interval types. - * Immutable, chainable, unambiguous API. - * Parsing and formatting for common and custom formats. - * Native time zone and Intl support (no locale or tz files). - -## Download/install - -[Download/install instructions](https://moment.github.io/luxon/docs/manual/install.html) - -## Documentation - -* [General documentation][doc-url] -* [API docs](https://moment.github.io/luxon/docs/identifiers.html) -* [Quick tour](https://moment.github.io/luxon/docs/manual/tour.html) -* [For Moment users](https://moment.github.io/luxon/docs/manual/moment.html) -* [Why does Luxon exist?](https://moment.github.io/luxon/docs/manual/why.html) -* [A quick demo](https://moment.github.io/luxon/demo/global.html) - -## Development - -See [contributing](contributing.md). - -![Phasers to stun][phasers-image] - -[license-image]: http://img.shields.io/badge/license-MIT-blue.svg -[license]: license.md - -[travis-url]: http://travis-ci.org/moment/luxon -[travis-image]: https://api.travis-ci.org/moment/luxon.svg?branch=master - -[npm-url]: https://npmjs.org/package/luxon -[npm-version-image]: https://badge.fury.io/js/luxon.svg - -[doc-url]: https://moment.github.io/luxon/docs/ -[doc-coverage-image]: https://moment.github.io/luxon/docs/badge.svg - -[test-coverage-url]: https://codecov.io/gh/moment/luxon -[test-coverage-image]: https://codecov.io/gh/moment/luxon/branch/master/graph/badge.svg - -[contributing-url]: https://moment.github.io/luxon/docs/manual/contributing.html -[contributing-image]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg - -[phasers-image]: https://img.shields.io/badge/phasers-stun-brightgreen.svg diff --git a/node_modules/luxon/build/amd/luxon.js b/node_modules/luxon/build/amd/luxon.js deleted file mode 100644 index bff5f0d..0000000 --- a/node_modules/luxon/build/amd/luxon.js +++ /dev/null @@ -1,8295 +0,0 @@ -define(['exports'], function (exports) { 'use strict'; - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; - } - - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); - return true; - } catch (e) { - return false; - } - } - - function _construct(Parent, args, Class) { - if (_isNativeReflectConstruct()) { - _construct = Reflect.construct; - } else { - _construct = function _construct(Parent, args, Class) { - var a = [null]; - a.push.apply(a, args); - var Constructor = Function.bind.apply(Parent, a); - var instance = new Constructor(); - if (Class) _setPrototypeOf(instance, Class.prototype); - return instance; - }; - } - - return _construct.apply(null, arguments); - } - - function _isNativeFunction(fn) { - return Function.toString.call(fn).indexOf("[native code]") !== -1; - } - - function _wrapNativeSuper(Class) { - var _cache = typeof Map === "function" ? new Map() : undefined; - - _wrapNativeSuper = function _wrapNativeSuper(Class) { - if (Class === null || !_isNativeFunction(Class)) return Class; - - if (typeof Class !== "function") { - throw new TypeError("Super expression must either be null or a function"); - } - - if (typeof _cache !== "undefined") { - if (_cache.has(Class)) return _cache.get(Class); - - _cache.set(Class, Wrapper); - } - - function Wrapper() { - return _construct(Class, arguments, _getPrototypeOf(this).constructor); - } - - Wrapper.prototype = Object.create(Class.prototype, { - constructor: { - value: Wrapper, - enumerable: false, - writable: true, - configurable: true - } - }); - return _setPrototypeOf(Wrapper, Class); - }; - - return _wrapNativeSuper(Class); - } - - function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(n); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; - } - - function _createForOfIteratorHelperLoose(o) { - var i = 0; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) return function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }; - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - i = o[Symbol.iterator](); - return i.next.bind(i); - } - - // these aren't really private, but nor are they really useful to document - - /** - * @private - */ - var LuxonError = /*#__PURE__*/function (_Error) { - _inheritsLoose(LuxonError, _Error); - - function LuxonError() { - return _Error.apply(this, arguments) || this; - } - - return LuxonError; - }( /*#__PURE__*/_wrapNativeSuper(Error)); - /** - * @private - */ - - - var InvalidDateTimeError = /*#__PURE__*/function (_LuxonError) { - _inheritsLoose(InvalidDateTimeError, _LuxonError); - - function InvalidDateTimeError(reason) { - return _LuxonError.call(this, "Invalid DateTime: " + reason.toMessage()) || this; - } - - return InvalidDateTimeError; - }(LuxonError); - /** - * @private - */ - - var InvalidIntervalError = /*#__PURE__*/function (_LuxonError2) { - _inheritsLoose(InvalidIntervalError, _LuxonError2); - - function InvalidIntervalError(reason) { - return _LuxonError2.call(this, "Invalid Interval: " + reason.toMessage()) || this; - } - - return InvalidIntervalError; - }(LuxonError); - /** - * @private - */ - - var InvalidDurationError = /*#__PURE__*/function (_LuxonError3) { - _inheritsLoose(InvalidDurationError, _LuxonError3); - - function InvalidDurationError(reason) { - return _LuxonError3.call(this, "Invalid Duration: " + reason.toMessage()) || this; - } - - return InvalidDurationError; - }(LuxonError); - /** - * @private - */ - - var ConflictingSpecificationError = /*#__PURE__*/function (_LuxonError4) { - _inheritsLoose(ConflictingSpecificationError, _LuxonError4); - - function ConflictingSpecificationError() { - return _LuxonError4.apply(this, arguments) || this; - } - - return ConflictingSpecificationError; - }(LuxonError); - /** - * @private - */ - - var InvalidUnitError = /*#__PURE__*/function (_LuxonError5) { - _inheritsLoose(InvalidUnitError, _LuxonError5); - - function InvalidUnitError(unit) { - return _LuxonError5.call(this, "Invalid unit " + unit) || this; - } - - return InvalidUnitError; - }(LuxonError); - /** - * @private - */ - - var InvalidArgumentError = /*#__PURE__*/function (_LuxonError6) { - _inheritsLoose(InvalidArgumentError, _LuxonError6); - - function InvalidArgumentError() { - return _LuxonError6.apply(this, arguments) || this; - } - - return InvalidArgumentError; - }(LuxonError); - /** - * @private - */ - - var ZoneIsAbstractError = /*#__PURE__*/function (_LuxonError7) { - _inheritsLoose(ZoneIsAbstractError, _LuxonError7); - - function ZoneIsAbstractError() { - return _LuxonError7.call(this, "Zone is an abstract class") || this; - } - - return ZoneIsAbstractError; - }(LuxonError); - - /** - * @private - */ - var n = "numeric", - s = "short", - l = "long"; - var DATE_SHORT = { - year: n, - month: n, - day: n - }; - var DATE_MED = { - year: n, - month: s, - day: n - }; - var DATE_MED_WITH_WEEKDAY = { - year: n, - month: s, - day: n, - weekday: s - }; - var DATE_FULL = { - year: n, - month: l, - day: n - }; - var DATE_HUGE = { - year: n, - month: l, - day: n, - weekday: l - }; - var TIME_SIMPLE = { - hour: n, - minute: n - }; - var TIME_WITH_SECONDS = { - hour: n, - minute: n, - second: n - }; - var TIME_WITH_SHORT_OFFSET = { - hour: n, - minute: n, - second: n, - timeZoneName: s - }; - var TIME_WITH_LONG_OFFSET = { - hour: n, - minute: n, - second: n, - timeZoneName: l - }; - var TIME_24_SIMPLE = { - hour: n, - minute: n, - hour12: false - }; - /** - * {@link toLocaleString}; format like '09:30:23', always 24-hour. - */ - - var TIME_24_WITH_SECONDS = { - hour: n, - minute: n, - second: n, - hour12: false - }; - /** - * {@link toLocaleString}; format like '09:30:23 EDT', always 24-hour. - */ - - var TIME_24_WITH_SHORT_OFFSET = { - hour: n, - minute: n, - second: n, - hour12: false, - timeZoneName: s - }; - /** - * {@link toLocaleString}; format like '09:30:23 Eastern Daylight Time', always 24-hour. - */ - - var TIME_24_WITH_LONG_OFFSET = { - hour: n, - minute: n, - second: n, - hour12: false, - timeZoneName: l - }; - /** - * {@link toLocaleString}; format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. - */ - - var DATETIME_SHORT = { - year: n, - month: n, - day: n, - hour: n, - minute: n - }; - /** - * {@link toLocaleString}; format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. - */ - - var DATETIME_SHORT_WITH_SECONDS = { - year: n, - month: n, - day: n, - hour: n, - minute: n, - second: n - }; - var DATETIME_MED = { - year: n, - month: s, - day: n, - hour: n, - minute: n - }; - var DATETIME_MED_WITH_SECONDS = { - year: n, - month: s, - day: n, - hour: n, - minute: n, - second: n - }; - var DATETIME_MED_WITH_WEEKDAY = { - year: n, - month: s, - day: n, - weekday: s, - hour: n, - minute: n - }; - var DATETIME_FULL = { - year: n, - month: l, - day: n, - hour: n, - minute: n, - timeZoneName: s - }; - var DATETIME_FULL_WITH_SECONDS = { - year: n, - month: l, - day: n, - hour: n, - minute: n, - second: n, - timeZoneName: s - }; - var DATETIME_HUGE = { - year: n, - month: l, - day: n, - weekday: l, - hour: n, - minute: n, - timeZoneName: l - }; - var DATETIME_HUGE_WITH_SECONDS = { - year: n, - month: l, - day: n, - weekday: l, - hour: n, - minute: n, - second: n, - timeZoneName: l - }; - - /* - This is just a junk drawer, containing anything used across multiple classes. - Because Luxon is small(ish), this should stay small and we won't worry about splitting - it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area. - */ - /** - * @private - */ - // TYPES - - function isUndefined(o) { - return typeof o === "undefined"; - } - function isNumber(o) { - return typeof o === "number"; - } - function isInteger(o) { - return typeof o === "number" && o % 1 === 0; - } - function isString(o) { - return typeof o === "string"; - } - function isDate(o) { - return Object.prototype.toString.call(o) === "[object Date]"; - } // CAPABILITIES - - function hasIntl() { - try { - return typeof Intl !== "undefined" && Intl.DateTimeFormat; - } catch (e) { - return false; - } - } - function hasFormatToParts() { - return !isUndefined(Intl.DateTimeFormat.prototype.formatToParts); - } - function hasRelative() { - try { - return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat; - } catch (e) { - return false; - } - } // OBJECTS AND ARRAYS - - function maybeArray(thing) { - return Array.isArray(thing) ? thing : [thing]; - } - function bestBy(arr, by, compare) { - if (arr.length === 0) { - return undefined; - } - - return arr.reduce(function (best, next) { - var pair = [by(next), next]; - - if (!best) { - return pair; - } else if (compare(best[0], pair[0]) === best[0]) { - return best; - } else { - return pair; - } - }, null)[1]; - } - function pick(obj, keys) { - return keys.reduce(function (a, k) { - a[k] = obj[k]; - return a; - }, {}); - } - function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); - } // NUMBERS AND STRINGS - - function integerBetween(thing, bottom, top) { - return isInteger(thing) && thing >= bottom && thing <= top; - } // x % n but takes the sign of n instead of x - - function floorMod(x, n) { - return x - n * Math.floor(x / n); - } - function padStart(input, n) { - if (n === void 0) { - n = 2; - } - - if (input.toString().length < n) { - return ("0".repeat(n) + input).slice(-n); - } else { - return input.toString(); - } - } - function parseInteger(string) { - if (isUndefined(string) || string === null || string === "") { - return undefined; - } else { - return parseInt(string, 10); - } - } - function parseMillis(fraction) { - // Return undefined (instead of 0) in these cases, where fraction is not set - if (isUndefined(fraction) || fraction === null || fraction === "") { - return undefined; - } else { - var f = parseFloat("0." + fraction) * 1000; - return Math.floor(f); - } - } - function roundTo(number, digits, towardZero) { - if (towardZero === void 0) { - towardZero = false; - } - - var factor = Math.pow(10, digits), - rounder = towardZero ? Math.trunc : Math.round; - return rounder(number * factor) / factor; - } // DATE BASICS - - function isLeapYear(year) { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); - } - function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; - } - function daysInMonth(year, month) { - var modMonth = floorMod(month - 1, 12) + 1, - modYear = year + (month - modMonth) / 12; - - if (modMonth === 2) { - return isLeapYear(modYear) ? 29 : 28; - } else { - return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1]; - } - } // covert a calendar object to a local timestamp (epoch, but with the offset baked in) - - function objToLocalTS(obj) { - var d = Date.UTC(obj.year, obj.month - 1, obj.day, obj.hour, obj.minute, obj.second, obj.millisecond); // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that - - if (obj.year < 100 && obj.year >= 0) { - d = new Date(d); - d.setUTCFullYear(d.getUTCFullYear() - 1900); - } - - return +d; - } - function weeksInWeekYear(weekYear) { - var p1 = (weekYear + Math.floor(weekYear / 4) - Math.floor(weekYear / 100) + Math.floor(weekYear / 400)) % 7, - last = weekYear - 1, - p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7; - return p1 === 4 || p2 === 3 ? 53 : 52; - } - function untruncateYear(year) { - if (year > 99) { - return year; - } else return year > 60 ? 1900 + year : 2000 + year; - } // PARSING - - function parseZoneInfo(ts, offsetFormat, locale, timeZone) { - if (timeZone === void 0) { - timeZone = null; - } - - var date = new Date(ts), - intlOpts = { - hour12: false, - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit" - }; - - if (timeZone) { - intlOpts.timeZone = timeZone; - } - - var modified = Object.assign({ - timeZoneName: offsetFormat - }, intlOpts), - intl = hasIntl(); - - if (intl && hasFormatToParts()) { - var parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(function (m) { - return m.type.toLowerCase() === "timezonename"; - }); - return parsed ? parsed.value : null; - } else if (intl) { - // this probably doesn't work for all locales - var without = new Intl.DateTimeFormat(locale, intlOpts).format(date), - included = new Intl.DateTimeFormat(locale, modified).format(date), - diffed = included.substring(without.length), - trimmed = diffed.replace(/^[, \u200e]+/, ""); - return trimmed; - } else { - return null; - } - } // signedOffset('-5', '30') -> -330 - - function signedOffset(offHourStr, offMinuteStr) { - var offHour = parseInt(offHourStr, 10); // don't || this because we want to preserve -0 - - if (Number.isNaN(offHour)) { - offHour = 0; - } - - var offMin = parseInt(offMinuteStr, 10) || 0, - offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin; - return offHour * 60 + offMinSigned; - } // COERCION - - function asNumber(value) { - var numericValue = Number(value); - if (typeof value === "boolean" || value === "" || Number.isNaN(numericValue)) throw new InvalidArgumentError("Invalid unit value " + value); - return numericValue; - } - function normalizeObject(obj, normalizer, nonUnitKeys) { - var normalized = {}; - - for (var u in obj) { - if (hasOwnProperty(obj, u)) { - if (nonUnitKeys.indexOf(u) >= 0) continue; - var v = obj[u]; - if (v === undefined || v === null) continue; - normalized[normalizer(u)] = asNumber(v); - } - } - - return normalized; - } - function formatOffset(offset, format) { - var hours = Math.trunc(Math.abs(offset / 60)), - minutes = Math.trunc(Math.abs(offset % 60)), - sign = offset >= 0 ? "+" : "-"; - - switch (format) { - case "short": - return "" + sign + padStart(hours, 2) + ":" + padStart(minutes, 2); - - case "narrow": - return "" + sign + hours + (minutes > 0 ? ":" + minutes : ""); - - case "techie": - return "" + sign + padStart(hours, 2) + padStart(minutes, 2); - - default: - throw new RangeError("Value format " + format + " is out of range for property format"); - } - } - function timeObject(obj) { - return pick(obj, ["hour", "minute", "second", "millisecond"]); - } - var ianaRegex = /[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/; - - function stringify(obj) { - return JSON.stringify(obj, Object.keys(obj).sort()); - } - /** - * @private - */ - - - var monthsLong = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; - var monthsShort = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; - var monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]; - function months(length) { - switch (length) { - case "narrow": - return monthsNarrow; - - case "short": - return monthsShort; - - case "long": - return monthsLong; - - case "numeric": - return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]; - - case "2-digit": - return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]; - - default: - return null; - } - } - var weekdaysLong = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]; - var weekdaysShort = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; - var weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"]; - function weekdays(length) { - switch (length) { - case "narrow": - return weekdaysNarrow; - - case "short": - return weekdaysShort; - - case "long": - return weekdaysLong; - - case "numeric": - return ["1", "2", "3", "4", "5", "6", "7"]; - - default: - return null; - } - } - var meridiems = ["AM", "PM"]; - var erasLong = ["Before Christ", "Anno Domini"]; - var erasShort = ["BC", "AD"]; - var erasNarrow = ["B", "A"]; - function eras(length) { - switch (length) { - case "narrow": - return erasNarrow; - - case "short": - return erasShort; - - case "long": - return erasLong; - - default: - return null; - } - } - function meridiemForDateTime(dt) { - return meridiems[dt.hour < 12 ? 0 : 1]; - } - function weekdayForDateTime(dt, length) { - return weekdays(length)[dt.weekday - 1]; - } - function monthForDateTime(dt, length) { - return months(length)[dt.month - 1]; - } - function eraForDateTime(dt, length) { - return eras(length)[dt.year < 0 ? 0 : 1]; - } - function formatRelativeTime(unit, count, numeric, narrow) { - if (numeric === void 0) { - numeric = "always"; - } - - if (narrow === void 0) { - narrow = false; - } - - var units = { - years: ["year", "yr."], - quarters: ["quarter", "qtr."], - months: ["month", "mo."], - weeks: ["week", "wk."], - days: ["day", "day", "days"], - hours: ["hour", "hr."], - minutes: ["minute", "min."], - seconds: ["second", "sec."] - }; - var lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1; - - if (numeric === "auto" && lastable) { - var isDay = unit === "days"; - - switch (count) { - case 1: - return isDay ? "tomorrow" : "next " + units[unit][0]; - - case -1: - return isDay ? "yesterday" : "last " + units[unit][0]; - - case 0: - return isDay ? "today" : "this " + units[unit][0]; - - } - } - - var isInPast = Object.is(count, -0) || count < 0, - fmtValue = Math.abs(count), - singular = fmtValue === 1, - lilUnits = units[unit], - fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit; - return isInPast ? fmtValue + " " + fmtUnit + " ago" : "in " + fmtValue + " " + fmtUnit; - } - function formatString(knownFormat) { - // these all have the offsets removed because we don't have access to them - // without all the intl stuff this is backfilling - var filtered = pick(knownFormat, ["weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZoneName", "hour12"]), - key = stringify(filtered), - dateTimeHuge = "EEEE, LLLL d, yyyy, h:mm a"; - - switch (key) { - case stringify(DATE_SHORT): - return "M/d/yyyy"; - - case stringify(DATE_MED): - return "LLL d, yyyy"; - - case stringify(DATE_MED_WITH_WEEKDAY): - return "EEE, LLL d, yyyy"; - - case stringify(DATE_FULL): - return "LLLL d, yyyy"; - - case stringify(DATE_HUGE): - return "EEEE, LLLL d, yyyy"; - - case stringify(TIME_SIMPLE): - return "h:mm a"; - - case stringify(TIME_WITH_SECONDS): - return "h:mm:ss a"; - - case stringify(TIME_WITH_SHORT_OFFSET): - return "h:mm a"; - - case stringify(TIME_WITH_LONG_OFFSET): - return "h:mm a"; - - case stringify(TIME_24_SIMPLE): - return "HH:mm"; - - case stringify(TIME_24_WITH_SECONDS): - return "HH:mm:ss"; - - case stringify(TIME_24_WITH_SHORT_OFFSET): - return "HH:mm"; - - case stringify(TIME_24_WITH_LONG_OFFSET): - return "HH:mm"; - - case stringify(DATETIME_SHORT): - return "M/d/yyyy, h:mm a"; - - case stringify(DATETIME_MED): - return "LLL d, yyyy, h:mm a"; - - case stringify(DATETIME_FULL): - return "LLLL d, yyyy, h:mm a"; - - case stringify(DATETIME_HUGE): - return dateTimeHuge; - - case stringify(DATETIME_SHORT_WITH_SECONDS): - return "M/d/yyyy, h:mm:ss a"; - - case stringify(DATETIME_MED_WITH_SECONDS): - return "LLL d, yyyy, h:mm:ss a"; - - case stringify(DATETIME_MED_WITH_WEEKDAY): - return "EEE, d LLL yyyy, h:mm a"; - - case stringify(DATETIME_FULL_WITH_SECONDS): - return "LLLL d, yyyy, h:mm:ss a"; - - case stringify(DATETIME_HUGE_WITH_SECONDS): - return "EEEE, LLLL d, yyyy, h:mm:ss a"; - - default: - return dateTimeHuge; - } - } - - function stringifyTokens(splits, tokenToString) { - var s = ""; - - for (var _iterator = _createForOfIteratorHelperLoose(splits), _step; !(_step = _iterator()).done;) { - var token = _step.value; - - if (token.literal) { - s += token.val; - } else { - s += tokenToString(token.val); - } - } - - return s; - } - - var _macroTokenToFormatOpts = { - D: DATE_SHORT, - DD: DATE_MED, - DDD: DATE_FULL, - DDDD: DATE_HUGE, - t: TIME_SIMPLE, - tt: TIME_WITH_SECONDS, - ttt: TIME_WITH_SHORT_OFFSET, - tttt: TIME_WITH_LONG_OFFSET, - T: TIME_24_SIMPLE, - TT: TIME_24_WITH_SECONDS, - TTT: TIME_24_WITH_SHORT_OFFSET, - TTTT: TIME_24_WITH_LONG_OFFSET, - f: DATETIME_SHORT, - ff: DATETIME_MED, - fff: DATETIME_FULL, - ffff: DATETIME_HUGE, - F: DATETIME_SHORT_WITH_SECONDS, - FF: DATETIME_MED_WITH_SECONDS, - FFF: DATETIME_FULL_WITH_SECONDS, - FFFF: DATETIME_HUGE_WITH_SECONDS - }; - /** - * @private - */ - - var Formatter = /*#__PURE__*/function () { - Formatter.create = function create(locale, opts) { - if (opts === void 0) { - opts = {}; - } - - return new Formatter(locale, opts); - }; - - Formatter.parseFormat = function parseFormat(fmt) { - var current = null, - currentFull = "", - bracketed = false; - var splits = []; - - for (var i = 0; i < fmt.length; i++) { - var c = fmt.charAt(i); - - if (c === "'") { - if (currentFull.length > 0) { - splits.push({ - literal: bracketed, - val: currentFull - }); - } - - current = null; - currentFull = ""; - bracketed = !bracketed; - } else if (bracketed) { - currentFull += c; - } else if (c === current) { - currentFull += c; - } else { - if (currentFull.length > 0) { - splits.push({ - literal: false, - val: currentFull - }); - } - - currentFull = c; - current = c; - } - } - - if (currentFull.length > 0) { - splits.push({ - literal: bracketed, - val: currentFull - }); - } - - return splits; - }; - - Formatter.macroTokenToFormatOpts = function macroTokenToFormatOpts(token) { - return _macroTokenToFormatOpts[token]; - }; - - function Formatter(locale, formatOpts) { - this.opts = formatOpts; - this.loc = locale; - this.systemLoc = null; - } - - var _proto = Formatter.prototype; - - _proto.formatWithSystemDefault = function formatWithSystemDefault(dt, opts) { - if (this.systemLoc === null) { - this.systemLoc = this.loc.redefaultToSystem(); - } - - var df = this.systemLoc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.format(); - }; - - _proto.formatDateTime = function formatDateTime(dt, opts) { - if (opts === void 0) { - opts = {}; - } - - var df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.format(); - }; - - _proto.formatDateTimeParts = function formatDateTimeParts(dt, opts) { - if (opts === void 0) { - opts = {}; - } - - var df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.formatToParts(); - }; - - _proto.resolvedOptions = function resolvedOptions(dt, opts) { - if (opts === void 0) { - opts = {}; - } - - var df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.resolvedOptions(); - }; - - _proto.num = function num(n, p) { - if (p === void 0) { - p = 0; - } - - // we get some perf out of doing this here, annoyingly - if (this.opts.forceSimple) { - return padStart(n, p); - } - - var opts = Object.assign({}, this.opts); - - if (p > 0) { - opts.padTo = p; - } - - return this.loc.numberFormatter(opts).format(n); - }; - - _proto.formatDateTimeFromString = function formatDateTimeFromString(dt, fmt) { - var _this = this; - - var knownEnglish = this.loc.listingMode() === "en", - useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory" && hasFormatToParts(), - string = function string(opts, extract) { - return _this.loc.extract(dt, opts, extract); - }, - formatOffset = function formatOffset(opts) { - if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) { - return "Z"; - } - - return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : ""; - }, - meridiem = function meridiem() { - return knownEnglish ? meridiemForDateTime(dt) : string({ - hour: "numeric", - hour12: true - }, "dayperiod"); - }, - month = function month(length, standalone) { - return knownEnglish ? monthForDateTime(dt, length) : string(standalone ? { - month: length - } : { - month: length, - day: "numeric" - }, "month"); - }, - weekday = function weekday(length, standalone) { - return knownEnglish ? weekdayForDateTime(dt, length) : string(standalone ? { - weekday: length - } : { - weekday: length, - month: "long", - day: "numeric" - }, "weekday"); - }, - maybeMacro = function maybeMacro(token) { - var formatOpts = Formatter.macroTokenToFormatOpts(token); - - if (formatOpts) { - return _this.formatWithSystemDefault(dt, formatOpts); - } else { - return token; - } - }, - era = function era(length) { - return knownEnglish ? eraForDateTime(dt, length) : string({ - era: length - }, "era"); - }, - tokenToString = function tokenToString(token) { - // Where possible: http://cldr.unicode.org/translation/date-time#TOC-Stand-Alone-vs.-Format-Styles - switch (token) { - // ms - case "S": - return _this.num(dt.millisecond); - - case "u": // falls through - - case "SSS": - return _this.num(dt.millisecond, 3); - // seconds - - case "s": - return _this.num(dt.second); - - case "ss": - return _this.num(dt.second, 2); - // minutes - - case "m": - return _this.num(dt.minute); - - case "mm": - return _this.num(dt.minute, 2); - // hours - - case "h": - return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12); - - case "hh": - return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2); - - case "H": - return _this.num(dt.hour); - - case "HH": - return _this.num(dt.hour, 2); - // offset - - case "Z": - // like +6 - return formatOffset({ - format: "narrow", - allowZ: _this.opts.allowZ - }); - - case "ZZ": - // like +06:00 - return formatOffset({ - format: "short", - allowZ: _this.opts.allowZ - }); - - case "ZZZ": - // like +0600 - return formatOffset({ - format: "techie", - allowZ: _this.opts.allowZ - }); - - case "ZZZZ": - // like EST - return dt.zone.offsetName(dt.ts, { - format: "short", - locale: _this.loc.locale - }); - - case "ZZZZZ": - // like Eastern Standard Time - return dt.zone.offsetName(dt.ts, { - format: "long", - locale: _this.loc.locale - }); - // zone - - case "z": - // like America/New_York - return dt.zoneName; - // meridiems - - case "a": - return meridiem(); - // dates - - case "d": - return useDateTimeFormatter ? string({ - day: "numeric" - }, "day") : _this.num(dt.day); - - case "dd": - return useDateTimeFormatter ? string({ - day: "2-digit" - }, "day") : _this.num(dt.day, 2); - // weekdays - standalone - - case "c": - // like 1 - return _this.num(dt.weekday); - - case "ccc": - // like 'Tues' - return weekday("short", true); - - case "cccc": - // like 'Tuesday' - return weekday("long", true); - - case "ccccc": - // like 'T' - return weekday("narrow", true); - // weekdays - format - - case "E": - // like 1 - return _this.num(dt.weekday); - - case "EEE": - // like 'Tues' - return weekday("short", false); - - case "EEEE": - // like 'Tuesday' - return weekday("long", false); - - case "EEEEE": - // like 'T' - return weekday("narrow", false); - // months - standalone - - case "L": - // like 1 - return useDateTimeFormatter ? string({ - month: "numeric", - day: "numeric" - }, "month") : _this.num(dt.month); - - case "LL": - // like 01, doesn't seem to work - return useDateTimeFormatter ? string({ - month: "2-digit", - day: "numeric" - }, "month") : _this.num(dt.month, 2); - - case "LLL": - // like Jan - return month("short", true); - - case "LLLL": - // like January - return month("long", true); - - case "LLLLL": - // like J - return month("narrow", true); - // months - format - - case "M": - // like 1 - return useDateTimeFormatter ? string({ - month: "numeric" - }, "month") : _this.num(dt.month); - - case "MM": - // like 01 - return useDateTimeFormatter ? string({ - month: "2-digit" - }, "month") : _this.num(dt.month, 2); - - case "MMM": - // like Jan - return month("short", false); - - case "MMMM": - // like January - return month("long", false); - - case "MMMMM": - // like J - return month("narrow", false); - // years - - case "y": - // like 2014 - return useDateTimeFormatter ? string({ - year: "numeric" - }, "year") : _this.num(dt.year); - - case "yy": - // like 14 - return useDateTimeFormatter ? string({ - year: "2-digit" - }, "year") : _this.num(dt.year.toString().slice(-2), 2); - - case "yyyy": - // like 0012 - return useDateTimeFormatter ? string({ - year: "numeric" - }, "year") : _this.num(dt.year, 4); - - case "yyyyyy": - // like 000012 - return useDateTimeFormatter ? string({ - year: "numeric" - }, "year") : _this.num(dt.year, 6); - // eras - - case "G": - // like AD - return era("short"); - - case "GG": - // like Anno Domini - return era("long"); - - case "GGGGG": - return era("narrow"); - - case "kk": - return _this.num(dt.weekYear.toString().slice(-2), 2); - - case "kkkk": - return _this.num(dt.weekYear, 4); - - case "W": - return _this.num(dt.weekNumber); - - case "WW": - return _this.num(dt.weekNumber, 2); - - case "o": - return _this.num(dt.ordinal); - - case "ooo": - return _this.num(dt.ordinal, 3); - - case "q": - // like 1 - return _this.num(dt.quarter); - - case "qq": - // like 01 - return _this.num(dt.quarter, 2); - - case "X": - return _this.num(Math.floor(dt.ts / 1000)); - - case "x": - return _this.num(dt.ts); - - default: - return maybeMacro(token); - } - }; - - return stringifyTokens(Formatter.parseFormat(fmt), tokenToString); - }; - - _proto.formatDurationFromString = function formatDurationFromString(dur, fmt) { - var _this2 = this; - - var tokenToField = function tokenToField(token) { - switch (token[0]) { - case "S": - return "millisecond"; - - case "s": - return "second"; - - case "m": - return "minute"; - - case "h": - return "hour"; - - case "d": - return "day"; - - case "M": - return "month"; - - case "y": - return "year"; - - default: - return null; - } - }, - tokenToString = function tokenToString(lildur) { - return function (token) { - var mapped = tokenToField(token); - - if (mapped) { - return _this2.num(lildur.get(mapped), token.length); - } else { - return token; - } - }; - }, - tokens = Formatter.parseFormat(fmt), - realTokens = tokens.reduce(function (found, _ref) { - var literal = _ref.literal, - val = _ref.val; - return literal ? found : found.concat(val); - }, []), - collapsed = dur.shiftTo.apply(dur, realTokens.map(tokenToField).filter(function (t) { - return t; - })); - - return stringifyTokens(tokens, tokenToString(collapsed)); - }; - - return Formatter; - }(); - - var Invalid = /*#__PURE__*/function () { - function Invalid(reason, explanation) { - this.reason = reason; - this.explanation = explanation; - } - - var _proto = Invalid.prototype; - - _proto.toMessage = function toMessage() { - if (this.explanation) { - return this.reason + ": " + this.explanation; - } else { - return this.reason; - } - }; - - return Invalid; - }(); - - /** - * @interface - */ - - var Zone = /*#__PURE__*/function () { - function Zone() {} - - var _proto = Zone.prototype; - - /** - * Returns the offset's common name (such as EST) at the specified timestamp - * @abstract - * @param {number} ts - Epoch milliseconds for which to get the name - * @param {Object} opts - Options to affect the format - * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. - * @param {string} opts.locale - What locale to return the offset name in. - * @return {string} - */ - _proto.offsetName = function offsetName(ts, opts) { - throw new ZoneIsAbstractError(); - } - /** - * Returns the offset's value as a string - * @abstract - * @param {number} ts - Epoch milliseconds for which to get the offset - * @param {string} format - What style of offset to return. - * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively - * @return {string} - */ - ; - - _proto.formatOffset = function formatOffset(ts, format) { - throw new ZoneIsAbstractError(); - } - /** - * Return the offset in minutes for this zone at the specified timestamp. - * @abstract - * @param {number} ts - Epoch milliseconds for which to compute the offset - * @return {number} - */ - ; - - _proto.offset = function offset(ts) { - throw new ZoneIsAbstractError(); - } - /** - * Return whether this Zone is equal to another zone - * @abstract - * @param {Zone} otherZone - the zone to compare - * @return {boolean} - */ - ; - - _proto.equals = function equals(otherZone) { - throw new ZoneIsAbstractError(); - } - /** - * Return whether this Zone is valid. - * @abstract - * @type {boolean} - */ - ; - - _createClass(Zone, [{ - key: "type", - - /** - * The type of zone - * @abstract - * @type {string} - */ - get: function get() { - throw new ZoneIsAbstractError(); - } - /** - * The name of this zone. - * @abstract - * @type {string} - */ - - }, { - key: "name", - get: function get() { - throw new ZoneIsAbstractError(); - } - /** - * Returns whether the offset is known to be fixed for the whole year. - * @abstract - * @type {boolean} - */ - - }, { - key: "universal", - get: function get() { - throw new ZoneIsAbstractError(); - } - }, { - key: "isValid", - get: function get() { - throw new ZoneIsAbstractError(); - } - }]); - - return Zone; - }(); - - var singleton = null; - /** - * Represents the local zone for this Javascript environment. - * @implements {Zone} - */ - - var LocalZone = /*#__PURE__*/function (_Zone) { - _inheritsLoose(LocalZone, _Zone); - - function LocalZone() { - return _Zone.apply(this, arguments) || this; - } - - var _proto = LocalZone.prototype; - - /** @override **/ - _proto.offsetName = function offsetName(ts, _ref) { - var format = _ref.format, - locale = _ref.locale; - return parseZoneInfo(ts, format, locale); - } - /** @override **/ - ; - - _proto.formatOffset = function formatOffset$1(ts, format) { - return formatOffset(this.offset(ts), format); - } - /** @override **/ - ; - - _proto.offset = function offset(ts) { - return -new Date(ts).getTimezoneOffset(); - } - /** @override **/ - ; - - _proto.equals = function equals(otherZone) { - return otherZone.type === "local"; - } - /** @override **/ - ; - - _createClass(LocalZone, [{ - key: "type", - - /** @override **/ - get: function get() { - return "local"; - } - /** @override **/ - - }, { - key: "name", - get: function get() { - if (hasIntl()) { - return new Intl.DateTimeFormat().resolvedOptions().timeZone; - } else return "local"; - } - /** @override **/ - - }, { - key: "universal", - get: function get() { - return false; - } - }, { - key: "isValid", - get: function get() { - return true; - } - }], [{ - key: "instance", - - /** - * Get a singleton instance of the local zone - * @return {LocalZone} - */ - get: function get() { - if (singleton === null) { - singleton = new LocalZone(); - } - - return singleton; - } - }]); - - return LocalZone; - }(Zone); - - var matchingRegex = RegExp("^" + ianaRegex.source + "$"); - var dtfCache = {}; - - function makeDTF(zone) { - if (!dtfCache[zone]) { - dtfCache[zone] = new Intl.DateTimeFormat("en-US", { - hour12: false, - timeZone: zone, - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit", - second: "2-digit" - }); - } - - return dtfCache[zone]; - } - - var typeToPos = { - year: 0, - month: 1, - day: 2, - hour: 3, - minute: 4, - second: 5 - }; - - function hackyOffset(dtf, date) { - var formatted = dtf.format(date).replace(/\u200E/g, ""), - parsed = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(formatted), - fMonth = parsed[1], - fDay = parsed[2], - fYear = parsed[3], - fHour = parsed[4], - fMinute = parsed[5], - fSecond = parsed[6]; - return [fYear, fMonth, fDay, fHour, fMinute, fSecond]; - } - - function partsOffset(dtf, date) { - var formatted = dtf.formatToParts(date), - filled = []; - - for (var i = 0; i < formatted.length; i++) { - var _formatted$i = formatted[i], - type = _formatted$i.type, - value = _formatted$i.value, - pos = typeToPos[type]; - - if (!isUndefined(pos)) { - filled[pos] = parseInt(value, 10); - } - } - - return filled; - } - - var ianaZoneCache = {}; - /** - * A zone identified by an IANA identifier, like America/New_York - * @implements {Zone} - */ - - var IANAZone = /*#__PURE__*/function (_Zone) { - _inheritsLoose(IANAZone, _Zone); - - /** - * @param {string} name - Zone name - * @return {IANAZone} - */ - IANAZone.create = function create(name) { - if (!ianaZoneCache[name]) { - ianaZoneCache[name] = new IANAZone(name); - } - - return ianaZoneCache[name]; - } - /** - * Reset local caches. Should only be necessary in testing scenarios. - * @return {void} - */ - ; - - IANAZone.resetCache = function resetCache() { - ianaZoneCache = {}; - dtfCache = {}; - } - /** - * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that. - * @param {string} s - The string to check validity on - * @example IANAZone.isValidSpecifier("America/New_York") //=> true - * @example IANAZone.isValidSpecifier("Fantasia/Castle") //=> true - * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false - * @return {boolean} - */ - ; - - IANAZone.isValidSpecifier = function isValidSpecifier(s) { - return !!(s && s.match(matchingRegex)); - } - /** - * Returns whether the provided string identifies a real zone - * @param {string} zone - The string to check - * @example IANAZone.isValidZone("America/New_York") //=> true - * @example IANAZone.isValidZone("Fantasia/Castle") //=> false - * @example IANAZone.isValidZone("Sport~~blorp") //=> false - * @return {boolean} - */ - ; - - IANAZone.isValidZone = function isValidZone(zone) { - try { - new Intl.DateTimeFormat("en-US", { - timeZone: zone - }).format(); - return true; - } catch (e) { - return false; - } - } // Etc/GMT+8 -> -480 - - /** @ignore */ - ; - - IANAZone.parseGMTOffset = function parseGMTOffset(specifier) { - if (specifier) { - var match = specifier.match(/^Etc\/GMT([+-]\d{1,2})$/i); - - if (match) { - return -60 * parseInt(match[1]); - } - } - - return null; - }; - - function IANAZone(name) { - var _this; - - _this = _Zone.call(this) || this; - /** @private **/ - - _this.zoneName = name; - /** @private **/ - - _this.valid = IANAZone.isValidZone(name); - return _this; - } - /** @override **/ - - - var _proto = IANAZone.prototype; - - /** @override **/ - _proto.offsetName = function offsetName(ts, _ref) { - var format = _ref.format, - locale = _ref.locale; - return parseZoneInfo(ts, format, locale, this.name); - } - /** @override **/ - ; - - _proto.formatOffset = function formatOffset$1(ts, format) { - return formatOffset(this.offset(ts), format); - } - /** @override **/ - ; - - _proto.offset = function offset(ts) { - var date = new Date(ts), - dtf = makeDTF(this.name), - _ref2 = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date), - year = _ref2[0], - month = _ref2[1], - day = _ref2[2], - hour = _ref2[3], - minute = _ref2[4], - second = _ref2[5], - adjustedHour = hour === 24 ? 0 : hour; - - var asUTC = objToLocalTS({ - year: year, - month: month, - day: day, - hour: adjustedHour, - minute: minute, - second: second, - millisecond: 0 - }); - var asTS = +date; - var over = asTS % 1000; - asTS -= over >= 0 ? over : 1000 + over; - return (asUTC - asTS) / (60 * 1000); - } - /** @override **/ - ; - - _proto.equals = function equals(otherZone) { - return otherZone.type === "iana" && otherZone.name === this.name; - } - /** @override **/ - ; - - _createClass(IANAZone, [{ - key: "type", - get: function get() { - return "iana"; - } - /** @override **/ - - }, { - key: "name", - get: function get() { - return this.zoneName; - } - /** @override **/ - - }, { - key: "universal", - get: function get() { - return false; - } - }, { - key: "isValid", - get: function get() { - return this.valid; - } - }]); - - return IANAZone; - }(Zone); - - var singleton$1 = null; - /** - * A zone with a fixed offset (meaning no DST) - * @implements {Zone} - */ - - var FixedOffsetZone = /*#__PURE__*/function (_Zone) { - _inheritsLoose(FixedOffsetZone, _Zone); - - /** - * Get an instance with a specified offset - * @param {number} offset - The offset in minutes - * @return {FixedOffsetZone} - */ - FixedOffsetZone.instance = function instance(offset) { - return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset); - } - /** - * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6" - * @param {string} s - The offset string to parse - * @example FixedOffsetZone.parseSpecifier("UTC+6") - * @example FixedOffsetZone.parseSpecifier("UTC+06") - * @example FixedOffsetZone.parseSpecifier("UTC-6:00") - * @return {FixedOffsetZone} - */ - ; - - FixedOffsetZone.parseSpecifier = function parseSpecifier(s) { - if (s) { - var r = s.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); - - if (r) { - return new FixedOffsetZone(signedOffset(r[1], r[2])); - } - } - - return null; - }; - - _createClass(FixedOffsetZone, null, [{ - key: "utcInstance", - - /** - * Get a singleton instance of UTC - * @return {FixedOffsetZone} - */ - get: function get() { - if (singleton$1 === null) { - singleton$1 = new FixedOffsetZone(0); - } - - return singleton$1; - } - }]); - - function FixedOffsetZone(offset) { - var _this; - - _this = _Zone.call(this) || this; - /** @private **/ - - _this.fixed = offset; - return _this; - } - /** @override **/ - - - var _proto = FixedOffsetZone.prototype; - - /** @override **/ - _proto.offsetName = function offsetName() { - return this.name; - } - /** @override **/ - ; - - _proto.formatOffset = function formatOffset$1(ts, format) { - return formatOffset(this.fixed, format); - } - /** @override **/ - ; - - /** @override **/ - _proto.offset = function offset() { - return this.fixed; - } - /** @override **/ - ; - - _proto.equals = function equals(otherZone) { - return otherZone.type === "fixed" && otherZone.fixed === this.fixed; - } - /** @override **/ - ; - - _createClass(FixedOffsetZone, [{ - key: "type", - get: function get() { - return "fixed"; - } - /** @override **/ - - }, { - key: "name", - get: function get() { - return this.fixed === 0 ? "UTC" : "UTC" + formatOffset(this.fixed, "narrow"); - } - }, { - key: "universal", - get: function get() { - return true; - } - }, { - key: "isValid", - get: function get() { - return true; - } - }]); - - return FixedOffsetZone; - }(Zone); - - /** - * A zone that failed to parse. You should never need to instantiate this. - * @implements {Zone} - */ - - var InvalidZone = /*#__PURE__*/function (_Zone) { - _inheritsLoose(InvalidZone, _Zone); - - function InvalidZone(zoneName) { - var _this; - - _this = _Zone.call(this) || this; - /** @private */ - - _this.zoneName = zoneName; - return _this; - } - /** @override **/ - - - var _proto = InvalidZone.prototype; - - /** @override **/ - _proto.offsetName = function offsetName() { - return null; - } - /** @override **/ - ; - - _proto.formatOffset = function formatOffset() { - return ""; - } - /** @override **/ - ; - - _proto.offset = function offset() { - return NaN; - } - /** @override **/ - ; - - _proto.equals = function equals() { - return false; - } - /** @override **/ - ; - - _createClass(InvalidZone, [{ - key: "type", - get: function get() { - return "invalid"; - } - /** @override **/ - - }, { - key: "name", - get: function get() { - return this.zoneName; - } - /** @override **/ - - }, { - key: "universal", - get: function get() { - return false; - } - }, { - key: "isValid", - get: function get() { - return false; - } - }]); - - return InvalidZone; - }(Zone); - - /** - * @private - */ - function normalizeZone(input, defaultZone) { - var offset; - - if (isUndefined(input) || input === null) { - return defaultZone; - } else if (input instanceof Zone) { - return input; - } else if (isString(input)) { - var lowered = input.toLowerCase(); - if (lowered === "local") return defaultZone;else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance;else if ((offset = IANAZone.parseGMTOffset(input)) != null) { - // handle Etc/GMT-4, which V8 chokes on - return FixedOffsetZone.instance(offset); - } else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input);else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input); - } else if (isNumber(input)) { - return FixedOffsetZone.instance(input); - } else if (typeof input === "object" && input.offset && typeof input.offset === "number") { - // This is dumb, but the instanceof check above doesn't seem to really work - // so we're duck checking it - return input; - } else { - return new InvalidZone(input); - } - } - - var now = function now() { - return Date.now(); - }, - defaultZone = null, - // not setting this directly to LocalZone.instance bc loading order issues - defaultLocale = null, - defaultNumberingSystem = null, - defaultOutputCalendar = null, - throwOnInvalid = false; - /** - * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here. - */ - - - var Settings = /*#__PURE__*/function () { - function Settings() {} - - /** - * Reset Luxon's global caches. Should only be necessary in testing scenarios. - * @return {void} - */ - Settings.resetCaches = function resetCaches() { - Locale.resetCache(); - IANAZone.resetCache(); - }; - - _createClass(Settings, null, [{ - key: "now", - - /** - * Get the callback for returning the current timestamp. - * @type {function} - */ - get: function get() { - return now; - } - /** - * Set the callback for returning the current timestamp. - * The function should return a number, which will be interpreted as an Epoch millisecond count - * @type {function} - * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future - * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time - */ - , - set: function set(n) { - now = n; - } - /** - * Get the default time zone to create DateTimes in. - * @type {string} - */ - - }, { - key: "defaultZoneName", - get: function get() { - return Settings.defaultZone.name; - } - /** - * Set the default time zone to create DateTimes in. Does not affect existing instances. - * @type {string} - */ - , - set: function set(z) { - if (!z) { - defaultZone = null; - } else { - defaultZone = normalizeZone(z); - } - } - /** - * Get the default time zone object to create DateTimes in. Does not affect existing instances. - * @type {Zone} - */ - - }, { - key: "defaultZone", - get: function get() { - return defaultZone || LocalZone.instance; - } - /** - * Get the default locale to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - }, { - key: "defaultLocale", - get: function get() { - return defaultLocale; - } - /** - * Set the default locale to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - , - set: function set(locale) { - defaultLocale = locale; - } - /** - * Get the default numbering system to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - }, { - key: "defaultNumberingSystem", - get: function get() { - return defaultNumberingSystem; - } - /** - * Set the default numbering system to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - , - set: function set(numberingSystem) { - defaultNumberingSystem = numberingSystem; - } - /** - * Get the default output calendar to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - }, { - key: "defaultOutputCalendar", - get: function get() { - return defaultOutputCalendar; - } - /** - * Set the default output calendar to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - , - set: function set(outputCalendar) { - defaultOutputCalendar = outputCalendar; - } - /** - * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals - * @type {boolean} - */ - - }, { - key: "throwOnInvalid", - get: function get() { - return throwOnInvalid; - } - /** - * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals - * @type {boolean} - */ - , - set: function set(t) { - throwOnInvalid = t; - } - }]); - - return Settings; - }(); - - var intlDTCache = {}; - - function getCachedDTF(locString, opts) { - if (opts === void 0) { - opts = {}; - } - - var key = JSON.stringify([locString, opts]); - var dtf = intlDTCache[key]; - - if (!dtf) { - dtf = new Intl.DateTimeFormat(locString, opts); - intlDTCache[key] = dtf; - } - - return dtf; - } - - var intlNumCache = {}; - - function getCachedINF(locString, opts) { - if (opts === void 0) { - opts = {}; - } - - var key = JSON.stringify([locString, opts]); - var inf = intlNumCache[key]; - - if (!inf) { - inf = new Intl.NumberFormat(locString, opts); - intlNumCache[key] = inf; - } - - return inf; - } - - var intlRelCache = {}; - - function getCachedRTF(locString, opts) { - if (opts === void 0) { - opts = {}; - } - - var _opts = opts, - base = _opts.base, - cacheKeyOpts = _objectWithoutPropertiesLoose(_opts, ["base"]); // exclude `base` from the options - - - var key = JSON.stringify([locString, cacheKeyOpts]); - var inf = intlRelCache[key]; - - if (!inf) { - inf = new Intl.RelativeTimeFormat(locString, opts); - intlRelCache[key] = inf; - } - - return inf; - } - - var sysLocaleCache = null; - - function systemLocale() { - if (sysLocaleCache) { - return sysLocaleCache; - } else if (hasIntl()) { - var computedSys = new Intl.DateTimeFormat().resolvedOptions().locale; // node sometimes defaults to "und". Override that because that is dumb - - sysLocaleCache = !computedSys || computedSys === "und" ? "en-US" : computedSys; - return sysLocaleCache; - } else { - sysLocaleCache = "en-US"; - return sysLocaleCache; - } - } - - function parseLocaleString(localeStr) { - // I really want to avoid writing a BCP 47 parser - // see, e.g. https://github.com/wooorm/bcp-47 - // Instead, we'll do this: - // a) if the string has no -u extensions, just leave it alone - // b) if it does, use Intl to resolve everything - // c) if Intl fails, try again without the -u - var uIndex = localeStr.indexOf("-u-"); - - if (uIndex === -1) { - return [localeStr]; - } else { - var options; - var smaller = localeStr.substring(0, uIndex); - - try { - options = getCachedDTF(localeStr).resolvedOptions(); - } catch (e) { - options = getCachedDTF(smaller).resolvedOptions(); - } - - var _options = options, - numberingSystem = _options.numberingSystem, - calendar = _options.calendar; // return the smaller one so that we can append the calendar and numbering overrides to it - - return [smaller, numberingSystem, calendar]; - } - } - - function intlConfigString(localeStr, numberingSystem, outputCalendar) { - if (hasIntl()) { - if (outputCalendar || numberingSystem) { - localeStr += "-u"; - - if (outputCalendar) { - localeStr += "-ca-" + outputCalendar; - } - - if (numberingSystem) { - localeStr += "-nu-" + numberingSystem; - } - - return localeStr; - } else { - return localeStr; - } - } else { - return []; - } - } - - function mapMonths(f) { - var ms = []; - - for (var i = 1; i <= 12; i++) { - var dt = DateTime.utc(2016, i, 1); - ms.push(f(dt)); - } - - return ms; - } - - function mapWeekdays(f) { - var ms = []; - - for (var i = 1; i <= 7; i++) { - var dt = DateTime.utc(2016, 11, 13 + i); - ms.push(f(dt)); - } - - return ms; - } - - function listStuff(loc, length, defaultOK, englishFn, intlFn) { - var mode = loc.listingMode(defaultOK); - - if (mode === "error") { - return null; - } else if (mode === "en") { - return englishFn(length); - } else { - return intlFn(length); - } - } - - function supportsFastNumbers(loc) { - if (loc.numberingSystem && loc.numberingSystem !== "latn") { - return false; - } else { - return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || hasIntl() && new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === "latn"; - } - } - /** - * @private - */ - - - var PolyNumberFormatter = /*#__PURE__*/function () { - function PolyNumberFormatter(intl, forceSimple, opts) { - this.padTo = opts.padTo || 0; - this.floor = opts.floor || false; - - if (!forceSimple && hasIntl()) { - var intlOpts = { - useGrouping: false - }; - if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo; - this.inf = getCachedINF(intl, intlOpts); - } - } - - var _proto = PolyNumberFormatter.prototype; - - _proto.format = function format(i) { - if (this.inf) { - var fixed = this.floor ? Math.floor(i) : i; - return this.inf.format(fixed); - } else { - // to match the browser's numberformatter defaults - var _fixed = this.floor ? Math.floor(i) : roundTo(i, 3); - - return padStart(_fixed, this.padTo); - } - }; - - return PolyNumberFormatter; - }(); - /** - * @private - */ - - - var PolyDateFormatter = /*#__PURE__*/function () { - function PolyDateFormatter(dt, intl, opts) { - this.opts = opts; - this.hasIntl = hasIntl(); - var z; - - if (dt.zone.universal && this.hasIntl) { - // Chromium doesn't support fixed-offset zones like Etc/GMT+8 in its formatter, - // See https://bugs.chromium.org/p/chromium/issues/detail?id=364374. - // So we have to make do. Two cases: - // 1. The format options tell us to show the zone. We can't do that, so the best - // we can do is format the date in UTC. - // 2. The format options don't tell us to show the zone. Then we can adjust them - // the time and tell the formatter to show it to us in UTC, so that the time is right - // and the bad zone doesn't show up. - // We can clean all this up when Chrome fixes this. - z = "UTC"; - - if (opts.timeZoneName) { - this.dt = dt; - } else { - this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1000); - } - } else if (dt.zone.type === "local") { - this.dt = dt; - } else { - this.dt = dt; - z = dt.zone.name; - } - - if (this.hasIntl) { - var intlOpts = Object.assign({}, this.opts); - - if (z) { - intlOpts.timeZone = z; - } - - this.dtf = getCachedDTF(intl, intlOpts); - } - } - - var _proto2 = PolyDateFormatter.prototype; - - _proto2.format = function format() { - if (this.hasIntl) { - return this.dtf.format(this.dt.toJSDate()); - } else { - var tokenFormat = formatString(this.opts), - loc = Locale.create("en-US"); - return Formatter.create(loc).formatDateTimeFromString(this.dt, tokenFormat); - } - }; - - _proto2.formatToParts = function formatToParts() { - if (this.hasIntl && hasFormatToParts()) { - return this.dtf.formatToParts(this.dt.toJSDate()); - } else { - // This is kind of a cop out. We actually could do this for English. However, we couldn't do it for intl strings - // and IMO it's too weird to have an uncanny valley like that - return []; - } - }; - - _proto2.resolvedOptions = function resolvedOptions() { - if (this.hasIntl) { - return this.dtf.resolvedOptions(); - } else { - return { - locale: "en-US", - numberingSystem: "latn", - outputCalendar: "gregory" - }; - } - }; - - return PolyDateFormatter; - }(); - /** - * @private - */ - - - var PolyRelFormatter = /*#__PURE__*/function () { - function PolyRelFormatter(intl, isEnglish, opts) { - this.opts = Object.assign({ - style: "long" - }, opts); - - if (!isEnglish && hasRelative()) { - this.rtf = getCachedRTF(intl, opts); - } - } - - var _proto3 = PolyRelFormatter.prototype; - - _proto3.format = function format(count, unit) { - if (this.rtf) { - return this.rtf.format(count, unit); - } else { - return formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== "long"); - } - }; - - _proto3.formatToParts = function formatToParts(count, unit) { - if (this.rtf) { - return this.rtf.formatToParts(count, unit); - } else { - return []; - } - }; - - return PolyRelFormatter; - }(); - /** - * @private - */ - - - var Locale = /*#__PURE__*/function () { - Locale.fromOpts = function fromOpts(opts) { - return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN); - }; - - Locale.create = function create(locale, numberingSystem, outputCalendar, defaultToEN) { - if (defaultToEN === void 0) { - defaultToEN = false; - } - - var specifiedLocale = locale || Settings.defaultLocale, - // the system locale is useful for human readable strings but annoying for parsing/formatting known formats - localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale()), - numberingSystemR = numberingSystem || Settings.defaultNumberingSystem, - outputCalendarR = outputCalendar || Settings.defaultOutputCalendar; - return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale); - }; - - Locale.resetCache = function resetCache() { - sysLocaleCache = null; - intlDTCache = {}; - intlNumCache = {}; - intlRelCache = {}; - }; - - Locale.fromObject = function fromObject(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - locale = _ref.locale, - numberingSystem = _ref.numberingSystem, - outputCalendar = _ref.outputCalendar; - - return Locale.create(locale, numberingSystem, outputCalendar); - }; - - function Locale(locale, numbering, outputCalendar, specifiedLocale) { - var _parseLocaleString = parseLocaleString(locale), - parsedLocale = _parseLocaleString[0], - parsedNumberingSystem = _parseLocaleString[1], - parsedOutputCalendar = _parseLocaleString[2]; - - this.locale = parsedLocale; - this.numberingSystem = numbering || parsedNumberingSystem || null; - this.outputCalendar = outputCalendar || parsedOutputCalendar || null; - this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar); - this.weekdaysCache = { - format: {}, - standalone: {} - }; - this.monthsCache = { - format: {}, - standalone: {} - }; - this.meridiemCache = null; - this.eraCache = {}; - this.specifiedLocale = specifiedLocale; - this.fastNumbersCached = null; - } - - var _proto4 = Locale.prototype; - - _proto4.listingMode = function listingMode(defaultOK) { - if (defaultOK === void 0) { - defaultOK = true; - } - - var intl = hasIntl(), - hasFTP = intl && hasFormatToParts(), - isActuallyEn = this.isEnglish(), - hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory"); - - if (!hasFTP && !(isActuallyEn && hasNoWeirdness) && !defaultOK) { - return "error"; - } else if (!hasFTP || isActuallyEn && hasNoWeirdness) { - return "en"; - } else { - return "intl"; - } - }; - - _proto4.clone = function clone(alts) { - if (!alts || Object.getOwnPropertyNames(alts).length === 0) { - return this; - } else { - return Locale.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, alts.defaultToEN || false); - } - }; - - _proto4.redefaultToEN = function redefaultToEN(alts) { - if (alts === void 0) { - alts = {}; - } - - return this.clone(Object.assign({}, alts, { - defaultToEN: true - })); - }; - - _proto4.redefaultToSystem = function redefaultToSystem(alts) { - if (alts === void 0) { - alts = {}; - } - - return this.clone(Object.assign({}, alts, { - defaultToEN: false - })); - }; - - _proto4.months = function months$1(length, format, defaultOK) { - var _this = this; - - if (format === void 0) { - format = false; - } - - if (defaultOK === void 0) { - defaultOK = true; - } - - return listStuff(this, length, defaultOK, months, function () { - var intl = format ? { - month: length, - day: "numeric" - } : { - month: length - }, - formatStr = format ? "format" : "standalone"; - - if (!_this.monthsCache[formatStr][length]) { - _this.monthsCache[formatStr][length] = mapMonths(function (dt) { - return _this.extract(dt, intl, "month"); - }); - } - - return _this.monthsCache[formatStr][length]; - }); - }; - - _proto4.weekdays = function weekdays$1(length, format, defaultOK) { - var _this2 = this; - - if (format === void 0) { - format = false; - } - - if (defaultOK === void 0) { - defaultOK = true; - } - - return listStuff(this, length, defaultOK, weekdays, function () { - var intl = format ? { - weekday: length, - year: "numeric", - month: "long", - day: "numeric" - } : { - weekday: length - }, - formatStr = format ? "format" : "standalone"; - - if (!_this2.weekdaysCache[formatStr][length]) { - _this2.weekdaysCache[formatStr][length] = mapWeekdays(function (dt) { - return _this2.extract(dt, intl, "weekday"); - }); - } - - return _this2.weekdaysCache[formatStr][length]; - }); - }; - - _proto4.meridiems = function meridiems$1(defaultOK) { - var _this3 = this; - - if (defaultOK === void 0) { - defaultOK = true; - } - - return listStuff(this, undefined, defaultOK, function () { - return meridiems; - }, function () { - // In theory there could be aribitrary day periods. We're gonna assume there are exactly two - // for AM and PM. This is probably wrong, but it's makes parsing way easier. - if (!_this3.meridiemCache) { - var intl = { - hour: "numeric", - hour12: true - }; - _this3.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(function (dt) { - return _this3.extract(dt, intl, "dayperiod"); - }); - } - - return _this3.meridiemCache; - }); - }; - - _proto4.eras = function eras$1(length, defaultOK) { - var _this4 = this; - - if (defaultOK === void 0) { - defaultOK = true; - } - - return listStuff(this, length, defaultOK, eras, function () { - var intl = { - era: length - }; // This is utter bullshit. Different calendars are going to define eras totally differently. What I need is the minimum set of dates - // to definitely enumerate them. - - if (!_this4.eraCache[length]) { - _this4.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(function (dt) { - return _this4.extract(dt, intl, "era"); - }); - } - - return _this4.eraCache[length]; - }); - }; - - _proto4.extract = function extract(dt, intlOpts, field) { - var df = this.dtFormatter(dt, intlOpts), - results = df.formatToParts(), - matching = results.find(function (m) { - return m.type.toLowerCase() === field; - }); - return matching ? matching.value : null; - }; - - _proto4.numberFormatter = function numberFormatter(opts) { - if (opts === void 0) { - opts = {}; - } - - // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave) - // (in contrast, the rest of the condition is used heavily) - return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts); - }; - - _proto4.dtFormatter = function dtFormatter(dt, intlOpts) { - if (intlOpts === void 0) { - intlOpts = {}; - } - - return new PolyDateFormatter(dt, this.intl, intlOpts); - }; - - _proto4.relFormatter = function relFormatter(opts) { - if (opts === void 0) { - opts = {}; - } - - return new PolyRelFormatter(this.intl, this.isEnglish(), opts); - }; - - _proto4.isEnglish = function isEnglish() { - return this.locale === "en" || this.locale.toLowerCase() === "en-us" || hasIntl() && new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us"); - }; - - _proto4.equals = function equals(other) { - return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar; - }; - - _createClass(Locale, [{ - key: "fastNumbers", - get: function get() { - if (this.fastNumbersCached == null) { - this.fastNumbersCached = supportsFastNumbers(this); - } - - return this.fastNumbersCached; - } - }]); - - return Locale; - }(); - - /* - * This file handles parsing for well-specified formats. Here's how it works: - * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match. - * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object - * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence. - * Extractors can take a "cursor" representing the offset in the match to look at. This makes it easy to combine extractors. - * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions. - * Some extractions are super dumb and simpleParse and fromStrings help DRY them. - */ - - function combineRegexes() { - for (var _len = arguments.length, regexes = new Array(_len), _key = 0; _key < _len; _key++) { - regexes[_key] = arguments[_key]; - } - - var full = regexes.reduce(function (f, r) { - return f + r.source; - }, ""); - return RegExp("^" + full + "$"); - } - - function combineExtractors() { - for (var _len2 = arguments.length, extractors = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - extractors[_key2] = arguments[_key2]; - } - - return function (m) { - return extractors.reduce(function (_ref, ex) { - var mergedVals = _ref[0], - mergedZone = _ref[1], - cursor = _ref[2]; - - var _ex = ex(m, cursor), - val = _ex[0], - zone = _ex[1], - next = _ex[2]; - - return [Object.assign(mergedVals, val), mergedZone || zone, next]; - }, [{}, null, 1]).slice(0, 2); - }; - } - - function parse(s) { - if (s == null) { - return [null, null]; - } - - for (var _len3 = arguments.length, patterns = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { - patterns[_key3 - 1] = arguments[_key3]; - } - - for (var _i = 0, _patterns = patterns; _i < _patterns.length; _i++) { - var _patterns$_i = _patterns[_i], - regex = _patterns$_i[0], - extractor = _patterns$_i[1]; - var m = regex.exec(s); - - if (m) { - return extractor(m); - } - } - - return [null, null]; - } - - function simpleParse() { - for (var _len4 = arguments.length, keys = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - keys[_key4] = arguments[_key4]; - } - - return function (match, cursor) { - var ret = {}; - var i; - - for (i = 0; i < keys.length; i++) { - ret[keys[i]] = parseInteger(match[cursor + i]); - } - - return [ret, null, cursor + i]; - }; - } // ISO and SQL parsing - - - var offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, - isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, - isoTimeRegex = RegExp("" + isoTimeBaseRegex.source + offsetRegex.source + "?"), - isoTimeExtensionRegex = RegExp("(?:T" + isoTimeRegex.source + ")?"), - isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, - isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/, - isoOrdinalRegex = /(\d{4})-?(\d{3})/, - extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay"), - extractISOOrdinalData = simpleParse("year", "ordinal"), - sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/, - // dumbed-down version of the ISO one - sqlTimeRegex = RegExp(isoTimeBaseRegex.source + " ?(?:" + offsetRegex.source + "|(" + ianaRegex.source + "))?"), - sqlTimeExtensionRegex = RegExp("(?: " + sqlTimeRegex.source + ")?"); - - function int(match, pos, fallback) { - var m = match[pos]; - return isUndefined(m) ? fallback : parseInteger(m); - } - - function extractISOYmd(match, cursor) { - var item = { - year: int(match, cursor), - month: int(match, cursor + 1, 1), - day: int(match, cursor + 2, 1) - }; - return [item, null, cursor + 3]; - } - - function extractISOTime(match, cursor) { - var item = { - hour: int(match, cursor, 0), - minute: int(match, cursor + 1, 0), - second: int(match, cursor + 2, 0), - millisecond: parseMillis(match[cursor + 3]) - }; - return [item, null, cursor + 4]; - } - - function extractISOOffset(match, cursor) { - var local = !match[cursor] && !match[cursor + 1], - fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]), - zone = local ? null : FixedOffsetZone.instance(fullOffset); - return [{}, zone, cursor + 3]; - } - - function extractIANAZone(match, cursor) { - var zone = match[cursor] ? IANAZone.create(match[cursor]) : null; - return [{}, zone, cursor + 1]; - } // ISO duration parsing - - - var isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/; - - function extractISODuration(match) { - var s = match[0], - yearStr = match[1], - monthStr = match[2], - weekStr = match[3], - dayStr = match[4], - hourStr = match[5], - minuteStr = match[6], - secondStr = match[7], - millisecondsStr = match[8]; - var hasNegativePrefix = s[0] === "-"; - - var maybeNegate = function maybeNegate(num) { - return num && hasNegativePrefix ? -num : num; - }; - - return [{ - years: maybeNegate(parseInteger(yearStr)), - months: maybeNegate(parseInteger(monthStr)), - weeks: maybeNegate(parseInteger(weekStr)), - days: maybeNegate(parseInteger(dayStr)), - hours: maybeNegate(parseInteger(hourStr)), - minutes: maybeNegate(parseInteger(minuteStr)), - seconds: maybeNegate(parseInteger(secondStr)), - milliseconds: maybeNegate(parseMillis(millisecondsStr)) - }]; - } // These are a little braindead. EDT *should* tell us that we're in, say, America/New_York - // and not just that we're in -240 *right now*. But since I don't think these are used that often - // I'm just going to ignore that - - - var obsOffsets = { - GMT: 0, - EDT: -4 * 60, - EST: -5 * 60, - CDT: -5 * 60, - CST: -6 * 60, - MDT: -6 * 60, - MST: -7 * 60, - PDT: -7 * 60, - PST: -8 * 60 - }; - - function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { - var result = { - year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr), - month: monthsShort.indexOf(monthStr) + 1, - day: parseInteger(dayStr), - hour: parseInteger(hourStr), - minute: parseInteger(minuteStr) - }; - if (secondStr) result.second = parseInteger(secondStr); - - if (weekdayStr) { - result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1; - } - - return result; - } // RFC 2822/5322 - - - var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/; - - function extractRFC2822(match) { - var weekdayStr = match[1], - dayStr = match[2], - monthStr = match[3], - yearStr = match[4], - hourStr = match[5], - minuteStr = match[6], - secondStr = match[7], - obsOffset = match[8], - milOffset = match[9], - offHourStr = match[10], - offMinuteStr = match[11], - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - var offset; - - if (obsOffset) { - offset = obsOffsets[obsOffset]; - } else if (milOffset) { - offset = 0; - } else { - offset = signedOffset(offHourStr, offMinuteStr); - } - - return [result, new FixedOffsetZone(offset)]; - } - - function preprocessRFC2822(s) { - // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s.replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim(); - } // http date - - - var rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, - rfc850 = /^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, - ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/; - - function extractRFC1123Or850(match) { - var weekdayStr = match[1], - dayStr = match[2], - monthStr = match[3], - yearStr = match[4], - hourStr = match[5], - minuteStr = match[6], - secondStr = match[7], - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - return [result, FixedOffsetZone.utcInstance]; - } - - function extractASCII(match) { - var weekdayStr = match[1], - monthStr = match[2], - dayStr = match[3], - hourStr = match[4], - minuteStr = match[5], - secondStr = match[6], - yearStr = match[7], - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - return [result, FixedOffsetZone.utcInstance]; - } - - var isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex); - var isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex); - var isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex); - var isoTimeCombinedRegex = combineRegexes(isoTimeRegex); - var extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset); - var extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset); - var extractISOOrdinalDataAndTime = combineExtractors(extractISOOrdinalData, extractISOTime); - var extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset); - /** - * @private - */ - - function parseISODate(s) { - return parse(s, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDataAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]); - } - function parseRFC2822Date(s) { - return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]); - } - function parseHTTPDate(s) { - return parse(s, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]); - } - function parseISODuration(s) { - return parse(s, [isoDuration, extractISODuration]); - } - var sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex); - var sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex); - var extractISOYmdTimeOffsetAndIANAZone = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone); - var extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone); - function parseSQL(s) { - return parse(s, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeOffsetAndIANAZone], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]); - } - - var INVALID = "Invalid Duration"; // unit conversion constants - - var lowOrderMatrix = { - weeks: { - days: 7, - hours: 7 * 24, - minutes: 7 * 24 * 60, - seconds: 7 * 24 * 60 * 60, - milliseconds: 7 * 24 * 60 * 60 * 1000 - }, - days: { - hours: 24, - minutes: 24 * 60, - seconds: 24 * 60 * 60, - milliseconds: 24 * 60 * 60 * 1000 - }, - hours: { - minutes: 60, - seconds: 60 * 60, - milliseconds: 60 * 60 * 1000 - }, - minutes: { - seconds: 60, - milliseconds: 60 * 1000 - }, - seconds: { - milliseconds: 1000 - } - }, - casualMatrix = Object.assign({ - years: { - quarters: 4, - months: 12, - weeks: 52, - days: 365, - hours: 365 * 24, - minutes: 365 * 24 * 60, - seconds: 365 * 24 * 60 * 60, - milliseconds: 365 * 24 * 60 * 60 * 1000 - }, - quarters: { - months: 3, - weeks: 13, - days: 91, - hours: 91 * 24, - minutes: 91 * 24 * 60, - seconds: 91 * 24 * 60 * 60, - milliseconds: 91 * 24 * 60 * 60 * 1000 - }, - months: { - weeks: 4, - days: 30, - hours: 30 * 24, - minutes: 30 * 24 * 60, - seconds: 30 * 24 * 60 * 60, - milliseconds: 30 * 24 * 60 * 60 * 1000 - } - }, lowOrderMatrix), - daysInYearAccurate = 146097.0 / 400, - daysInMonthAccurate = 146097.0 / 4800, - accurateMatrix = Object.assign({ - years: { - quarters: 4, - months: 12, - weeks: daysInYearAccurate / 7, - days: daysInYearAccurate, - hours: daysInYearAccurate * 24, - minutes: daysInYearAccurate * 24 * 60, - seconds: daysInYearAccurate * 24 * 60 * 60, - milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 - }, - quarters: { - months: 3, - weeks: daysInYearAccurate / 28, - days: daysInYearAccurate / 4, - hours: daysInYearAccurate * 24 / 4, - minutes: daysInYearAccurate * 24 * 60 / 4, - seconds: daysInYearAccurate * 24 * 60 * 60 / 4, - milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 / 4 - }, - months: { - weeks: daysInMonthAccurate / 7, - days: daysInMonthAccurate, - hours: daysInMonthAccurate * 24, - minutes: daysInMonthAccurate * 24 * 60, - seconds: daysInMonthAccurate * 24 * 60 * 60, - milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000 - } - }, lowOrderMatrix); // units ordered by size - - var orderedUnits = ["years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"]; - var reverseUnits = orderedUnits.slice(0).reverse(); // clone really means "create another instance just like this one, but with these changes" - - function clone(dur, alts, clear) { - if (clear === void 0) { - clear = false; - } - - // deep merge for vals - var conf = { - values: clear ? alts.values : Object.assign({}, dur.values, alts.values || {}), - loc: dur.loc.clone(alts.loc), - conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy - }; - return new Duration(conf); - } - - function antiTrunc(n) { - return n < 0 ? Math.floor(n) : Math.ceil(n); - } // NB: mutates parameters - - - function convert(matrix, fromMap, fromUnit, toMap, toUnit) { - var conv = matrix[toUnit][fromUnit], - raw = fromMap[fromUnit] / conv, - sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]), - // ok, so this is wild, but see the matrix in the tests - added = !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw); - toMap[toUnit] += added; - fromMap[fromUnit] -= added * conv; - } // NB: mutates parameters - - - function normalizeValues(matrix, vals) { - reverseUnits.reduce(function (previous, current) { - if (!isUndefined(vals[current])) { - if (previous) { - convert(matrix, vals, previous, vals, current); - } - - return current; - } else { - return previous; - } - }, null); - } - /** - * A Duration object represents a period of time, like "2 months" or "1 day, 1 hour". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime.plus} to add a Duration object to a DateTime, producing another DateTime. - * - * Here is a brief overview of commonly used methods and getters in Duration: - * - * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}. - * * **Unit values** See the {@link Duration.years}, {@link Duration.months}, {@link Duration.weeks}, {@link Duration.days}, {@link Duration.hours}, {@link Duration.minutes}, {@link Duration.seconds}, {@link Duration.milliseconds} accessors. - * * **Configuration** See {@link Duration.locale} and {@link Duration.numberingSystem} accessors. - * * **Transformation** To create new Durations out of old ones use {@link Duration.plus}, {@link Duration.minus}, {@link Duration.normalize}, {@link Duration.set}, {@link Duration.reconfigure}, {@link Duration.shiftTo}, and {@link Duration.negate}. - * * **Output** To convert the Duration into other representations, see {@link Duration.as}, {@link Duration.toISO}, {@link Duration.toFormat}, and {@link Duration.toJSON} - * - * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation. - */ - - - var Duration = /*#__PURE__*/function () { - /** - * @private - */ - function Duration(config) { - var accurate = config.conversionAccuracy === "longterm" || false; - /** - * @access private - */ - - this.values = config.values; - /** - * @access private - */ - - this.loc = config.loc || Locale.create(); - /** - * @access private - */ - - this.conversionAccuracy = accurate ? "longterm" : "casual"; - /** - * @access private - */ - - this.invalid = config.invalid || null; - /** - * @access private - */ - - this.matrix = accurate ? accurateMatrix : casualMatrix; - /** - * @access private - */ - - this.isLuxonDuration = true; - } - /** - * Create Duration from a number of milliseconds. - * @param {number} count of milliseconds - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - - - Duration.fromMillis = function fromMillis(count, opts) { - return Duration.fromObject(Object.assign({ - milliseconds: count - }, opts)); - } - /** - * Create a Duration from a Javascript object with keys like 'years' and 'hours. - * If this object is empty then a zero milliseconds duration is returned. - * @param {Object} obj - the object to create the DateTime from - * @param {number} obj.years - * @param {number} obj.quarters - * @param {number} obj.months - * @param {number} obj.weeks - * @param {number} obj.days - * @param {number} obj.hours - * @param {number} obj.minutes - * @param {number} obj.seconds - * @param {number} obj.milliseconds - * @param {string} [obj.locale='en-US'] - the locale to use - * @param {string} obj.numberingSystem - the numbering system to use - * @param {string} [obj.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - ; - - Duration.fromObject = function fromObject(obj) { - if (obj == null || typeof obj !== "object") { - throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got " + (obj === null ? "null" : typeof obj)); - } - - return new Duration({ - values: normalizeObject(obj, Duration.normalizeUnit, ["locale", "numberingSystem", "conversionAccuracy", "zone" // a bit of debt; it's super inconvenient internally not to be able to blindly pass this - ]), - loc: Locale.fromObject(obj), - conversionAccuracy: obj.conversionAccuracy - }); - } - /** - * Create a Duration from an ISO 8601 duration string. - * @param {string} text - text to parse - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @see https://en.wikipedia.org/wiki/ISO_8601#Durations - * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 } - * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 } - * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 } - * @return {Duration} - */ - ; - - Duration.fromISO = function fromISO(text, opts) { - var _parseISODuration = parseISODuration(text), - parsed = _parseISODuration[0]; - - if (parsed) { - var obj = Object.assign(parsed, opts); - return Duration.fromObject(obj); - } else { - return Duration.invalid("unparsable", "the input \"" + text + "\" can't be parsed as ISO 8601"); - } - } - /** - * Create an invalid Duration. - * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {Duration} - */ - ; - - Duration.invalid = function invalid(reason, explanation) { - if (explanation === void 0) { - explanation = null; - } - - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the Duration is invalid"); - } - - var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidDurationError(invalid); - } else { - return new Duration({ - invalid: invalid - }); - } - } - /** - * @private - */ - ; - - Duration.normalizeUnit = function normalizeUnit(unit) { - var normalized = { - year: "years", - years: "years", - quarter: "quarters", - quarters: "quarters", - month: "months", - months: "months", - week: "weeks", - weeks: "weeks", - day: "days", - days: "days", - hour: "hours", - hours: "hours", - minute: "minutes", - minutes: "minutes", - second: "seconds", - seconds: "seconds", - millisecond: "milliseconds", - milliseconds: "milliseconds" - }[unit ? unit.toLowerCase() : unit]; - if (!normalized) throw new InvalidUnitError(unit); - return normalized; - } - /** - * Check if an object is a Duration. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - ; - - Duration.isDuration = function isDuration(o) { - return o && o.isLuxonDuration || false; - } - /** - * Get the locale of a Duration, such 'en-GB' - * @type {string} - */ - ; - - var _proto = Duration.prototype; - - /** - * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens: - * * `S` for milliseconds - * * `s` for seconds - * * `m` for minutes - * * `h` for hours - * * `d` for days - * * `M` for months - * * `y` for years - * Notes: - * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits - * * The duration will be converted to the set of units in the format string using {@link Duration.shiftTo} and the Durations's conversion accuracy setting. - * @param {string} fmt - the format string - * @param {Object} opts - options - * @param {boolean} [opts.floor=true] - floor numerical values - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2" - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002" - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000" - * @return {string} - */ - _proto.toFormat = function toFormat(fmt, opts) { - if (opts === void 0) { - opts = {}; - } - - // reverse-compat since 1.2; we always round down now, never up, and we do it by default - var fmtOpts = Object.assign({}, opts, { - floor: opts.round !== false && opts.floor !== false - }); - return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID; - } - /** - * Returns a Javascript object with this Duration's values. - * @param opts - options for generating the object - * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 } - * @return {Object} - */ - ; - - _proto.toObject = function toObject(opts) { - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid) return {}; - var base = Object.assign({}, this.values); - - if (opts.includeConfig) { - base.conversionAccuracy = this.conversionAccuracy; - base.numberingSystem = this.loc.numberingSystem; - base.locale = this.loc.locale; - } - - return base; - } - /** - * Returns an ISO 8601-compliant string representation of this Duration. - * @see https://en.wikipedia.org/wiki/ISO_8601#Durations - * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S' - * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S' - * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M' - * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M' - * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S' - * @return {string} - */ - ; - - _proto.toISO = function toISO() { - // we could use the formatter, but this is an easier way to get the minimum string - if (!this.isValid) return null; - var s = "P"; - if (this.years !== 0) s += this.years + "Y"; - if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + "M"; - if (this.weeks !== 0) s += this.weeks + "W"; - if (this.days !== 0) s += this.days + "D"; - if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) s += "T"; - if (this.hours !== 0) s += this.hours + "H"; - if (this.minutes !== 0) s += this.minutes + "M"; - if (this.seconds !== 0 || this.milliseconds !== 0) // this will handle "floating point madness" by removing extra decimal places - // https://stackoverflow.com/questions/588004/is-floating-point-math-broken - s += roundTo(this.seconds + this.milliseconds / 1000, 3) + "S"; - if (s === "P") s += "T0S"; - return s; - } - /** - * Returns an ISO 8601 representation of this Duration appropriate for use in JSON. - * @return {string} - */ - ; - - _proto.toJSON = function toJSON() { - return this.toISO(); - } - /** - * Returns an ISO 8601 representation of this Duration appropriate for use in debugging. - * @return {string} - */ - ; - - _proto.toString = function toString() { - return this.toISO(); - } - /** - * Returns an milliseconds value of this Duration. - * @return {number} - */ - ; - - _proto.valueOf = function valueOf() { - return this.as("milliseconds"); - } - /** - * Make this Duration longer by the specified amount. Return a newly-constructed Duration. - * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @return {Duration} - */ - ; - - _proto.plus = function plus(duration) { - if (!this.isValid) return this; - var dur = friendlyDuration(duration), - result = {}; - - for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits), _step; !(_step = _iterator()).done;) { - var k = _step.value; - - if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) { - result[k] = dur.get(k) + this.get(k); - } - } - - return clone(this, { - values: result - }, true); - } - /** - * Make this Duration shorter by the specified amount. Return a newly-constructed Duration. - * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @return {Duration} - */ - ; - - _proto.minus = function minus(duration) { - if (!this.isValid) return this; - var dur = friendlyDuration(duration); - return this.plus(dur.negate()); - } - /** - * Scale this Duration by the specified amount. Return a newly-constructed Duration. - * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number. - * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit(x => x * 2) //=> { hours: 2, minutes: 60 } - * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit((x, u) => u === "hour" ? x * 2 : x) //=> { hours: 2, minutes: 30 } - * @return {Duration} - */ - ; - - _proto.mapUnits = function mapUnits(fn) { - if (!this.isValid) return this; - var result = {}; - - for (var _i = 0, _Object$keys = Object.keys(this.values); _i < _Object$keys.length; _i++) { - var k = _Object$keys[_i]; - result[k] = asNumber(fn(this.values[k], k)); - } - - return clone(this, { - values: result - }, true); - } - /** - * Get the value of unit. - * @param {string} unit - a unit such as 'minute' or 'day' - * @example Duration.fromObject({years: 2, days: 3}).years //=> 2 - * @example Duration.fromObject({years: 2, days: 3}).months //=> 0 - * @example Duration.fromObject({years: 2, days: 3}).days //=> 3 - * @return {number} - */ - ; - - _proto.get = function get(unit) { - return this[Duration.normalizeUnit(unit)]; - } - /** - * "Set" the values of specified units. Return a newly-constructed Duration. - * @param {Object} values - a mapping of units to numbers - * @example dur.set({ years: 2017 }) - * @example dur.set({ hours: 8, minutes: 30 }) - * @return {Duration} - */ - ; - - _proto.set = function set(values) { - if (!this.isValid) return this; - var mixed = Object.assign(this.values, normalizeObject(values, Duration.normalizeUnit, [])); - return clone(this, { - values: mixed - }); - } - /** - * "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration. - * @example dur.reconfigure({ locale: 'en-GB' }) - * @return {Duration} - */ - ; - - _proto.reconfigure = function reconfigure(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - locale = _ref.locale, - numberingSystem = _ref.numberingSystem, - conversionAccuracy = _ref.conversionAccuracy; - - var loc = this.loc.clone({ - locale: locale, - numberingSystem: numberingSystem - }), - opts = { - loc: loc - }; - - if (conversionAccuracy) { - opts.conversionAccuracy = conversionAccuracy; - } - - return clone(this, opts); - } - /** - * Return the length of the duration in the specified unit. - * @param {string} unit - a unit such as 'minutes' or 'days' - * @example Duration.fromObject({years: 1}).as('days') //=> 365 - * @example Duration.fromObject({years: 1}).as('months') //=> 12 - * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5 - * @return {number} - */ - ; - - _proto.as = function as(unit) { - return this.isValid ? this.shiftTo(unit).get(unit) : NaN; - } - /** - * Reduce this Duration to its canonical representation in its current units. - * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 } - * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 } - * @return {Duration} - */ - ; - - _proto.normalize = function normalize() { - if (!this.isValid) return this; - var vals = this.toObject(); - normalizeValues(this.matrix, vals); - return clone(this, { - values: vals - }, true); - } - /** - * Convert this Duration into its representation in a different set of units. - * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 } - * @return {Duration} - */ - ; - - _proto.shiftTo = function shiftTo() { - for (var _len = arguments.length, units = new Array(_len), _key = 0; _key < _len; _key++) { - units[_key] = arguments[_key]; - } - - if (!this.isValid) return this; - - if (units.length === 0) { - return this; - } - - units = units.map(function (u) { - return Duration.normalizeUnit(u); - }); - var built = {}, - accumulated = {}, - vals = this.toObject(); - var lastUnit; - - for (var _iterator2 = _createForOfIteratorHelperLoose(orderedUnits), _step2; !(_step2 = _iterator2()).done;) { - var k = _step2.value; - - if (units.indexOf(k) >= 0) { - lastUnit = k; - var own = 0; // anything we haven't boiled down yet should get boiled to this unit - - for (var ak in accumulated) { - own += this.matrix[ak][k] * accumulated[ak]; - accumulated[ak] = 0; - } // plus anything that's already in this unit - - - if (isNumber(vals[k])) { - own += vals[k]; - } - - var i = Math.trunc(own); - built[k] = i; - accumulated[k] = own - i; // we'd like to absorb these fractions in another unit - // plus anything further down the chain that should be rolled up in to this - - for (var down in vals) { - if (orderedUnits.indexOf(down) > orderedUnits.indexOf(k)) { - convert(this.matrix, vals, down, built, k); - } - } // otherwise, keep it in the wings to boil it later - - } else if (isNumber(vals[k])) { - accumulated[k] = vals[k]; - } - } // anything leftover becomes the decimal for the last unit - // lastUnit must be defined since units is not empty - - - for (var key in accumulated) { - if (accumulated[key] !== 0) { - built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key]; - } - } - - return clone(this, { - values: built - }, true).normalize(); - } - /** - * Return the negative of this Duration. - * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 } - * @return {Duration} - */ - ; - - _proto.negate = function negate() { - if (!this.isValid) return this; - var negated = {}; - - for (var _i2 = 0, _Object$keys2 = Object.keys(this.values); _i2 < _Object$keys2.length; _i2++) { - var k = _Object$keys2[_i2]; - negated[k] = -this.values[k]; - } - - return clone(this, { - values: negated - }, true); - } - /** - * Get the years. - * @type {number} - */ - ; - - /** - * Equality check - * Two Durations are equal iff they have the same units and the same values for each unit. - * @param {Duration} other - * @return {boolean} - */ - _proto.equals = function equals(other) { - if (!this.isValid || !other.isValid) { - return false; - } - - if (!this.loc.equals(other.loc)) { - return false; - } - - for (var _iterator3 = _createForOfIteratorHelperLoose(orderedUnits), _step3; !(_step3 = _iterator3()).done;) { - var u = _step3.value; - - if (this.values[u] !== other.values[u]) { - return false; - } - } - - return true; - }; - - _createClass(Duration, [{ - key: "locale", - get: function get() { - return this.isValid ? this.loc.locale : null; - } - /** - * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration - * - * @type {string} - */ - - }, { - key: "numberingSystem", - get: function get() { - return this.isValid ? this.loc.numberingSystem : null; - } - }, { - key: "years", - get: function get() { - return this.isValid ? this.values.years || 0 : NaN; - } - /** - * Get the quarters. - * @type {number} - */ - - }, { - key: "quarters", - get: function get() { - return this.isValid ? this.values.quarters || 0 : NaN; - } - /** - * Get the months. - * @type {number} - */ - - }, { - key: "months", - get: function get() { - return this.isValid ? this.values.months || 0 : NaN; - } - /** - * Get the weeks - * @type {number} - */ - - }, { - key: "weeks", - get: function get() { - return this.isValid ? this.values.weeks || 0 : NaN; - } - /** - * Get the days. - * @type {number} - */ - - }, { - key: "days", - get: function get() { - return this.isValid ? this.values.days || 0 : NaN; - } - /** - * Get the hours. - * @type {number} - */ - - }, { - key: "hours", - get: function get() { - return this.isValid ? this.values.hours || 0 : NaN; - } - /** - * Get the minutes. - * @type {number} - */ - - }, { - key: "minutes", - get: function get() { - return this.isValid ? this.values.minutes || 0 : NaN; - } - /** - * Get the seconds. - * @return {number} - */ - - }, { - key: "seconds", - get: function get() { - return this.isValid ? this.values.seconds || 0 : NaN; - } - /** - * Get the milliseconds. - * @return {number} - */ - - }, { - key: "milliseconds", - get: function get() { - return this.isValid ? this.values.milliseconds || 0 : NaN; - } - /** - * Returns whether the Duration is invalid. Invalid durations are returned by diff operations - * on invalid DateTimes or Intervals. - * @return {boolean} - */ - - }, { - key: "isValid", - get: function get() { - return this.invalid === null; - } - /** - * Returns an error code if this Duration became invalid, or null if the Duration is valid - * @return {string} - */ - - }, { - key: "invalidReason", - get: function get() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this Duration became invalid, or null if the Duration is valid - * @type {string} - */ - - }, { - key: "invalidExplanation", - get: function get() { - return this.invalid ? this.invalid.explanation : null; - } - }]); - - return Duration; - }(); - function friendlyDuration(durationish) { - if (isNumber(durationish)) { - return Duration.fromMillis(durationish); - } else if (Duration.isDuration(durationish)) { - return durationish; - } else if (typeof durationish === "object") { - return Duration.fromObject(durationish); - } else { - throw new InvalidArgumentError("Unknown duration argument " + durationish + " of type " + typeof durationish); - } - } - - var INVALID$1 = "Invalid Interval"; // checks if the start is equal to or before the end - - function validateStartEnd(start, end) { - if (!start || !start.isValid) { - return Interval.invalid("missing or invalid start"); - } else if (!end || !end.isValid) { - return Interval.invalid("missing or invalid end"); - } else if (end < start) { - return Interval.invalid("end before start", "The end of an interval must be after its start, but you had start=" + start.toISO() + " and end=" + end.toISO()); - } else { - return null; - } - } - /** - * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them. - * - * Here is a brief overview of the most commonly used methods and getters in Interval: - * - * * **Creation** To create an Interval, use {@link fromDateTimes}, {@link after}, {@link before}, or {@link fromISO}. - * * **Accessors** Use {@link start} and {@link end} to get the start and end. - * * **Interrogation** To analyze the Interval, use {@link count}, {@link length}, {@link hasSame}, {@link contains}, {@link isAfter}, or {@link isBefore}. - * * **Transformation** To create other Intervals out of this one, use {@link set}, {@link splitAt}, {@link splitBy}, {@link divideEqually}, {@link merge}, {@link xor}, {@link union}, {@link intersection}, or {@link difference}. - * * **Comparison** To compare this Interval to another one, use {@link equals}, {@link overlaps}, {@link abutsStart}, {@link abutsEnd}, {@link engulfs}. - * * **Output** To convert the Interval into other representations, see {@link toString}, {@link toISO}, {@link toISODate}, {@link toISOTime}, {@link toFormat}, and {@link toDuration}. - */ - - - var Interval = /*#__PURE__*/function () { - /** - * @private - */ - function Interval(config) { - /** - * @access private - */ - this.s = config.start; - /** - * @access private - */ - - this.e = config.end; - /** - * @access private - */ - - this.invalid = config.invalid || null; - /** - * @access private - */ - - this.isLuxonInterval = true; - } - /** - * Create an invalid Interval. - * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {Interval} - */ - - - Interval.invalid = function invalid(reason, explanation) { - if (explanation === void 0) { - explanation = null; - } - - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the Interval is invalid"); - } - - var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidIntervalError(invalid); - } else { - return new Interval({ - invalid: invalid - }); - } - } - /** - * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end. - * @param {DateTime|Date|Object} start - * @param {DateTime|Date|Object} end - * @return {Interval} - */ - ; - - Interval.fromDateTimes = function fromDateTimes(start, end) { - var builtStart = friendlyDateTime(start), - builtEnd = friendlyDateTime(end); - var validateError = validateStartEnd(builtStart, builtEnd); - - if (validateError == null) { - return new Interval({ - start: builtStart, - end: builtEnd - }); - } else { - return validateError; - } - } - /** - * Create an Interval from a start DateTime and a Duration to extend to. - * @param {DateTime|Date|Object} start - * @param {Duration|Object|number} duration - the length of the Interval. - * @return {Interval} - */ - ; - - Interval.after = function after(start, duration) { - var dur = friendlyDuration(duration), - dt = friendlyDateTime(start); - return Interval.fromDateTimes(dt, dt.plus(dur)); - } - /** - * Create an Interval from an end DateTime and a Duration to extend backwards to. - * @param {DateTime|Date|Object} end - * @param {Duration|Object|number} duration - the length of the Interval. - * @return {Interval} - */ - ; - - Interval.before = function before(end, duration) { - var dur = friendlyDuration(duration), - dt = friendlyDateTime(end); - return Interval.fromDateTimes(dt.minus(dur), dt); - } - /** - * Create an Interval from an ISO 8601 string. - * Accepts `/`, `/`, and `/` formats. - * @param {string} text - the ISO string to parse - * @param {Object} [opts] - options to pass {@link DateTime.fromISO} and optionally {@link Duration.fromISO} - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @return {Interval} - */ - ; - - Interval.fromISO = function fromISO(text, opts) { - var _split = (text || "").split("/", 2), - s = _split[0], - e = _split[1]; - - if (s && e) { - var start, startIsValid; - - try { - start = DateTime.fromISO(s, opts); - startIsValid = start.isValid; - } catch (e) { - startIsValid = false; - } - - var end, endIsValid; - - try { - end = DateTime.fromISO(e, opts); - endIsValid = end.isValid; - } catch (e) { - endIsValid = false; - } - - if (startIsValid && endIsValid) { - return Interval.fromDateTimes(start, end); - } - - if (startIsValid) { - var dur = Duration.fromISO(e, opts); - - if (dur.isValid) { - return Interval.after(start, dur); - } - } else if (endIsValid) { - var _dur = Duration.fromISO(s, opts); - - if (_dur.isValid) { - return Interval.before(end, _dur); - } - } - } - - return Interval.invalid("unparsable", "the input \"" + text + "\" can't be parsed as ISO 8601"); - } - /** - * Check if an object is an Interval. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - ; - - Interval.isInterval = function isInterval(o) { - return o && o.isLuxonInterval || false; - } - /** - * Returns the start of the Interval - * @type {DateTime} - */ - ; - - var _proto = Interval.prototype; - - /** - * Returns the length of the Interval in the specified unit. - * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in. - * @return {number} - */ - _proto.length = function length(unit) { - if (unit === void 0) { - unit = "milliseconds"; - } - - return this.isValid ? this.toDuration.apply(this, [unit]).get(unit) : NaN; - } - /** - * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part. - * Unlike {@link length} this counts sections of the calendar, not periods of time, e.g. specifying 'day' - * asks 'what dates are included in this interval?', not 'how many days long is this interval?' - * @param {string} [unit='milliseconds'] - the unit of time to count. - * @return {number} - */ - ; - - _proto.count = function count(unit) { - if (unit === void 0) { - unit = "milliseconds"; - } - - if (!this.isValid) return NaN; - var start = this.start.startOf(unit), - end = this.end.startOf(unit); - return Math.floor(end.diff(start, unit).get(unit)) + 1; - } - /** - * Returns whether this Interval's start and end are both in the same unit of time - * @param {string} unit - the unit of time to check sameness on - * @return {boolean} - */ - ; - - _proto.hasSame = function hasSame(unit) { - return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false; - } - /** - * Return whether this Interval has the same start and end DateTimes. - * @return {boolean} - */ - ; - - _proto.isEmpty = function isEmpty() { - return this.s.valueOf() === this.e.valueOf(); - } - /** - * Return whether this Interval's start is after the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - ; - - _proto.isAfter = function isAfter(dateTime) { - if (!this.isValid) return false; - return this.s > dateTime; - } - /** - * Return whether this Interval's end is before the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - ; - - _proto.isBefore = function isBefore(dateTime) { - if (!this.isValid) return false; - return this.e <= dateTime; - } - /** - * Return whether this Interval contains the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - ; - - _proto.contains = function contains(dateTime) { - if (!this.isValid) return false; - return this.s <= dateTime && this.e > dateTime; - } - /** - * "Sets" the start and/or end dates. Returns a newly-constructed Interval. - * @param {Object} values - the values to set - * @param {DateTime} values.start - the starting DateTime - * @param {DateTime} values.end - the ending DateTime - * @return {Interval} - */ - ; - - _proto.set = function set(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - start = _ref.start, - end = _ref.end; - - if (!this.isValid) return this; - return Interval.fromDateTimes(start || this.s, end || this.e); - } - /** - * Split this Interval at each of the specified DateTimes - * @param {...[DateTime]} dateTimes - the unit of time to count. - * @return {[Interval]} - */ - ; - - _proto.splitAt = function splitAt() { - var _this = this; - - if (!this.isValid) return []; - - for (var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++) { - dateTimes[_key] = arguments[_key]; - } - - var sorted = dateTimes.map(friendlyDateTime).filter(function (d) { - return _this.contains(d); - }).sort(), - results = []; - var s = this.s, - i = 0; - - while (s < this.e) { - var added = sorted[i] || this.e, - next = +added > +this.e ? this.e : added; - results.push(Interval.fromDateTimes(s, next)); - s = next; - i += 1; - } - - return results; - } - /** - * Split this Interval into smaller Intervals, each of the specified length. - * Left over time is grouped into a smaller interval - * @param {Duration|Object|number} duration - The length of each resulting interval. - * @return {[Interval]} - */ - ; - - _proto.splitBy = function splitBy(duration) { - var dur = friendlyDuration(duration); - - if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) { - return []; - } - - var s = this.s, - added, - next; - var results = []; - - while (s < this.e) { - added = s.plus(dur); - next = +added > +this.e ? this.e : added; - results.push(Interval.fromDateTimes(s, next)); - s = next; - } - - return results; - } - /** - * Split this Interval into the specified number of smaller intervals. - * @param {number} numberOfParts - The number of Intervals to divide the Interval into. - * @return {[Interval]} - */ - ; - - _proto.divideEqually = function divideEqually(numberOfParts) { - if (!this.isValid) return []; - return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts); - } - /** - * Return whether this Interval overlaps with the specified Interval - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.overlaps = function overlaps(other) { - return this.e > other.s && this.s < other.e; - } - /** - * Return whether this Interval's end is adjacent to the specified Interval's start. - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.abutsStart = function abutsStart(other) { - if (!this.isValid) return false; - return +this.e === +other.s; - } - /** - * Return whether this Interval's start is adjacent to the specified Interval's end. - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.abutsEnd = function abutsEnd(other) { - if (!this.isValid) return false; - return +other.e === +this.s; - } - /** - * Return whether this Interval engulfs the start and end of the specified Interval. - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.engulfs = function engulfs(other) { - if (!this.isValid) return false; - return this.s <= other.s && this.e >= other.e; - } - /** - * Return whether this Interval has the same start and end as the specified Interval. - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.equals = function equals(other) { - if (!this.isValid || !other.isValid) { - return false; - } - - return this.s.equals(other.s) && this.e.equals(other.e); - } - /** - * Return an Interval representing the intersection of this Interval and the specified Interval. - * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals. - * Returns null if the intersection is empty, meaning, the intervals don't intersect. - * @param {Interval} other - * @return {Interval} - */ - ; - - _proto.intersection = function intersection(other) { - if (!this.isValid) return this; - var s = this.s > other.s ? this.s : other.s, - e = this.e < other.e ? this.e : other.e; - - if (s > e) { - return null; - } else { - return Interval.fromDateTimes(s, e); - } - } - /** - * Return an Interval representing the union of this Interval and the specified Interval. - * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals. - * @param {Interval} other - * @return {Interval} - */ - ; - - _proto.union = function union(other) { - if (!this.isValid) return this; - var s = this.s < other.s ? this.s : other.s, - e = this.e > other.e ? this.e : other.e; - return Interval.fromDateTimes(s, e); - } - /** - * Merge an array of Intervals into a equivalent minimal set of Intervals. - * Combines overlapping and adjacent Intervals. - * @param {[Interval]} intervals - * @return {[Interval]} - */ - ; - - Interval.merge = function merge(intervals) { - var _intervals$sort$reduc = intervals.sort(function (a, b) { - return a.s - b.s; - }).reduce(function (_ref2, item) { - var sofar = _ref2[0], - current = _ref2[1]; - - if (!current) { - return [sofar, item]; - } else if (current.overlaps(item) || current.abutsStart(item)) { - return [sofar, current.union(item)]; - } else { - return [sofar.concat([current]), item]; - } - }, [[], null]), - found = _intervals$sort$reduc[0], - final = _intervals$sort$reduc[1]; - - if (final) { - found.push(final); - } - - return found; - } - /** - * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals. - * @param {[Interval]} intervals - * @return {[Interval]} - */ - ; - - Interval.xor = function xor(intervals) { - var _Array$prototype; - - var start = null, - currentCount = 0; - - var results = [], - ends = intervals.map(function (i) { - return [{ - time: i.s, - type: "s" - }, { - time: i.e, - type: "e" - }]; - }), - flattened = (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, ends), - arr = flattened.sort(function (a, b) { - return a.time - b.time; - }); - - for (var _iterator = _createForOfIteratorHelperLoose(arr), _step; !(_step = _iterator()).done;) { - var i = _step.value; - currentCount += i.type === "s" ? 1 : -1; - - if (currentCount === 1) { - start = i.time; - } else { - if (start && +start !== +i.time) { - results.push(Interval.fromDateTimes(start, i.time)); - } - - start = null; - } - } - - return Interval.merge(results); - } - /** - * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals. - * @param {...Interval} intervals - * @return {[Interval]} - */ - ; - - _proto.difference = function difference() { - var _this2 = this; - - for (var _len2 = arguments.length, intervals = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - intervals[_key2] = arguments[_key2]; - } - - return Interval.xor([this].concat(intervals)).map(function (i) { - return _this2.intersection(i); - }).filter(function (i) { - return i && !i.isEmpty(); - }); - } - /** - * Returns a string representation of this Interval appropriate for debugging. - * @return {string} - */ - ; - - _proto.toString = function toString() { - if (!this.isValid) return INVALID$1; - return "[" + this.s.toISO() + " \u2013 " + this.e.toISO() + ")"; - } - /** - * Returns an ISO 8601-compliant string representation of this Interval. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @param {Object} opts - The same options as {@link DateTime.toISO} - * @return {string} - */ - ; - - _proto.toISO = function toISO(opts) { - if (!this.isValid) return INVALID$1; - return this.s.toISO(opts) + "/" + this.e.toISO(opts); - } - /** - * Returns an ISO 8601-compliant string representation of date of this Interval. - * The time components are ignored. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @return {string} - */ - ; - - _proto.toISODate = function toISODate() { - if (!this.isValid) return INVALID$1; - return this.s.toISODate() + "/" + this.e.toISODate(); - } - /** - * Returns an ISO 8601-compliant string representation of time of this Interval. - * The date components are ignored. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @param {Object} opts - The same options as {@link DateTime.toISO} - * @return {string} - */ - ; - - _proto.toISOTime = function toISOTime(opts) { - if (!this.isValid) return INVALID$1; - return this.s.toISOTime(opts) + "/" + this.e.toISOTime(opts); - } - /** - * Returns a string representation of this Interval formatted according to the specified format string. - * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime.toFormat} for details. - * @param {Object} opts - options - * @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations - * @return {string} - */ - ; - - _proto.toFormat = function toFormat(dateFormat, _temp2) { - var _ref3 = _temp2 === void 0 ? {} : _temp2, - _ref3$separator = _ref3.separator, - separator = _ref3$separator === void 0 ? " – " : _ref3$separator; - - if (!this.isValid) return INVALID$1; - return "" + this.s.toFormat(dateFormat) + separator + this.e.toFormat(dateFormat); - } - /** - * Return a Duration representing the time spanned by this interval. - * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration. - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 } - * @return {Duration} - */ - ; - - _proto.toDuration = function toDuration(unit, opts) { - if (!this.isValid) { - return Duration.invalid(this.invalidReason); - } - - return this.e.diff(this.s, unit, opts); - } - /** - * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes - * @param {function} mapFn - * @return {Interval} - * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC()) - * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 })) - */ - ; - - _proto.mapEndpoints = function mapEndpoints(mapFn) { - return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e)); - }; - - _createClass(Interval, [{ - key: "start", - get: function get() { - return this.isValid ? this.s : null; - } - /** - * Returns the end of the Interval - * @type {DateTime} - */ - - }, { - key: "end", - get: function get() { - return this.isValid ? this.e : null; - } - /** - * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'. - * @type {boolean} - */ - - }, { - key: "isValid", - get: function get() { - return this.invalidReason === null; - } - /** - * Returns an error code if this Interval is invalid, or null if the Interval is valid - * @type {string} - */ - - }, { - key: "invalidReason", - get: function get() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this Interval became invalid, or null if the Interval is valid - * @type {string} - */ - - }, { - key: "invalidExplanation", - get: function get() { - return this.invalid ? this.invalid.explanation : null; - } - }]); - - return Interval; - }(); - - /** - * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment. - */ - - var Info = /*#__PURE__*/function () { - function Info() {} - - /** - * Return whether the specified zone contains a DST. - * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone. - * @return {boolean} - */ - Info.hasDST = function hasDST(zone) { - if (zone === void 0) { - zone = Settings.defaultZone; - } - - var proto = DateTime.local().setZone(zone).set({ - month: 12 - }); - return !zone.universal && proto.offset !== proto.set({ - month: 6 - }).offset; - } - /** - * Return whether the specified zone is a valid IANA specifier. - * @param {string} zone - Zone to check - * @return {boolean} - */ - ; - - Info.isValidIANAZone = function isValidIANAZone(zone) { - return IANAZone.isValidSpecifier(zone) && IANAZone.isValidZone(zone); - } - /** - * Converts the input into a {@link Zone} instance. - * - * * If `input` is already a Zone instance, it is returned unchanged. - * * If `input` is a string containing a valid time zone name, a Zone instance - * with that name is returned. - * * If `input` is a string that doesn't refer to a known time zone, a Zone - * instance with {@link Zone.isValid} == false is returned. - * * If `input is a number, a Zone instance with the specified fixed offset - * in minutes is returned. - * * If `input` is `null` or `undefined`, the default zone is returned. - * @param {string|Zone|number} [input] - the value to be converted - * @return {Zone} - */ - ; - - Info.normalizeZone = function normalizeZone$1(input) { - return normalizeZone(input, Settings.defaultZone); - } - /** - * Return an array of standalone month names. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.outputCalendar='gregory'] - the calendar - * @example Info.months()[0] //=> 'January' - * @example Info.months('short')[0] //=> 'Jan' - * @example Info.months('numeric')[0] //=> '1' - * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.' - * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١' - * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I' - * @return {[string]} - */ - ; - - Info.months = function months(length, _temp) { - if (length === void 0) { - length = "long"; - } - - var _ref = _temp === void 0 ? {} : _temp, - _ref$locale = _ref.locale, - locale = _ref$locale === void 0 ? null : _ref$locale, - _ref$numberingSystem = _ref.numberingSystem, - numberingSystem = _ref$numberingSystem === void 0 ? null : _ref$numberingSystem, - _ref$outputCalendar = _ref.outputCalendar, - outputCalendar = _ref$outputCalendar === void 0 ? "gregory" : _ref$outputCalendar; - - return Locale.create(locale, numberingSystem, outputCalendar).months(length); - } - /** - * Return an array of format month names. - * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that - * changes the string. - * See {@link months} - * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.outputCalendar='gregory'] - the calendar - * @return {[string]} - */ - ; - - Info.monthsFormat = function monthsFormat(length, _temp2) { - if (length === void 0) { - length = "long"; - } - - var _ref2 = _temp2 === void 0 ? {} : _temp2, - _ref2$locale = _ref2.locale, - locale = _ref2$locale === void 0 ? null : _ref2$locale, - _ref2$numberingSystem = _ref2.numberingSystem, - numberingSystem = _ref2$numberingSystem === void 0 ? null : _ref2$numberingSystem, - _ref2$outputCalendar = _ref2.outputCalendar, - outputCalendar = _ref2$outputCalendar === void 0 ? "gregory" : _ref2$outputCalendar; - - return Locale.create(locale, numberingSystem, outputCalendar).months(length, true); - } - /** - * Return an array of standalone week names. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @example Info.weekdays()[0] //=> 'Monday' - * @example Info.weekdays('short')[0] //=> 'Mon' - * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.' - * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين' - * @return {[string]} - */ - ; - - Info.weekdays = function weekdays(length, _temp3) { - if (length === void 0) { - length = "long"; - } - - var _ref3 = _temp3 === void 0 ? {} : _temp3, - _ref3$locale = _ref3.locale, - locale = _ref3$locale === void 0 ? null : _ref3$locale, - _ref3$numberingSystem = _ref3.numberingSystem, - numberingSystem = _ref3$numberingSystem === void 0 ? null : _ref3$numberingSystem; - - return Locale.create(locale, numberingSystem, null).weekdays(length); - } - /** - * Return an array of format week names. - * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that - * changes the string. - * See {@link weekdays} - * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". - * @param {Object} opts - options - * @param {string} [opts.locale=null] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @return {[string]} - */ - ; - - Info.weekdaysFormat = function weekdaysFormat(length, _temp4) { - if (length === void 0) { - length = "long"; - } - - var _ref4 = _temp4 === void 0 ? {} : _temp4, - _ref4$locale = _ref4.locale, - locale = _ref4$locale === void 0 ? null : _ref4$locale, - _ref4$numberingSystem = _ref4.numberingSystem, - numberingSystem = _ref4$numberingSystem === void 0 ? null : _ref4$numberingSystem; - - return Locale.create(locale, numberingSystem, null).weekdays(length, true); - } - /** - * Return an array of meridiems. - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @example Info.meridiems() //=> [ 'AM', 'PM' ] - * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ] - * @return {[string]} - */ - ; - - Info.meridiems = function meridiems(_temp5) { - var _ref5 = _temp5 === void 0 ? {} : _temp5, - _ref5$locale = _ref5.locale, - locale = _ref5$locale === void 0 ? null : _ref5$locale; - - return Locale.create(locale).meridiems(); - } - /** - * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian. - * @param {string} [length='short'] - the length of the era representation, such as "short" or "long". - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @example Info.eras() //=> [ 'BC', 'AD' ] - * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ] - * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ] - * @return {[string]} - */ - ; - - Info.eras = function eras(length, _temp6) { - if (length === void 0) { - length = "short"; - } - - var _ref6 = _temp6 === void 0 ? {} : _temp6, - _ref6$locale = _ref6.locale, - locale = _ref6$locale === void 0 ? null : _ref6$locale; - - return Locale.create(locale, null, "gregory").eras(length); - } - /** - * Return the set of available features in this environment. - * Some features of Luxon are not available in all environments. For example, on older browsers, timezone support is not available. Use this function to figure out if that's the case. - * Keys: - * * `zones`: whether this environment supports IANA timezones - * * `intlTokens`: whether this environment supports internationalized token-based formatting/parsing - * * `intl`: whether this environment supports general internationalization - * * `relative`: whether this environment supports relative time formatting - * @example Info.features() //=> { intl: true, intlTokens: false, zones: true, relative: false } - * @return {Object} - */ - ; - - Info.features = function features() { - var intl = false, - intlTokens = false, - zones = false, - relative = false; - - if (hasIntl()) { - intl = true; - intlTokens = hasFormatToParts(); - relative = hasRelative(); - - try { - zones = new Intl.DateTimeFormat("en", { - timeZone: "America/New_York" - }).resolvedOptions().timeZone === "America/New_York"; - } catch (e) { - zones = false; - } - } - - return { - intl: intl, - intlTokens: intlTokens, - zones: zones, - relative: relative - }; - }; - - return Info; - }(); - - function dayDiff(earlier, later) { - var utcDayStart = function utcDayStart(dt) { - return dt.toUTC(0, { - keepLocalTime: true - }).startOf("day").valueOf(); - }, - ms = utcDayStart(later) - utcDayStart(earlier); - - return Math.floor(Duration.fromMillis(ms).as("days")); - } - - function highOrderDiffs(cursor, later, units) { - var differs = [["years", function (a, b) { - return b.year - a.year; - }], ["months", function (a, b) { - return b.month - a.month + (b.year - a.year) * 12; - }], ["weeks", function (a, b) { - var days = dayDiff(a, b); - return (days - days % 7) / 7; - }], ["days", dayDiff]]; - var results = {}; - var lowestOrder, highWater; - - for (var _i = 0, _differs = differs; _i < _differs.length; _i++) { - var _differs$_i = _differs[_i], - unit = _differs$_i[0], - differ = _differs$_i[1]; - - if (units.indexOf(unit) >= 0) { - var _cursor$plus; - - lowestOrder = unit; - var delta = differ(cursor, later); - highWater = cursor.plus((_cursor$plus = {}, _cursor$plus[unit] = delta, _cursor$plus)); - - if (highWater > later) { - var _cursor$plus2; - - cursor = cursor.plus((_cursor$plus2 = {}, _cursor$plus2[unit] = delta - 1, _cursor$plus2)); - delta -= 1; - } else { - cursor = highWater; - } - - results[unit] = delta; - } - } - - return [cursor, results, highWater, lowestOrder]; - } - - function _diff (earlier, later, units, opts) { - var _highOrderDiffs = highOrderDiffs(earlier, later, units), - cursor = _highOrderDiffs[0], - results = _highOrderDiffs[1], - highWater = _highOrderDiffs[2], - lowestOrder = _highOrderDiffs[3]; - - var remainingMillis = later - cursor; - var lowerOrderUnits = units.filter(function (u) { - return ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0; - }); - - if (lowerOrderUnits.length === 0) { - if (highWater < later) { - var _cursor$plus3; - - highWater = cursor.plus((_cursor$plus3 = {}, _cursor$plus3[lowestOrder] = 1, _cursor$plus3)); - } - - if (highWater !== cursor) { - results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor); - } - } - - var duration = Duration.fromObject(Object.assign(results, opts)); - - if (lowerOrderUnits.length > 0) { - var _Duration$fromMillis; - - return (_Duration$fromMillis = Duration.fromMillis(remainingMillis, opts)).shiftTo.apply(_Duration$fromMillis, lowerOrderUnits).plus(duration); - } else { - return duration; - } - } - - var numberingSystems = { - arab: "[\u0660-\u0669]", - arabext: "[\u06F0-\u06F9]", - bali: "[\u1B50-\u1B59]", - beng: "[\u09E6-\u09EF]", - deva: "[\u0966-\u096F]", - fullwide: "[\uFF10-\uFF19]", - gujr: "[\u0AE6-\u0AEF]", - hanidec: "[〇|一|二|三|四|五|六|七|八|九]", - khmr: "[\u17E0-\u17E9]", - knda: "[\u0CE6-\u0CEF]", - laoo: "[\u0ED0-\u0ED9]", - limb: "[\u1946-\u194F]", - mlym: "[\u0D66-\u0D6F]", - mong: "[\u1810-\u1819]", - mymr: "[\u1040-\u1049]", - orya: "[\u0B66-\u0B6F]", - tamldec: "[\u0BE6-\u0BEF]", - telu: "[\u0C66-\u0C6F]", - thai: "[\u0E50-\u0E59]", - tibt: "[\u0F20-\u0F29]", - latn: "\\d" - }; - var numberingSystemsUTF16 = { - arab: [1632, 1641], - arabext: [1776, 1785], - bali: [6992, 7001], - beng: [2534, 2543], - deva: [2406, 2415], - fullwide: [65296, 65303], - gujr: [2790, 2799], - khmr: [6112, 6121], - knda: [3302, 3311], - laoo: [3792, 3801], - limb: [6470, 6479], - mlym: [3430, 3439], - mong: [6160, 6169], - mymr: [4160, 4169], - orya: [2918, 2927], - tamldec: [3046, 3055], - telu: [3174, 3183], - thai: [3664, 3673], - tibt: [3872, 3881] - }; // eslint-disable-next-line - - var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split(""); - function parseDigits(str) { - var value = parseInt(str, 10); - - if (isNaN(value)) { - value = ""; - - for (var i = 0; i < str.length; i++) { - var code = str.charCodeAt(i); - - if (str[i].search(numberingSystems.hanidec) !== -1) { - value += hanidecChars.indexOf(str[i]); - } else { - for (var key in numberingSystemsUTF16) { - var _numberingSystemsUTF = numberingSystemsUTF16[key], - min = _numberingSystemsUTF[0], - max = _numberingSystemsUTF[1]; - - if (code >= min && code <= max) { - value += code - min; - } - } - } - } - - return parseInt(value, 10); - } else { - return value; - } - } - function digitRegex(_ref, append) { - var numberingSystem = _ref.numberingSystem; - - if (append === void 0) { - append = ""; - } - - return new RegExp("" + numberingSystems[numberingSystem || "latn"] + append); - } - - var MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support"; - - function intUnit(regex, post) { - if (post === void 0) { - post = function post(i) { - return i; - }; - } - - return { - regex: regex, - deser: function deser(_ref) { - var s = _ref[0]; - return post(parseDigits(s)); - } - }; - } - - var NBSP = String.fromCharCode(160); - var spaceOrNBSP = "( |" + NBSP + ")"; - var spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g"); - - function fixListRegex(s) { - // make dots optional and also make them literal - // make space and non breakable space characters interchangeable - return s.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP); - } - - function stripInsensitivities(s) { - return s.replace(/\./g, "") // ignore dots that were made optional - .replace(spaceOrNBSPRegExp, " ") // interchange space and nbsp - .toLowerCase(); - } - - function oneOf(strings, startIndex) { - if (strings === null) { - return null; - } else { - return { - regex: RegExp(strings.map(fixListRegex).join("|")), - deser: function deser(_ref2) { - var s = _ref2[0]; - return strings.findIndex(function (i) { - return stripInsensitivities(s) === stripInsensitivities(i); - }) + startIndex; - } - }; - } - } - - function offset(regex, groups) { - return { - regex: regex, - deser: function deser(_ref3) { - var h = _ref3[1], - m = _ref3[2]; - return signedOffset(h, m); - }, - groups: groups - }; - } - - function simple(regex) { - return { - regex: regex, - deser: function deser(_ref4) { - var s = _ref4[0]; - return s; - } - }; - } - - function escapeToken(value) { - // eslint-disable-next-line no-useless-escape - return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); - } - - function unitForToken(token, loc) { - var one = digitRegex(loc), - two = digitRegex(loc, "{2}"), - three = digitRegex(loc, "{3}"), - four = digitRegex(loc, "{4}"), - six = digitRegex(loc, "{6}"), - oneOrTwo = digitRegex(loc, "{1,2}"), - oneToThree = digitRegex(loc, "{1,3}"), - oneToSix = digitRegex(loc, "{1,6}"), - oneToNine = digitRegex(loc, "{1,9}"), - twoToFour = digitRegex(loc, "{2,4}"), - fourToSix = digitRegex(loc, "{4,6}"), - literal = function literal(t) { - return { - regex: RegExp(escapeToken(t.val)), - deser: function deser(_ref5) { - var s = _ref5[0]; - return s; - }, - literal: true - }; - }, - unitate = function unitate(t) { - if (token.literal) { - return literal(t); - } - - switch (t.val) { - // era - case "G": - return oneOf(loc.eras("short", false), 0); - - case "GG": - return oneOf(loc.eras("long", false), 0); - // years - - case "y": - return intUnit(oneToSix); - - case "yy": - return intUnit(twoToFour, untruncateYear); - - case "yyyy": - return intUnit(four); - - case "yyyyy": - return intUnit(fourToSix); - - case "yyyyyy": - return intUnit(six); - // months - - case "M": - return intUnit(oneOrTwo); - - case "MM": - return intUnit(two); - - case "MMM": - return oneOf(loc.months("short", true, false), 1); - - case "MMMM": - return oneOf(loc.months("long", true, false), 1); - - case "L": - return intUnit(oneOrTwo); - - case "LL": - return intUnit(two); - - case "LLL": - return oneOf(loc.months("short", false, false), 1); - - case "LLLL": - return oneOf(loc.months("long", false, false), 1); - // dates - - case "d": - return intUnit(oneOrTwo); - - case "dd": - return intUnit(two); - // ordinals - - case "o": - return intUnit(oneToThree); - - case "ooo": - return intUnit(three); - // time - - case "HH": - return intUnit(two); - - case "H": - return intUnit(oneOrTwo); - - case "hh": - return intUnit(two); - - case "h": - return intUnit(oneOrTwo); - - case "mm": - return intUnit(two); - - case "m": - return intUnit(oneOrTwo); - - case "q": - return intUnit(oneOrTwo); - - case "qq": - return intUnit(two); - - case "s": - return intUnit(oneOrTwo); - - case "ss": - return intUnit(two); - - case "S": - return intUnit(oneToThree); - - case "SSS": - return intUnit(three); - - case "u": - return simple(oneToNine); - // meridiem - - case "a": - return oneOf(loc.meridiems(), 0); - // weekYear (k) - - case "kkkk": - return intUnit(four); - - case "kk": - return intUnit(twoToFour, untruncateYear); - // weekNumber (W) - - case "W": - return intUnit(oneOrTwo); - - case "WW": - return intUnit(two); - // weekdays - - case "E": - case "c": - return intUnit(one); - - case "EEE": - return oneOf(loc.weekdays("short", false, false), 1); - - case "EEEE": - return oneOf(loc.weekdays("long", false, false), 1); - - case "ccc": - return oneOf(loc.weekdays("short", true, false), 1); - - case "cccc": - return oneOf(loc.weekdays("long", true, false), 1); - // offset/zone - - case "Z": - case "ZZ": - return offset(new RegExp("([+-]" + oneOrTwo.source + ")(?::(" + two.source + "))?"), 2); - - case "ZZZ": - return offset(new RegExp("([+-]" + oneOrTwo.source + ")(" + two.source + ")?"), 2); - // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing - // because we don't have any way to figure out what they are - - case "z": - return simple(/[a-z_+-/]{1,256}?/i); - - default: - return literal(t); - } - }; - - var unit = unitate(token) || { - invalidReason: MISSING_FTP - }; - unit.token = token; - return unit; - } - - var partTypeStyleToTokenVal = { - year: { - "2-digit": "yy", - numeric: "yyyyy" - }, - month: { - numeric: "M", - "2-digit": "MM", - short: "MMM", - long: "MMMM" - }, - day: { - numeric: "d", - "2-digit": "dd" - }, - weekday: { - short: "EEE", - long: "EEEE" - }, - dayperiod: "a", - dayPeriod: "a", - hour: { - numeric: "h", - "2-digit": "hh" - }, - minute: { - numeric: "m", - "2-digit": "mm" - }, - second: { - numeric: "s", - "2-digit": "ss" - } - }; - - function tokenForPart(part, locale, formatOpts) { - var type = part.type, - value = part.value; - - if (type === "literal") { - return { - literal: true, - val: value - }; - } - - var style = formatOpts[type]; - var val = partTypeStyleToTokenVal[type]; - - if (typeof val === "object") { - val = val[style]; - } - - if (val) { - return { - literal: false, - val: val - }; - } - - return undefined; - } - - function buildRegex(units) { - var re = units.map(function (u) { - return u.regex; - }).reduce(function (f, r) { - return f + "(" + r.source + ")"; - }, ""); - return ["^" + re + "$", units]; - } - - function match(input, regex, handlers) { - var matches = input.match(regex); - - if (matches) { - var all = {}; - var matchIndex = 1; - - for (var i in handlers) { - if (hasOwnProperty(handlers, i)) { - var h = handlers[i], - groups = h.groups ? h.groups + 1 : 1; - - if (!h.literal && h.token) { - all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups)); - } - - matchIndex += groups; - } - } - - return [matches, all]; - } else { - return [matches, {}]; - } - } - - function dateTimeFromMatches(matches) { - var toField = function toField(token) { - switch (token) { - case "S": - return "millisecond"; - - case "s": - return "second"; - - case "m": - return "minute"; - - case "h": - case "H": - return "hour"; - - case "d": - return "day"; - - case "o": - return "ordinal"; - - case "L": - case "M": - return "month"; - - case "y": - return "year"; - - case "E": - case "c": - return "weekday"; - - case "W": - return "weekNumber"; - - case "k": - return "weekYear"; - - case "q": - return "quarter"; - - default: - return null; - } - }; - - var zone; - - if (!isUndefined(matches.Z)) { - zone = new FixedOffsetZone(matches.Z); - } else if (!isUndefined(matches.z)) { - zone = IANAZone.create(matches.z); - } else { - zone = null; - } - - if (!isUndefined(matches.q)) { - matches.M = (matches.q - 1) * 3 + 1; - } - - if (!isUndefined(matches.h)) { - if (matches.h < 12 && matches.a === 1) { - matches.h += 12; - } else if (matches.h === 12 && matches.a === 0) { - matches.h = 0; - } - } - - if (matches.G === 0 && matches.y) { - matches.y = -matches.y; - } - - if (!isUndefined(matches.u)) { - matches.S = parseMillis(matches.u); - } - - var vals = Object.keys(matches).reduce(function (r, k) { - var f = toField(k); - - if (f) { - r[f] = matches[k]; - } - - return r; - }, {}); - return [vals, zone]; - } - - var dummyDateTimeCache = null; - - function getDummyDateTime() { - if (!dummyDateTimeCache) { - dummyDateTimeCache = DateTime.fromMillis(1555555555555); - } - - return dummyDateTimeCache; - } - - function maybeExpandMacroToken(token, locale) { - if (token.literal) { - return token; - } - - var formatOpts = Formatter.macroTokenToFormatOpts(token.val); - - if (!formatOpts) { - return token; - } - - var formatter = Formatter.create(locale, formatOpts); - var parts = formatter.formatDateTimeParts(getDummyDateTime()); - var tokens = parts.map(function (p) { - return tokenForPart(p, locale, formatOpts); - }); - - if (tokens.includes(undefined)) { - return token; - } - - return tokens; - } - - function expandMacroTokens(tokens, locale) { - var _Array$prototype; - - return (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, tokens.map(function (t) { - return maybeExpandMacroToken(t, locale); - })); - } - /** - * @private - */ - - - function explainFromTokens(locale, input, format) { - var tokens = expandMacroTokens(Formatter.parseFormat(format), locale), - units = tokens.map(function (t) { - return unitForToken(t, locale); - }), - disqualifyingUnit = units.find(function (t) { - return t.invalidReason; - }); - - if (disqualifyingUnit) { - return { - input: input, - tokens: tokens, - invalidReason: disqualifyingUnit.invalidReason - }; - } else { - var _buildRegex = buildRegex(units), - regexString = _buildRegex[0], - handlers = _buildRegex[1], - regex = RegExp(regexString, "i"), - _match = match(input, regex, handlers), - rawMatches = _match[0], - matches = _match[1], - _ref6 = matches ? dateTimeFromMatches(matches) : [null, null], - result = _ref6[0], - zone = _ref6[1]; - - if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) { - throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format"); - } - - return { - input: input, - tokens: tokens, - regex: regex, - rawMatches: rawMatches, - matches: matches, - result: result, - zone: zone - }; - } - } - function parseFromTokens(locale, input, format) { - var _explainFromTokens = explainFromTokens(locale, input, format), - result = _explainFromTokens.result, - zone = _explainFromTokens.zone, - invalidReason = _explainFromTokens.invalidReason; - - return [result, zone, invalidReason]; - } - - var nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], - leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; - - function unitOutOfRange(unit, value) { - return new Invalid("unit out of range", "you specified " + value + " (of type " + typeof value + ") as a " + unit + ", which is invalid"); - } - - function dayOfWeek(year, month, day) { - var js = new Date(Date.UTC(year, month - 1, day)).getUTCDay(); - return js === 0 ? 7 : js; - } - - function computeOrdinal(year, month, day) { - return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1]; - } - - function uncomputeOrdinal(year, ordinal) { - var table = isLeapYear(year) ? leapLadder : nonLeapLadder, - month0 = table.findIndex(function (i) { - return i < ordinal; - }), - day = ordinal - table[month0]; - return { - month: month0 + 1, - day: day - }; - } - /** - * @private - */ - - - function gregorianToWeek(gregObj) { - var year = gregObj.year, - month = gregObj.month, - day = gregObj.day, - ordinal = computeOrdinal(year, month, day), - weekday = dayOfWeek(year, month, day); - var weekNumber = Math.floor((ordinal - weekday + 10) / 7), - weekYear; - - if (weekNumber < 1) { - weekYear = year - 1; - weekNumber = weeksInWeekYear(weekYear); - } else if (weekNumber > weeksInWeekYear(year)) { - weekYear = year + 1; - weekNumber = 1; - } else { - weekYear = year; - } - - return Object.assign({ - weekYear: weekYear, - weekNumber: weekNumber, - weekday: weekday - }, timeObject(gregObj)); - } - function weekToGregorian(weekData) { - var weekYear = weekData.weekYear, - weekNumber = weekData.weekNumber, - weekday = weekData.weekday, - weekdayOfJan4 = dayOfWeek(weekYear, 1, 4), - yearInDays = daysInYear(weekYear); - var ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3, - year; - - if (ordinal < 1) { - year = weekYear - 1; - ordinal += daysInYear(year); - } else if (ordinal > yearInDays) { - year = weekYear + 1; - ordinal -= daysInYear(weekYear); - } else { - year = weekYear; - } - - var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal), - month = _uncomputeOrdinal.month, - day = _uncomputeOrdinal.day; - - return Object.assign({ - year: year, - month: month, - day: day - }, timeObject(weekData)); - } - function gregorianToOrdinal(gregData) { - var year = gregData.year, - month = gregData.month, - day = gregData.day, - ordinal = computeOrdinal(year, month, day); - return Object.assign({ - year: year, - ordinal: ordinal - }, timeObject(gregData)); - } - function ordinalToGregorian(ordinalData) { - var year = ordinalData.year, - ordinal = ordinalData.ordinal, - _uncomputeOrdinal2 = uncomputeOrdinal(year, ordinal), - month = _uncomputeOrdinal2.month, - day = _uncomputeOrdinal2.day; - - return Object.assign({ - year: year, - month: month, - day: day - }, timeObject(ordinalData)); - } - function hasInvalidWeekData(obj) { - var validYear = isInteger(obj.weekYear), - validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear)), - validWeekday = integerBetween(obj.weekday, 1, 7); - - if (!validYear) { - return unitOutOfRange("weekYear", obj.weekYear); - } else if (!validWeek) { - return unitOutOfRange("week", obj.week); - } else if (!validWeekday) { - return unitOutOfRange("weekday", obj.weekday); - } else return false; - } - function hasInvalidOrdinalData(obj) { - var validYear = isInteger(obj.year), - validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year)); - - if (!validYear) { - return unitOutOfRange("year", obj.year); - } else if (!validOrdinal) { - return unitOutOfRange("ordinal", obj.ordinal); - } else return false; - } - function hasInvalidGregorianData(obj) { - var validYear = isInteger(obj.year), - validMonth = integerBetween(obj.month, 1, 12), - validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month)); - - if (!validYear) { - return unitOutOfRange("year", obj.year); - } else if (!validMonth) { - return unitOutOfRange("month", obj.month); - } else if (!validDay) { - return unitOutOfRange("day", obj.day); - } else return false; - } - function hasInvalidTimeData(obj) { - var hour = obj.hour, - minute = obj.minute, - second = obj.second, - millisecond = obj.millisecond; - var validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, - validMinute = integerBetween(minute, 0, 59), - validSecond = integerBetween(second, 0, 59), - validMillisecond = integerBetween(millisecond, 0, 999); - - if (!validHour) { - return unitOutOfRange("hour", hour); - } else if (!validMinute) { - return unitOutOfRange("minute", minute); - } else if (!validSecond) { - return unitOutOfRange("second", second); - } else if (!validMillisecond) { - return unitOutOfRange("millisecond", millisecond); - } else return false; - } - - var INVALID$2 = "Invalid DateTime"; - var MAX_DATE = 8.64e15; - - function unsupportedZone(zone) { - return new Invalid("unsupported zone", "the zone \"" + zone.name + "\" is not supported"); - } // we cache week data on the DT object and this intermediates the cache - - - function possiblyCachedWeekData(dt) { - if (dt.weekData === null) { - dt.weekData = gregorianToWeek(dt.c); - } - - return dt.weekData; - } // clone really means, "make a new object with these modifications". all "setters" really use this - // to create a new object while only changing some of the properties - - - function clone$1(inst, alts) { - var current = { - ts: inst.ts, - zone: inst.zone, - c: inst.c, - o: inst.o, - loc: inst.loc, - invalid: inst.invalid - }; - return new DateTime(Object.assign({}, current, alts, { - old: current - })); - } // find the right offset a given local time. The o input is our guess, which determines which - // offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST) - - - function fixOffset(localTS, o, tz) { - // Our UTC time is just a guess because our offset is just a guess - var utcGuess = localTS - o * 60 * 1000; // Test whether the zone matches the offset for this ts - - var o2 = tz.offset(utcGuess); // If so, offset didn't change and we're done - - if (o === o2) { - return [utcGuess, o]; - } // If not, change the ts by the difference in the offset - - - utcGuess -= (o2 - o) * 60 * 1000; // If that gives us the local time we want, we're done - - var o3 = tz.offset(utcGuess); - - if (o2 === o3) { - return [utcGuess, o2]; - } // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time - - - return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)]; - } // convert an epoch timestamp into a calendar object with the given offset - - - function tsToObj(ts, offset) { - ts += offset * 60 * 1000; - var d = new Date(ts); - return { - year: d.getUTCFullYear(), - month: d.getUTCMonth() + 1, - day: d.getUTCDate(), - hour: d.getUTCHours(), - minute: d.getUTCMinutes(), - second: d.getUTCSeconds(), - millisecond: d.getUTCMilliseconds() - }; - } // convert a calendar object to a epoch timestamp - - - function objToTS(obj, offset, zone) { - return fixOffset(objToLocalTS(obj), offset, zone); - } // create a new DT instance by adding a duration, adjusting for DSTs - - - function adjustTime(inst, dur) { - var oPre = inst.o, - year = inst.c.year + Math.trunc(dur.years), - month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, - c = Object.assign({}, inst.c, { - year: year, - month: month, - day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7 - }), - millisToAdd = Duration.fromObject({ - years: dur.years - Math.trunc(dur.years), - quarters: dur.quarters - Math.trunc(dur.quarters), - months: dur.months - Math.trunc(dur.months), - weeks: dur.weeks - Math.trunc(dur.weeks), - days: dur.days - Math.trunc(dur.days), - hours: dur.hours, - minutes: dur.minutes, - seconds: dur.seconds, - milliseconds: dur.milliseconds - }).as("milliseconds"), - localTS = objToLocalTS(c); - - var _fixOffset = fixOffset(localTS, oPre, inst.zone), - ts = _fixOffset[0], - o = _fixOffset[1]; - - if (millisToAdd !== 0) { - ts += millisToAdd; // that could have changed the offset by going over a DST, but we want to keep the ts the same - - o = inst.zone.offset(ts); - } - - return { - ts: ts, - o: o - }; - } // helper useful in turning the results of parsing into real dates - // by handling the zone options - - - function parseDataToDateTime(parsed, parsedZone, opts, format, text) { - var setZone = opts.setZone, - zone = opts.zone; - - if (parsed && Object.keys(parsed).length !== 0) { - var interpretationZone = parsedZone || zone, - inst = DateTime.fromObject(Object.assign(parsed, opts, { - zone: interpretationZone, - // setZone is a valid option in the calling methods, but not in fromObject - setZone: undefined - })); - return setZone ? inst : inst.setZone(zone); - } else { - return DateTime.invalid(new Invalid("unparsable", "the input \"" + text + "\" can't be parsed as " + format)); - } - } // if you want to output a technical format (e.g. RFC 2822), this helper - // helps handle the details - - - function toTechFormat(dt, format, allowZ) { - if (allowZ === void 0) { - allowZ = true; - } - - return dt.isValid ? Formatter.create(Locale.create("en-US"), { - allowZ: allowZ, - forceSimple: true - }).formatDateTimeFromString(dt, format) : null; - } // technical time formats (e.g. the time part of ISO 8601), take some options - // and this commonizes their handling - - - function toTechTimeFormat(dt, _ref) { - var _ref$suppressSeconds = _ref.suppressSeconds, - suppressSeconds = _ref$suppressSeconds === void 0 ? false : _ref$suppressSeconds, - _ref$suppressMillisec = _ref.suppressMilliseconds, - suppressMilliseconds = _ref$suppressMillisec === void 0 ? false : _ref$suppressMillisec, - includeOffset = _ref.includeOffset, - _ref$includeZone = _ref.includeZone, - includeZone = _ref$includeZone === void 0 ? false : _ref$includeZone, - _ref$spaceZone = _ref.spaceZone, - spaceZone = _ref$spaceZone === void 0 ? false : _ref$spaceZone, - _ref$format = _ref.format, - format = _ref$format === void 0 ? "extended" : _ref$format; - var fmt = format === "basic" ? "HHmm" : "HH:mm"; - - if (!suppressSeconds || dt.second !== 0 || dt.millisecond !== 0) { - fmt += format === "basic" ? "ss" : ":ss"; - - if (!suppressMilliseconds || dt.millisecond !== 0) { - fmt += ".SSS"; - } - } - - if ((includeZone || includeOffset) && spaceZone) { - fmt += " "; - } - - if (includeZone) { - fmt += "z"; - } else if (includeOffset) { - fmt += format === "basic" ? "ZZZ" : "ZZ"; - } - - return toTechFormat(dt, fmt); - } // defaults for unspecified units in the supported calendars - - - var defaultUnitValues = { - month: 1, - day: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 - }, - defaultWeekUnitValues = { - weekNumber: 1, - weekday: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 - }, - defaultOrdinalUnitValues = { - ordinal: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 - }; // Units in the supported calendars, sorted by bigness - - var orderedUnits$1 = ["year", "month", "day", "hour", "minute", "second", "millisecond"], - orderedWeekUnits = ["weekYear", "weekNumber", "weekday", "hour", "minute", "second", "millisecond"], - orderedOrdinalUnits = ["year", "ordinal", "hour", "minute", "second", "millisecond"]; // standardize case and plurality in units - - function normalizeUnit(unit) { - var normalized = { - year: "year", - years: "year", - month: "month", - months: "month", - day: "day", - days: "day", - hour: "hour", - hours: "hour", - minute: "minute", - minutes: "minute", - quarter: "quarter", - quarters: "quarter", - second: "second", - seconds: "second", - millisecond: "millisecond", - milliseconds: "millisecond", - weekday: "weekday", - weekdays: "weekday", - weeknumber: "weekNumber", - weeksnumber: "weekNumber", - weeknumbers: "weekNumber", - weekyear: "weekYear", - weekyears: "weekYear", - ordinal: "ordinal" - }[unit.toLowerCase()]; - if (!normalized) throw new InvalidUnitError(unit); - return normalized; - } // this is a dumbed down version of fromObject() that runs about 60% faster - // but doesn't do any validation, makes a bunch of assumptions about what units - // are present, and so on. - - - function quickDT(obj, zone) { - // assume we have the higher-order units - for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits$1), _step; !(_step = _iterator()).done;) { - var u = _step.value; - - if (isUndefined(obj[u])) { - obj[u] = defaultUnitValues[u]; - } - } - - var invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj); - - if (invalid) { - return DateTime.invalid(invalid); - } - - var tsNow = Settings.now(), - offsetProvis = zone.offset(tsNow), - _objToTS = objToTS(obj, offsetProvis, zone), - ts = _objToTS[0], - o = _objToTS[1]; - - return new DateTime({ - ts: ts, - zone: zone, - o: o - }); - } - - function diffRelative(start, end, opts) { - var round = isUndefined(opts.round) ? true : opts.round, - format = function format(c, unit) { - c = roundTo(c, round || opts.calendary ? 0 : 2, true); - var formatter = end.loc.clone(opts).relFormatter(opts); - return formatter.format(c, unit); - }, - differ = function differ(unit) { - if (opts.calendary) { - if (!end.hasSame(start, unit)) { - return end.startOf(unit).diff(start.startOf(unit), unit).get(unit); - } else return 0; - } else { - return end.diff(start, unit).get(unit); - } - }; - - if (opts.unit) { - return format(differ(opts.unit), opts.unit); - } - - for (var _iterator2 = _createForOfIteratorHelperLoose(opts.units), _step2; !(_step2 = _iterator2()).done;) { - var unit = _step2.value; - var count = differ(unit); - - if (Math.abs(count) >= 1) { - return format(count, unit); - } - } - - return format(0, opts.units[opts.units.length - 1]); - } - /** - * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them. - * - * A DateTime comprises of: - * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch. - * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone). - * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`. - * - * Here is a brief overview of the most commonly used functionality it provides: - * - * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link local}, {@link utc}, and (most flexibly) {@link fromObject}. To create one from a standard string format, use {@link fromISO}, {@link fromHTTP}, and {@link fromRFC2822}. To create one from a custom string format, use {@link fromFormat}. To create one from a native JS date, use {@link fromJSDate}. - * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link toObject}), use the {@link year}, {@link month}, - * {@link day}, {@link hour}, {@link minute}, {@link second}, {@link millisecond} accessors. - * * **Week calendar**: For ISO week calendar attributes, see the {@link weekYear}, {@link weekNumber}, and {@link weekday} accessors. - * * **Configuration** See the {@link locale} and {@link numberingSystem} accessors. - * * **Transformation**: To transform the DateTime into other DateTimes, use {@link set}, {@link reconfigure}, {@link setZone}, {@link setLocale}, {@link plus}, {@link minus}, {@link endOf}, {@link startOf}, {@link toUTC}, and {@link toLocal}. - * * **Output**: To convert the DateTime to other representations, use the {@link toRelative}, {@link toRelativeCalendar}, {@link toJSON}, {@link toISO}, {@link toHTTP}, {@link toObject}, {@link toRFC2822}, {@link toString}, {@link toLocaleString}, {@link toFormat}, {@link toMillis} and {@link toJSDate}. - * - * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation. - */ - - - var DateTime = /*#__PURE__*/function () { - /** - * @access private - */ - function DateTime(config) { - var zone = config.zone || Settings.defaultZone; - var invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null); - /** - * @access private - */ - - this.ts = isUndefined(config.ts) ? Settings.now() : config.ts; - var c = null, - o = null; - - if (!invalid) { - var unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone); - - if (unchanged) { - var _ref2 = [config.old.c, config.old.o]; - c = _ref2[0]; - o = _ref2[1]; - } else { - var ot = zone.offset(this.ts); - c = tsToObj(this.ts, ot); - invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null; - c = invalid ? null : c; - o = invalid ? null : ot; - } - } - /** - * @access private - */ - - - this._zone = zone; - /** - * @access private - */ - - this.loc = config.loc || Locale.create(); - /** - * @access private - */ - - this.invalid = invalid; - /** - * @access private - */ - - this.weekData = null; - /** - * @access private - */ - - this.c = c; - /** - * @access private - */ - - this.o = o; - /** - * @access private - */ - - this.isLuxonDateTime = true; - } // CONSTRUCT - - /** - * Create a local DateTime - * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used - * @param {number} [month=1] - The month, 1-indexed - * @param {number} [day=1] - The day of the month - * @param {number} [hour=0] - The hour of the day, in 24-hour time - * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 - * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 - * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 - * @example DateTime.local() //~> now - * @example DateTime.local(2017) //~> 2017-01-01T00:00:00 - * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00 - * @example DateTime.local(2017, 3, 12) //~> 2017-03-12T00:00:00 - * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00 - * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00 - * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10 - * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765 - * @return {DateTime} - */ - - - DateTime.local = function local(year, month, day, hour, minute, second, millisecond) { - if (isUndefined(year)) { - return new DateTime({ - ts: Settings.now() - }); - } else { - return quickDT({ - year: year, - month: month, - day: day, - hour: hour, - minute: minute, - second: second, - millisecond: millisecond - }, Settings.defaultZone); - } - } - /** - * Create a DateTime in UTC - * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used - * @param {number} [month=1] - The month, 1-indexed - * @param {number} [day=1] - The day of the month - * @param {number} [hour=0] - The hour of the day, in 24-hour time - * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 - * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 - * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 - * @example DateTime.utc() //~> now - * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z - * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z - * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z - * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z - * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z - * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z - * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765Z - * @return {DateTime} - */ - ; - - DateTime.utc = function utc(year, month, day, hour, minute, second, millisecond) { - if (isUndefined(year)) { - return new DateTime({ - ts: Settings.now(), - zone: FixedOffsetZone.utcInstance - }); - } else { - return quickDT({ - year: year, - month: month, - day: day, - hour: hour, - minute: minute, - second: second, - millisecond: millisecond - }, FixedOffsetZone.utcInstance); - } - } - /** - * Create a DateTime from a Javascript Date object. Uses the default zone. - * @param {Date} date - a Javascript Date object - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @return {DateTime} - */ - ; - - DateTime.fromJSDate = function fromJSDate(date, options) { - if (options === void 0) { - options = {}; - } - - var ts = isDate(date) ? date.valueOf() : NaN; - - if (Number.isNaN(ts)) { - return DateTime.invalid("invalid input"); - } - - var zoneToUse = normalizeZone(options.zone, Settings.defaultZone); - - if (!zoneToUse.isValid) { - return DateTime.invalid(unsupportedZone(zoneToUse)); - } - - return new DateTime({ - ts: ts, - zone: zoneToUse, - loc: Locale.fromObject(options) - }); - } - /** - * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. - * @param {number} milliseconds - a number of milliseconds since 1970 UTC - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance - * @return {DateTime} - */ - ; - - DateTime.fromMillis = function fromMillis(milliseconds, options) { - if (options === void 0) { - options = {}; - } - - if (!isNumber(milliseconds)) { - throw new InvalidArgumentError("fromMillis requires a numerical input, but received a " + typeof milliseconds + " with value " + milliseconds); - } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) { - // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start - return DateTime.invalid("Timestamp out of range"); - } else { - return new DateTime({ - ts: milliseconds, - zone: normalizeZone(options.zone, Settings.defaultZone), - loc: Locale.fromObject(options) - }); - } - } - /** - * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. - * @param {number} seconds - a number of seconds since 1970 UTC - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance - * @return {DateTime} - */ - ; - - DateTime.fromSeconds = function fromSeconds(seconds, options) { - if (options === void 0) { - options = {}; - } - - if (!isNumber(seconds)) { - throw new InvalidArgumentError("fromSeconds requires a numerical input"); - } else { - return new DateTime({ - ts: seconds * 1000, - zone: normalizeZone(options.zone, Settings.defaultZone), - loc: Locale.fromObject(options) - }); - } - } - /** - * Create a DateTime from a Javascript object with keys like 'year' and 'hour' with reasonable defaults. - * @param {Object} obj - the object to create the DateTime from - * @param {number} obj.year - a year, such as 1987 - * @param {number} obj.month - a month, 1-12 - * @param {number} obj.day - a day of the month, 1-31, depending on the month - * @param {number} obj.ordinal - day of the year, 1-365 or 366 - * @param {number} obj.weekYear - an ISO week year - * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year - * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday - * @param {number} obj.hour - hour of the day, 0-23 - * @param {number} obj.minute - minute of the hour, 0-59 - * @param {number} obj.second - second of the minute, 0-59 - * @param {number} obj.millisecond - millisecond of the second, 0-999 - * @param {string|Zone} [obj.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone() - * @param {string} [obj.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} obj.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} obj.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25' - * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01' - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06 - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'utc' }), - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'local' }) - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'America/New_York' }) - * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13' - * @return {DateTime} - */ - ; - - DateTime.fromObject = function fromObject(obj) { - var zoneToUse = normalizeZone(obj.zone, Settings.defaultZone); - - if (!zoneToUse.isValid) { - return DateTime.invalid(unsupportedZone(zoneToUse)); - } - - var tsNow = Settings.now(), - offsetProvis = zoneToUse.offset(tsNow), - normalized = normalizeObject(obj, normalizeUnit, ["zone", "locale", "outputCalendar", "numberingSystem"]), - containsOrdinal = !isUndefined(normalized.ordinal), - containsGregorYear = !isUndefined(normalized.year), - containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), - containsGregor = containsGregorYear || containsGregorMD, - definiteWeekDef = normalized.weekYear || normalized.weekNumber, - loc = Locale.fromObject(obj); // cases: - // just a weekday -> this week's instance of that weekday, no worries - // (gregorian data or ordinal) + (weekYear or weekNumber) -> error - // (gregorian month or day) + ordinal -> error - // otherwise just use weeks or ordinals or gregorian, depending on what's specified - - if ((containsGregor || containsOrdinal) && definiteWeekDef) { - throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); - } - - if (containsGregorMD && containsOrdinal) { - throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); - } - - var useWeekData = definiteWeekDef || normalized.weekday && !containsGregor; // configure ourselves to deal with gregorian dates or week stuff - - var units, - defaultValues, - objNow = tsToObj(tsNow, offsetProvis); - - if (useWeekData) { - units = orderedWeekUnits; - defaultValues = defaultWeekUnitValues; - objNow = gregorianToWeek(objNow); - } else if (containsOrdinal) { - units = orderedOrdinalUnits; - defaultValues = defaultOrdinalUnitValues; - objNow = gregorianToOrdinal(objNow); - } else { - units = orderedUnits$1; - defaultValues = defaultUnitValues; - } // set default values for missing stuff - - - var foundFirst = false; - - for (var _iterator3 = _createForOfIteratorHelperLoose(units), _step3; !(_step3 = _iterator3()).done;) { - var u = _step3.value; - var v = normalized[u]; - - if (!isUndefined(v)) { - foundFirst = true; - } else if (foundFirst) { - normalized[u] = defaultValues[u]; - } else { - normalized[u] = objNow[u]; - } - } // make sure the values we have are in range - - - var higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), - invalid = higherOrderInvalid || hasInvalidTimeData(normalized); - - if (invalid) { - return DateTime.invalid(invalid); - } // compute the actual time - - - var gregorian = useWeekData ? weekToGregorian(normalized) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, - _objToTS2 = objToTS(gregorian, offsetProvis, zoneToUse), - tsFinal = _objToTS2[0], - offsetFinal = _objToTS2[1], - inst = new DateTime({ - ts: tsFinal, - zone: zoneToUse, - o: offsetFinal, - loc: loc - }); // gregorian data + weekday serves only to validate - - - if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) { - return DateTime.invalid("mismatched weekday", "you can't specify both a weekday of " + normalized.weekday + " and a date of " + inst.toISO()); - } - - return inst; - } - /** - * Create a DateTime from an ISO 8601 string - * @param {string} text - the ISO string - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromISO('2016-05-25T09:08:34.123') - * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00') - * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true}) - * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'}) - * @example DateTime.fromISO('2016-W05-4') - * @return {DateTime} - */ - ; - - DateTime.fromISO = function fromISO(text, opts) { - if (opts === void 0) { - opts = {}; - } - - var _parseISODate = parseISODate(text), - vals = _parseISODate[0], - parsedZone = _parseISODate[1]; - - return parseDataToDateTime(vals, parsedZone, opts, "ISO 8601", text); - } - /** - * Create a DateTime from an RFC 2822 string - * @param {string} text - the RFC 2822 string - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. - * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT') - * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600') - * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z') - * @return {DateTime} - */ - ; - - DateTime.fromRFC2822 = function fromRFC2822(text, opts) { - if (opts === void 0) { - opts = {}; - } - - var _parseRFC2822Date = parseRFC2822Date(text), - vals = _parseRFC2822Date[0], - parsedZone = _parseRFC2822Date[1]; - - return parseDataToDateTime(vals, parsedZone, opts, "RFC 2822", text); - } - /** - * Create a DateTime from an HTTP header date - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 - * @param {string} text - the HTTP header date - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. - * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods. - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT') - * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT') - * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994') - * @return {DateTime} - */ - ; - - DateTime.fromHTTP = function fromHTTP(text, opts) { - if (opts === void 0) { - opts = {}; - } - - var _parseHTTPDate = parseHTTPDate(text), - vals = _parseHTTPDate[0], - parsedZone = _parseHTTPDate[1]; - - return parseDataToDateTime(vals, parsedZone, opts, "HTTP", opts); - } - /** - * Create a DateTime from an input string and format string. - * Defaults to en-US if no locale has been specified, regardless of the system's locale. - * @see https://moment.github.io/luxon/docs/manual/parsing.html#table-of-tokens - * @param {string} text - the string to parse - * @param {string} fmt - the format the string is expected to be in (see the link below for the formats) - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale - * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @return {DateTime} - */ - ; - - DateTime.fromFormat = function fromFormat(text, fmt, opts) { - if (opts === void 0) { - opts = {}; - } - - if (isUndefined(text) || isUndefined(fmt)) { - throw new InvalidArgumentError("fromFormat requires an input string and a format"); - } - - var _opts = opts, - _opts$locale = _opts.locale, - locale = _opts$locale === void 0 ? null : _opts$locale, - _opts$numberingSystem = _opts.numberingSystem, - numberingSystem = _opts$numberingSystem === void 0 ? null : _opts$numberingSystem, - localeToUse = Locale.fromOpts({ - locale: locale, - numberingSystem: numberingSystem, - defaultToEN: true - }), - _parseFromTokens = parseFromTokens(localeToUse, text, fmt), - vals = _parseFromTokens[0], - parsedZone = _parseFromTokens[1], - invalid = _parseFromTokens[2]; - - if (invalid) { - return DateTime.invalid(invalid); - } else { - return parseDataToDateTime(vals, parsedZone, opts, "format " + fmt, text); - } - } - /** - * @deprecated use fromFormat instead - */ - ; - - DateTime.fromString = function fromString(text, fmt, opts) { - if (opts === void 0) { - opts = {}; - } - - return DateTime.fromFormat(text, fmt, opts); - } - /** - * Create a DateTime from a SQL date, time, or datetime - * Defaults to en-US if no locale has been specified, regardless of the system's locale - * @param {string} text - the string to parse - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale - * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @example DateTime.fromSQL('2017-05-15') - * @example DateTime.fromSQL('2017-05-15 09:12:34') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true }) - * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' }) - * @example DateTime.fromSQL('09:12:34.342') - * @return {DateTime} - */ - ; - - DateTime.fromSQL = function fromSQL(text, opts) { - if (opts === void 0) { - opts = {}; - } - - var _parseSQL = parseSQL(text), - vals = _parseSQL[0], - parsedZone = _parseSQL[1]; - - return parseDataToDateTime(vals, parsedZone, opts, "SQL", text); - } - /** - * Create an invalid DateTime. - * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {DateTime} - */ - ; - - DateTime.invalid = function invalid(reason, explanation) { - if (explanation === void 0) { - explanation = null; - } - - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the DateTime is invalid"); - } - - var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidDateTimeError(invalid); - } else { - return new DateTime({ - invalid: invalid - }); - } - } - /** - * Check if an object is a DateTime. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - ; - - DateTime.isDateTime = function isDateTime(o) { - return o && o.isLuxonDateTime || false; - } // INFO - - /** - * Get the value of unit. - * @param {string} unit - a unit such as 'minute' or 'day' - * @example DateTime.local(2017, 7, 4).get('month'); //=> 7 - * @example DateTime.local(2017, 7, 4).get('day'); //=> 4 - * @return {number} - */ - ; - - var _proto = DateTime.prototype; - - _proto.get = function get(unit) { - return this[unit]; - } - /** - * Returns whether the DateTime is valid. Invalid DateTimes occur when: - * * The DateTime was created from invalid calendar information, such as the 13th month or February 30 - * * The DateTime was created by an operation on another invalid date - * @type {boolean} - */ - ; - - /** - * Returns the resolved Intl options for this DateTime. - * This is useful in understanding the behavior of formatting methods - * @param {Object} opts - the same options as toLocaleString - * @return {Object} - */ - _proto.resolvedLocaleOpts = function resolvedLocaleOpts(opts) { - if (opts === void 0) { - opts = {}; - } - - var _Formatter$create$res = Formatter.create(this.loc.clone(opts), opts).resolvedOptions(this), - locale = _Formatter$create$res.locale, - numberingSystem = _Formatter$create$res.numberingSystem, - calendar = _Formatter$create$res.calendar; - - return { - locale: locale, - numberingSystem: numberingSystem, - outputCalendar: calendar - }; - } // TRANSFORM - - /** - * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime. - * - * Equivalent to {@link setZone}('utc') - * @param {number} [offset=0] - optionally, an offset from UTC in minutes - * @param {Object} [opts={}] - options to pass to `setZone()` - * @return {DateTime} - */ - ; - - _proto.toUTC = function toUTC(offset, opts) { - if (offset === void 0) { - offset = 0; - } - - if (opts === void 0) { - opts = {}; - } - - return this.setZone(FixedOffsetZone.instance(offset), opts); - } - /** - * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime. - * - * Equivalent to `setZone('local')` - * @return {DateTime} - */ - ; - - _proto.toLocal = function toLocal() { - return this.setZone(Settings.defaultZone); - } - /** - * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime. - * - * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link plus}. You may wish to use {@link toLocal} and {@link toUTC} which provide simple convenience wrappers for commonly used zones. - * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link Zone} class. - * @param {Object} opts - options - * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this. - * @return {DateTime} - */ - ; - - _proto.setZone = function setZone(zone, _temp) { - var _ref3 = _temp === void 0 ? {} : _temp, - _ref3$keepLocalTime = _ref3.keepLocalTime, - keepLocalTime = _ref3$keepLocalTime === void 0 ? false : _ref3$keepLocalTime, - _ref3$keepCalendarTim = _ref3.keepCalendarTime, - keepCalendarTime = _ref3$keepCalendarTim === void 0 ? false : _ref3$keepCalendarTim; - - zone = normalizeZone(zone, Settings.defaultZone); - - if (zone.equals(this.zone)) { - return this; - } else if (!zone.isValid) { - return DateTime.invalid(unsupportedZone(zone)); - } else { - var newTS = this.ts; - - if (keepLocalTime || keepCalendarTime) { - var offsetGuess = zone.offset(this.ts); - var asObj = this.toObject(); - - var _objToTS3 = objToTS(asObj, offsetGuess, zone); - - newTS = _objToTS3[0]; - } - - return clone$1(this, { - ts: newTS, - zone: zone - }); - } - } - /** - * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime. - * @param {Object} properties - the properties to set - * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' }) - * @return {DateTime} - */ - ; - - _proto.reconfigure = function reconfigure(_temp2) { - var _ref4 = _temp2 === void 0 ? {} : _temp2, - locale = _ref4.locale, - numberingSystem = _ref4.numberingSystem, - outputCalendar = _ref4.outputCalendar; - - var loc = this.loc.clone({ - locale: locale, - numberingSystem: numberingSystem, - outputCalendar: outputCalendar - }); - return clone$1(this, { - loc: loc - }); - } - /** - * "Set" the locale. Returns a newly-constructed DateTime. - * Just a convenient alias for reconfigure({ locale }) - * @example DateTime.local(2017, 5, 25).setLocale('en-GB') - * @return {DateTime} - */ - ; - - _proto.setLocale = function setLocale(locale) { - return this.reconfigure({ - locale: locale - }); - } - /** - * "Set" the values of specified units. Returns a newly-constructed DateTime. - * You can only set units with this method; for "setting" metadata, see {@link reconfigure} and {@link setZone}. - * @param {Object} values - a mapping of units to numbers - * @example dt.set({ year: 2017 }) - * @example dt.set({ hour: 8, minute: 30 }) - * @example dt.set({ weekday: 5 }) - * @example dt.set({ year: 2005, ordinal: 234 }) - * @return {DateTime} - */ - ; - - _proto.set = function set(values) { - if (!this.isValid) return this; - var normalized = normalizeObject(values, normalizeUnit, []), - settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday); - var mixed; - - if (settingWeekStuff) { - mixed = weekToGregorian(Object.assign(gregorianToWeek(this.c), normalized)); - } else if (!isUndefined(normalized.ordinal)) { - mixed = ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c), normalized)); - } else { - mixed = Object.assign(this.toObject(), normalized); // if we didn't set the day but we ended up on an overflow date, - // use the last day of the right month - - if (isUndefined(normalized.day)) { - mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day); - } - } - - var _objToTS4 = objToTS(mixed, this.o, this.zone), - ts = _objToTS4[0], - o = _objToTS4[1]; - - return clone$1(this, { - ts: ts, - o: o - }); - } - /** - * Add a period of time to this DateTime and return the resulting DateTime - * - * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between. - * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @example DateTime.local().plus(123) //~> in 123 milliseconds - * @example DateTime.local().plus({ minutes: 15 }) //~> in 15 minutes - * @example DateTime.local().plus({ days: 1 }) //~> this time tomorrow - * @example DateTime.local().plus({ days: -1 }) //~> this time yesterday - * @example DateTime.local().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min - * @example DateTime.local().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min - * @return {DateTime} - */ - ; - - _proto.plus = function plus(duration) { - if (!this.isValid) return this; - var dur = friendlyDuration(duration); - return clone$1(this, adjustTime(this, dur)); - } - /** - * Subtract a period of time to this DateTime and return the resulting DateTime - * See {@link plus} - * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - @return {DateTime} - */ - ; - - _proto.minus = function minus(duration) { - if (!this.isValid) return this; - var dur = friendlyDuration(duration).negate(); - return clone$1(this, adjustTime(this, dur)); - } - /** - * "Set" this DateTime to the beginning of a unit of time. - * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. - * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01' - * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01' - * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00' - * @return {DateTime} - */ - ; - - _proto.startOf = function startOf(unit) { - if (!this.isValid) return this; - var o = {}, - normalizedUnit = Duration.normalizeUnit(unit); - - switch (normalizedUnit) { - case "years": - o.month = 1; - // falls through - - case "quarters": - case "months": - o.day = 1; - // falls through - - case "weeks": - case "days": - o.hour = 0; - // falls through - - case "hours": - o.minute = 0; - // falls through - - case "minutes": - o.second = 0; - // falls through - - case "seconds": - o.millisecond = 0; - break; - // no default, invalid units throw in normalizeUnit() - } - - if (normalizedUnit === "weeks") { - o.weekday = 1; - } - - if (normalizedUnit === "quarters") { - var q = Math.ceil(this.month / 3); - o.month = (q - 1) * 3 + 1; - } - - return this.set(o); - } - /** - * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time - * @param {string} unit - The unit to go to the end of. Can be 'year', 'month', 'day', 'hour', 'minute', 'second', or 'millisecond'. - * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00' - * @return {DateTime} - */ - ; - - _proto.endOf = function endOf(unit) { - var _this$plus; - - return this.isValid ? this.plus((_this$plus = {}, _this$plus[unit] = 1, _this$plus)).startOf(unit).minus(1) : this; - } // OUTPUT - - /** - * Returns a string representation of this DateTime formatted according to the specified format string. - * **You may not want this.** See {@link toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens). - * Defaults to en-US if no locale has been specified, regardless of the system's locale. - * @see https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens - * @param {string} fmt - the format string - * @param {Object} opts - opts to override the configuration options - * @example DateTime.local().toFormat('yyyy LLL dd') //=> '2017 Apr 22' - * @example DateTime.local().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22' - * @example DateTime.local().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22' - * @example DateTime.local().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes' - * @return {string} - */ - ; - - _proto.toFormat = function toFormat(fmt, opts) { - if (opts === void 0) { - opts = {}; - } - - return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID$2; - } - /** - * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`. - * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation - * of the DateTime in the assigned locale. - * Defaults to the system's locale if no locale has been specified - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param opts {Object} - Intl.DateTimeFormat constructor options and configuration options - * @example DateTime.local().toLocaleString(); //=> 4/20/2017 - * @example DateTime.local().setLocale('en-gb').toLocaleString(); //=> '20/04/2017' - * @example DateTime.local().toLocaleString({ locale: 'en-gb' }); //=> '20/04/2017' - * @example DateTime.local().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017' - * @example DateTime.local().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM' - * @example DateTime.local().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM' - * @example DateTime.local().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20' - * @example DateTime.local().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM' - * @example DateTime.local().toLocaleString({ hour: '2-digit', minute: '2-digit', hour12: false }); //=> '11:32' - * @return {string} - */ - ; - - _proto.toLocaleString = function toLocaleString(opts) { - if (opts === void 0) { - opts = DATE_SHORT; - } - - return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTime(this) : INVALID$2; - } - /** - * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output. - * Defaults to the system's locale if no locale has been specified - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts - * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`. - * @example DateTime.local().toLocaleParts(); //=> [ - * //=> { type: 'day', value: '25' }, - * //=> { type: 'literal', value: '/' }, - * //=> { type: 'month', value: '05' }, - * //=> { type: 'literal', value: '/' }, - * //=> { type: 'year', value: '1982' } - * //=> ] - */ - ; - - _proto.toLocaleParts = function toLocaleParts(opts) { - if (opts === void 0) { - opts = {}; - } - - return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : []; - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc(1982, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z' - * @example DateTime.local().toISO() //=> '2017-04-22T20:47:05.335-04:00' - * @example DateTime.local().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335' - * @example DateTime.local().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400' - * @return {string} - */ - ; - - _proto.toISO = function toISO(opts) { - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid) { - return null; - } - - return this.toISODate(opts) + "T" + this.toISOTime(opts); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's date component - * @param {Object} opts - options - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25' - * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525' - * @return {string} - */ - ; - - _proto.toISODate = function toISODate(_temp3) { - var _ref5 = _temp3 === void 0 ? {} : _temp3, - _ref5$format = _ref5.format, - format = _ref5$format === void 0 ? "extended" : _ref5$format; - - var fmt = format === "basic" ? "yyyyMMdd" : "yyyy-MM-dd"; - - if (this.year > 9999) { - fmt = "+" + fmt; - } - - return toTechFormat(this, fmt); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's week date - * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2' - * @return {string} - */ - ; - - _proto.toISOWeekDate = function toISOWeekDate() { - return toTechFormat(this, "kkkk-'W'WW-c"); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's time component - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z' - * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z' - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z' - * @return {string} - */ - ; - - _proto.toISOTime = function toISOTime(_temp4) { - var _ref6 = _temp4 === void 0 ? {} : _temp4, - _ref6$suppressMillise = _ref6.suppressMilliseconds, - suppressMilliseconds = _ref6$suppressMillise === void 0 ? false : _ref6$suppressMillise, - _ref6$suppressSeconds = _ref6.suppressSeconds, - suppressSeconds = _ref6$suppressSeconds === void 0 ? false : _ref6$suppressSeconds, - _ref6$includeOffset = _ref6.includeOffset, - includeOffset = _ref6$includeOffset === void 0 ? true : _ref6$includeOffset, - _ref6$format = _ref6.format, - format = _ref6$format === void 0 ? "extended" : _ref6$format; - - return toTechTimeFormat(this, { - suppressSeconds: suppressSeconds, - suppressMilliseconds: suppressMilliseconds, - includeOffset: includeOffset, - format: format - }); - } - /** - * Returns an RFC 2822-compatible string representation of this DateTime, always in UTC - * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000' - * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400' - * @return {string} - */ - ; - - _proto.toRFC2822 = function toRFC2822() { - return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false); - } - /** - * Returns a string representation of this DateTime appropriate for use in HTTP headers. - * Specifically, the string conforms to RFC 1123. - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 - * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT' - * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT' - * @return {string} - */ - ; - - _proto.toHTTP = function toHTTP() { - return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL Date - * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13' - * @return {string} - */ - ; - - _proto.toSQLDate = function toSQLDate() { - return toTechFormat(this, "yyyy-MM-dd"); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL Time - * @param {Object} opts - options - * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @example DateTime.utc().toSQL() //=> '05:15:16.345' - * @example DateTime.local().toSQL() //=> '05:15:16.345 -04:00' - * @example DateTime.local().toSQL({ includeOffset: false }) //=> '05:15:16.345' - * @example DateTime.local().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York' - * @return {string} - */ - ; - - _proto.toSQLTime = function toSQLTime(_temp5) { - var _ref7 = _temp5 === void 0 ? {} : _temp5, - _ref7$includeOffset = _ref7.includeOffset, - includeOffset = _ref7$includeOffset === void 0 ? true : _ref7$includeOffset, - _ref7$includeZone = _ref7.includeZone, - includeZone = _ref7$includeZone === void 0 ? false : _ref7$includeZone; - - return toTechTimeFormat(this, { - includeOffset: includeOffset, - includeZone: includeZone, - spaceZone: true - }); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL DateTime - * @param {Object} opts - options - * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z' - * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00' - * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000' - * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York' - * @return {string} - */ - ; - - _proto.toSQL = function toSQL(opts) { - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid) { - return null; - } - - return this.toSQLDate() + " " + this.toSQLTime(opts); - } - /** - * Returns a string representation of this DateTime appropriate for debugging - * @return {string} - */ - ; - - _proto.toString = function toString() { - return this.isValid ? this.toISO() : INVALID$2; - } - /** - * Returns the epoch milliseconds of this DateTime. Alias of {@link toMillis} - * @return {number} - */ - ; - - _proto.valueOf = function valueOf() { - return this.toMillis(); - } - /** - * Returns the epoch milliseconds of this DateTime. - * @return {number} - */ - ; - - _proto.toMillis = function toMillis() { - return this.isValid ? this.ts : NaN; - } - /** - * Returns the epoch seconds of this DateTime. - * @return {number} - */ - ; - - _proto.toSeconds = function toSeconds() { - return this.isValid ? this.ts / 1000 : NaN; - } - /** - * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON. - * @return {string} - */ - ; - - _proto.toJSON = function toJSON() { - return this.toISO(); - } - /** - * Returns a BSON serializable equivalent to this DateTime. - * @return {Date} - */ - ; - - _proto.toBSON = function toBSON() { - return this.toJSDate(); - } - /** - * Returns a Javascript object with this DateTime's year, month, day, and so on. - * @param opts - options for generating the object - * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output - * @example DateTime.local().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 } - * @return {Object} - */ - ; - - _proto.toObject = function toObject(opts) { - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid) return {}; - var base = Object.assign({}, this.c); - - if (opts.includeConfig) { - base.outputCalendar = this.outputCalendar; - base.numberingSystem = this.loc.numberingSystem; - base.locale = this.loc.locale; - } - - return base; - } - /** - * Returns a Javascript Date equivalent to this DateTime. - * @return {Date} - */ - ; - - _proto.toJSDate = function toJSDate() { - return new Date(this.isValid ? this.ts : NaN); - } // COMPARE - - /** - * Return the difference between two DateTimes as a Duration. - * @param {DateTime} otherDateTime - the DateTime to compare this one to - * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration. - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @example - * var i1 = DateTime.fromISO('1982-05-25T09:45'), - * i2 = DateTime.fromISO('1983-10-14T10:30'); - * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 } - * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 } - * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 } - * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 } - * @return {Duration} - */ - ; - - _proto.diff = function diff(otherDateTime, unit, opts) { - if (unit === void 0) { - unit = "milliseconds"; - } - - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid || !otherDateTime.isValid) { - return Duration.invalid(this.invalid || otherDateTime.invalid, "created by diffing an invalid DateTime"); - } - - var durOpts = Object.assign({ - locale: this.locale, - numberingSystem: this.numberingSystem - }, opts); - - var units = maybeArray(unit).map(Duration.normalizeUnit), - otherIsLater = otherDateTime.valueOf() > this.valueOf(), - earlier = otherIsLater ? this : otherDateTime, - later = otherIsLater ? otherDateTime : this, - diffed = _diff(earlier, later, units, durOpts); - - return otherIsLater ? diffed.negate() : diffed; - } - /** - * Return the difference between this DateTime and right now. - * See {@link diff} - * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - ; - - _proto.diffNow = function diffNow(unit, opts) { - if (unit === void 0) { - unit = "milliseconds"; - } - - if (opts === void 0) { - opts = {}; - } - - return this.diff(DateTime.local(), unit, opts); - } - /** - * Return an Interval spanning between this DateTime and another DateTime - * @param {DateTime} otherDateTime - the other end point of the Interval - * @return {Interval} - */ - ; - - _proto.until = function until(otherDateTime) { - return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this; - } - /** - * Return whether this DateTime is in the same unit of time as another DateTime - * @param {DateTime} otherDateTime - the other DateTime - * @param {string} unit - the unit of time to check sameness on - * @example DateTime.local().hasSame(otherDT, 'day'); //~> true if both the same calendar day - * @return {boolean} - */ - ; - - _proto.hasSame = function hasSame(otherDateTime, unit) { - if (!this.isValid) return false; - - if (unit === "millisecond") { - return this.valueOf() === otherDateTime.valueOf(); - } else { - var inputMs = otherDateTime.valueOf(); - return this.startOf(unit) <= inputMs && inputMs <= this.endOf(unit); - } - } - /** - * Equality check - * Two DateTimes are equal iff they represent the same millisecond, have the same zone and location, and are both valid. - * To compare just the millisecond values, use `+dt1 === +dt2`. - * @param {DateTime} other - the other DateTime - * @return {boolean} - */ - ; - - _proto.equals = function equals(other) { - return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc); - } - /** - * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your - * platform supports Intl.RelativeTimeFormat. Rounds down by default. - * @param {Object} options - options that affect the output - * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now. - * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow" - * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds" - * @param {boolean} [options.round=true] - whether to round the numbers in the output. - * @param {boolean} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding. - * @param {string} options.locale - override the locale of this DateTime - * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this - * @example DateTime.local().plus({ days: 1 }).toRelative() //=> "in 1 day" - * @example DateTime.local().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día" - * @example DateTime.local().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures" - * @example DateTime.local().minus({ days: 2 }).toRelative() //=> "2 days ago" - * @example DateTime.local().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago" - * @example DateTime.local().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago" - */ - ; - - _proto.toRelative = function toRelative(options) { - if (options === void 0) { - options = {}; - } - - if (!this.isValid) return null; - var base = options.base || DateTime.fromObject({ - zone: this.zone - }), - padding = options.padding ? this < base ? -options.padding : options.padding : 0; - return diffRelative(base, this.plus(padding), Object.assign(options, { - numeric: "always", - units: ["years", "months", "days", "hours", "minutes", "seconds"] - })); - } - /** - * Returns a string representation of this date relative to today, such as "yesterday" or "next month". - * Only internationalizes on platforms that supports Intl.RelativeTimeFormat. - * @param {Object} options - options that affect the output - * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now. - * @param {string} options.locale - override the locale of this DateTime - * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days" - * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this - * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow" - * @example DateTime.local().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana" - * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain" - * @example DateTime.local().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago" - */ - ; - - _proto.toRelativeCalendar = function toRelativeCalendar(options) { - if (options === void 0) { - options = {}; - } - - if (!this.isValid) return null; - return diffRelative(options.base || DateTime.fromObject({ - zone: this.zone - }), this, Object.assign(options, { - numeric: "auto", - units: ["years", "months", "days"], - calendary: true - })); - } - /** - * Return the min of several date times - * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum - * @return {DateTime} the min DateTime, or undefined if called with no argument - */ - ; - - DateTime.min = function min() { - for (var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++) { - dateTimes[_key] = arguments[_key]; - } - - if (!dateTimes.every(DateTime.isDateTime)) { - throw new InvalidArgumentError("min requires all arguments be DateTimes"); - } - - return bestBy(dateTimes, function (i) { - return i.valueOf(); - }, Math.min); - } - /** - * Return the max of several date times - * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum - * @return {DateTime} the max DateTime, or undefined if called with no argument - */ - ; - - DateTime.max = function max() { - for (var _len2 = arguments.length, dateTimes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - dateTimes[_key2] = arguments[_key2]; - } - - if (!dateTimes.every(DateTime.isDateTime)) { - throw new InvalidArgumentError("max requires all arguments be DateTimes"); - } - - return bestBy(dateTimes, function (i) { - return i.valueOf(); - }, Math.max); - } // MISC - - /** - * Explain how a string would be parsed by fromFormat() - * @param {string} text - the string to parse - * @param {string} fmt - the format the string is expected to be in (see description) - * @param {Object} options - options taken by fromFormat() - * @return {Object} - */ - ; - - DateTime.fromFormatExplain = function fromFormatExplain(text, fmt, options) { - if (options === void 0) { - options = {}; - } - - var _options = options, - _options$locale = _options.locale, - locale = _options$locale === void 0 ? null : _options$locale, - _options$numberingSys = _options.numberingSystem, - numberingSystem = _options$numberingSys === void 0 ? null : _options$numberingSys, - localeToUse = Locale.fromOpts({ - locale: locale, - numberingSystem: numberingSystem, - defaultToEN: true - }); - return explainFromTokens(localeToUse, text, fmt); - } - /** - * @deprecated use fromFormatExplain instead - */ - ; - - DateTime.fromStringExplain = function fromStringExplain(text, fmt, options) { - if (options === void 0) { - options = {}; - } - - return DateTime.fromFormatExplain(text, fmt, options); - } // FORMAT PRESETS - - /** - * {@link toLocaleString} format like 10/14/1983 - * @type {Object} - */ - ; - - _createClass(DateTime, [{ - key: "isValid", - get: function get() { - return this.invalid === null; - } - /** - * Returns an error code if this DateTime is invalid, or null if the DateTime is valid - * @type {string} - */ - - }, { - key: "invalidReason", - get: function get() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid - * @type {string} - */ - - }, { - key: "invalidExplanation", - get: function get() { - return this.invalid ? this.invalid.explanation : null; - } - /** - * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime - * - * @type {string} - */ - - }, { - key: "locale", - get: function get() { - return this.isValid ? this.loc.locale : null; - } - /** - * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime - * - * @type {string} - */ - - }, { - key: "numberingSystem", - get: function get() { - return this.isValid ? this.loc.numberingSystem : null; - } - /** - * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime - * - * @type {string} - */ - - }, { - key: "outputCalendar", - get: function get() { - return this.isValid ? this.loc.outputCalendar : null; - } - /** - * Get the time zone associated with this DateTime. - * @type {Zone} - */ - - }, { - key: "zone", - get: function get() { - return this._zone; - } - /** - * Get the name of the time zone. - * @type {string} - */ - - }, { - key: "zoneName", - get: function get() { - return this.isValid ? this.zone.name : null; - } - /** - * Get the year - * @example DateTime.local(2017, 5, 25).year //=> 2017 - * @type {number} - */ - - }, { - key: "year", - get: function get() { - return this.isValid ? this.c.year : NaN; - } - /** - * Get the quarter - * @example DateTime.local(2017, 5, 25).quarter //=> 2 - * @type {number} - */ - - }, { - key: "quarter", - get: function get() { - return this.isValid ? Math.ceil(this.c.month / 3) : NaN; - } - /** - * Get the month (1-12). - * @example DateTime.local(2017, 5, 25).month //=> 5 - * @type {number} - */ - - }, { - key: "month", - get: function get() { - return this.isValid ? this.c.month : NaN; - } - /** - * Get the day of the month (1-30ish). - * @example DateTime.local(2017, 5, 25).day //=> 25 - * @type {number} - */ - - }, { - key: "day", - get: function get() { - return this.isValid ? this.c.day : NaN; - } - /** - * Get the hour of the day (0-23). - * @example DateTime.local(2017, 5, 25, 9).hour //=> 9 - * @type {number} - */ - - }, { - key: "hour", - get: function get() { - return this.isValid ? this.c.hour : NaN; - } - /** - * Get the minute of the hour (0-59). - * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30 - * @type {number} - */ - - }, { - key: "minute", - get: function get() { - return this.isValid ? this.c.minute : NaN; - } - /** - * Get the second of the minute (0-59). - * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52 - * @type {number} - */ - - }, { - key: "second", - get: function get() { - return this.isValid ? this.c.second : NaN; - } - /** - * Get the millisecond of the second (0-999). - * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654 - * @type {number} - */ - - }, { - key: "millisecond", - get: function get() { - return this.isValid ? this.c.millisecond : NaN; - } - /** - * Get the week year - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2014, 11, 31).weekYear //=> 2015 - * @type {number} - */ - - }, { - key: "weekYear", - get: function get() { - return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN; - } - /** - * Get the week number of the week year (1-52ish). - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2017, 5, 25).weekNumber //=> 21 - * @type {number} - */ - - }, { - key: "weekNumber", - get: function get() { - return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN; - } - /** - * Get the day of the week. - * 1 is Monday and 7 is Sunday - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2014, 11, 31).weekday //=> 4 - * @type {number} - */ - - }, { - key: "weekday", - get: function get() { - return this.isValid ? possiblyCachedWeekData(this).weekday : NaN; - } - /** - * Get the ordinal (meaning the day of the year) - * @example DateTime.local(2017, 5, 25).ordinal //=> 145 - * @type {number|DateTime} - */ - - }, { - key: "ordinal", - get: function get() { - return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN; - } - /** - * Get the human readable short month name, such as 'Oct'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).monthShort //=> Oct - * @type {string} - */ - - }, { - key: "monthShort", - get: function get() { - return this.isValid ? Info.months("short", { - locale: this.locale - })[this.month - 1] : null; - } - /** - * Get the human readable long month name, such as 'October'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).monthLong //=> October - * @type {string} - */ - - }, { - key: "monthLong", - get: function get() { - return this.isValid ? Info.months("long", { - locale: this.locale - })[this.month - 1] : null; - } - /** - * Get the human readable short weekday, such as 'Mon'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon - * @type {string} - */ - - }, { - key: "weekdayShort", - get: function get() { - return this.isValid ? Info.weekdays("short", { - locale: this.locale - })[this.weekday - 1] : null; - } - /** - * Get the human readable long weekday, such as 'Monday'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday - * @type {string} - */ - - }, { - key: "weekdayLong", - get: function get() { - return this.isValid ? Info.weekdays("long", { - locale: this.locale - })[this.weekday - 1] : null; - } - /** - * Get the UTC offset of this DateTime in minutes - * @example DateTime.local().offset //=> -240 - * @example DateTime.utc().offset //=> 0 - * @type {number} - */ - - }, { - key: "offset", - get: function get() { - return this.isValid ? +this.o : NaN; - } - /** - * Get the short human name for the zone's current offset, for example "EST" or "EDT". - * Defaults to the system's locale if no locale has been specified - * @type {string} - */ - - }, { - key: "offsetNameShort", - get: function get() { - if (this.isValid) { - return this.zone.offsetName(this.ts, { - format: "short", - locale: this.locale - }); - } else { - return null; - } - } - /** - * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time". - * Defaults to the system's locale if no locale has been specified - * @type {string} - */ - - }, { - key: "offsetNameLong", - get: function get() { - if (this.isValid) { - return this.zone.offsetName(this.ts, { - format: "long", - locale: this.locale - }); - } else { - return null; - } - } - /** - * Get whether this zone's offset ever changes, as in a DST. - * @type {boolean} - */ - - }, { - key: "isOffsetFixed", - get: function get() { - return this.isValid ? this.zone.universal : null; - } - /** - * Get whether the DateTime is in a DST. - * @type {boolean} - */ - - }, { - key: "isInDST", - get: function get() { - if (this.isOffsetFixed) { - return false; - } else { - return this.offset > this.set({ - month: 1 - }).offset || this.offset > this.set({ - month: 5 - }).offset; - } - } - /** - * Returns true if this DateTime is in a leap year, false otherwise - * @example DateTime.local(2016).isInLeapYear //=> true - * @example DateTime.local(2013).isInLeapYear //=> false - * @type {boolean} - */ - - }, { - key: "isInLeapYear", - get: function get() { - return isLeapYear(this.year); - } - /** - * Returns the number of days in this DateTime's month - * @example DateTime.local(2016, 2).daysInMonth //=> 29 - * @example DateTime.local(2016, 3).daysInMonth //=> 31 - * @type {number} - */ - - }, { - key: "daysInMonth", - get: function get() { - return daysInMonth(this.year, this.month); - } - /** - * Returns the number of days in this DateTime's year - * @example DateTime.local(2016).daysInYear //=> 366 - * @example DateTime.local(2013).daysInYear //=> 365 - * @type {number} - */ - - }, { - key: "daysInYear", - get: function get() { - return this.isValid ? daysInYear(this.year) : NaN; - } - /** - * Returns the number of weeks in this DateTime's year - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2004).weeksInWeekYear //=> 53 - * @example DateTime.local(2013).weeksInWeekYear //=> 52 - * @type {number} - */ - - }, { - key: "weeksInWeekYear", - get: function get() { - return this.isValid ? weeksInWeekYear(this.weekYear) : NaN; - } - }], [{ - key: "DATE_SHORT", - get: function get() { - return DATE_SHORT; - } - /** - * {@link toLocaleString} format like 'Oct 14, 1983' - * @type {Object} - */ - - }, { - key: "DATE_MED", - get: function get() { - return DATE_MED; - } - /** - * {@link toLocaleString} format like 'Fri, Oct 14, 1983' - * @type {Object} - */ - - }, { - key: "DATE_MED_WITH_WEEKDAY", - get: function get() { - return DATE_MED_WITH_WEEKDAY; - } - /** - * {@link toLocaleString} format like 'October 14, 1983' - * @type {Object} - */ - - }, { - key: "DATE_FULL", - get: function get() { - return DATE_FULL; - } - /** - * {@link toLocaleString} format like 'Tuesday, October 14, 1983' - * @type {Object} - */ - - }, { - key: "DATE_HUGE", - get: function get() { - return DATE_HUGE; - } - /** - * {@link toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "TIME_SIMPLE", - get: function get() { - return TIME_SIMPLE; - } - /** - * {@link toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "TIME_WITH_SECONDS", - get: function get() { - return TIME_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "TIME_WITH_SHORT_OFFSET", - get: function get() { - return TIME_WITH_SHORT_OFFSET; - } - /** - * {@link toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "TIME_WITH_LONG_OFFSET", - get: function get() { - return TIME_WITH_LONG_OFFSET; - } - /** - * {@link toLocaleString} format like '09:30', always 24-hour. - * @type {Object} - */ - - }, { - key: "TIME_24_SIMPLE", - get: function get() { - return TIME_24_SIMPLE; - } - /** - * {@link toLocaleString} format like '09:30:23', always 24-hour. - * @type {Object} - */ - - }, { - key: "TIME_24_WITH_SECONDS", - get: function get() { - return TIME_24_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like '09:30:23 EDT', always 24-hour. - * @type {Object} - */ - - }, { - key: "TIME_24_WITH_SHORT_OFFSET", - get: function get() { - return TIME_24_WITH_SHORT_OFFSET; - } - /** - * {@link toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour. - * @type {Object} - */ - - }, { - key: "TIME_24_WITH_LONG_OFFSET", - get: function get() { - return TIME_24_WITH_LONG_OFFSET; - } - /** - * {@link toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_SHORT", - get: function get() { - return DATETIME_SHORT; - } - /** - * {@link toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_SHORT_WITH_SECONDS", - get: function get() { - return DATETIME_SHORT_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_MED", - get: function get() { - return DATETIME_MED; - } - /** - * {@link toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_MED_WITH_SECONDS", - get: function get() { - return DATETIME_MED_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_MED_WITH_WEEKDAY", - get: function get() { - return DATETIME_MED_WITH_WEEKDAY; - } - /** - * {@link toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_FULL", - get: function get() { - return DATETIME_FULL; - } - /** - * {@link toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_FULL_WITH_SECONDS", - get: function get() { - return DATETIME_FULL_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_HUGE", - get: function get() { - return DATETIME_HUGE; - } - /** - * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_HUGE_WITH_SECONDS", - get: function get() { - return DATETIME_HUGE_WITH_SECONDS; - } - }]); - - return DateTime; - }(); - function friendlyDateTime(dateTimeish) { - if (DateTime.isDateTime(dateTimeish)) { - return dateTimeish; - } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) { - return DateTime.fromJSDate(dateTimeish); - } else if (dateTimeish && typeof dateTimeish === "object") { - return DateTime.fromObject(dateTimeish); - } else { - throw new InvalidArgumentError("Unknown datetime argument: " + dateTimeish + ", of type " + typeof dateTimeish); - } - } - - exports.DateTime = DateTime; - exports.Duration = Duration; - exports.FixedOffsetZone = FixedOffsetZone; - exports.IANAZone = IANAZone; - exports.Info = Info; - exports.Interval = Interval; - exports.InvalidZone = InvalidZone; - exports.LocalZone = LocalZone; - exports.Settings = Settings; - exports.Zone = Zone; - - Object.defineProperty(exports, '__esModule', { value: true }); - -}); -//# sourceMappingURL=luxon.js.map diff --git a/node_modules/luxon/build/amd/luxon.js.map b/node_modules/luxon/build/amd/luxon.js.map deleted file mode 100644 index 88f9ce4..0000000 --- a/node_modules/luxon/build/amd/luxon.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"luxon.js","sources":["../../src/errors.js","../../src/impl/formats.js","../../src/impl/util.js","../../src/impl/english.js","../../src/impl/formatter.js","../../src/impl/invalid.js","../../src/zone.js","../../src/zones/localZone.js","../../src/zones/IANAZone.js","../../src/zones/fixedOffsetZone.js","../../src/zones/invalidZone.js","../../src/impl/zoneUtil.js","../../src/settings.js","../../src/impl/locale.js","../../src/impl/regexParser.js","../../src/duration.js","../../src/interval.js","../../src/info.js","../../src/impl/diff.js","../../src/impl/digits.js","../../src/impl/tokenParser.js","../../src/impl/conversions.js","../../src/datetime.js"],"sourcesContent":["// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nexport class InvalidDateTimeError extends LuxonError {\n constructor(reason) {\n super(`Invalid DateTime: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidIntervalError extends LuxonError {\n constructor(reason) {\n super(`Invalid Interval: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidDurationError extends LuxonError {\n constructor(reason) {\n super(`Invalid Duration: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nexport class InvalidUnitError extends LuxonError {\n constructor(unit) {\n super(`Invalid unit ${unit}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nexport class ZoneIsAbstractError extends LuxonError {\n constructor() {\n super(\"Zone is an abstract class\");\n }\n}\n","/**\n * @private\n */\n\nconst n = \"numeric\",\n s = \"short\",\n l = \"long\";\n\nexport const DATE_SHORT = {\n year: n,\n month: n,\n day: n\n};\n\nexport const DATE_MED = {\n year: n,\n month: s,\n day: n\n};\n\nexport const DATE_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s\n};\n\nexport const DATE_FULL = {\n year: n,\n month: l,\n day: n\n};\n\nexport const DATE_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l\n};\n\nexport const TIME_SIMPLE = {\n hour: n,\n minute: n\n};\n\nexport const TIME_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n\n};\n\nexport const TIME_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s\n};\n\nexport const TIME_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l\n};\n\nexport const TIME_24_SIMPLE = {\n hour: n,\n minute: n,\n hour12: false\n};\n\n/**\n * {@link toLocaleString}; format like '09:30:23', always 24-hour.\n */\nexport const TIME_24_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n hour12: false\n};\n\n/**\n * {@link toLocaleString}; format like '09:30:23 EDT', always 24-hour.\n */\nexport const TIME_24_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hour12: false,\n timeZoneName: s\n};\n\n/**\n * {@link toLocaleString}; format like '09:30:23 Eastern Daylight Time', always 24-hour.\n */\nexport const TIME_24_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hour12: false,\n timeZoneName: l\n};\n\n/**\n * {@link toLocaleString}; format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n */\nexport const DATETIME_SHORT = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n\n};\n\n/**\n * {@link toLocaleString}; format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n */\nexport const DATETIME_SHORT_WITH_SECONDS = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n second: n\n};\n\nexport const DATETIME_MED = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n\n};\n\nexport const DATETIME_MED_WITH_SECONDS = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n second: n\n};\n\nexport const DATETIME_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n hour: n,\n minute: n\n};\n\nexport const DATETIME_FULL = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n timeZoneName: s\n};\n\nexport const DATETIME_FULL_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s\n};\n\nexport const DATETIME_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n timeZoneName: l\n};\n\nexport const DATETIME_HUGE_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l\n};\n","/*\n This is just a junk drawer, containing anything used across multiple classes.\n Because Luxon is small(ish), this should stay small and we won't worry about splitting\n it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\nimport { InvalidArgumentError } from \"../errors.js\";\n\n/**\n * @private\n */\n\n// TYPES\n\nexport function isUndefined(o) {\n return typeof o === \"undefined\";\n}\n\nexport function isNumber(o) {\n return typeof o === \"number\";\n}\n\nexport function isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\n\nexport function isString(o) {\n return typeof o === \"string\";\n}\n\nexport function isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nexport function hasIntl() {\n try {\n return typeof Intl !== \"undefined\" && Intl.DateTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\nexport function hasFormatToParts() {\n return !isUndefined(Intl.DateTimeFormat.prototype.formatToParts);\n}\n\nexport function hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\n// OBJECTS AND ARRAYS\n\nexport function maybeArray(thing) {\n return Array.isArray(thing) ? thing : [thing];\n}\n\nexport function bestBy(arr, by, compare) {\n if (arr.length === 0) {\n return undefined;\n }\n return arr.reduce((best, next) => {\n const pair = [by(next), next];\n if (!best) {\n return pair;\n } else if (compare(best[0], pair[0]) === best[0]) {\n return best;\n } else {\n return pair;\n }\n }, null)[1];\n}\n\nexport function pick(obj, keys) {\n return keys.reduce((a, k) => {\n a[k] = obj[k];\n return a;\n }, {});\n}\n\nexport function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n// NUMBERS AND STRINGS\n\nexport function integerBetween(thing, bottom, top) {\n return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nexport function floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\n\nexport function padStart(input, n = 2) {\n if (input.toString().length < n) {\n return (\"0\".repeat(n) + input).slice(-n);\n } else {\n return input.toString();\n }\n}\n\nexport function parseInteger(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseInt(string, 10);\n }\n}\n\nexport function parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n return undefined;\n } else {\n const f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\n\nexport function roundTo(number, digits, towardZero = false) {\n const factor = 10 ** digits,\n rounder = towardZero ? Math.trunc : Math.round;\n return rounder(number * factor) / factor;\n}\n\n// DATE BASICS\n\nexport function isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\nexport function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nexport function daysInMonth(year, month) {\n const modMonth = floorMod(month - 1, 12) + 1,\n modYear = year + (month - modMonth) / 12;\n\n if (modMonth === 2) {\n return isLeapYear(modYear) ? 29 : 28;\n } else {\n return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n }\n}\n\n// covert a calendar object to a local timestamp (epoch, but with the offset baked in)\nexport function objToLocalTS(obj) {\n let d = Date.UTC(\n obj.year,\n obj.month - 1,\n obj.day,\n obj.hour,\n obj.minute,\n obj.second,\n obj.millisecond\n );\n\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n return +d;\n}\n\nexport function weeksInWeekYear(weekYear) {\n const p1 =\n (weekYear +\n Math.floor(weekYear / 4) -\n Math.floor(weekYear / 100) +\n Math.floor(weekYear / 400)) %\n 7,\n last = weekYear - 1,\n p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7;\n return p1 === 4 || p2 === 3 ? 53 : 52;\n}\n\nexport function untruncateYear(year) {\n if (year > 99) {\n return year;\n } else return year > 60 ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nexport function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n const date = new Date(ts),\n intlOpts = {\n hour12: false,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\"\n };\n\n if (timeZone) {\n intlOpts.timeZone = timeZone;\n }\n\n const modified = Object.assign({ timeZoneName: offsetFormat }, intlOpts),\n intl = hasIntl();\n\n if (intl && hasFormatToParts()) {\n const parsed = new Intl.DateTimeFormat(locale, modified)\n .formatToParts(date)\n .find(m => m.type.toLowerCase() === \"timezonename\");\n return parsed ? parsed.value : null;\n } else if (intl) {\n // this probably doesn't work for all locales\n const without = new Intl.DateTimeFormat(locale, intlOpts).format(date),\n included = new Intl.DateTimeFormat(locale, modified).format(date),\n diffed = included.substring(without.length),\n trimmed = diffed.replace(/^[, \\u200e]+/, \"\");\n return trimmed;\n } else {\n return null;\n }\n}\n\n// signedOffset('-5', '30') -> -330\nexport function signedOffset(offHourStr, offMinuteStr) {\n let offHour = parseInt(offHourStr, 10);\n\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) {\n offHour = 0;\n }\n\n const offMin = parseInt(offMinuteStr, 10) || 0,\n offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nexport function asNumber(value) {\n const numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || Number.isNaN(numericValue))\n throw new InvalidArgumentError(`Invalid unit value ${value}`);\n return numericValue;\n}\n\nexport function normalizeObject(obj, normalizer, nonUnitKeys) {\n const normalized = {};\n for (const u in obj) {\n if (hasOwnProperty(obj, u)) {\n if (nonUnitKeys.indexOf(u) >= 0) continue;\n const v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = asNumber(v);\n }\n }\n return normalized;\n}\n\nexport function formatOffset(offset, format) {\n const hours = Math.trunc(Math.abs(offset / 60)),\n minutes = Math.trunc(Math.abs(offset % 60)),\n sign = offset >= 0 ? \"+\" : \"-\";\n\n switch (format) {\n case \"short\":\n return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n case \"narrow\":\n return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n case \"techie\":\n return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n default:\n throw new RangeError(`Value format ${format} is out of range for property format`);\n }\n}\n\nexport function timeObject(obj) {\n return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n\nexport const ianaRegex = /[A-Za-z_+-]{1,256}(:?\\/[A-Za-z_+-]{1,256}(\\/[A-Za-z_+-]{1,256})?)?/;\n","import * as Formats from \"./formats.js\";\nimport { pick } from \"./util.js\";\n\nfunction stringify(obj) {\n return JSON.stringify(obj, Object.keys(obj).sort());\n}\n\n/**\n * @private\n */\n\nexport const monthsLong = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n];\n\nexport const monthsShort = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\"\n];\n\nexport const monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\n\nexport function months(length) {\n switch (length) {\n case \"narrow\":\n return monthsNarrow;\n case \"short\":\n return monthsShort;\n case \"long\":\n return monthsLong;\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n case \"2-digit\":\n return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n default:\n return null;\n }\n}\n\nexport const weekdaysLong = [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\"\n];\n\nexport const weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nexport const weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\n\nexport function weekdays(length) {\n switch (length) {\n case \"narrow\":\n return weekdaysNarrow;\n case \"short\":\n return weekdaysShort;\n case \"long\":\n return weekdaysLong;\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n default:\n return null;\n }\n}\n\nexport const meridiems = [\"AM\", \"PM\"];\n\nexport const erasLong = [\"Before Christ\", \"Anno Domini\"];\n\nexport const erasShort = [\"BC\", \"AD\"];\n\nexport const erasNarrow = [\"B\", \"A\"];\n\nexport function eras(length) {\n switch (length) {\n case \"narrow\":\n return erasNarrow;\n case \"short\":\n return erasShort;\n case \"long\":\n return erasLong;\n default:\n return null;\n }\n}\n\nexport function meridiemForDateTime(dt) {\n return meridiems[dt.hour < 12 ? 0 : 1];\n}\n\nexport function weekdayForDateTime(dt, length) {\n return weekdays(length)[dt.weekday - 1];\n}\n\nexport function monthForDateTime(dt, length) {\n return months(length)[dt.month - 1];\n}\n\nexport function eraForDateTime(dt, length) {\n return eras(length)[dt.year < 0 ? 0 : 1];\n}\n\nexport function formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n const units = {\n years: [\"year\", \"yr.\"],\n quarters: [\"quarter\", \"qtr.\"],\n months: [\"month\", \"mo.\"],\n weeks: [\"week\", \"wk.\"],\n days: [\"day\", \"day\", \"days\"],\n hours: [\"hour\", \"hr.\"],\n minutes: [\"minute\", \"min.\"],\n seconds: [\"second\", \"sec.\"]\n };\n\n const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n\n if (numeric === \"auto\" && lastable) {\n const isDay = unit === \"days\";\n switch (count) {\n case 1:\n return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n case -1:\n return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n case 0:\n return isDay ? \"today\" : `this ${units[unit][0]}`;\n default: // fall through\n }\n }\n\n const isInPast = Object.is(count, -0) || count < 0,\n fmtValue = Math.abs(count),\n singular = fmtValue === 1,\n lilUnits = units[unit],\n fmtUnit = narrow\n ? singular\n ? lilUnits[1]\n : lilUnits[2] || lilUnits[1]\n : singular\n ? units[unit][0]\n : unit;\n return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nexport function formatString(knownFormat) {\n // these all have the offsets removed because we don't have access to them\n // without all the intl stuff this is backfilling\n const filtered = pick(knownFormat, [\n \"weekday\",\n \"era\",\n \"year\",\n \"month\",\n \"day\",\n \"hour\",\n \"minute\",\n \"second\",\n \"timeZoneName\",\n \"hour12\"\n ]),\n key = stringify(filtered),\n dateTimeHuge = \"EEEE, LLLL d, yyyy, h:mm a\";\n switch (key) {\n case stringify(Formats.DATE_SHORT):\n return \"M/d/yyyy\";\n case stringify(Formats.DATE_MED):\n return \"LLL d, yyyy\";\n case stringify(Formats.DATE_MED_WITH_WEEKDAY):\n return \"EEE, LLL d, yyyy\";\n case stringify(Formats.DATE_FULL):\n return \"LLLL d, yyyy\";\n case stringify(Formats.DATE_HUGE):\n return \"EEEE, LLLL d, yyyy\";\n case stringify(Formats.TIME_SIMPLE):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_SECONDS):\n return \"h:mm:ss a\";\n case stringify(Formats.TIME_WITH_SHORT_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_LONG_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_24_SIMPLE):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_SECONDS):\n return \"HH:mm:ss\";\n case stringify(Formats.TIME_24_WITH_SHORT_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_LONG_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.DATETIME_SHORT):\n return \"M/d/yyyy, h:mm a\";\n case stringify(Formats.DATETIME_MED):\n return \"LLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL):\n return \"LLLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_HUGE):\n return dateTimeHuge;\n case stringify(Formats.DATETIME_SHORT_WITH_SECONDS):\n return \"M/d/yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_SECONDS):\n return \"LLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):\n return \"EEE, d LLL yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL_WITH_SECONDS):\n return \"LLLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_HUGE_WITH_SECONDS):\n return \"EEEE, LLLL d, yyyy, h:mm:ss a\";\n default:\n return dateTimeHuge;\n }\n}\n","import * as English from \"./english.js\";\nimport * as Formats from \"./formats.js\";\nimport { hasFormatToParts, padStart } from \"./util.js\";\n\nfunction stringifyTokens(splits, tokenToString) {\n let s = \"\";\n for (const token of splits) {\n if (token.literal) {\n s += token.val;\n } else {\n s += tokenToString(token.val);\n }\n }\n return s;\n}\n\nconst macroTokenToFormatOpts = {\n D: Formats.DATE_SHORT,\n DD: Formats.DATE_MED,\n DDD: Formats.DATE_FULL,\n DDDD: Formats.DATE_HUGE,\n t: Formats.TIME_SIMPLE,\n tt: Formats.TIME_WITH_SECONDS,\n ttt: Formats.TIME_WITH_SHORT_OFFSET,\n tttt: Formats.TIME_WITH_LONG_OFFSET,\n T: Formats.TIME_24_SIMPLE,\n TT: Formats.TIME_24_WITH_SECONDS,\n TTT: Formats.TIME_24_WITH_SHORT_OFFSET,\n TTTT: Formats.TIME_24_WITH_LONG_OFFSET,\n f: Formats.DATETIME_SHORT,\n ff: Formats.DATETIME_MED,\n fff: Formats.DATETIME_FULL,\n ffff: Formats.DATETIME_HUGE,\n F: Formats.DATETIME_SHORT_WITH_SECONDS,\n FF: Formats.DATETIME_MED_WITH_SECONDS,\n FFF: Formats.DATETIME_FULL_WITH_SECONDS,\n FFFF: Formats.DATETIME_HUGE_WITH_SECONDS\n};\n\n/**\n * @private\n */\n\nexport default class Formatter {\n static create(locale, opts = {}) {\n return new Formatter(locale, opts);\n }\n\n static parseFormat(fmt) {\n let current = null,\n currentFull = \"\",\n bracketed = false;\n const splits = [];\n for (let i = 0; i < fmt.length; i++) {\n const c = fmt.charAt(i);\n if (c === \"'\") {\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed, val: currentFull });\n }\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) {\n currentFull += c;\n } else if (c === current) {\n currentFull += c;\n } else {\n if (currentFull.length > 0) {\n splits.push({ literal: false, val: currentFull });\n }\n currentFull = c;\n current = c;\n }\n }\n\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed, val: currentFull });\n }\n\n return splits;\n }\n\n static macroTokenToFormatOpts(token) {\n return macroTokenToFormatOpts[token];\n }\n\n constructor(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n\n formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) {\n this.systemLoc = this.loc.redefaultToSystem();\n }\n const df = this.systemLoc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.format();\n }\n\n formatDateTime(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.format();\n }\n\n formatDateTimeParts(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.formatToParts();\n }\n\n resolvedOptions(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.resolvedOptions();\n }\n\n num(n, p = 0) {\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) {\n return padStart(n, p);\n }\n\n const opts = Object.assign({}, this.opts);\n\n if (p > 0) {\n opts.padTo = p;\n }\n\n return this.loc.numberFormatter(opts).format(n);\n }\n\n formatDateTimeFromString(dt, fmt) {\n const knownEnglish = this.loc.listingMode() === \"en\",\n useDateTimeFormatter =\n this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\" && hasFormatToParts(),\n string = (opts, extract) => this.loc.extract(dt, opts, extract),\n formatOffset = opts => {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n return \"Z\";\n }\n\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n },\n meridiem = () =>\n knownEnglish\n ? English.meridiemForDateTime(dt)\n : string({ hour: \"numeric\", hour12: true }, \"dayperiod\"),\n month = (length, standalone) =>\n knownEnglish\n ? English.monthForDateTime(dt, length)\n : string(standalone ? { month: length } : { month: length, day: \"numeric\" }, \"month\"),\n weekday = (length, standalone) =>\n knownEnglish\n ? English.weekdayForDateTime(dt, length)\n : string(\n standalone ? { weekday: length } : { weekday: length, month: \"long\", day: \"numeric\" },\n \"weekday\"\n ),\n maybeMacro = token => {\n const formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) {\n return this.formatWithSystemDefault(dt, formatOpts);\n } else {\n return token;\n }\n },\n era = length =>\n knownEnglish ? English.eraForDateTime(dt, length) : string({ era: length }, \"era\"),\n tokenToString = token => {\n // Where possible: http://cldr.unicode.org/translation/date-time#TOC-Stand-Alone-vs.-Format-Styles\n switch (token) {\n // ms\n case \"S\":\n return this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return this.num(dt.second);\n case \"ss\":\n return this.num(dt.second, 2);\n // minutes\n case \"m\":\n return this.num(dt.minute);\n case \"mm\":\n return this.num(dt.minute, 2);\n // hours\n case \"h\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return this.num(dt.hour);\n case \"HH\":\n return this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({ format: \"narrow\", allowZ: this.opts.allowZ });\n case \"ZZ\":\n // like +06:00\n return formatOffset({ format: \"short\", allowZ: this.opts.allowZ });\n case \"ZZZ\":\n // like +0600\n return formatOffset({ format: \"techie\", allowZ: this.opts.allowZ });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, { format: \"short\", locale: this.loc.locale });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, { format: \"long\", locale: this.loc.locale });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({ day: \"numeric\" }, \"day\") : this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({ day: \"2-digit\" }, \"day\") : this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\", day: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter\n ? string({ month: \"2-digit\", day: \"numeric\" }, \"month\")\n : this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter\n ? string({ month: \"2-digit\" }, \"month\")\n : this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({ year: \"numeric\" }, \"year\") : this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter\n ? string({ year: \"2-digit\" }, \"year\")\n : this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return this.num(dt.weekYear, 4);\n case \"W\":\n return this.num(dt.weekNumber);\n case \"WW\":\n return this.num(dt.weekNumber, 2);\n case \"o\":\n return this.num(dt.ordinal);\n case \"ooo\":\n return this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return this.num(dt.quarter);\n case \"qq\":\n // like 01\n return this.num(dt.quarter, 2);\n case \"X\":\n return this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n\n return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n }\n\n formatDurationFromString(dur, fmt) {\n const tokenToField = token => {\n switch (token[0]) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n default:\n return null;\n }\n },\n tokenToString = lildur => token => {\n const mapped = tokenToField(token);\n if (mapped) {\n return this.num(lildur.get(mapped), token.length);\n } else {\n return token;\n }\n },\n tokens = Formatter.parseFormat(fmt),\n realTokens = tokens.reduce(\n (found, { literal, val }) => (literal ? found : found.concat(val)),\n []\n ),\n collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter(t => t));\n return stringifyTokens(tokens, tokenToString(collapsed));\n }\n}\n","export default class Invalid {\n constructor(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n\n toMessage() {\n if (this.explanation) {\n return `${this.reason}: ${this.explanation}`;\n } else {\n return this.reason;\n }\n }\n}\n","/* eslint no-unused-vars: \"off\" */\nimport { ZoneIsAbstractError } from \"./errors.js\";\n\n/**\n * @interface\n */\nexport default class Zone {\n /**\n * The type of zone\n * @abstract\n * @type {string}\n */\n get type() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The name of this zone.\n * @abstract\n * @type {string}\n */\n get name() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year.\n * @abstract\n * @type {boolean}\n */\n get universal() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, opts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */\n get isValid() {\n throw new ZoneIsAbstractError();\n }\n}\n","import { formatOffset, parseZoneInfo, hasIntl } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * Represents the local zone for this Javascript environment.\n * @implements {Zone}\n */\nexport default class LocalZone extends Zone {\n /**\n * Get a singleton instance of the local zone\n * @return {LocalZone}\n */\n static get instance() {\n if (singleton === null) {\n singleton = new LocalZone();\n }\n return singleton;\n }\n\n /** @override **/\n get type() {\n return \"local\";\n }\n\n /** @override **/\n get name() {\n if (hasIntl()) {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n } else return \"local\";\n }\n\n /** @override **/\n get universal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"local\";\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import { formatOffset, parseZoneInfo, isUndefined, ianaRegex, objToLocalTS } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nconst matchingRegex = RegExp(`^${ianaRegex.source}$`);\n\nlet dtfCache = {};\nfunction makeDTF(zone) {\n if (!dtfCache[zone]) {\n dtfCache[zone] = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\"\n });\n }\n return dtfCache[zone];\n}\n\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n hour: 3,\n minute: 4,\n second: 5\n};\n\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n parsed = /(\\d+)\\/(\\d+)\\/(\\d+),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed;\n return [fYear, fMonth, fDay, fHour, fMinute, fSecond];\n}\n\nfunction partsOffset(dtf, date) {\n const formatted = dtf.formatToParts(date),\n filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const { type, value } = formatted[i],\n pos = typeToPos[type];\n\n if (!isUndefined(pos)) {\n filled[pos] = parseInt(value, 10);\n }\n }\n return filled;\n}\n\nlet ianaZoneCache = {};\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nexport default class IANAZone extends Zone {\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */\n static create(name) {\n if (!ianaZoneCache[name]) {\n ianaZoneCache[name] = new IANAZone(name);\n }\n return ianaZoneCache[name];\n }\n\n /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCache() {\n ianaZoneCache = {};\n dtfCache = {};\n }\n\n /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Fantasia/Castle\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidSpecifier(s) {\n return !!(s && s.match(matchingRegex));\n }\n\n /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidZone(zone) {\n try {\n new Intl.DateTimeFormat(\"en-US\", { timeZone: zone }).format();\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Etc/GMT+8 -> -480\n /** @ignore */\n static parseGMTOffset(specifier) {\n if (specifier) {\n const match = specifier.match(/^Etc\\/GMT([+-]\\d{1,2})$/i);\n if (match) {\n return -60 * parseInt(match[1]);\n }\n }\n return null;\n }\n\n constructor(name) {\n super();\n /** @private **/\n this.zoneName = name;\n /** @private **/\n this.valid = IANAZone.isValidZone(name);\n }\n\n /** @override **/\n get type() {\n return \"iana\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get universal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale, this.name);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n const date = new Date(ts),\n dtf = makeDTF(this.name),\n [year, month, day, hour, minute, second] = dtf.formatToParts\n ? partsOffset(dtf, date)\n : hackyOffset(dtf, date),\n // work around https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n adjustedHour = hour === 24 ? 0 : hour;\n\n const asUTC = objToLocalTS({\n year,\n month,\n day,\n hour: adjustedHour,\n minute,\n second,\n millisecond: 0\n });\n\n let asTS = +date;\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / (60 * 1000);\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n }\n\n /** @override **/\n get isValid() {\n return this.valid;\n }\n}\n","import { formatOffset, signedOffset } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nexport default class FixedOffsetZone extends Zone {\n /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */\n static get utcInstance() {\n if (singleton === null) {\n singleton = new FixedOffsetZone(0);\n }\n return singleton;\n }\n\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */\n static instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n }\n\n /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */\n static parseSpecifier(s) {\n if (s) {\n const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) {\n return new FixedOffsetZone(signedOffset(r[1], r[2]));\n }\n }\n return null;\n }\n\n constructor(offset) {\n super();\n /** @private **/\n this.fixed = offset;\n }\n\n /** @override **/\n get type() {\n return \"fixed\";\n }\n\n /** @override **/\n get name() {\n return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n }\n\n /** @override **/\n offsetName() {\n return this.name;\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.fixed, format);\n }\n\n /** @override **/\n get universal() {\n return true;\n }\n\n /** @override **/\n offset() {\n return this.fixed;\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import Zone from \"../zone.js\";\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nexport default class InvalidZone extends Zone {\n constructor(zoneName) {\n super();\n /** @private */\n this.zoneName = zoneName;\n }\n\n /** @override **/\n get type() {\n return \"invalid\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get universal() {\n return false;\n }\n\n /** @override **/\n offsetName() {\n return null;\n }\n\n /** @override **/\n formatOffset() {\n return \"\";\n }\n\n /** @override **/\n offset() {\n return NaN;\n }\n\n /** @override **/\n equals() {\n return false;\n }\n\n /** @override **/\n get isValid() {\n return false;\n }\n}\n","/**\n * @private\n */\n\nimport Zone from \"../zone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport InvalidZone from \"../zones/invalidZone.js\";\n\nimport { isUndefined, isString, isNumber } from \"./util.js\";\n\nexport function normalizeZone(input, defaultZone) {\n let offset;\n if (isUndefined(input) || input === null) {\n return defaultZone;\n } else if (input instanceof Zone) {\n return input;\n } else if (isString(input)) {\n const lowered = input.toLowerCase();\n if (lowered === \"local\") return defaultZone;\n else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;\n else if ((offset = IANAZone.parseGMTOffset(input)) != null) {\n // handle Etc/GMT-4, which V8 chokes on\n return FixedOffsetZone.instance(offset);\n } else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input);\n else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input);\n } else if (isNumber(input)) {\n return FixedOffsetZone.instance(input);\n } else if (typeof input === \"object\" && input.offset && typeof input.offset === \"number\") {\n // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n } else {\n return new InvalidZone(input);\n }\n}\n","import LocalZone from \"./zones/localZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport Locale from \"./impl/locale.js\";\n\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nlet now = () => Date.now(),\n defaultZone = null, // not setting this directly to LocalZone.instance bc loading order issues\n defaultLocale = null,\n defaultNumberingSystem = null,\n defaultOutputCalendar = null,\n throwOnInvalid = false;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nexport default class Settings {\n /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */\n static get now() {\n return now;\n }\n\n /**\n * Set the callback for returning the current timestamp.\n * The function should return a number, which will be interpreted as an Epoch millisecond count\n * @type {function}\n * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n */\n static set now(n) {\n now = n;\n }\n\n /**\n * Get the default time zone to create DateTimes in.\n * @type {string}\n */\n static get defaultZoneName() {\n return Settings.defaultZone.name;\n }\n\n /**\n * Set the default time zone to create DateTimes in. Does not affect existing instances.\n * @type {string}\n */\n static set defaultZoneName(z) {\n if (!z) {\n defaultZone = null;\n } else {\n defaultZone = normalizeZone(z);\n }\n }\n\n /**\n * Get the default time zone object to create DateTimes in. Does not affect existing instances.\n * @type {Zone}\n */\n static get defaultZone() {\n return defaultZone || LocalZone.instance;\n }\n\n /**\n * Get the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultLocale() {\n return defaultLocale;\n }\n\n /**\n * Set the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultLocale(locale) {\n defaultLocale = locale;\n }\n\n /**\n * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultNumberingSystem() {\n return defaultNumberingSystem;\n }\n\n /**\n * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultNumberingSystem(numberingSystem) {\n defaultNumberingSystem = numberingSystem;\n }\n\n /**\n * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultOutputCalendar() {\n return defaultOutputCalendar;\n }\n\n /**\n * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultOutputCalendar(outputCalendar) {\n defaultOutputCalendar = outputCalendar;\n }\n\n /**\n * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static get throwOnInvalid() {\n return throwOnInvalid;\n }\n\n /**\n * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static set throwOnInvalid(t) {\n throwOnInvalid = t;\n }\n\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCaches() {\n Locale.resetCache();\n IANAZone.resetCache();\n }\n}\n","import { hasFormatToParts, hasIntl, padStart, roundTo, hasRelative } from \"./util.js\";\nimport * as English from \"./english.js\";\nimport Settings from \"../settings.js\";\nimport DateTime from \"../datetime.js\";\nimport Formatter from \"./formatter.js\";\n\nlet intlDTCache = {};\nfunction getCachedDTF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlDTCache[key];\n if (!dtf) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n intlDTCache[key] = dtf;\n }\n return dtf;\n}\n\nlet intlNumCache = {};\nfunction getCachedINF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let inf = intlNumCache[key];\n if (!inf) {\n inf = new Intl.NumberFormat(locString, opts);\n intlNumCache[key] = inf;\n }\n return inf;\n}\n\nlet intlRelCache = {};\nfunction getCachedRTF(locString, opts = {}) {\n const { base, ...cacheKeyOpts } = opts; // exclude `base` from the options\n const key = JSON.stringify([locString, cacheKeyOpts]);\n let inf = intlRelCache[key];\n if (!inf) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n intlRelCache[key] = inf;\n }\n return inf;\n}\n\nlet sysLocaleCache = null;\nfunction systemLocale() {\n if (sysLocaleCache) {\n return sysLocaleCache;\n } else if (hasIntl()) {\n const computedSys = new Intl.DateTimeFormat().resolvedOptions().locale;\n // node sometimes defaults to \"und\". Override that because that is dumb\n sysLocaleCache = !computedSys || computedSys === \"und\" ? \"en-US\" : computedSys;\n return sysLocaleCache;\n } else {\n sysLocaleCache = \"en-US\";\n return sysLocaleCache;\n }\n}\n\nfunction parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n\n const uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) {\n return [localeStr];\n } else {\n let options;\n const smaller = localeStr.substring(0, uIndex);\n try {\n options = getCachedDTF(localeStr).resolvedOptions();\n } catch (e) {\n options = getCachedDTF(smaller).resolvedOptions();\n }\n\n const { numberingSystem, calendar } = options;\n // return the smaller one so that we can append the calendar and numbering overrides to it\n return [smaller, numberingSystem, calendar];\n }\n}\n\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (hasIntl()) {\n if (outputCalendar || numberingSystem) {\n localeStr += \"-u\";\n\n if (outputCalendar) {\n localeStr += `-ca-${outputCalendar}`;\n }\n\n if (numberingSystem) {\n localeStr += `-nu-${numberingSystem}`;\n }\n return localeStr;\n } else {\n return localeStr;\n }\n } else {\n return [];\n }\n}\n\nfunction mapMonths(f) {\n const ms = [];\n for (let i = 1; i <= 12; i++) {\n const dt = DateTime.utc(2016, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction mapWeekdays(f) {\n const ms = [];\n for (let i = 1; i <= 7; i++) {\n const dt = DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction listStuff(loc, length, defaultOK, englishFn, intlFn) {\n const mode = loc.listingMode(defaultOK);\n\n if (mode === \"error\") {\n return null;\n } else if (mode === \"en\") {\n return englishFn(length);\n } else {\n return intlFn(length);\n }\n}\n\nfunction supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n return false;\n } else {\n return (\n loc.numberingSystem === \"latn\" ||\n !loc.locale ||\n loc.locale.startsWith(\"en\") ||\n (hasIntl() && new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === \"latn\")\n );\n }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n constructor(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n\n if (!forceSimple && hasIntl()) {\n const intlOpts = { useGrouping: false };\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = getCachedINF(intl, intlOpts);\n }\n }\n\n format(i) {\n if (this.inf) {\n const fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n return padStart(fixed, this.padTo);\n }\n }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n constructor(dt, intl, opts) {\n this.opts = opts;\n this.hasIntl = hasIntl();\n\n let z;\n if (dt.zone.universal && this.hasIntl) {\n // Chromium doesn't support fixed-offset zones like Etc/GMT+8 in its formatter,\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=364374.\n // So we have to make do. Two cases:\n // 1. The format options tell us to show the zone. We can't do that, so the best\n // we can do is format the date in UTC.\n // 2. The format options don't tell us to show the zone. Then we can adjust them\n // the time and tell the formatter to show it to us in UTC, so that the time is right\n // and the bad zone doesn't show up.\n // We can clean all this up when Chrome fixes this.\n z = \"UTC\";\n if (opts.timeZoneName) {\n this.dt = dt;\n } else {\n this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1000);\n }\n } else if (dt.zone.type === \"local\") {\n this.dt = dt;\n } else {\n this.dt = dt;\n z = dt.zone.name;\n }\n\n if (this.hasIntl) {\n const intlOpts = Object.assign({}, this.opts);\n if (z) {\n intlOpts.timeZone = z;\n }\n this.dtf = getCachedDTF(intl, intlOpts);\n }\n }\n\n format() {\n if (this.hasIntl) {\n return this.dtf.format(this.dt.toJSDate());\n } else {\n const tokenFormat = English.formatString(this.opts),\n loc = Locale.create(\"en-US\");\n return Formatter.create(loc).formatDateTimeFromString(this.dt, tokenFormat);\n }\n }\n\n formatToParts() {\n if (this.hasIntl && hasFormatToParts()) {\n return this.dtf.formatToParts(this.dt.toJSDate());\n } else {\n // This is kind of a cop out. We actually could do this for English. However, we couldn't do it for intl strings\n // and IMO it's too weird to have an uncanny valley like that\n return [];\n }\n }\n\n resolvedOptions() {\n if (this.hasIntl) {\n return this.dtf.resolvedOptions();\n } else {\n return {\n locale: \"en-US\",\n numberingSystem: \"latn\",\n outputCalendar: \"gregory\"\n };\n }\n }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n constructor(intl, isEnglish, opts) {\n this.opts = Object.assign({ style: \"long\" }, opts);\n if (!isEnglish && hasRelative()) {\n this.rtf = getCachedRTF(intl, opts);\n }\n }\n\n format(count, unit) {\n if (this.rtf) {\n return this.rtf.format(count, unit);\n } else {\n return English.formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n }\n }\n\n formatToParts(count, unit) {\n if (this.rtf) {\n return this.rtf.formatToParts(count, unit);\n } else {\n return [];\n }\n }\n}\n\n/**\n * @private\n */\n\nexport default class Locale {\n static fromOpts(opts) {\n return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN);\n }\n\n static create(locale, numberingSystem, outputCalendar, defaultToEN = false) {\n const specifiedLocale = locale || Settings.defaultLocale,\n // the system locale is useful for human readable strings but annoying for parsing/formatting known formats\n localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale()),\n numberingSystemR = numberingSystem || Settings.defaultNumberingSystem,\n outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale);\n }\n\n static resetCache() {\n sysLocaleCache = null;\n intlDTCache = {};\n intlNumCache = {};\n intlRelCache = {};\n }\n\n static fromObject({ locale, numberingSystem, outputCalendar } = {}) {\n return Locale.create(locale, numberingSystem, outputCalendar);\n }\n\n constructor(locale, numbering, outputCalendar, specifiedLocale) {\n const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n\n this.weekdaysCache = { format: {}, standalone: {} };\n this.monthsCache = { format: {}, standalone: {} };\n this.meridiemCache = null;\n this.eraCache = {};\n\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n\n get fastNumbers() {\n if (this.fastNumbersCached == null) {\n this.fastNumbersCached = supportsFastNumbers(this);\n }\n\n return this.fastNumbersCached;\n }\n\n listingMode(defaultOK = true) {\n const intl = hasIntl(),\n hasFTP = intl && hasFormatToParts(),\n isActuallyEn = this.isEnglish(),\n hasNoWeirdness =\n (this.numberingSystem === null || this.numberingSystem === \"latn\") &&\n (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n\n if (!hasFTP && !(isActuallyEn && hasNoWeirdness) && !defaultOK) {\n return \"error\";\n } else if (!hasFTP || (isActuallyEn && hasNoWeirdness)) {\n return \"en\";\n } else {\n return \"intl\";\n }\n }\n\n clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n return this;\n } else {\n return Locale.create(\n alts.locale || this.specifiedLocale,\n alts.numberingSystem || this.numberingSystem,\n alts.outputCalendar || this.outputCalendar,\n alts.defaultToEN || false\n );\n }\n }\n\n redefaultToEN(alts = {}) {\n return this.clone(Object.assign({}, alts, { defaultToEN: true }));\n }\n\n redefaultToSystem(alts = {}) {\n return this.clone(Object.assign({}, alts, { defaultToEN: false }));\n }\n\n months(length, format = false, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.months, () => {\n const intl = format ? { month: length, day: \"numeric\" } : { month: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.monthsCache[formatStr][length]) {\n this.monthsCache[formatStr][length] = mapMonths(dt => this.extract(dt, intl, \"month\"));\n }\n return this.monthsCache[formatStr][length];\n });\n }\n\n weekdays(length, format = false, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.weekdays, () => {\n const intl = format\n ? { weekday: length, year: \"numeric\", month: \"long\", day: \"numeric\" }\n : { weekday: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.weekdaysCache[formatStr][length]) {\n this.weekdaysCache[formatStr][length] = mapWeekdays(dt =>\n this.extract(dt, intl, \"weekday\")\n );\n }\n return this.weekdaysCache[formatStr][length];\n });\n }\n\n meridiems(defaultOK = true) {\n return listStuff(\n this,\n undefined,\n defaultOK,\n () => English.meridiems,\n () => {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!this.meridiemCache) {\n const intl = { hour: \"numeric\", hour12: true };\n this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(\n dt => this.extract(dt, intl, \"dayperiod\")\n );\n }\n\n return this.meridiemCache;\n }\n );\n }\n\n eras(length, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.eras, () => {\n const intl = { era: length };\n\n // This is utter bullshit. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!this.eraCache[length]) {\n this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(dt =>\n this.extract(dt, intl, \"era\")\n );\n }\n\n return this.eraCache[length];\n });\n }\n\n extract(dt, intlOpts, field) {\n const df = this.dtFormatter(dt, intlOpts),\n results = df.formatToParts(),\n matching = results.find(m => m.type.toLowerCase() === field);\n return matching ? matching.value : null;\n }\n\n numberFormatter(opts = {}) {\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n }\n\n dtFormatter(dt, intlOpts = {}) {\n return new PolyDateFormatter(dt, this.intl, intlOpts);\n }\n\n relFormatter(opts = {}) {\n return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n }\n\n isEnglish() {\n return (\n this.locale === \"en\" ||\n this.locale.toLowerCase() === \"en-us\" ||\n (hasIntl() && new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith(\"en-us\"))\n );\n }\n\n equals(other) {\n return (\n this.locale === other.locale &&\n this.numberingSystem === other.numberingSystem &&\n this.outputCalendar === other.outputCalendar\n );\n }\n}\n","import {\n untruncateYear,\n signedOffset,\n parseInteger,\n parseMillis,\n ianaRegex,\n isUndefined\n} from \"./util.js\";\nimport * as English from \"./english.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nfunction combineRegexes(...regexes) {\n const full = regexes.reduce((f, r) => f + r.source, \"\");\n return RegExp(`^${full}$`);\n}\n\nfunction combineExtractors(...extractors) {\n return m =>\n extractors\n .reduce(\n ([mergedVals, mergedZone, cursor], ex) => {\n const [val, zone, next] = ex(m, cursor);\n return [Object.assign(mergedVals, val), mergedZone || zone, next];\n },\n [{}, null, 1]\n )\n .slice(0, 2);\n}\n\nfunction parse(s, ...patterns) {\n if (s == null) {\n return [null, null];\n }\n\n for (const [regex, extractor] of patterns) {\n const m = regex.exec(s);\n if (m) {\n return extractor(m);\n }\n }\n return [null, null];\n}\n\nfunction simpleParse(...keys) {\n return (match, cursor) => {\n const ret = {};\n let i;\n\n for (i = 0; i < keys.length; i++) {\n ret[keys[i]] = parseInteger(match[cursor + i]);\n }\n return [ret, null, cursor + i];\n };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:(Z)|([+-]\\d\\d)(?::?(\\d\\d))?)/,\n isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/,\n isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${offsetRegex.source}?`),\n isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`),\n isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/,\n isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/,\n isoOrdinalRegex = /(\\d{4})-?(\\d{3})/,\n extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\"),\n extractISOOrdinalData = simpleParse(\"year\", \"ordinal\"),\n sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/, // dumbed-down version of the ISO one\n sqlTimeRegex = RegExp(\n `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`\n ),\n sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\n\nfunction int(match, pos, fallback) {\n const m = match[pos];\n return isUndefined(m) ? fallback : parseInteger(m);\n}\n\nfunction extractISOYmd(match, cursor) {\n const item = {\n year: int(match, cursor),\n month: int(match, cursor + 1, 1),\n day: int(match, cursor + 2, 1)\n };\n\n return [item, null, cursor + 3];\n}\n\nfunction extractISOTime(match, cursor) {\n const item = {\n hour: int(match, cursor, 0),\n minute: int(match, cursor + 1, 0),\n second: int(match, cursor + 2, 0),\n millisecond: parseMillis(match[cursor + 3])\n };\n\n return [item, null, cursor + 4];\n}\n\nfunction extractISOOffset(match, cursor) {\n const local = !match[cursor] && !match[cursor + 1],\n fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n zone = local ? null : FixedOffsetZone.instance(fullOffset);\n return [{}, zone, cursor + 3];\n}\n\nfunction extractIANAZone(match, cursor) {\n const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n return [{}, zone, cursor + 1];\n}\n\n// ISO duration parsing\n\nconst isoDuration = /^-?P(?:(?:(-?\\d{1,9})Y)?(?:(-?\\d{1,9})M)?(?:(-?\\d{1,9})W)?(?:(-?\\d{1,9})D)?(?:T(?:(-?\\d{1,9})H)?(?:(-?\\d{1,9})M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,9}))?S)?)?)$/;\n\nfunction extractISODuration(match) {\n const [\n s,\n yearStr,\n monthStr,\n weekStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr,\n millisecondsStr\n ] = match;\n\n const hasNegativePrefix = s[0] === \"-\";\n\n const maybeNegate = num => (num && hasNegativePrefix ? -num : num);\n\n return [\n {\n years: maybeNegate(parseInteger(yearStr)),\n months: maybeNegate(parseInteger(monthStr)),\n weeks: maybeNegate(parseInteger(weekStr)),\n days: maybeNegate(parseInteger(dayStr)),\n hours: maybeNegate(parseInteger(hourStr)),\n minutes: maybeNegate(parseInteger(minuteStr)),\n seconds: maybeNegate(parseInteger(secondStr)),\n milliseconds: maybeNegate(parseMillis(millisecondsStr))\n }\n ];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n};\n\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n const result = {\n year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n month: English.monthsShort.indexOf(monthStr) + 1,\n day: parseInteger(dayStr),\n hour: parseInteger(hourStr),\n minute: parseInteger(minuteStr)\n };\n\n if (secondStr) result.second = parseInteger(secondStr);\n if (weekdayStr) {\n result.weekday =\n weekdayStr.length > 3\n ? English.weekdaysLong.indexOf(weekdayStr) + 1\n : English.weekdaysShort.indexOf(weekdayStr) + 1;\n }\n\n return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\n\nfunction extractRFC2822(match) {\n const [\n ,\n weekdayStr,\n dayStr,\n monthStr,\n yearStr,\n hourStr,\n minuteStr,\n secondStr,\n obsOffset,\n milOffset,\n offHourStr,\n offMinuteStr\n ] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n\n let offset;\n if (obsOffset) {\n offset = obsOffsets[obsOffset];\n } else if (milOffset) {\n offset = 0;\n } else {\n offset = signedOffset(offHourStr, offMinuteStr);\n }\n\n return [result, new FixedOffsetZone(offset)];\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^)]*\\)|[\\n\\t]/g, \" \")\n .replace(/(\\s\\s+)/g, \" \")\n .trim();\n}\n\n// http date\n\nconst rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n rfc850 = /^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\n\nfunction extractRFC1123Or850(match) {\n const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nfunction extractASCII(match) {\n const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\n\nconst extractISOYmdTimeAndOffset = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset\n);\nconst extractISOWeekTimeAndOffset = combineExtractors(\n extractISOWeekData,\n extractISOTime,\n extractISOOffset\n);\nconst extractISOOrdinalDataAndTime = combineExtractors(extractISOOrdinalData, extractISOTime);\nconst extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset);\n\n/**\n * @private\n */\n\nexport function parseISODate(s) {\n return parse(\n s,\n [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],\n [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDataAndTime],\n [isoTimeCombinedRegex, extractISOTimeAndOffset]\n );\n}\n\nexport function parseRFC2822Date(s) {\n return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\n\nexport function parseHTTPDate(s) {\n return parse(\n s,\n [rfc1123, extractRFC1123Or850],\n [rfc850, extractRFC1123Or850],\n [ascii, extractASCII]\n );\n}\n\nexport function parseISODuration(s) {\n return parse(s, [isoDuration, extractISODuration]);\n}\n\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\n\nconst extractISOYmdTimeOffsetAndIANAZone = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\nexport function parseSQL(s) {\n return parse(\n s,\n [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeOffsetAndIANAZone],\n [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]\n );\n}\n","import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from \"./errors.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Locale from \"./impl/locale.js\";\nimport { parseISODuration } from \"./impl/regexParser.js\";\nimport {\n asNumber,\n hasOwnProperty,\n isNumber,\n isUndefined,\n normalizeObject,\n roundTo\n} from \"./impl/util.js\";\nimport Settings from \"./settings.js\";\n\nconst INVALID = \"Invalid Duration\";\n\n// unit conversion constants\nconst lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 7 * 24,\n minutes: 7 * 24 * 60,\n seconds: 7 * 24 * 60 * 60,\n milliseconds: 7 * 24 * 60 * 60 * 1000\n },\n days: {\n hours: 24,\n minutes: 24 * 60,\n seconds: 24 * 60 * 60,\n milliseconds: 24 * 60 * 60 * 1000\n },\n hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1000 },\n minutes: { seconds: 60, milliseconds: 60 * 1000 },\n seconds: { milliseconds: 1000 }\n },\n casualMatrix = Object.assign(\n {\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 365 * 24,\n minutes: 365 * 24 * 60,\n seconds: 365 * 24 * 60 * 60,\n milliseconds: 365 * 24 * 60 * 60 * 1000\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 91 * 24,\n minutes: 91 * 24 * 60,\n seconds: 91 * 24 * 60 * 60,\n milliseconds: 91 * 24 * 60 * 60 * 1000\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 30 * 24,\n minutes: 30 * 24 * 60,\n seconds: 30 * 24 * 60 * 60,\n milliseconds: 30 * 24 * 60 * 60 * 1000\n }\n },\n lowOrderMatrix\n ),\n daysInYearAccurate = 146097.0 / 400,\n daysInMonthAccurate = 146097.0 / 4800,\n accurateMatrix = Object.assign(\n {\n years: {\n quarters: 4,\n months: 12,\n weeks: daysInYearAccurate / 7,\n days: daysInYearAccurate,\n hours: daysInYearAccurate * 24,\n minutes: daysInYearAccurate * 24 * 60,\n seconds: daysInYearAccurate * 24 * 60 * 60,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000\n },\n quarters: {\n months: 3,\n weeks: daysInYearAccurate / 28,\n days: daysInYearAccurate / 4,\n hours: (daysInYearAccurate * 24) / 4,\n minutes: (daysInYearAccurate * 24 * 60) / 4,\n seconds: (daysInYearAccurate * 24 * 60 * 60) / 4,\n milliseconds: (daysInYearAccurate * 24 * 60 * 60 * 1000) / 4\n },\n months: {\n weeks: daysInMonthAccurate / 7,\n days: daysInMonthAccurate,\n hours: daysInMonthAccurate * 24,\n minutes: daysInMonthAccurate * 24 * 60,\n seconds: daysInMonthAccurate * 24 * 60 * 60,\n milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000\n }\n },\n lowOrderMatrix\n );\n\n// units ordered by size\nconst orderedUnits = [\n \"years\",\n \"quarters\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\"\n];\n\nconst reverseUnits = orderedUnits.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone(dur, alts, clear = false) {\n // deep merge for vals\n const conf = {\n values: clear ? alts.values : Object.assign({}, dur.values, alts.values || {}),\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy\n };\n return new Duration(conf);\n}\n\nfunction antiTrunc(n) {\n return n < 0 ? Math.floor(n) : Math.ceil(n);\n}\n\n// NB: mutates parameters\nfunction convert(matrix, fromMap, fromUnit, toMap, toUnit) {\n const conv = matrix[toUnit][fromUnit],\n raw = fromMap[fromUnit] / conv,\n sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]),\n // ok, so this is wild, but see the matrix in the tests\n added =\n !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw);\n toMap[toUnit] += added;\n fromMap[fromUnit] -= added * conv;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n reverseUnits.reduce((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n convert(matrix, vals, previous, vals, current);\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime.plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration.years}, {@link Duration.months}, {@link Duration.weeks}, {@link Duration.days}, {@link Duration.hours}, {@link Duration.minutes}, {@link Duration.seconds}, {@link Duration.milliseconds} accessors.\n * * **Configuration** See {@link Duration.locale} and {@link Duration.numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration.plus}, {@link Duration.minus}, {@link Duration.normalize}, {@link Duration.set}, {@link Duration.reconfigure}, {@link Duration.shiftTo}, and {@link Duration.negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration.as}, {@link Duration.toISO}, {@link Duration.toFormat}, and {@link Duration.toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nexport default class Duration {\n /**\n * @private\n */\n constructor(config) {\n const accurate = config.conversionAccuracy === \"longterm\" || false;\n /**\n * @access private\n */\n this.values = config.values;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.matrix = accurate ? accurateMatrix : casualMatrix;\n /**\n * @access private\n */\n this.isLuxonDuration = true;\n }\n\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromMillis(count, opts) {\n return Duration.fromObject(Object.assign({ milliseconds: count }, opts));\n }\n\n /**\n * Create a Duration from a Javascript object with keys like 'years' and 'hours.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {string} [obj.locale='en-US'] - the locale to use\n * @param {string} obj.numberingSystem - the numbering system to use\n * @param {string} [obj.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromObject(obj) {\n if (obj == null || typeof obj !== \"object\") {\n throw new InvalidArgumentError(\n `Duration.fromObject: argument expected to be an object, got ${\n obj === null ? \"null\" : typeof obj\n }`\n );\n }\n return new Duration({\n values: normalizeObject(obj, Duration.normalizeUnit, [\n \"locale\",\n \"numberingSystem\",\n \"conversionAccuracy\",\n \"zone\" // a bit of debt; it's super inconvenient internally not to be able to blindly pass this\n ]),\n loc: Locale.fromObject(obj),\n conversionAccuracy: obj.conversionAccuracy\n });\n }\n\n /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */\n static fromISO(text, opts) {\n const [parsed] = parseISODuration(text);\n if (parsed) {\n const obj = Object.assign(parsed, opts);\n return Duration.fromObject(obj);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDurationError(invalid);\n } else {\n return new Duration({ invalid });\n }\n }\n\n /**\n * @private\n */\n static normalizeUnit(unit) {\n const normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\"\n }[unit ? unit.toLowerCase() : unit];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n }\n\n /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDuration(o) {\n return (o && o.isLuxonDuration) || false;\n }\n\n /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * The duration will be converted to the set of units in the format string using {@link Duration.shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n const fmtOpts = Object.assign({}, opts, {\n floor: opts.round !== false && opts.floor !== false\n });\n return this.isValid\n ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a Javascript object with this Duration's values.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = Object.assign({}, this.values);\n\n if (opts.includeConfig) {\n base.conversionAccuracy = this.conversionAccuracy;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */\n toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n\n let s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)\n s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0)\n // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */\n toString() {\n return this.toISO();\n }\n\n /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */\n valueOf() {\n return this.as(\"milliseconds\");\n }\n\n /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n plus(duration) {\n if (!this.isValid) return this;\n\n const dur = friendlyDuration(duration),\n result = {};\n\n for (const k of orderedUnits) {\n if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n result[k] = dur.get(k) + this.get(k);\n }\n }\n\n return clone(this, { values: result }, true);\n }\n\n /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n minus(duration) {\n if (!this.isValid) return this;\n\n const dur = friendlyDuration(duration);\n return this.plus(dur.negate());\n }\n\n /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit((x, u) => u === \"hour\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */\n mapUnits(fn) {\n if (!this.isValid) return this;\n const result = {};\n for (const k of Object.keys(this.values)) {\n result[k] = asNumber(fn(this.values[k], k));\n }\n return clone(this, { values: result }, true);\n }\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).years //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).months //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).days //=> 3\n * @return {number}\n */\n get(unit) {\n return this[Duration.normalizeUnit(unit)];\n }\n\n /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const mixed = Object.assign(this.values, normalizeObject(values, Duration.normalizeUnit, []));\n return clone(this, { values: mixed });\n }\n\n /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */\n reconfigure({ locale, numberingSystem, conversionAccuracy } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem }),\n opts = { loc };\n\n if (conversionAccuracy) {\n opts.conversionAccuracy = conversionAccuracy;\n }\n\n return clone(this, opts);\n }\n\n /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */\n as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n }\n\n /**\n * Reduce this Duration to its canonical representation in its current units.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @return {Duration}\n */\n normalize() {\n if (!this.isValid) return this;\n const vals = this.toObject();\n normalizeValues(this.matrix, vals);\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */\n shiftTo(...units) {\n if (!this.isValid) return this;\n\n if (units.length === 0) {\n return this;\n }\n\n units = units.map(u => Duration.normalizeUnit(u));\n\n const built = {},\n accumulated = {},\n vals = this.toObject();\n let lastUnit;\n\n for (const k of orderedUnits) {\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n\n let own = 0;\n\n // anything we haven't boiled down yet should get boiled to this unit\n for (const ak in accumulated) {\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n\n // plus anything that's already in this unit\n if (isNumber(vals[k])) {\n own += vals[k];\n }\n\n const i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = own - i; // we'd like to absorb these fractions in another unit\n\n // plus anything further down the chain that should be rolled up in to this\n for (const down in vals) {\n if (orderedUnits.indexOf(down) > orderedUnits.indexOf(k)) {\n convert(this.matrix, vals, down, built, k);\n }\n }\n // otherwise, keep it in the wings to boil it later\n } else if (isNumber(vals[k])) {\n accumulated[k] = vals[k];\n }\n }\n\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for (const key in accumulated) {\n if (accumulated[key] !== 0) {\n built[lastUnit] +=\n key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n }\n }\n\n return clone(this, { values: built }, true).normalize();\n }\n\n /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */\n negate() {\n if (!this.isValid) return this;\n const negated = {};\n for (const k of Object.keys(this.values)) {\n negated[k] = -this.values[k];\n }\n return clone(this, { values: negated }, true);\n }\n\n /**\n * Get the years.\n * @type {number}\n */\n get years() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n\n /**\n * Get the quarters.\n * @type {number}\n */\n get quarters() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n\n /**\n * Get the months.\n * @type {number}\n */\n get months() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n\n /**\n * Get the weeks\n * @type {number}\n */\n get weeks() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n\n /**\n * Get the days.\n * @type {number}\n */\n get days() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n\n /**\n * Get the hours.\n * @type {number}\n */\n get hours() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n\n /**\n * Get the minutes.\n * @type {number}\n */\n get minutes() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n\n /**\n * Get the seconds.\n * @return {number}\n */\n get seconds() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n\n /**\n * Get the milliseconds.\n * @return {number}\n */\n get milliseconds() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n\n /**\n * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n * on invalid DateTimes or Intervals.\n * @return {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this Duration became invalid, or null if the Duration is valid\n * @return {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n if (!this.loc.equals(other.loc)) {\n return false;\n }\n\n for (const u of orderedUnits) {\n if (this.values[u] !== other.values[u]) {\n return false;\n }\n }\n return true;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDuration(durationish) {\n if (isNumber(durationish)) {\n return Duration.fromMillis(durationish);\n } else if (Duration.isDuration(durationish)) {\n return durationish;\n } else if (typeof durationish === \"object\") {\n return Duration.fromObject(durationish);\n } else {\n throw new InvalidArgumentError(\n `Unknown duration argument ${durationish} of type ${typeof durationish}`\n );\n }\n}\n","import DateTime, { friendlyDateTime } from \"./datetime.js\";\nimport Duration, { friendlyDuration } from \"./duration.js\";\nimport Settings from \"./settings.js\";\nimport { InvalidArgumentError, InvalidIntervalError } from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\n \"end before start\",\n `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`\n );\n } else {\n return null;\n }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link fromDateTimes}, {@link after}, {@link before}, or {@link fromISO}.\n * * **Accessors** Use {@link start} and {@link end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link count}, {@link length}, {@link hasSame}, {@link contains}, {@link isAfter}, or {@link isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link set}, {@link splitAt}, {@link splitBy}, {@link divideEqually}, {@link merge}, {@link xor}, {@link union}, {@link intersection}, or {@link difference}.\n * * **Comparison** To compare this Interval to another one, use {@link equals}, {@link overlaps}, {@link abutsStart}, {@link abutsEnd}, {@link engulfs}.\n * * **Output** To convert the Interval into other representations, see {@link toString}, {@link toISO}, {@link toISODate}, {@link toISOTime}, {@link toFormat}, and {@link toDuration}.\n */\nexport default class Interval {\n /**\n * @private\n */\n constructor(config) {\n /**\n * @access private\n */\n this.s = config.start;\n /**\n * @access private\n */\n this.e = config.end;\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.isLuxonInterval = true;\n }\n\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidIntervalError(invalid);\n } else {\n return new Interval({ invalid });\n }\n }\n\n /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */\n static fromDateTimes(start, end) {\n const builtStart = friendlyDateTime(start),\n builtEnd = friendlyDateTime(end);\n\n const validateError = validateStartEnd(builtStart, builtEnd);\n\n if (validateError == null) {\n return new Interval({\n start: builtStart,\n end: builtEnd\n });\n } else {\n return validateError;\n }\n }\n\n /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static after(start, duration) {\n const dur = friendlyDuration(duration),\n dt = friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n }\n\n /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static before(end, duration) {\n const dur = friendlyDuration(duration),\n dt = friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n }\n\n /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `/`, `/`, and `/` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime.fromISO} and optionally {@link Duration.fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */\n static fromISO(text, opts) {\n const [s, e] = (text || \"\").split(\"/\", 2);\n if (s && e) {\n let start, startIsValid;\n try {\n start = DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n\n let end, endIsValid;\n try {\n end = DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n\n if (startIsValid && endIsValid) {\n return Interval.fromDateTimes(start, end);\n }\n\n if (startIsValid) {\n const dur = Duration.fromISO(e, opts);\n if (dur.isValid) {\n return Interval.after(start, dur);\n }\n } else if (endIsValid) {\n const dur = Duration.fromISO(s, opts);\n if (dur.isValid) {\n return Interval.before(end, dur);\n }\n }\n }\n return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n\n /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isInterval(o) {\n return (o && o.isLuxonInterval) || false;\n }\n\n /**\n * Returns the start of the Interval\n * @type {DateTime}\n */\n get start() {\n return this.isValid ? this.s : null;\n }\n\n /**\n * Returns the end of the Interval\n * @type {DateTime}\n */\n get end() {\n return this.isValid ? this.e : null;\n }\n\n /**\n * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n * @type {boolean}\n */\n get isValid() {\n return this.invalidReason === null;\n }\n\n /**\n * Returns an error code if this Interval is invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */\n length(unit = \"milliseconds\") {\n return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n }\n\n /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @return {number}\n */\n count(unit = \"milliseconds\") {\n if (!this.isValid) return NaN;\n const start = this.start.startOf(unit),\n end = this.end.startOf(unit);\n return Math.floor(end.diff(start, unit).get(unit)) + 1;\n }\n\n /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */\n hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n }\n\n /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */\n isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n }\n\n /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n }\n\n /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n }\n\n /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n }\n\n /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */\n set({ start, end } = {}) {\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n }\n\n /**\n * Split this Interval at each of the specified DateTimes\n * @param {...[DateTime]} dateTimes - the unit of time to count.\n * @return {[Interval]}\n */\n splitAt(...dateTimes) {\n if (!this.isValid) return [];\n const sorted = dateTimes\n .map(friendlyDateTime)\n .filter(d => this.contains(d))\n .sort(),\n results = [];\n let { s } = this,\n i = 0;\n\n while (s < this.e) {\n const added = sorted[i] || this.e,\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {[Interval]}\n */\n splitBy(duration) {\n const dur = friendlyDuration(duration);\n\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n return [];\n }\n\n let { s } = this,\n added,\n next;\n\n const results = [];\n while (s < this.e) {\n added = s.plus(dur);\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {[Interval]}\n */\n divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n }\n\n /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */\n overlaps(other) {\n return this.e > other.s && this.s < other.e;\n }\n\n /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n }\n\n /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n }\n\n /**\n * Return whether this Interval engulfs the start and end of the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n }\n\n /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n return this.s.equals(other.s) && this.e.equals(other.e);\n }\n\n /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */\n intersection(other) {\n if (!this.isValid) return this;\n const s = this.s > other.s ? this.s : other.s,\n e = this.e < other.e ? this.e : other.e;\n\n if (s > e) {\n return null;\n } else {\n return Interval.fromDateTimes(s, e);\n }\n }\n\n /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */\n union(other) {\n if (!this.isValid) return this;\n const s = this.s < other.s ? this.s : other.s,\n e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n }\n\n /**\n * Merge an array of Intervals into a equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * @param {[Interval]} intervals\n * @return {[Interval]}\n */\n static merge(intervals) {\n const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(\n ([sofar, current], item) => {\n if (!current) {\n return [sofar, item];\n } else if (current.overlaps(item) || current.abutsStart(item)) {\n return [sofar, current.union(item)];\n } else {\n return [sofar.concat([current]), item];\n }\n },\n [[], null]\n );\n if (final) {\n found.push(final);\n }\n return found;\n }\n\n /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {[Interval]} intervals\n * @return {[Interval]}\n */\n static xor(intervals) {\n let start = null,\n currentCount = 0;\n const results = [],\n ends = intervals.map(i => [{ time: i.s, type: \"s\" }, { time: i.e, type: \"e\" }]),\n flattened = Array.prototype.concat(...ends),\n arr = flattened.sort((a, b) => a.time - b.time);\n\n for (const i of arr) {\n currentCount += i.type === \"s\" ? 1 : -1;\n\n if (currentCount === 1) {\n start = i.time;\n } else {\n if (start && +start !== +i.time) {\n results.push(Interval.fromDateTimes(start, i.time));\n }\n\n start = null;\n }\n }\n\n return Interval.merge(results);\n }\n\n /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {[Interval]}\n */\n difference(...intervals) {\n return Interval.xor([this].concat(intervals))\n .map(i => this.intersection(i))\n .filter(i => i && !i.isEmpty());\n }\n\n /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */\n toString() {\n if (!this.isValid) return INVALID;\n return `[${this.s.toISO()} – ${this.e.toISO()})`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime.toISO}\n * @return {string}\n */\n toISO(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */\n toISODate() {\n if (!this.isValid) return INVALID;\n return `${this.s.toISODate()}/${this.e.toISODate()}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime.toISO}\n * @return {string}\n */\n toISOTime(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this Interval formatted according to the specified format string.\n * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime.toFormat} for details.\n * @param {Object} opts - options\n * @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations\n * @return {string}\n */\n toFormat(dateFormat, { separator = \" – \" } = {}) {\n if (!this.isValid) return INVALID;\n return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n }\n\n /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */\n toDuration(unit, opts) {\n if (!this.isValid) {\n return Duration.invalid(this.invalidReason);\n }\n return this.e.diff(this.s, unit, opts);\n }\n\n /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */\n mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n }\n}\n","import DateTime from \"./datetime.js\";\nimport Settings from \"./settings.js\";\nimport Locale from \"./impl/locale.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nimport { hasFormatToParts, hasIntl, hasRelative } from \"./impl/util.js\";\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nexport default class Info {\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */\n static hasDST(zone = Settings.defaultZone) {\n const proto = DateTime.local()\n .setZone(zone)\n .set({ month: 12 });\n\n return !zone.universal && proto.offset !== proto.set({ month: 6 }).offset;\n }\n\n /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */\n static isValidIANAZone(zone) {\n return IANAZone.isValidSpecifier(zone) && IANAZone.isValidZone(zone);\n }\n\n /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone.isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */\n static normalizeZone(input) {\n return normalizeZone(input, Settings.defaultZone);\n }\n\n /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {[string]}\n */\n static months(\n length = \"long\",\n { locale = null, numberingSystem = null, outputCalendar = \"gregory\" } = {}\n ) {\n return Locale.create(locale, numberingSystem, outputCalendar).months(length);\n }\n\n /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {[string]}\n */\n static monthsFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, outputCalendar = \"gregory\" } = {}\n ) {\n return Locale.create(locale, numberingSystem, outputCalendar).months(length, true);\n }\n\n /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {[string]}\n */\n static weekdays(length = \"long\", { locale = null, numberingSystem = null } = {}) {\n return Locale.create(locale, numberingSystem, null).weekdays(length);\n }\n\n /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link weekdays}\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @return {[string]}\n */\n static weekdaysFormat(length = \"long\", { locale = null, numberingSystem = null } = {}) {\n return Locale.create(locale, numberingSystem, null).weekdays(length, true);\n }\n\n /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {[string]}\n */\n static meridiems({ locale = null } = {}) {\n return Locale.create(locale).meridiems();\n }\n\n /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {[string]}\n */\n static eras(length = \"short\", { locale = null } = {}) {\n return Locale.create(locale, null, \"gregory\").eras(length);\n }\n\n /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, timezone support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `zones`: whether this environment supports IANA timezones\n * * `intlTokens`: whether this environment supports internationalized token-based formatting/parsing\n * * `intl`: whether this environment supports general internationalization\n * * `relative`: whether this environment supports relative time formatting\n * @example Info.features() //=> { intl: true, intlTokens: false, zones: true, relative: false }\n * @return {Object}\n */\n static features() {\n let intl = false,\n intlTokens = false,\n zones = false,\n relative = false;\n\n if (hasIntl()) {\n intl = true;\n intlTokens = hasFormatToParts();\n relative = hasRelative();\n\n try {\n zones =\n new Intl.DateTimeFormat(\"en\", { timeZone: \"America/New_York\" }).resolvedOptions()\n .timeZone === \"America/New_York\";\n } catch (e) {\n zones = false;\n }\n }\n\n return { intl, intlTokens, zones, relative };\n }\n}\n","import Duration from \"../duration.js\";\n\nfunction dayDiff(earlier, later) {\n const utcDayStart = dt =>\n dt\n .toUTC(0, { keepLocalTime: true })\n .startOf(\"day\")\n .valueOf(),\n ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\n\nfunction highOrderDiffs(cursor, later, units) {\n const differs = [\n [\"years\", (a, b) => b.year - a.year],\n [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12],\n [\n \"weeks\",\n (a, b) => {\n const days = dayDiff(a, b);\n return (days - (days % 7)) / 7;\n }\n ],\n [\"days\", dayDiff]\n ];\n\n const results = {};\n let lowestOrder, highWater;\n\n for (const [unit, differ] of differs) {\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n\n let delta = differ(cursor, later);\n highWater = cursor.plus({ [unit]: delta });\n\n if (highWater > later) {\n cursor = cursor.plus({ [unit]: delta - 1 });\n delta -= 1;\n } else {\n cursor = highWater;\n }\n\n results[unit] = delta;\n }\n }\n\n return [cursor, results, highWater, lowestOrder];\n}\n\nexport default function(earlier, later, units, opts) {\n let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n\n const remainingMillis = later - cursor;\n\n const lowerOrderUnits = units.filter(\n u => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0\n );\n\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n highWater = cursor.plus({ [lowestOrder]: 1 });\n }\n\n if (highWater !== cursor) {\n results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n }\n\n const duration = Duration.fromObject(Object.assign(results, opts));\n\n if (lowerOrderUnits.length > 0) {\n return Duration.fromMillis(remainingMillis, opts)\n .shiftTo(...lowerOrderUnits)\n .plus(duration);\n } else {\n return duration;\n }\n}\n","const numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\"\n};\n\nconst numberingSystemsUTF16 = {\n arab: [1632, 1641],\n arabext: [1776, 1785],\n bali: [6992, 7001],\n beng: [2534, 2543],\n deva: [2406, 2415],\n fullwide: [65296, 65303],\n gujr: [2790, 2799],\n khmr: [6112, 6121],\n knda: [3302, 3311],\n laoo: [3792, 3801],\n limb: [6470, 6479],\n mlym: [3430, 3439],\n mong: [6160, 6169],\n mymr: [4160, 4169],\n orya: [2918, 2927],\n tamldec: [3046, 3055],\n telu: [3174, 3183],\n thai: [3664, 3673],\n tibt: [3872, 3881]\n};\n\n// eslint-disable-next-line\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\n\nexport function parseDigits(str) {\n let value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (str[i].search(numberingSystems.hanidec) !== -1) {\n value += hanidecChars.indexOf(str[i]);\n } else {\n for (const key in numberingSystemsUTF16) {\n const [min, max] = numberingSystemsUTF16[key];\n if (code >= min && code <= max) {\n value += code - min;\n }\n }\n }\n }\n return parseInt(value, 10);\n } else {\n return value;\n }\n}\n\nexport function digitRegex({ numberingSystem }, append = \"\") {\n return new RegExp(`${numberingSystems[numberingSystem || \"latn\"]}${append}`);\n}\n","import { parseMillis, isUndefined, untruncateYear, signedOffset, hasOwnProperty } from \"./util.js\";\nimport Formatter from \"./formatter.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport DateTime from \"../datetime.js\";\nimport { digitRegex, parseDigits } from \"./digits.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\n\nfunction intUnit(regex, post = i => i) {\n return { regex, deser: ([s]) => post(parseDigits(s)) };\n}\n\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `( |${NBSP})`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\n\nfunction fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\n\nfunction stripInsensitivities(s) {\n return s\n .replace(/\\./g, \"\") // ignore dots that were made optional\n .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\n\nfunction oneOf(strings, startIndex) {\n if (strings === null) {\n return null;\n } else {\n return {\n regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n deser: ([s]) =>\n strings.findIndex(i => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex\n };\n }\n}\n\nfunction offset(regex, groups) {\n return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };\n}\n\nfunction simple(regex) {\n return { regex, deser: ([s]) => s };\n}\n\nfunction escapeToken(value) {\n // eslint-disable-next-line no-useless-escape\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\nfunction unitForToken(token, loc) {\n const one = digitRegex(loc),\n two = digitRegex(loc, \"{2}\"),\n three = digitRegex(loc, \"{3}\"),\n four = digitRegex(loc, \"{4}\"),\n six = digitRegex(loc, \"{6}\"),\n oneOrTwo = digitRegex(loc, \"{1,2}\"),\n oneToThree = digitRegex(loc, \"{1,3}\"),\n oneToSix = digitRegex(loc, \"{1,6}\"),\n oneToNine = digitRegex(loc, \"{1,9}\"),\n twoToFour = digitRegex(loc, \"{2,4}\"),\n fourToSix = digitRegex(loc, \"{4,6}\"),\n literal = t => ({ regex: RegExp(escapeToken(t.val)), deser: ([s]) => s, literal: true }),\n unitate = t => {\n if (token.literal) {\n return literal(t);\n }\n switch (t.val) {\n // era\n case \"G\":\n return oneOf(loc.eras(\"short\", false), 0);\n case \"GG\":\n return oneOf(loc.eras(\"long\", false), 0);\n // years\n case \"y\":\n return intUnit(oneToSix);\n case \"yy\":\n return intUnit(twoToFour, untruncateYear);\n case \"yyyy\":\n return intUnit(four);\n case \"yyyyy\":\n return intUnit(fourToSix);\n case \"yyyyyy\":\n return intUnit(six);\n // months\n case \"M\":\n return intUnit(oneOrTwo);\n case \"MM\":\n return intUnit(two);\n case \"MMM\":\n return oneOf(loc.months(\"short\", true, false), 1);\n case \"MMMM\":\n return oneOf(loc.months(\"long\", true, false), 1);\n case \"L\":\n return intUnit(oneOrTwo);\n case \"LL\":\n return intUnit(two);\n case \"LLL\":\n return oneOf(loc.months(\"short\", false, false), 1);\n case \"LLLL\":\n return oneOf(loc.months(\"long\", false, false), 1);\n // dates\n case \"d\":\n return intUnit(oneOrTwo);\n case \"dd\":\n return intUnit(two);\n // ordinals\n case \"o\":\n return intUnit(oneToThree);\n case \"ooo\":\n return intUnit(three);\n // time\n case \"HH\":\n return intUnit(two);\n case \"H\":\n return intUnit(oneOrTwo);\n case \"hh\":\n return intUnit(two);\n case \"h\":\n return intUnit(oneOrTwo);\n case \"mm\":\n return intUnit(two);\n case \"m\":\n return intUnit(oneOrTwo);\n case \"q\":\n return intUnit(oneOrTwo);\n case \"qq\":\n return intUnit(two);\n case \"s\":\n return intUnit(oneOrTwo);\n case \"ss\":\n return intUnit(two);\n case \"S\":\n return intUnit(oneToThree);\n case \"SSS\":\n return intUnit(three);\n case \"u\":\n return simple(oneToNine);\n // meridiem\n case \"a\":\n return oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return intUnit(four);\n case \"kk\":\n return intUnit(twoToFour, untruncateYear);\n // weekNumber (W)\n case \"W\":\n return intUnit(oneOrTwo);\n case \"WW\":\n return intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return intUnit(one);\n case \"EEE\":\n return oneOf(loc.weekdays(\"short\", false, false), 1);\n case \"EEEE\":\n return oneOf(loc.weekdays(\"long\", false, false), 1);\n case \"ccc\":\n return oneOf(loc.weekdays(\"short\", true, false), 1);\n case \"cccc\":\n return oneOf(loc.weekdays(\"long\", true, false), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n case \"ZZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return simple(/[a-z_+-/]{1,256}?/i);\n default:\n return literal(t);\n }\n };\n\n const unit = unitate(token) || {\n invalidReason: MISSING_FTP\n };\n\n unit.token = token;\n\n return unit;\n}\n\nconst partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\"\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\"\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\"\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\"\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour: {\n numeric: \"h\",\n \"2-digit\": \"hh\"\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\"\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\"\n }\n};\n\nfunction tokenForPart(part, locale, formatOpts) {\n const { type, value } = part;\n\n if (type === \"literal\") {\n return {\n literal: true,\n val: value\n };\n }\n\n const style = formatOpts[type];\n\n let val = partTypeStyleToTokenVal[type];\n if (typeof val === \"object\") {\n val = val[style];\n }\n\n if (val) {\n return {\n literal: false,\n val\n };\n }\n\n return undefined;\n}\n\nfunction buildRegex(units) {\n const re = units.map(u => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n return [`^${re}$`, units];\n}\n\nfunction match(input, regex, handlers) {\n const matches = input.match(regex);\n\n if (matches) {\n const all = {};\n let matchIndex = 1;\n for (const i in handlers) {\n if (hasOwnProperty(handlers, i)) {\n const h = handlers[i],\n groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) {\n all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n }\n matchIndex += groups;\n }\n }\n return [matches, all];\n } else {\n return [matches, {}];\n }\n}\n\nfunction dateTimeFromMatches(matches) {\n const toField = token => {\n switch (token) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n\n let zone;\n if (!isUndefined(matches.Z)) {\n zone = new FixedOffsetZone(matches.Z);\n } else if (!isUndefined(matches.z)) {\n zone = IANAZone.create(matches.z);\n } else {\n zone = null;\n }\n\n if (!isUndefined(matches.q)) {\n matches.M = (matches.q - 1) * 3 + 1;\n }\n\n if (!isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) {\n matches.h += 12;\n } else if (matches.h === 12 && matches.a === 0) {\n matches.h = 0;\n }\n }\n\n if (matches.G === 0 && matches.y) {\n matches.y = -matches.y;\n }\n\n if (!isUndefined(matches.u)) {\n matches.S = parseMillis(matches.u);\n }\n\n const vals = Object.keys(matches).reduce((r, k) => {\n const f = toField(k);\n if (f) {\n r[f] = matches[k];\n }\n\n return r;\n }, {});\n\n return [vals, zone];\n}\n\nlet dummyDateTimeCache = null;\n\nfunction getDummyDateTime() {\n if (!dummyDateTimeCache) {\n dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n }\n\n return dummyDateTimeCache;\n}\n\nfunction maybeExpandMacroToken(token, locale) {\n if (token.literal) {\n return token;\n }\n\n const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n\n if (!formatOpts) {\n return token;\n }\n\n const formatter = Formatter.create(locale, formatOpts);\n const parts = formatter.formatDateTimeParts(getDummyDateTime());\n\n const tokens = parts.map(p => tokenForPart(p, locale, formatOpts));\n\n if (tokens.includes(undefined)) {\n return token;\n }\n\n return tokens;\n}\n\nfunction expandMacroTokens(tokens, locale) {\n return Array.prototype.concat(...tokens.map(t => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nexport function explainFromTokens(locale, input, format) {\n const tokens = expandMacroTokens(Formatter.parseFormat(format), locale),\n units = tokens.map(t => unitForToken(t, locale)),\n disqualifyingUnit = units.find(t => t.invalidReason);\n\n if (disqualifyingUnit) {\n return { input, tokens, invalidReason: disqualifyingUnit.invalidReason };\n } else {\n const [regexString, handlers] = buildRegex(units),\n regex = RegExp(regexString, \"i\"),\n [rawMatches, matches] = match(input, regex, handlers),\n [result, zone] = matches ? dateTimeFromMatches(matches) : [null, null];\n if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n throw new ConflictingSpecificationError(\n \"Can't include meridiem when specifying 24-hour format\"\n );\n }\n return { input, tokens, regex, rawMatches, matches, result, zone };\n }\n}\n\nexport function parseFromTokens(locale, input, format) {\n const { result, zone, invalidReason } = explainFromTokens(locale, input, format);\n return [result, zone, invalidReason];\n}\n","import {\n integerBetween,\n isLeapYear,\n timeObject,\n daysInYear,\n daysInMonth,\n weeksInWeekYear,\n isInteger\n} from \"./util.js\";\nimport Invalid from \"./invalid.js\";\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\nfunction unitOutOfRange(unit, value) {\n return new Invalid(\n \"unit out of range\",\n `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`\n );\n}\n\nfunction dayOfWeek(year, month, day) {\n const js = new Date(Date.UTC(year, month - 1, day)).getUTCDay();\n return js === 0 ? 7 : js;\n}\n\nfunction computeOrdinal(year, month, day) {\n return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\n\nfunction uncomputeOrdinal(year, ordinal) {\n const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n month0 = table.findIndex(i => i < ordinal),\n day = ordinal - table[month0];\n return { month: month0 + 1, day };\n}\n\n/**\n * @private\n */\n\nexport function gregorianToWeek(gregObj) {\n const { year, month, day } = gregObj,\n ordinal = computeOrdinal(year, month, day),\n weekday = dayOfWeek(year, month, day);\n\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7),\n weekYear;\n\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = weeksInWeekYear(weekYear);\n } else if (weekNumber > weeksInWeekYear(year)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else {\n weekYear = year;\n }\n\n return Object.assign({ weekYear, weekNumber, weekday }, timeObject(gregObj));\n}\n\nexport function weekToGregorian(weekData) {\n const { weekYear, weekNumber, weekday } = weekData,\n weekdayOfJan4 = dayOfWeek(weekYear, 1, 4),\n yearInDays = daysInYear(weekYear);\n\n let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3,\n year;\n\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= daysInYear(weekYear);\n } else {\n year = weekYear;\n }\n\n const { month, day } = uncomputeOrdinal(year, ordinal);\n\n return Object.assign({ year, month, day }, timeObject(weekData));\n}\n\nexport function gregorianToOrdinal(gregData) {\n const { year, month, day } = gregData,\n ordinal = computeOrdinal(year, month, day);\n\n return Object.assign({ year, ordinal }, timeObject(gregData));\n}\n\nexport function ordinalToGregorian(ordinalData) {\n const { year, ordinal } = ordinalData,\n { month, day } = uncomputeOrdinal(year, ordinal);\n\n return Object.assign({ year, month, day }, timeObject(ordinalData));\n}\n\nexport function hasInvalidWeekData(obj) {\n const validYear = isInteger(obj.weekYear),\n validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear)),\n validWeekday = integerBetween(obj.weekday, 1, 7);\n\n if (!validYear) {\n return unitOutOfRange(\"weekYear\", obj.weekYear);\n } else if (!validWeek) {\n return unitOutOfRange(\"week\", obj.week);\n } else if (!validWeekday) {\n return unitOutOfRange(\"weekday\", obj.weekday);\n } else return false;\n}\n\nexport function hasInvalidOrdinalData(obj) {\n const validYear = isInteger(obj.year),\n validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validOrdinal) {\n return unitOutOfRange(\"ordinal\", obj.ordinal);\n } else return false;\n}\n\nexport function hasInvalidGregorianData(obj) {\n const validYear = isInteger(obj.year),\n validMonth = integerBetween(obj.month, 1, 12),\n validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validMonth) {\n return unitOutOfRange(\"month\", obj.month);\n } else if (!validDay) {\n return unitOutOfRange(\"day\", obj.day);\n } else return false;\n}\n\nexport function hasInvalidTimeData(obj) {\n const { hour, minute, second, millisecond } = obj;\n const validHour =\n integerBetween(hour, 0, 23) ||\n (hour === 24 && minute === 0 && second === 0 && millisecond === 0),\n validMinute = integerBetween(minute, 0, 59),\n validSecond = integerBetween(second, 0, 59),\n validMillisecond = integerBetween(millisecond, 0, 999);\n\n if (!validHour) {\n return unitOutOfRange(\"hour\", hour);\n } else if (!validMinute) {\n return unitOutOfRange(\"minute\", minute);\n } else if (!validSecond) {\n return unitOutOfRange(\"second\", second);\n } else if (!validMillisecond) {\n return unitOutOfRange(\"millisecond\", millisecond);\n } else return false;\n}\n","import Duration, { friendlyDuration } from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Settings from \"./settings.js\";\nimport Info from \"./info.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport {\n isUndefined,\n maybeArray,\n isDate,\n isNumber,\n bestBy,\n daysInMonth,\n daysInYear,\n isLeapYear,\n weeksInWeekYear,\n normalizeObject,\n roundTo,\n objToLocalTS\n} from \"./impl/util.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport diff from \"./impl/diff.js\";\nimport { parseRFC2822Date, parseISODate, parseHTTPDate, parseSQL } from \"./impl/regexParser.js\";\nimport { parseFromTokens, explainFromTokens } from \"./impl/tokenParser.js\";\nimport {\n gregorianToWeek,\n weekToGregorian,\n gregorianToOrdinal,\n ordinalToGregorian,\n hasInvalidGregorianData,\n hasInvalidWeekData,\n hasInvalidOrdinalData,\n hasInvalidTimeData\n} from \"./impl/conversions.js\";\nimport * as Formats from \"./impl/formats.js\";\nimport {\n InvalidArgumentError,\n ConflictingSpecificationError,\n InvalidUnitError,\n InvalidDateTimeError\n} from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\n\nfunction unsupportedZone(zone) {\n return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\nfunction possiblyCachedWeekData(dt) {\n if (dt.weekData === null) {\n dt.weekData = gregorianToWeek(dt.c);\n }\n return dt.weekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n const current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid\n };\n return new DateTime(Object.assign({}, current, alts, { old: current }));\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n const o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n const o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n ts += offset * 60 * 1000;\n\n const d = new Date(ts);\n\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds()\n };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n const oPre = inst.o,\n year = inst.c.year + Math.trunc(dur.years),\n month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n c = Object.assign({}, inst.c, {\n year,\n month,\n day:\n Math.min(inst.c.day, daysInMonth(year, month)) +\n Math.trunc(dur.days) +\n Math.trunc(dur.weeks) * 7\n }),\n millisToAdd = Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds\n }).as(\"milliseconds\"),\n localTS = objToLocalTS(c);\n\n let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n\n return { ts, o };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text) {\n const { setZone, zone } = opts;\n if (parsed && Object.keys(parsed).length !== 0) {\n const interpretationZone = parsedZone || zone,\n inst = DateTime.fromObject(\n Object.assign(parsed, opts, {\n zone: interpretationZone,\n // setZone is a valid option in the calling methods, but not in fromObject\n setZone: undefined\n })\n );\n return setZone ? inst : inst.setZone(zone);\n } else {\n return DateTime.invalid(\n new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`)\n );\n }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n return dt.isValid\n ? Formatter.create(Locale.create(\"en-US\"), {\n allowZ,\n forceSimple: true\n }).formatDateTimeFromString(dt, format)\n : null;\n}\n\n// technical time formats (e.g. the time part of ISO 8601), take some options\n// and this commonizes their handling\nfunction toTechTimeFormat(\n dt,\n {\n suppressSeconds = false,\n suppressMilliseconds = false,\n includeOffset,\n includeZone = false,\n spaceZone = false,\n format = \"extended\"\n }\n) {\n let fmt = format === \"basic\" ? \"HHmm\" : \"HH:mm\";\n\n if (!suppressSeconds || dt.second !== 0 || dt.millisecond !== 0) {\n fmt += format === \"basic\" ? \"ss\" : \":ss\";\n if (!suppressMilliseconds || dt.millisecond !== 0) {\n fmt += \".SSS\";\n }\n }\n\n if ((includeZone || includeOffset) && spaceZone) {\n fmt += \" \";\n }\n\n if (includeZone) {\n fmt += \"z\";\n } else if (includeOffset) {\n fmt += format === \"basic\" ? \"ZZZ\" : \"ZZ\";\n }\n\n return toTechFormat(dt, fmt);\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n },\n defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n },\n defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedWeekUnits = [\n \"weekYear\",\n \"weekNumber\",\n \"weekday\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\"\n ],\n orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, zone) {\n // assume we have the higher-order units\n for (const u of orderedUnits) {\n if (isUndefined(obj[u])) {\n obj[u] = defaultUnitValues[u];\n }\n }\n\n const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n const tsNow = Settings.now(),\n offsetProvis = zone.offset(tsNow),\n [ts, o] = objToTS(obj, offsetProvis, zone);\n\n return new DateTime({\n ts,\n zone,\n o\n });\n}\n\nfunction diffRelative(start, end, opts) {\n const round = isUndefined(opts.round) ? true : opts.round,\n format = (c, unit) => {\n c = roundTo(c, round || opts.calendary ? 0 : 2, true);\n const formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n },\n differ = unit => {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) {\n return end\n .startOf(unit)\n .diff(start.startOf(unit), unit)\n .get(unit);\n } else return 0;\n } else {\n return end.diff(start, unit).get(unit);\n }\n };\n\n if (opts.unit) {\n return format(differ(opts.unit), opts.unit);\n }\n\n for (const unit of opts.units) {\n const count = differ(unit);\n if (Math.abs(count) >= 1) {\n return format(count, unit);\n }\n }\n return format(0, opts.units[opts.units.length - 1]);\n}\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link local}, {@link utc}, and (most flexibly) {@link fromObject}. To create one from a standard string format, use {@link fromISO}, {@link fromHTTP}, and {@link fromRFC2822}. To create one from a custom string format, use {@link fromFormat}. To create one from a native JS date, use {@link fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link toObject}), use the {@link year}, {@link month},\n * {@link day}, {@link hour}, {@link minute}, {@link second}, {@link millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link weekYear}, {@link weekNumber}, and {@link weekday} accessors.\n * * **Configuration** See the {@link locale} and {@link numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link set}, {@link reconfigure}, {@link setZone}, {@link setLocale}, {@link plus}, {@link minus}, {@link endOf}, {@link startOf}, {@link toUTC}, and {@link toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link toRelative}, {@link toRelativeCalendar}, {@link toJSON}, {@link toISO}, {@link toHTTP}, {@link toObject}, {@link toRFC2822}, {@link toString}, {@link toLocaleString}, {@link toFormat}, {@link toMillis} and {@link toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nexport default class DateTime {\n /**\n * @access private\n */\n constructor(config) {\n const zone = config.zone || Settings.defaultZone;\n\n let invalid =\n config.invalid ||\n (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) ||\n (!zone.isValid ? unsupportedZone(zone) : null);\n /**\n * @access private\n */\n this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n\n let c = null,\n o = null;\n if (!invalid) {\n const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n\n if (unchanged) {\n [c, o] = [config.old.c, config.old.o];\n } else {\n const ot = zone.offset(this.ts);\n c = tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n\n /**\n * @access private\n */\n this._zone = zone;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.invalid = invalid;\n /**\n * @access private\n */\n this.weekData = null;\n /**\n * @access private\n */\n this.c = c;\n /**\n * @access private\n */\n this.o = o;\n /**\n * @access private\n */\n this.isLuxonDateTime = true;\n }\n\n // CONSTRUCT\n\n /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12) //~> 2017-03-12T00:00:00\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */\n static local(year, month, day, hour, minute, second, millisecond) {\n if (isUndefined(year)) {\n return new DateTime({ ts: Settings.now() });\n } else {\n return quickDT(\n {\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond\n },\n Settings.defaultZone\n );\n }\n }\n\n /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765Z\n * @return {DateTime}\n */\n static utc(year, month, day, hour, minute, second, millisecond) {\n if (isUndefined(year)) {\n return new DateTime({\n ts: Settings.now(),\n zone: FixedOffsetZone.utcInstance\n });\n } else {\n return quickDT(\n {\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond\n },\n FixedOffsetZone.utcInstance\n );\n }\n }\n\n /**\n * Create a DateTime from a Javascript Date object. Uses the default zone.\n * @param {Date} date - a Javascript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */\n static fromJSDate(date, options = {}) {\n const ts = isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) {\n return DateTime.invalid(\"invalid input\");\n }\n\n const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: Locale.fromObject(options)\n });\n }\n\n /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromMillis(milliseconds, options = {}) {\n if (!isNumber(milliseconds)) {\n throw new InvalidArgumentError(\n `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`\n );\n } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n } else {\n return new DateTime({\n ts: milliseconds,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options)\n });\n }\n }\n\n /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromSeconds(seconds, options = {}) {\n if (!isNumber(seconds)) {\n throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n } else {\n return new DateTime({\n ts: seconds * 1000,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options)\n });\n }\n }\n\n /**\n * Create a DateTime from a Javascript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {string|Zone} [obj.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [obj.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} obj.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} obj.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @return {DateTime}\n */\n static fromObject(obj) {\n const zoneToUse = normalizeZone(obj.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n const tsNow = Settings.now(),\n offsetProvis = zoneToUse.offset(tsNow),\n normalized = normalizeObject(obj, normalizeUnit, [\n \"zone\",\n \"locale\",\n \"outputCalendar\",\n \"numberingSystem\"\n ]),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber,\n loc = Locale.fromObject(obj);\n\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n const useWeekData = definiteWeekDef || (normalized.weekday && !containsGregor);\n\n // configure ourselves to deal with gregorian dates or week stuff\n let units,\n defaultValues,\n objNow = tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = orderedWeekUnits;\n defaultValues = defaultWeekUnitValues;\n objNow = gregorianToWeek(objNow);\n } else if (containsOrdinal) {\n units = orderedOrdinalUnits;\n defaultValues = defaultOrdinalUnitValues;\n objNow = gregorianToOrdinal(objNow);\n } else {\n units = orderedUnits;\n defaultValues = defaultUnitValues;\n }\n\n // set default values for missing stuff\n let foundFirst = false;\n for (const u of units) {\n const v = normalized[u];\n if (!isUndefined(v)) {\n foundFirst = true;\n } else if (foundFirst) {\n normalized[u] = defaultValues[u];\n } else {\n normalized[u] = objNow[u];\n }\n }\n\n // make sure the values we have are in range\n const higherOrderInvalid = useWeekData\n ? hasInvalidWeekData(normalized)\n : containsOrdinal\n ? hasInvalidOrdinalData(normalized)\n : hasInvalidGregorianData(normalized),\n invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n // compute the actual time\n const gregorian = useWeekData\n ? weekToGregorian(normalized)\n : containsOrdinal\n ? ordinalToGregorian(normalized)\n : normalized,\n [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc\n });\n\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n return DateTime.invalid(\n \"mismatched weekday\",\n `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`\n );\n }\n\n return inst;\n }\n\n /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */\n static fromISO(text, opts = {}) {\n const [vals, parsedZone] = parseISODate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n }\n\n /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */\n static fromRFC2822(text, opts = {}) {\n const [vals, parsedZone] = parseRFC2822Date(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n }\n\n /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */\n static fromHTTP(text, opts = {}) {\n const [vals, parsedZone] = parseHTTPDate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n }\n\n /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @see https://moment.github.io/luxon/docs/manual/parsing.html#table-of-tokens\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromFormat(text, fmt, opts = {}) {\n if (isUndefined(text) || isUndefined(fmt)) {\n throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n }\n\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true\n }),\n [vals, parsedZone, invalid] = parseFromTokens(localeToUse, text, fmt);\n if (invalid) {\n return DateTime.invalid(invalid);\n } else {\n return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text);\n }\n }\n\n /**\n * @deprecated use fromFormat instead\n */\n static fromString(text, fmt, opts = {}) {\n return DateTime.fromFormat(text, fmt, opts);\n }\n\n /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */\n static fromSQL(text, opts = {}) {\n const [vals, parsedZone] = parseSQL(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n }\n\n /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDateTimeError(invalid);\n } else {\n return new DateTime({ invalid });\n }\n }\n\n /**\n * Check if an object is a DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDateTime(o) {\n return (o && o.isLuxonDateTime) || false;\n }\n\n // INFO\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */\n get(unit) {\n return this[unit];\n }\n\n /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n *\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n *\n * @type {string}\n */\n get outputCalendar() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n\n /**\n * Get the time zone associated with this DateTime.\n * @type {Zone}\n */\n get zone() {\n return this._zone;\n }\n\n /**\n * Get the name of the time zone.\n * @type {string}\n */\n get zoneName() {\n return this.isValid ? this.zone.name : null;\n }\n\n /**\n * Get the year\n * @example DateTime.local(2017, 5, 25).year //=> 2017\n * @type {number}\n */\n get year() {\n return this.isValid ? this.c.year : NaN;\n }\n\n /**\n * Get the quarter\n * @example DateTime.local(2017, 5, 25).quarter //=> 2\n * @type {number}\n */\n get quarter() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n\n /**\n * Get the month (1-12).\n * @example DateTime.local(2017, 5, 25).month //=> 5\n * @type {number}\n */\n get month() {\n return this.isValid ? this.c.month : NaN;\n }\n\n /**\n * Get the day of the month (1-30ish).\n * @example DateTime.local(2017, 5, 25).day //=> 25\n * @type {number}\n */\n get day() {\n return this.isValid ? this.c.day : NaN;\n }\n\n /**\n * Get the hour of the day (0-23).\n * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n * @type {number}\n */\n get hour() {\n return this.isValid ? this.c.hour : NaN;\n }\n\n /**\n * Get the minute of the hour (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n * @type {number}\n */\n get minute() {\n return this.isValid ? this.c.minute : NaN;\n }\n\n /**\n * Get the second of the minute (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n * @type {number}\n */\n get second() {\n return this.isValid ? this.c.second : NaN;\n }\n\n /**\n * Get the millisecond of the second (0-999).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n * @type {number}\n */\n get millisecond() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n\n /**\n * Get the week year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekYear //=> 2015\n * @type {number}\n */\n get weekYear() {\n return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the week number of the week year (1-52ish).\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n * @type {number}\n */\n get weekNumber() {\n return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the day of the week.\n * 1 is Monday and 7 is Sunday\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekday //=> 4\n * @type {number}\n */\n get weekday() {\n return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n }\n\n /**\n * Get the ordinal (meaning the day of the year)\n * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n * @type {number|DateTime}\n */\n get ordinal() {\n return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n }\n\n /**\n * Get the human readable short month name, such as 'Oct'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n * @type {string}\n */\n get monthShort() {\n return this.isValid ? Info.months(\"short\", { locale: this.locale })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable long month name, such as 'October'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthLong //=> October\n * @type {string}\n */\n get monthLong() {\n return this.isValid ? Info.months(\"long\", { locale: this.locale })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable short weekday, such as 'Mon'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n * @type {string}\n */\n get weekdayShort() {\n return this.isValid ? Info.weekdays(\"short\", { locale: this.locale })[this.weekday - 1] : null;\n }\n\n /**\n * Get the human readable long weekday, such as 'Monday'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n * @type {string}\n */\n get weekdayLong() {\n return this.isValid ? Info.weekdays(\"long\", { locale: this.locale })[this.weekday - 1] : null;\n }\n\n /**\n * Get the UTC offset of this DateTime in minutes\n * @example DateTime.local().offset //=> -240\n * @example DateTime.utc().offset //=> 0\n * @type {number}\n */\n get offset() {\n return this.isValid ? +this.o : NaN;\n }\n\n /**\n * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameShort() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameLong() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get whether this zone's offset ever changes, as in a DST.\n * @type {boolean}\n */\n get isOffsetFixed() {\n return this.isValid ? this.zone.universal : null;\n }\n\n /**\n * Get whether the DateTime is in a DST.\n * @type {boolean}\n */\n get isInDST() {\n if (this.isOffsetFixed) {\n return false;\n } else {\n return (\n this.offset > this.set({ month: 1 }).offset || this.offset > this.set({ month: 5 }).offset\n );\n }\n }\n\n /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */\n get isInLeapYear() {\n return isLeapYear(this.year);\n }\n\n /**\n * Returns the number of days in this DateTime's month\n * @example DateTime.local(2016, 2).daysInMonth //=> 29\n * @example DateTime.local(2016, 3).daysInMonth //=> 31\n * @type {number}\n */\n get daysInMonth() {\n return daysInMonth(this.year, this.month);\n }\n\n /**\n * Returns the number of days in this DateTime's year\n * @example DateTime.local(2016).daysInYear //=> 366\n * @example DateTime.local(2013).daysInYear //=> 365\n * @type {number}\n */\n get daysInYear() {\n return this.isValid ? daysInYear(this.year) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2004).weeksInWeekYear //=> 53\n * @example DateTime.local(2013).weeksInWeekYear //=> 52\n * @type {number}\n */\n get weeksInWeekYear() {\n return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n }\n\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */\n resolvedLocaleOpts(opts = {}) {\n const { locale, numberingSystem, calendar } = Formatter.create(\n this.loc.clone(opts),\n opts\n ).resolvedOptions(this);\n return { locale, numberingSystem, outputCalendar: calendar };\n }\n\n // TRANSFORM\n\n /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */\n toUTC(offset = 0, opts = {}) {\n return this.setZone(FixedOffsetZone.instance(offset), opts);\n }\n\n /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */\n toLocal() {\n return this.setZone(Settings.defaultZone);\n }\n\n /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link plus}. You may wish to use {@link toLocal} and {@link toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */\n setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {\n zone = normalizeZone(zone, Settings.defaultZone);\n if (zone.equals(this.zone)) {\n return this;\n } else if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n } else {\n let newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n const offsetGuess = zone.offset(this.ts);\n const asObj = this.toObject();\n [newTS] = objToTS(asObj, offsetGuess, zone);\n }\n return clone(this, { ts: newTS, zone });\n }\n }\n\n /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */\n reconfigure({ locale, numberingSystem, outputCalendar } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });\n return clone(this, { loc });\n }\n\n /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */\n setLocale(locale) {\n return this.reconfigure({ locale });\n }\n\n /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link reconfigure} and {@link setZone}.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const normalized = normalizeObject(values, normalizeUnit, []),\n settingWeekStuff =\n !isUndefined(normalized.weekYear) ||\n !isUndefined(normalized.weekNumber) ||\n !isUndefined(normalized.weekday);\n\n let mixed;\n if (settingWeekStuff) {\n mixed = weekToGregorian(Object.assign(gregorianToWeek(this.c), normalized));\n } else if (!isUndefined(normalized.ordinal)) {\n mixed = ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c), normalized));\n } else {\n mixed = Object.assign(this.toObject(), normalized);\n\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if (isUndefined(normalized.day)) {\n mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n }\n\n const [ts, o] = objToTS(mixed, this.o, this.zone);\n return clone(this, { ts, o });\n }\n\n /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.local().plus(123) //~> in 123 milliseconds\n * @example DateTime.local().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.local().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.local().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.local().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.local().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */\n plus(duration) {\n if (!this.isValid) return this;\n const dur = friendlyDuration(duration);\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */\n minus(duration) {\n if (!this.isValid) return this;\n const dur = friendlyDuration(duration).negate();\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */\n startOf(unit) {\n if (!this.isValid) return this;\n const o = {},\n normalizedUnit = Duration.normalizeUnit(unit);\n switch (normalizedUnit) {\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n case \"milliseconds\":\n break;\n // no default, invalid units throw in normalizeUnit()\n }\n\n if (normalizedUnit === \"weeks\") {\n o.weekday = 1;\n }\n\n if (normalizedUnit === \"quarters\") {\n const q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n\n return this.set(o);\n }\n\n /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'month', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */\n endOf(unit) {\n return this.isValid\n ? this.plus({ [unit]: 1 })\n .startOf(unit)\n .minus(1)\n : this;\n }\n\n // OUTPUT\n\n /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @see https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options\n * @example DateTime.local().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.local().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.local().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.local().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param opts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @example DateTime.local().toLocaleString(); //=> 4/20/2017\n * @example DateTime.local().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.local().toLocaleString({ locale: 'en-gb' }); //=> '20/04/2017'\n * @example DateTime.local().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.local().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.local().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.local().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.local().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.local().toLocaleString({ hour: '2-digit', minute: '2-digit', hour12: false }); //=> '11:32'\n * @return {string}\n */\n toLocaleString(opts = Formats.DATE_SHORT) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTime(this)\n : INVALID;\n }\n\n /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.local().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */\n toLocaleParts(opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this)\n : [];\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.local().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.local().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.local().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @return {string}\n */\n toISO(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toISODate(opts)}T${this.toISOTime(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @return {string}\n */\n toISODate({ format = \"extended\" } = {}) {\n let fmt = format === \"basic\" ? \"yyyyMMdd\" : \"yyyy-MM-dd\";\n if (this.year > 9999) {\n fmt = \"+\" + fmt;\n }\n\n return toTechFormat(this, fmt);\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */\n toISOWeekDate() {\n return toTechFormat(this, \"kkkk-'W'WW-c\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @return {string}\n */\n toISOTime({\n suppressMilliseconds = false,\n suppressSeconds = false,\n includeOffset = true,\n format = \"extended\"\n } = {}) {\n return toTechTimeFormat(this, {\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n format\n });\n }\n\n /**\n * Returns an RFC 2822-compatible string representation of this DateTime, always in UTC\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */\n toRFC2822() {\n return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */\n toHTTP() {\n return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string}\n */\n toSQLDate() {\n return toTechFormat(this, \"yyyy-MM-dd\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.local().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.local().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.local().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */\n toSQLTime({ includeOffset = true, includeZone = false } = {}) {\n return toTechTimeFormat(this, {\n includeOffset,\n includeZone,\n spaceZone: true\n });\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */\n toSQL(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */\n toString() {\n return this.isValid ? this.toISO() : INVALID;\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */\n toMillis() {\n return this.isValid ? this.ts : NaN;\n }\n\n /**\n * Returns the epoch seconds of this DateTime.\n * @return {number}\n */\n toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n }\n\n /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */\n toBSON() {\n return this.toJSDate();\n }\n\n /**\n * Returns a Javascript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.local().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = Object.assign({}, this.c);\n\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns a Javascript Date equivalent to this DateTime.\n * @return {Date}\n */\n toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n }\n\n // COMPARE\n\n /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */\n diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n if (!this.isValid || !otherDateTime.isValid) {\n return Duration.invalid(\n this.invalid || otherDateTime.invalid,\n \"created by diffing an invalid DateTime\"\n );\n }\n\n const durOpts = Object.assign(\n { locale: this.locale, numberingSystem: this.numberingSystem },\n opts\n );\n\n const units = maybeArray(unit).map(Duration.normalizeUnit),\n otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n earlier = otherIsLater ? this : otherDateTime,\n later = otherIsLater ? otherDateTime : this,\n diffed = diff(earlier, later, units, durOpts);\n\n return otherIsLater ? diffed.negate() : diffed;\n }\n\n /**\n * Return the difference between this DateTime and right now.\n * See {@link diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n diffNow(unit = \"milliseconds\", opts = {}) {\n return this.diff(DateTime.local(), unit, opts);\n }\n\n /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval}\n */\n until(otherDateTime) {\n return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n }\n\n /**\n * Return whether this DateTime is in the same unit of time as another DateTime\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @example DateTime.local().hasSame(otherDT, 'day'); //~> true if both the same calendar day\n * @return {boolean}\n */\n hasSame(otherDateTime, unit) {\n if (!this.isValid) return false;\n if (unit === \"millisecond\") {\n return this.valueOf() === otherDateTime.valueOf();\n } else {\n const inputMs = otherDateTime.valueOf();\n return this.startOf(unit) <= inputMs && inputMs <= this.endOf(unit);\n }\n }\n\n /**\n * Equality check\n * Two DateTimes are equal iff they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */\n equals(other) {\n return (\n this.isValid &&\n other.isValid &&\n this.valueOf() === other.valueOf() &&\n this.zone.equals(other.zone) &&\n this.loc.equals(other.loc)\n );\n }\n\n /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds down by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {boolean} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.local().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.local().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.local().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.local().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.local().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.local().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */\n toRelative(options = {}) {\n if (!this.isValid) return null;\n const base = options.base || DateTime.fromObject({ zone: this.zone }),\n padding = options.padding ? (this < base ? -options.padding : options.padding) : 0;\n return diffRelative(\n base,\n this.plus(padding),\n Object.assign(options, {\n numeric: \"always\",\n units: [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"]\n })\n );\n }\n\n /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.local().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.local().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */\n toRelativeCalendar(options = {}) {\n if (!this.isValid) return null;\n\n return diffRelative(\n options.base || DateTime.fromObject({ zone: this.zone }),\n this,\n Object.assign(options, {\n numeric: \"auto\",\n units: [\"years\", \"months\", \"days\"],\n calendary: true\n })\n );\n }\n\n /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */\n static min(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, i => i.valueOf(), Math.min);\n }\n\n /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */\n static max(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, i => i.valueOf(), Math.max);\n }\n\n // MISC\n\n /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */\n static fromFormatExplain(text, fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true\n });\n return explainFromTokens(localeToUse, text, fmt);\n }\n\n /**\n * @deprecated use fromFormatExplain instead\n */\n static fromStringExplain(text, fmt, options = {}) {\n return DateTime.fromFormatExplain(text, fmt, options);\n }\n\n // FORMAT PRESETS\n\n /**\n * {@link toLocaleString} format like 10/14/1983\n * @type {Object}\n */\n static get DATE_SHORT() {\n return Formats.DATE_SHORT;\n }\n\n /**\n * {@link toLocaleString} format like 'Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED() {\n return Formats.DATE_MED;\n }\n\n /**\n * {@link toLocaleString} format like 'Fri, Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED_WITH_WEEKDAY() {\n return Formats.DATE_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link toLocaleString} format like 'October 14, 1983'\n * @type {Object}\n */\n static get DATE_FULL() {\n return Formats.DATE_FULL;\n }\n\n /**\n * {@link toLocaleString} format like 'Tuesday, October 14, 1983'\n * @type {Object}\n */\n static get DATE_HUGE() {\n return Formats.DATE_HUGE;\n }\n\n /**\n * {@link toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_SIMPLE() {\n return Formats.TIME_SIMPLE;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SECONDS() {\n return Formats.TIME_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SHORT_OFFSET() {\n return Formats.TIME_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_LONG_OFFSET() {\n return Formats.TIME_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '09:30', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_SIMPLE() {\n return Formats.TIME_24_SIMPLE;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SECONDS() {\n return Formats.TIME_24_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 EDT', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SHORT_OFFSET() {\n return Formats.TIME_24_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_LONG_OFFSET() {\n return Formats.TIME_24_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT() {\n return Formats.DATETIME_SHORT;\n }\n\n /**\n * {@link toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT_WITH_SECONDS() {\n return Formats.DATETIME_SHORT_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED() {\n return Formats.DATETIME_MED;\n }\n\n /**\n * {@link toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_SECONDS() {\n return Formats.DATETIME_MED_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_WEEKDAY() {\n return Formats.DATETIME_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL() {\n return Formats.DATETIME_FULL;\n }\n\n /**\n * {@link toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL_WITH_SECONDS() {\n return Formats.DATETIME_FULL_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE() {\n return Formats.DATETIME_HUGE;\n }\n\n /**\n * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE_WITH_SECONDS() {\n return Formats.DATETIME_HUGE_WITH_SECONDS;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDateTime(dateTimeish) {\n if (DateTime.isDateTime(dateTimeish)) {\n return dateTimeish;\n } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n return DateTime.fromJSDate(dateTimeish);\n } else if (dateTimeish && typeof dateTimeish === \"object\") {\n return DateTime.fromObject(dateTimeish);\n } else {\n throw new InvalidArgumentError(\n `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`\n );\n }\n}\n"],"names":["LuxonError","Error","InvalidDateTimeError","reason","toMessage","InvalidIntervalError","InvalidDurationError","ConflictingSpecificationError","InvalidUnitError","unit","InvalidArgumentError","ZoneIsAbstractError","n","s","l","DATE_SHORT","year","month","day","DATE_MED","DATE_MED_WITH_WEEKDAY","weekday","DATE_FULL","DATE_HUGE","TIME_SIMPLE","hour","minute","TIME_WITH_SECONDS","second","TIME_WITH_SHORT_OFFSET","timeZoneName","TIME_WITH_LONG_OFFSET","TIME_24_SIMPLE","hour12","TIME_24_WITH_SECONDS","TIME_24_WITH_SHORT_OFFSET","TIME_24_WITH_LONG_OFFSET","DATETIME_SHORT","DATETIME_SHORT_WITH_SECONDS","DATETIME_MED","DATETIME_MED_WITH_SECONDS","DATETIME_MED_WITH_WEEKDAY","DATETIME_FULL","DATETIME_FULL_WITH_SECONDS","DATETIME_HUGE","DATETIME_HUGE_WITH_SECONDS","isUndefined","o","isNumber","isInteger","isString","isDate","Object","prototype","toString","call","hasIntl","Intl","DateTimeFormat","e","hasFormatToParts","formatToParts","hasRelative","RelativeTimeFormat","maybeArray","thing","Array","isArray","bestBy","arr","by","compare","length","undefined","reduce","best","next","pair","pick","obj","keys","a","k","hasOwnProperty","prop","integerBetween","bottom","top","floorMod","x","Math","floor","padStart","input","repeat","slice","parseInteger","string","parseInt","parseMillis","fraction","f","parseFloat","roundTo","number","digits","towardZero","factor","rounder","trunc","round","isLeapYear","daysInYear","daysInMonth","modMonth","modYear","objToLocalTS","d","Date","UTC","millisecond","setUTCFullYear","getUTCFullYear","weeksInWeekYear","weekYear","p1","last","p2","untruncateYear","parseZoneInfo","ts","offsetFormat","locale","timeZone","date","intlOpts","modified","assign","intl","parsed","find","m","type","toLowerCase","value","without","format","included","diffed","substring","trimmed","replace","signedOffset","offHourStr","offMinuteStr","offHour","Number","isNaN","offMin","offMinSigned","is","asNumber","numericValue","normalizeObject","normalizer","nonUnitKeys","normalized","u","indexOf","v","formatOffset","offset","hours","abs","minutes","sign","RangeError","timeObject","ianaRegex","stringify","JSON","sort","monthsLong","monthsShort","monthsNarrow","months","weekdaysLong","weekdaysShort","weekdaysNarrow","weekdays","meridiems","erasLong","erasShort","erasNarrow","eras","meridiemForDateTime","dt","weekdayForDateTime","monthForDateTime","eraForDateTime","formatRelativeTime","count","numeric","narrow","units","years","quarters","weeks","days","seconds","lastable","isDay","isInPast","fmtValue","singular","lilUnits","fmtUnit","formatString","knownFormat","filtered","key","dateTimeHuge","Formats","stringifyTokens","splits","tokenToString","token","literal","val","macroTokenToFormatOpts","D","DD","DDD","DDDD","t","tt","ttt","tttt","T","TT","TTT","TTTT","ff","fff","ffff","F","FF","FFF","FFFF","Formatter","create","opts","parseFormat","fmt","current","currentFull","bracketed","i","c","charAt","push","formatOpts","loc","systemLoc","formatWithSystemDefault","redefaultToSystem","df","dtFormatter","formatDateTime","formatDateTimeParts","resolvedOptions","num","p","forceSimple","padTo","numberFormatter","formatDateTimeFromString","knownEnglish","listingMode","useDateTimeFormatter","outputCalendar","extract","isOffsetFixed","allowZ","isValid","zone","meridiem","English","standalone","maybeMacro","era","offsetName","zoneName","weekNumber","ordinal","quarter","formatDurationFromString","dur","tokenToField","lildur","mapped","get","tokens","realTokens","found","concat","collapsed","shiftTo","map","filter","Invalid","explanation","Zone","equals","otherZone","singleton","LocalZone","getTimezoneOffset","matchingRegex","RegExp","source","dtfCache","makeDTF","typeToPos","hackyOffset","dtf","formatted","exec","fMonth","fDay","fYear","fHour","fMinute","fSecond","partsOffset","filled","pos","ianaZoneCache","IANAZone","name","resetCache","isValidSpecifier","match","isValidZone","parseGMTOffset","specifier","valid","adjustedHour","asUTC","asTS","over","FixedOffsetZone","instance","utcInstance","parseSpecifier","r","fixed","InvalidZone","NaN","normalizeZone","defaultZone","lowered","now","defaultLocale","defaultNumberingSystem","defaultOutputCalendar","throwOnInvalid","Settings","resetCaches","Locale","z","numberingSystem","intlDTCache","getCachedDTF","locString","intlNumCache","getCachedINF","inf","NumberFormat","intlRelCache","getCachedRTF","base","cacheKeyOpts","sysLocaleCache","systemLocale","computedSys","parseLocaleString","localeStr","uIndex","options","smaller","calendar","intlConfigString","mapMonths","ms","DateTime","utc","mapWeekdays","listStuff","defaultOK","englishFn","intlFn","mode","supportsFastNumbers","startsWith","PolyNumberFormatter","useGrouping","minimumIntegerDigits","PolyDateFormatter","universal","fromMillis","toJSDate","tokenFormat","PolyRelFormatter","isEnglish","style","rtf","fromOpts","defaultToEN","specifiedLocale","localeR","numberingSystemR","outputCalendarR","fromObject","numbering","parsedLocale","parsedNumberingSystem","parsedOutputCalendar","weekdaysCache","monthsCache","meridiemCache","eraCache","fastNumbersCached","hasFTP","isActuallyEn","hasNoWeirdness","clone","alts","getOwnPropertyNames","redefaultToEN","formatStr","field","results","matching","fastNumbers","relFormatter","other","combineRegexes","regexes","full","combineExtractors","extractors","ex","mergedVals","mergedZone","cursor","parse","patterns","regex","extractor","simpleParse","ret","offsetRegex","isoTimeBaseRegex","isoTimeRegex","isoTimeExtensionRegex","isoYmdRegex","isoWeekRegex","isoOrdinalRegex","extractISOWeekData","extractISOOrdinalData","sqlYmdRegex","sqlTimeRegex","sqlTimeExtensionRegex","int","fallback","extractISOYmd","item","extractISOTime","extractISOOffset","local","fullOffset","extractIANAZone","isoDuration","extractISODuration","yearStr","monthStr","weekStr","dayStr","hourStr","minuteStr","secondStr","millisecondsStr","hasNegativePrefix","maybeNegate","milliseconds","obsOffsets","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","fromStrings","weekdayStr","result","rfc2822","extractRFC2822","obsOffset","milOffset","preprocessRFC2822","trim","rfc1123","rfc850","ascii","extractRFC1123Or850","extractASCII","isoYmdWithTimeExtensionRegex","isoWeekWithTimeExtensionRegex","isoOrdinalWithTimeExtensionRegex","isoTimeCombinedRegex","extractISOYmdTimeAndOffset","extractISOWeekTimeAndOffset","extractISOOrdinalDataAndTime","extractISOTimeAndOffset","parseISODate","parseRFC2822Date","parseHTTPDate","parseISODuration","sqlYmdWithTimeExtensionRegex","sqlTimeCombinedRegex","extractISOYmdTimeOffsetAndIANAZone","extractISOTimeOffsetAndIANAZone","parseSQL","INVALID","lowOrderMatrix","casualMatrix","daysInYearAccurate","daysInMonthAccurate","accurateMatrix","orderedUnits","reverseUnits","reverse","clear","conf","values","conversionAccuracy","Duration","antiTrunc","ceil","convert","matrix","fromMap","fromUnit","toMap","toUnit","conv","raw","sameSign","added","normalizeValues","vals","previous","config","accurate","invalid","isLuxonDuration","normalizeUnit","fromISO","text","week","isDuration","toFormat","fmtOpts","toObject","includeConfig","toISO","toJSON","valueOf","as","plus","duration","friendlyDuration","minus","negate","mapUnits","fn","set","mixed","reconfigure","normalize","built","accumulated","lastUnit","own","ak","down","negated","durationish","validateStartEnd","start","end","Interval","isLuxonInterval","fromDateTimes","builtStart","friendlyDateTime","builtEnd","validateError","after","before","split","startIsValid","endIsValid","isInterval","toDuration","startOf","diff","hasSame","isEmpty","isAfter","dateTime","isBefore","contains","splitAt","dateTimes","sorted","splitBy","divideEqually","numberOfParts","overlaps","abutsStart","abutsEnd","engulfs","intersection","union","merge","intervals","b","sofar","final","xor","currentCount","ends","time","flattened","difference","toISODate","toISOTime","dateFormat","separator","invalidReason","mapEndpoints","mapFn","Info","hasDST","proto","setZone","isValidIANAZone","monthsFormat","weekdaysFormat","features","intlTokens","zones","relative","dayDiff","earlier","later","utcDayStart","toUTC","keepLocalTime","highOrderDiffs","differs","lowestOrder","highWater","differ","delta","remainingMillis","lowerOrderUnits","numberingSystems","arab","arabext","bali","beng","deva","fullwide","gujr","hanidec","khmr","knda","laoo","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt","latn","numberingSystemsUTF16","hanidecChars","parseDigits","str","code","charCodeAt","search","min","max","digitRegex","append","MISSING_FTP","intUnit","post","deser","NBSP","String","fromCharCode","spaceOrNBSP","spaceOrNBSPRegExp","fixListRegex","stripInsensitivities","oneOf","strings","startIndex","join","findIndex","groups","h","simple","escapeToken","unitForToken","one","two","three","four","six","oneOrTwo","oneToThree","oneToSix","oneToNine","twoToFour","fourToSix","unitate","partTypeStyleToTokenVal","short","long","dayperiod","dayPeriod","tokenForPart","part","buildRegex","re","handlers","matches","all","matchIndex","dateTimeFromMatches","toField","Z","q","M","G","y","S","dummyDateTimeCache","getDummyDateTime","maybeExpandMacroToken","formatter","parts","includes","expandMacroTokens","explainFromTokens","disqualifyingUnit","regexString","rawMatches","parseFromTokens","nonLeapLadder","leapLadder","unitOutOfRange","dayOfWeek","js","getUTCDay","computeOrdinal","uncomputeOrdinal","table","month0","gregorianToWeek","gregObj","weekToGregorian","weekData","weekdayOfJan4","yearInDays","gregorianToOrdinal","gregData","ordinalToGregorian","ordinalData","hasInvalidWeekData","validYear","validWeek","validWeekday","hasInvalidOrdinalData","validOrdinal","hasInvalidGregorianData","validMonth","validDay","hasInvalidTimeData","validHour","validMinute","validSecond","validMillisecond","MAX_DATE","unsupportedZone","possiblyCachedWeekData","inst","old","fixOffset","localTS","tz","utcGuess","o2","o3","tsToObj","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","objToTS","adjustTime","oPre","millisToAdd","parseDataToDateTime","parsedZone","interpretationZone","toTechFormat","toTechTimeFormat","suppressSeconds","suppressMilliseconds","includeOffset","includeZone","spaceZone","defaultUnitValues","defaultWeekUnitValues","defaultOrdinalUnitValues","orderedWeekUnits","orderedOrdinalUnits","weeknumber","weeksnumber","weeknumbers","weekyear","weekyears","quickDT","tsNow","offsetProvis","diffRelative","calendary","unchanged","ot","_zone","isLuxonDateTime","fromJSDate","zoneToUse","fromSeconds","containsOrdinal","containsGregorYear","containsGregorMD","containsGregor","definiteWeekDef","useWeekData","defaultValues","objNow","foundFirst","higherOrderInvalid","gregorian","tsFinal","offsetFinal","fromRFC2822","fromHTTP","fromFormat","localeToUse","fromString","fromSQL","isDateTime","resolvedLocaleOpts","toLocal","keepCalendarTime","newTS","offsetGuess","asObj","setLocale","settingWeekStuff","normalizedUnit","endOf","toLocaleString","toLocaleParts","toISOWeekDate","toRFC2822","toHTTP","toSQLDate","toSQLTime","toSQL","toMillis","toSeconds","toBSON","otherDateTime","durOpts","otherIsLater","diffNow","until","inputMs","toRelative","padding","toRel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,CAAC02B,WAAW,CAACrV,OAAZ,EAAD,CAAlD,EAA2E;EAChF,WAAO1L,QAAQ,CAACud,UAAT,CAAoBwD,WAApB,CAAP;EACD,GAFM,MAEA,IAAIA,WAAW,IAAI,OAAOA,WAAP,KAAuB,QAA1C,EAAoD;EACzD,WAAO/gB,QAAQ,CAAC4B,UAAT,CAAoBmf,WAApB,CAAP;EACD,GAFM,MAEA;EACL,UAAM,IAAIh5B,oBAAJ,iCAC0Bg5B,WAD1B,kBACkD,OAAOA,WADzD,CAAN;EAGD;EACF;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/luxon/build/cjs-browser/luxon.js b/node_modules/luxon/build/cjs-browser/luxon.js deleted file mode 100644 index 538e3fa..0000000 --- a/node_modules/luxon/build/cjs-browser/luxon.js +++ /dev/null @@ -1,8293 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } -} - -function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; -} - -function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; -} - -function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); -} - -function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); -} - -function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); - return true; - } catch (e) { - return false; - } -} - -function _construct(Parent, args, Class) { - if (_isNativeReflectConstruct()) { - _construct = Reflect.construct; - } else { - _construct = function _construct(Parent, args, Class) { - var a = [null]; - a.push.apply(a, args); - var Constructor = Function.bind.apply(Parent, a); - var instance = new Constructor(); - if (Class) _setPrototypeOf(instance, Class.prototype); - return instance; - }; - } - - return _construct.apply(null, arguments); -} - -function _isNativeFunction(fn) { - return Function.toString.call(fn).indexOf("[native code]") !== -1; -} - -function _wrapNativeSuper(Class) { - var _cache = typeof Map === "function" ? new Map() : undefined; - - _wrapNativeSuper = function _wrapNativeSuper(Class) { - if (Class === null || !_isNativeFunction(Class)) return Class; - - if (typeof Class !== "function") { - throw new TypeError("Super expression must either be null or a function"); - } - - if (typeof _cache !== "undefined") { - if (_cache.has(Class)) return _cache.get(Class); - - _cache.set(Class, Wrapper); - } - - function Wrapper() { - return _construct(Class, arguments, _getPrototypeOf(this).constructor); - } - - Wrapper.prototype = Object.create(Class.prototype, { - constructor: { - value: Wrapper, - enumerable: false, - writable: true, - configurable: true - } - }); - return _setPrototypeOf(Wrapper, Class); - }; - - return _wrapNativeSuper(Class); -} - -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; -} - -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(n); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); -} - -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; -} - -function _createForOfIteratorHelperLoose(o) { - var i = 0; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) return function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }; - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - i = o[Symbol.iterator](); - return i.next.bind(i); -} - -// these aren't really private, but nor are they really useful to document - -/** - * @private - */ -var LuxonError = /*#__PURE__*/function (_Error) { - _inheritsLoose(LuxonError, _Error); - - function LuxonError() { - return _Error.apply(this, arguments) || this; - } - - return LuxonError; -}( /*#__PURE__*/_wrapNativeSuper(Error)); -/** - * @private - */ - - -var InvalidDateTimeError = /*#__PURE__*/function (_LuxonError) { - _inheritsLoose(InvalidDateTimeError, _LuxonError); - - function InvalidDateTimeError(reason) { - return _LuxonError.call(this, "Invalid DateTime: " + reason.toMessage()) || this; - } - - return InvalidDateTimeError; -}(LuxonError); -/** - * @private - */ - -var InvalidIntervalError = /*#__PURE__*/function (_LuxonError2) { - _inheritsLoose(InvalidIntervalError, _LuxonError2); - - function InvalidIntervalError(reason) { - return _LuxonError2.call(this, "Invalid Interval: " + reason.toMessage()) || this; - } - - return InvalidIntervalError; -}(LuxonError); -/** - * @private - */ - -var InvalidDurationError = /*#__PURE__*/function (_LuxonError3) { - _inheritsLoose(InvalidDurationError, _LuxonError3); - - function InvalidDurationError(reason) { - return _LuxonError3.call(this, "Invalid Duration: " + reason.toMessage()) || this; - } - - return InvalidDurationError; -}(LuxonError); -/** - * @private - */ - -var ConflictingSpecificationError = /*#__PURE__*/function (_LuxonError4) { - _inheritsLoose(ConflictingSpecificationError, _LuxonError4); - - function ConflictingSpecificationError() { - return _LuxonError4.apply(this, arguments) || this; - } - - return ConflictingSpecificationError; -}(LuxonError); -/** - * @private - */ - -var InvalidUnitError = /*#__PURE__*/function (_LuxonError5) { - _inheritsLoose(InvalidUnitError, _LuxonError5); - - function InvalidUnitError(unit) { - return _LuxonError5.call(this, "Invalid unit " + unit) || this; - } - - return InvalidUnitError; -}(LuxonError); -/** - * @private - */ - -var InvalidArgumentError = /*#__PURE__*/function (_LuxonError6) { - _inheritsLoose(InvalidArgumentError, _LuxonError6); - - function InvalidArgumentError() { - return _LuxonError6.apply(this, arguments) || this; - } - - return InvalidArgumentError; -}(LuxonError); -/** - * @private - */ - -var ZoneIsAbstractError = /*#__PURE__*/function (_LuxonError7) { - _inheritsLoose(ZoneIsAbstractError, _LuxonError7); - - function ZoneIsAbstractError() { - return _LuxonError7.call(this, "Zone is an abstract class") || this; - } - - return ZoneIsAbstractError; -}(LuxonError); - -/** - * @private - */ -var n = "numeric", - s = "short", - l = "long"; -var DATE_SHORT = { - year: n, - month: n, - day: n -}; -var DATE_MED = { - year: n, - month: s, - day: n -}; -var DATE_MED_WITH_WEEKDAY = { - year: n, - month: s, - day: n, - weekday: s -}; -var DATE_FULL = { - year: n, - month: l, - day: n -}; -var DATE_HUGE = { - year: n, - month: l, - day: n, - weekday: l -}; -var TIME_SIMPLE = { - hour: n, - minute: n -}; -var TIME_WITH_SECONDS = { - hour: n, - minute: n, - second: n -}; -var TIME_WITH_SHORT_OFFSET = { - hour: n, - minute: n, - second: n, - timeZoneName: s -}; -var TIME_WITH_LONG_OFFSET = { - hour: n, - minute: n, - second: n, - timeZoneName: l -}; -var TIME_24_SIMPLE = { - hour: n, - minute: n, - hour12: false -}; -/** - * {@link toLocaleString}; format like '09:30:23', always 24-hour. - */ - -var TIME_24_WITH_SECONDS = { - hour: n, - minute: n, - second: n, - hour12: false -}; -/** - * {@link toLocaleString}; format like '09:30:23 EDT', always 24-hour. - */ - -var TIME_24_WITH_SHORT_OFFSET = { - hour: n, - minute: n, - second: n, - hour12: false, - timeZoneName: s -}; -/** - * {@link toLocaleString}; format like '09:30:23 Eastern Daylight Time', always 24-hour. - */ - -var TIME_24_WITH_LONG_OFFSET = { - hour: n, - minute: n, - second: n, - hour12: false, - timeZoneName: l -}; -/** - * {@link toLocaleString}; format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. - */ - -var DATETIME_SHORT = { - year: n, - month: n, - day: n, - hour: n, - minute: n -}; -/** - * {@link toLocaleString}; format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. - */ - -var DATETIME_SHORT_WITH_SECONDS = { - year: n, - month: n, - day: n, - hour: n, - minute: n, - second: n -}; -var DATETIME_MED = { - year: n, - month: s, - day: n, - hour: n, - minute: n -}; -var DATETIME_MED_WITH_SECONDS = { - year: n, - month: s, - day: n, - hour: n, - minute: n, - second: n -}; -var DATETIME_MED_WITH_WEEKDAY = { - year: n, - month: s, - day: n, - weekday: s, - hour: n, - minute: n -}; -var DATETIME_FULL = { - year: n, - month: l, - day: n, - hour: n, - minute: n, - timeZoneName: s -}; -var DATETIME_FULL_WITH_SECONDS = { - year: n, - month: l, - day: n, - hour: n, - minute: n, - second: n, - timeZoneName: s -}; -var DATETIME_HUGE = { - year: n, - month: l, - day: n, - weekday: l, - hour: n, - minute: n, - timeZoneName: l -}; -var DATETIME_HUGE_WITH_SECONDS = { - year: n, - month: l, - day: n, - weekday: l, - hour: n, - minute: n, - second: n, - timeZoneName: l -}; - -/* - This is just a junk drawer, containing anything used across multiple classes. - Because Luxon is small(ish), this should stay small and we won't worry about splitting - it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area. -*/ -/** - * @private - */ -// TYPES - -function isUndefined(o) { - return typeof o === "undefined"; -} -function isNumber(o) { - return typeof o === "number"; -} -function isInteger(o) { - return typeof o === "number" && o % 1 === 0; -} -function isString(o) { - return typeof o === "string"; -} -function isDate(o) { - return Object.prototype.toString.call(o) === "[object Date]"; -} // CAPABILITIES - -function hasIntl() { - try { - return typeof Intl !== "undefined" && Intl.DateTimeFormat; - } catch (e) { - return false; - } -} -function hasFormatToParts() { - return !isUndefined(Intl.DateTimeFormat.prototype.formatToParts); -} -function hasRelative() { - try { - return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat; - } catch (e) { - return false; - } -} // OBJECTS AND ARRAYS - -function maybeArray(thing) { - return Array.isArray(thing) ? thing : [thing]; -} -function bestBy(arr, by, compare) { - if (arr.length === 0) { - return undefined; - } - - return arr.reduce(function (best, next) { - var pair = [by(next), next]; - - if (!best) { - return pair; - } else if (compare(best[0], pair[0]) === best[0]) { - return best; - } else { - return pair; - } - }, null)[1]; -} -function pick(obj, keys) { - return keys.reduce(function (a, k) { - a[k] = obj[k]; - return a; - }, {}); -} -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} // NUMBERS AND STRINGS - -function integerBetween(thing, bottom, top) { - return isInteger(thing) && thing >= bottom && thing <= top; -} // x % n but takes the sign of n instead of x - -function floorMod(x, n) { - return x - n * Math.floor(x / n); -} -function padStart(input, n) { - if (n === void 0) { - n = 2; - } - - if (input.toString().length < n) { - return ("0".repeat(n) + input).slice(-n); - } else { - return input.toString(); - } -} -function parseInteger(string) { - if (isUndefined(string) || string === null || string === "") { - return undefined; - } else { - return parseInt(string, 10); - } -} -function parseMillis(fraction) { - // Return undefined (instead of 0) in these cases, where fraction is not set - if (isUndefined(fraction) || fraction === null || fraction === "") { - return undefined; - } else { - var f = parseFloat("0." + fraction) * 1000; - return Math.floor(f); - } -} -function roundTo(number, digits, towardZero) { - if (towardZero === void 0) { - towardZero = false; - } - - var factor = Math.pow(10, digits), - rounder = towardZero ? Math.trunc : Math.round; - return rounder(number * factor) / factor; -} // DATE BASICS - -function isLeapYear(year) { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -} -function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; -} -function daysInMonth(year, month) { - var modMonth = floorMod(month - 1, 12) + 1, - modYear = year + (month - modMonth) / 12; - - if (modMonth === 2) { - return isLeapYear(modYear) ? 29 : 28; - } else { - return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1]; - } -} // covert a calendar object to a local timestamp (epoch, but with the offset baked in) - -function objToLocalTS(obj) { - var d = Date.UTC(obj.year, obj.month - 1, obj.day, obj.hour, obj.minute, obj.second, obj.millisecond); // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that - - if (obj.year < 100 && obj.year >= 0) { - d = new Date(d); - d.setUTCFullYear(d.getUTCFullYear() - 1900); - } - - return +d; -} -function weeksInWeekYear(weekYear) { - var p1 = (weekYear + Math.floor(weekYear / 4) - Math.floor(weekYear / 100) + Math.floor(weekYear / 400)) % 7, - last = weekYear - 1, - p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7; - return p1 === 4 || p2 === 3 ? 53 : 52; -} -function untruncateYear(year) { - if (year > 99) { - return year; - } else return year > 60 ? 1900 + year : 2000 + year; -} // PARSING - -function parseZoneInfo(ts, offsetFormat, locale, timeZone) { - if (timeZone === void 0) { - timeZone = null; - } - - var date = new Date(ts), - intlOpts = { - hour12: false, - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit" - }; - - if (timeZone) { - intlOpts.timeZone = timeZone; - } - - var modified = Object.assign({ - timeZoneName: offsetFormat - }, intlOpts), - intl = hasIntl(); - - if (intl && hasFormatToParts()) { - var parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(function (m) { - return m.type.toLowerCase() === "timezonename"; - }); - return parsed ? parsed.value : null; - } else if (intl) { - // this probably doesn't work for all locales - var without = new Intl.DateTimeFormat(locale, intlOpts).format(date), - included = new Intl.DateTimeFormat(locale, modified).format(date), - diffed = included.substring(without.length), - trimmed = diffed.replace(/^[, \u200e]+/, ""); - return trimmed; - } else { - return null; - } -} // signedOffset('-5', '30') -> -330 - -function signedOffset(offHourStr, offMinuteStr) { - var offHour = parseInt(offHourStr, 10); // don't || this because we want to preserve -0 - - if (Number.isNaN(offHour)) { - offHour = 0; - } - - var offMin = parseInt(offMinuteStr, 10) || 0, - offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin; - return offHour * 60 + offMinSigned; -} // COERCION - -function asNumber(value) { - var numericValue = Number(value); - if (typeof value === "boolean" || value === "" || Number.isNaN(numericValue)) throw new InvalidArgumentError("Invalid unit value " + value); - return numericValue; -} -function normalizeObject(obj, normalizer, nonUnitKeys) { - var normalized = {}; - - for (var u in obj) { - if (hasOwnProperty(obj, u)) { - if (nonUnitKeys.indexOf(u) >= 0) continue; - var v = obj[u]; - if (v === undefined || v === null) continue; - normalized[normalizer(u)] = asNumber(v); - } - } - - return normalized; -} -function formatOffset(offset, format) { - var hours = Math.trunc(Math.abs(offset / 60)), - minutes = Math.trunc(Math.abs(offset % 60)), - sign = offset >= 0 ? "+" : "-"; - - switch (format) { - case "short": - return "" + sign + padStart(hours, 2) + ":" + padStart(minutes, 2); - - case "narrow": - return "" + sign + hours + (minutes > 0 ? ":" + minutes : ""); - - case "techie": - return "" + sign + padStart(hours, 2) + padStart(minutes, 2); - - default: - throw new RangeError("Value format " + format + " is out of range for property format"); - } -} -function timeObject(obj) { - return pick(obj, ["hour", "minute", "second", "millisecond"]); -} -var ianaRegex = /[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/; - -function stringify(obj) { - return JSON.stringify(obj, Object.keys(obj).sort()); -} -/** - * @private - */ - - -var monthsLong = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; -var monthsShort = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; -var monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]; -function months(length) { - switch (length) { - case "narrow": - return monthsNarrow; - - case "short": - return monthsShort; - - case "long": - return monthsLong; - - case "numeric": - return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]; - - case "2-digit": - return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]; - - default: - return null; - } -} -var weekdaysLong = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]; -var weekdaysShort = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; -var weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"]; -function weekdays(length) { - switch (length) { - case "narrow": - return weekdaysNarrow; - - case "short": - return weekdaysShort; - - case "long": - return weekdaysLong; - - case "numeric": - return ["1", "2", "3", "4", "5", "6", "7"]; - - default: - return null; - } -} -var meridiems = ["AM", "PM"]; -var erasLong = ["Before Christ", "Anno Domini"]; -var erasShort = ["BC", "AD"]; -var erasNarrow = ["B", "A"]; -function eras(length) { - switch (length) { - case "narrow": - return erasNarrow; - - case "short": - return erasShort; - - case "long": - return erasLong; - - default: - return null; - } -} -function meridiemForDateTime(dt) { - return meridiems[dt.hour < 12 ? 0 : 1]; -} -function weekdayForDateTime(dt, length) { - return weekdays(length)[dt.weekday - 1]; -} -function monthForDateTime(dt, length) { - return months(length)[dt.month - 1]; -} -function eraForDateTime(dt, length) { - return eras(length)[dt.year < 0 ? 0 : 1]; -} -function formatRelativeTime(unit, count, numeric, narrow) { - if (numeric === void 0) { - numeric = "always"; - } - - if (narrow === void 0) { - narrow = false; - } - - var units = { - years: ["year", "yr."], - quarters: ["quarter", "qtr."], - months: ["month", "mo."], - weeks: ["week", "wk."], - days: ["day", "day", "days"], - hours: ["hour", "hr."], - minutes: ["minute", "min."], - seconds: ["second", "sec."] - }; - var lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1; - - if (numeric === "auto" && lastable) { - var isDay = unit === "days"; - - switch (count) { - case 1: - return isDay ? "tomorrow" : "next " + units[unit][0]; - - case -1: - return isDay ? "yesterday" : "last " + units[unit][0]; - - case 0: - return isDay ? "today" : "this " + units[unit][0]; - - } - } - - var isInPast = Object.is(count, -0) || count < 0, - fmtValue = Math.abs(count), - singular = fmtValue === 1, - lilUnits = units[unit], - fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit; - return isInPast ? fmtValue + " " + fmtUnit + " ago" : "in " + fmtValue + " " + fmtUnit; -} -function formatString(knownFormat) { - // these all have the offsets removed because we don't have access to them - // without all the intl stuff this is backfilling - var filtered = pick(knownFormat, ["weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZoneName", "hour12"]), - key = stringify(filtered), - dateTimeHuge = "EEEE, LLLL d, yyyy, h:mm a"; - - switch (key) { - case stringify(DATE_SHORT): - return "M/d/yyyy"; - - case stringify(DATE_MED): - return "LLL d, yyyy"; - - case stringify(DATE_MED_WITH_WEEKDAY): - return "EEE, LLL d, yyyy"; - - case stringify(DATE_FULL): - return "LLLL d, yyyy"; - - case stringify(DATE_HUGE): - return "EEEE, LLLL d, yyyy"; - - case stringify(TIME_SIMPLE): - return "h:mm a"; - - case stringify(TIME_WITH_SECONDS): - return "h:mm:ss a"; - - case stringify(TIME_WITH_SHORT_OFFSET): - return "h:mm a"; - - case stringify(TIME_WITH_LONG_OFFSET): - return "h:mm a"; - - case stringify(TIME_24_SIMPLE): - return "HH:mm"; - - case stringify(TIME_24_WITH_SECONDS): - return "HH:mm:ss"; - - case stringify(TIME_24_WITH_SHORT_OFFSET): - return "HH:mm"; - - case stringify(TIME_24_WITH_LONG_OFFSET): - return "HH:mm"; - - case stringify(DATETIME_SHORT): - return "M/d/yyyy, h:mm a"; - - case stringify(DATETIME_MED): - return "LLL d, yyyy, h:mm a"; - - case stringify(DATETIME_FULL): - return "LLLL d, yyyy, h:mm a"; - - case stringify(DATETIME_HUGE): - return dateTimeHuge; - - case stringify(DATETIME_SHORT_WITH_SECONDS): - return "M/d/yyyy, h:mm:ss a"; - - case stringify(DATETIME_MED_WITH_SECONDS): - return "LLL d, yyyy, h:mm:ss a"; - - case stringify(DATETIME_MED_WITH_WEEKDAY): - return "EEE, d LLL yyyy, h:mm a"; - - case stringify(DATETIME_FULL_WITH_SECONDS): - return "LLLL d, yyyy, h:mm:ss a"; - - case stringify(DATETIME_HUGE_WITH_SECONDS): - return "EEEE, LLLL d, yyyy, h:mm:ss a"; - - default: - return dateTimeHuge; - } -} - -function stringifyTokens(splits, tokenToString) { - var s = ""; - - for (var _iterator = _createForOfIteratorHelperLoose(splits), _step; !(_step = _iterator()).done;) { - var token = _step.value; - - if (token.literal) { - s += token.val; - } else { - s += tokenToString(token.val); - } - } - - return s; -} - -var _macroTokenToFormatOpts = { - D: DATE_SHORT, - DD: DATE_MED, - DDD: DATE_FULL, - DDDD: DATE_HUGE, - t: TIME_SIMPLE, - tt: TIME_WITH_SECONDS, - ttt: TIME_WITH_SHORT_OFFSET, - tttt: TIME_WITH_LONG_OFFSET, - T: TIME_24_SIMPLE, - TT: TIME_24_WITH_SECONDS, - TTT: TIME_24_WITH_SHORT_OFFSET, - TTTT: TIME_24_WITH_LONG_OFFSET, - f: DATETIME_SHORT, - ff: DATETIME_MED, - fff: DATETIME_FULL, - ffff: DATETIME_HUGE, - F: DATETIME_SHORT_WITH_SECONDS, - FF: DATETIME_MED_WITH_SECONDS, - FFF: DATETIME_FULL_WITH_SECONDS, - FFFF: DATETIME_HUGE_WITH_SECONDS -}; -/** - * @private - */ - -var Formatter = /*#__PURE__*/function () { - Formatter.create = function create(locale, opts) { - if (opts === void 0) { - opts = {}; - } - - return new Formatter(locale, opts); - }; - - Formatter.parseFormat = function parseFormat(fmt) { - var current = null, - currentFull = "", - bracketed = false; - var splits = []; - - for (var i = 0; i < fmt.length; i++) { - var c = fmt.charAt(i); - - if (c === "'") { - if (currentFull.length > 0) { - splits.push({ - literal: bracketed, - val: currentFull - }); - } - - current = null; - currentFull = ""; - bracketed = !bracketed; - } else if (bracketed) { - currentFull += c; - } else if (c === current) { - currentFull += c; - } else { - if (currentFull.length > 0) { - splits.push({ - literal: false, - val: currentFull - }); - } - - currentFull = c; - current = c; - } - } - - if (currentFull.length > 0) { - splits.push({ - literal: bracketed, - val: currentFull - }); - } - - return splits; - }; - - Formatter.macroTokenToFormatOpts = function macroTokenToFormatOpts(token) { - return _macroTokenToFormatOpts[token]; - }; - - function Formatter(locale, formatOpts) { - this.opts = formatOpts; - this.loc = locale; - this.systemLoc = null; - } - - var _proto = Formatter.prototype; - - _proto.formatWithSystemDefault = function formatWithSystemDefault(dt, opts) { - if (this.systemLoc === null) { - this.systemLoc = this.loc.redefaultToSystem(); - } - - var df = this.systemLoc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.format(); - }; - - _proto.formatDateTime = function formatDateTime(dt, opts) { - if (opts === void 0) { - opts = {}; - } - - var df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.format(); - }; - - _proto.formatDateTimeParts = function formatDateTimeParts(dt, opts) { - if (opts === void 0) { - opts = {}; - } - - var df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.formatToParts(); - }; - - _proto.resolvedOptions = function resolvedOptions(dt, opts) { - if (opts === void 0) { - opts = {}; - } - - var df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.resolvedOptions(); - }; - - _proto.num = function num(n, p) { - if (p === void 0) { - p = 0; - } - - // we get some perf out of doing this here, annoyingly - if (this.opts.forceSimple) { - return padStart(n, p); - } - - var opts = Object.assign({}, this.opts); - - if (p > 0) { - opts.padTo = p; - } - - return this.loc.numberFormatter(opts).format(n); - }; - - _proto.formatDateTimeFromString = function formatDateTimeFromString(dt, fmt) { - var _this = this; - - var knownEnglish = this.loc.listingMode() === "en", - useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory" && hasFormatToParts(), - string = function string(opts, extract) { - return _this.loc.extract(dt, opts, extract); - }, - formatOffset = function formatOffset(opts) { - if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) { - return "Z"; - } - - return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : ""; - }, - meridiem = function meridiem() { - return knownEnglish ? meridiemForDateTime(dt) : string({ - hour: "numeric", - hour12: true - }, "dayperiod"); - }, - month = function month(length, standalone) { - return knownEnglish ? monthForDateTime(dt, length) : string(standalone ? { - month: length - } : { - month: length, - day: "numeric" - }, "month"); - }, - weekday = function weekday(length, standalone) { - return knownEnglish ? weekdayForDateTime(dt, length) : string(standalone ? { - weekday: length - } : { - weekday: length, - month: "long", - day: "numeric" - }, "weekday"); - }, - maybeMacro = function maybeMacro(token) { - var formatOpts = Formatter.macroTokenToFormatOpts(token); - - if (formatOpts) { - return _this.formatWithSystemDefault(dt, formatOpts); - } else { - return token; - } - }, - era = function era(length) { - return knownEnglish ? eraForDateTime(dt, length) : string({ - era: length - }, "era"); - }, - tokenToString = function tokenToString(token) { - // Where possible: http://cldr.unicode.org/translation/date-time#TOC-Stand-Alone-vs.-Format-Styles - switch (token) { - // ms - case "S": - return _this.num(dt.millisecond); - - case "u": // falls through - - case "SSS": - return _this.num(dt.millisecond, 3); - // seconds - - case "s": - return _this.num(dt.second); - - case "ss": - return _this.num(dt.second, 2); - // minutes - - case "m": - return _this.num(dt.minute); - - case "mm": - return _this.num(dt.minute, 2); - // hours - - case "h": - return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12); - - case "hh": - return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2); - - case "H": - return _this.num(dt.hour); - - case "HH": - return _this.num(dt.hour, 2); - // offset - - case "Z": - // like +6 - return formatOffset({ - format: "narrow", - allowZ: _this.opts.allowZ - }); - - case "ZZ": - // like +06:00 - return formatOffset({ - format: "short", - allowZ: _this.opts.allowZ - }); - - case "ZZZ": - // like +0600 - return formatOffset({ - format: "techie", - allowZ: _this.opts.allowZ - }); - - case "ZZZZ": - // like EST - return dt.zone.offsetName(dt.ts, { - format: "short", - locale: _this.loc.locale - }); - - case "ZZZZZ": - // like Eastern Standard Time - return dt.zone.offsetName(dt.ts, { - format: "long", - locale: _this.loc.locale - }); - // zone - - case "z": - // like America/New_York - return dt.zoneName; - // meridiems - - case "a": - return meridiem(); - // dates - - case "d": - return useDateTimeFormatter ? string({ - day: "numeric" - }, "day") : _this.num(dt.day); - - case "dd": - return useDateTimeFormatter ? string({ - day: "2-digit" - }, "day") : _this.num(dt.day, 2); - // weekdays - standalone - - case "c": - // like 1 - return _this.num(dt.weekday); - - case "ccc": - // like 'Tues' - return weekday("short", true); - - case "cccc": - // like 'Tuesday' - return weekday("long", true); - - case "ccccc": - // like 'T' - return weekday("narrow", true); - // weekdays - format - - case "E": - // like 1 - return _this.num(dt.weekday); - - case "EEE": - // like 'Tues' - return weekday("short", false); - - case "EEEE": - // like 'Tuesday' - return weekday("long", false); - - case "EEEEE": - // like 'T' - return weekday("narrow", false); - // months - standalone - - case "L": - // like 1 - return useDateTimeFormatter ? string({ - month: "numeric", - day: "numeric" - }, "month") : _this.num(dt.month); - - case "LL": - // like 01, doesn't seem to work - return useDateTimeFormatter ? string({ - month: "2-digit", - day: "numeric" - }, "month") : _this.num(dt.month, 2); - - case "LLL": - // like Jan - return month("short", true); - - case "LLLL": - // like January - return month("long", true); - - case "LLLLL": - // like J - return month("narrow", true); - // months - format - - case "M": - // like 1 - return useDateTimeFormatter ? string({ - month: "numeric" - }, "month") : _this.num(dt.month); - - case "MM": - // like 01 - return useDateTimeFormatter ? string({ - month: "2-digit" - }, "month") : _this.num(dt.month, 2); - - case "MMM": - // like Jan - return month("short", false); - - case "MMMM": - // like January - return month("long", false); - - case "MMMMM": - // like J - return month("narrow", false); - // years - - case "y": - // like 2014 - return useDateTimeFormatter ? string({ - year: "numeric" - }, "year") : _this.num(dt.year); - - case "yy": - // like 14 - return useDateTimeFormatter ? string({ - year: "2-digit" - }, "year") : _this.num(dt.year.toString().slice(-2), 2); - - case "yyyy": - // like 0012 - return useDateTimeFormatter ? string({ - year: "numeric" - }, "year") : _this.num(dt.year, 4); - - case "yyyyyy": - // like 000012 - return useDateTimeFormatter ? string({ - year: "numeric" - }, "year") : _this.num(dt.year, 6); - // eras - - case "G": - // like AD - return era("short"); - - case "GG": - // like Anno Domini - return era("long"); - - case "GGGGG": - return era("narrow"); - - case "kk": - return _this.num(dt.weekYear.toString().slice(-2), 2); - - case "kkkk": - return _this.num(dt.weekYear, 4); - - case "W": - return _this.num(dt.weekNumber); - - case "WW": - return _this.num(dt.weekNumber, 2); - - case "o": - return _this.num(dt.ordinal); - - case "ooo": - return _this.num(dt.ordinal, 3); - - case "q": - // like 1 - return _this.num(dt.quarter); - - case "qq": - // like 01 - return _this.num(dt.quarter, 2); - - case "X": - return _this.num(Math.floor(dt.ts / 1000)); - - case "x": - return _this.num(dt.ts); - - default: - return maybeMacro(token); - } - }; - - return stringifyTokens(Formatter.parseFormat(fmt), tokenToString); - }; - - _proto.formatDurationFromString = function formatDurationFromString(dur, fmt) { - var _this2 = this; - - var tokenToField = function tokenToField(token) { - switch (token[0]) { - case "S": - return "millisecond"; - - case "s": - return "second"; - - case "m": - return "minute"; - - case "h": - return "hour"; - - case "d": - return "day"; - - case "M": - return "month"; - - case "y": - return "year"; - - default: - return null; - } - }, - tokenToString = function tokenToString(lildur) { - return function (token) { - var mapped = tokenToField(token); - - if (mapped) { - return _this2.num(lildur.get(mapped), token.length); - } else { - return token; - } - }; - }, - tokens = Formatter.parseFormat(fmt), - realTokens = tokens.reduce(function (found, _ref) { - var literal = _ref.literal, - val = _ref.val; - return literal ? found : found.concat(val); - }, []), - collapsed = dur.shiftTo.apply(dur, realTokens.map(tokenToField).filter(function (t) { - return t; - })); - - return stringifyTokens(tokens, tokenToString(collapsed)); - }; - - return Formatter; -}(); - -var Invalid = /*#__PURE__*/function () { - function Invalid(reason, explanation) { - this.reason = reason; - this.explanation = explanation; - } - - var _proto = Invalid.prototype; - - _proto.toMessage = function toMessage() { - if (this.explanation) { - return this.reason + ": " + this.explanation; - } else { - return this.reason; - } - }; - - return Invalid; -}(); - -/** - * @interface - */ - -var Zone = /*#__PURE__*/function () { - function Zone() {} - - var _proto = Zone.prototype; - - /** - * Returns the offset's common name (such as EST) at the specified timestamp - * @abstract - * @param {number} ts - Epoch milliseconds for which to get the name - * @param {Object} opts - Options to affect the format - * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. - * @param {string} opts.locale - What locale to return the offset name in. - * @return {string} - */ - _proto.offsetName = function offsetName(ts, opts) { - throw new ZoneIsAbstractError(); - } - /** - * Returns the offset's value as a string - * @abstract - * @param {number} ts - Epoch milliseconds for which to get the offset - * @param {string} format - What style of offset to return. - * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively - * @return {string} - */ - ; - - _proto.formatOffset = function formatOffset(ts, format) { - throw new ZoneIsAbstractError(); - } - /** - * Return the offset in minutes for this zone at the specified timestamp. - * @abstract - * @param {number} ts - Epoch milliseconds for which to compute the offset - * @return {number} - */ - ; - - _proto.offset = function offset(ts) { - throw new ZoneIsAbstractError(); - } - /** - * Return whether this Zone is equal to another zone - * @abstract - * @param {Zone} otherZone - the zone to compare - * @return {boolean} - */ - ; - - _proto.equals = function equals(otherZone) { - throw new ZoneIsAbstractError(); - } - /** - * Return whether this Zone is valid. - * @abstract - * @type {boolean} - */ - ; - - _createClass(Zone, [{ - key: "type", - - /** - * The type of zone - * @abstract - * @type {string} - */ - get: function get() { - throw new ZoneIsAbstractError(); - } - /** - * The name of this zone. - * @abstract - * @type {string} - */ - - }, { - key: "name", - get: function get() { - throw new ZoneIsAbstractError(); - } - /** - * Returns whether the offset is known to be fixed for the whole year. - * @abstract - * @type {boolean} - */ - - }, { - key: "universal", - get: function get() { - throw new ZoneIsAbstractError(); - } - }, { - key: "isValid", - get: function get() { - throw new ZoneIsAbstractError(); - } - }]); - - return Zone; -}(); - -var singleton = null; -/** - * Represents the local zone for this Javascript environment. - * @implements {Zone} - */ - -var LocalZone = /*#__PURE__*/function (_Zone) { - _inheritsLoose(LocalZone, _Zone); - - function LocalZone() { - return _Zone.apply(this, arguments) || this; - } - - var _proto = LocalZone.prototype; - - /** @override **/ - _proto.offsetName = function offsetName(ts, _ref) { - var format = _ref.format, - locale = _ref.locale; - return parseZoneInfo(ts, format, locale); - } - /** @override **/ - ; - - _proto.formatOffset = function formatOffset$1(ts, format) { - return formatOffset(this.offset(ts), format); - } - /** @override **/ - ; - - _proto.offset = function offset(ts) { - return -new Date(ts).getTimezoneOffset(); - } - /** @override **/ - ; - - _proto.equals = function equals(otherZone) { - return otherZone.type === "local"; - } - /** @override **/ - ; - - _createClass(LocalZone, [{ - key: "type", - - /** @override **/ - get: function get() { - return "local"; - } - /** @override **/ - - }, { - key: "name", - get: function get() { - if (hasIntl()) { - return new Intl.DateTimeFormat().resolvedOptions().timeZone; - } else return "local"; - } - /** @override **/ - - }, { - key: "universal", - get: function get() { - return false; - } - }, { - key: "isValid", - get: function get() { - return true; - } - }], [{ - key: "instance", - - /** - * Get a singleton instance of the local zone - * @return {LocalZone} - */ - get: function get() { - if (singleton === null) { - singleton = new LocalZone(); - } - - return singleton; - } - }]); - - return LocalZone; -}(Zone); - -var matchingRegex = RegExp("^" + ianaRegex.source + "$"); -var dtfCache = {}; - -function makeDTF(zone) { - if (!dtfCache[zone]) { - dtfCache[zone] = new Intl.DateTimeFormat("en-US", { - hour12: false, - timeZone: zone, - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit", - second: "2-digit" - }); - } - - return dtfCache[zone]; -} - -var typeToPos = { - year: 0, - month: 1, - day: 2, - hour: 3, - minute: 4, - second: 5 -}; - -function hackyOffset(dtf, date) { - var formatted = dtf.format(date).replace(/\u200E/g, ""), - parsed = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(formatted), - fMonth = parsed[1], - fDay = parsed[2], - fYear = parsed[3], - fHour = parsed[4], - fMinute = parsed[5], - fSecond = parsed[6]; - return [fYear, fMonth, fDay, fHour, fMinute, fSecond]; -} - -function partsOffset(dtf, date) { - var formatted = dtf.formatToParts(date), - filled = []; - - for (var i = 0; i < formatted.length; i++) { - var _formatted$i = formatted[i], - type = _formatted$i.type, - value = _formatted$i.value, - pos = typeToPos[type]; - - if (!isUndefined(pos)) { - filled[pos] = parseInt(value, 10); - } - } - - return filled; -} - -var ianaZoneCache = {}; -/** - * A zone identified by an IANA identifier, like America/New_York - * @implements {Zone} - */ - -var IANAZone = /*#__PURE__*/function (_Zone) { - _inheritsLoose(IANAZone, _Zone); - - /** - * @param {string} name - Zone name - * @return {IANAZone} - */ - IANAZone.create = function create(name) { - if (!ianaZoneCache[name]) { - ianaZoneCache[name] = new IANAZone(name); - } - - return ianaZoneCache[name]; - } - /** - * Reset local caches. Should only be necessary in testing scenarios. - * @return {void} - */ - ; - - IANAZone.resetCache = function resetCache() { - ianaZoneCache = {}; - dtfCache = {}; - } - /** - * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that. - * @param {string} s - The string to check validity on - * @example IANAZone.isValidSpecifier("America/New_York") //=> true - * @example IANAZone.isValidSpecifier("Fantasia/Castle") //=> true - * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false - * @return {boolean} - */ - ; - - IANAZone.isValidSpecifier = function isValidSpecifier(s) { - return !!(s && s.match(matchingRegex)); - } - /** - * Returns whether the provided string identifies a real zone - * @param {string} zone - The string to check - * @example IANAZone.isValidZone("America/New_York") //=> true - * @example IANAZone.isValidZone("Fantasia/Castle") //=> false - * @example IANAZone.isValidZone("Sport~~blorp") //=> false - * @return {boolean} - */ - ; - - IANAZone.isValidZone = function isValidZone(zone) { - try { - new Intl.DateTimeFormat("en-US", { - timeZone: zone - }).format(); - return true; - } catch (e) { - return false; - } - } // Etc/GMT+8 -> -480 - - /** @ignore */ - ; - - IANAZone.parseGMTOffset = function parseGMTOffset(specifier) { - if (specifier) { - var match = specifier.match(/^Etc\/GMT([+-]\d{1,2})$/i); - - if (match) { - return -60 * parseInt(match[1]); - } - } - - return null; - }; - - function IANAZone(name) { - var _this; - - _this = _Zone.call(this) || this; - /** @private **/ - - _this.zoneName = name; - /** @private **/ - - _this.valid = IANAZone.isValidZone(name); - return _this; - } - /** @override **/ - - - var _proto = IANAZone.prototype; - - /** @override **/ - _proto.offsetName = function offsetName(ts, _ref) { - var format = _ref.format, - locale = _ref.locale; - return parseZoneInfo(ts, format, locale, this.name); - } - /** @override **/ - ; - - _proto.formatOffset = function formatOffset$1(ts, format) { - return formatOffset(this.offset(ts), format); - } - /** @override **/ - ; - - _proto.offset = function offset(ts) { - var date = new Date(ts), - dtf = makeDTF(this.name), - _ref2 = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date), - year = _ref2[0], - month = _ref2[1], - day = _ref2[2], - hour = _ref2[3], - minute = _ref2[4], - second = _ref2[5], - adjustedHour = hour === 24 ? 0 : hour; - - var asUTC = objToLocalTS({ - year: year, - month: month, - day: day, - hour: adjustedHour, - minute: minute, - second: second, - millisecond: 0 - }); - var asTS = +date; - var over = asTS % 1000; - asTS -= over >= 0 ? over : 1000 + over; - return (asUTC - asTS) / (60 * 1000); - } - /** @override **/ - ; - - _proto.equals = function equals(otherZone) { - return otherZone.type === "iana" && otherZone.name === this.name; - } - /** @override **/ - ; - - _createClass(IANAZone, [{ - key: "type", - get: function get() { - return "iana"; - } - /** @override **/ - - }, { - key: "name", - get: function get() { - return this.zoneName; - } - /** @override **/ - - }, { - key: "universal", - get: function get() { - return false; - } - }, { - key: "isValid", - get: function get() { - return this.valid; - } - }]); - - return IANAZone; -}(Zone); - -var singleton$1 = null; -/** - * A zone with a fixed offset (meaning no DST) - * @implements {Zone} - */ - -var FixedOffsetZone = /*#__PURE__*/function (_Zone) { - _inheritsLoose(FixedOffsetZone, _Zone); - - /** - * Get an instance with a specified offset - * @param {number} offset - The offset in minutes - * @return {FixedOffsetZone} - */ - FixedOffsetZone.instance = function instance(offset) { - return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset); - } - /** - * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6" - * @param {string} s - The offset string to parse - * @example FixedOffsetZone.parseSpecifier("UTC+6") - * @example FixedOffsetZone.parseSpecifier("UTC+06") - * @example FixedOffsetZone.parseSpecifier("UTC-6:00") - * @return {FixedOffsetZone} - */ - ; - - FixedOffsetZone.parseSpecifier = function parseSpecifier(s) { - if (s) { - var r = s.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); - - if (r) { - return new FixedOffsetZone(signedOffset(r[1], r[2])); - } - } - - return null; - }; - - _createClass(FixedOffsetZone, null, [{ - key: "utcInstance", - - /** - * Get a singleton instance of UTC - * @return {FixedOffsetZone} - */ - get: function get() { - if (singleton$1 === null) { - singleton$1 = new FixedOffsetZone(0); - } - - return singleton$1; - } - }]); - - function FixedOffsetZone(offset) { - var _this; - - _this = _Zone.call(this) || this; - /** @private **/ - - _this.fixed = offset; - return _this; - } - /** @override **/ - - - var _proto = FixedOffsetZone.prototype; - - /** @override **/ - _proto.offsetName = function offsetName() { - return this.name; - } - /** @override **/ - ; - - _proto.formatOffset = function formatOffset$1(ts, format) { - return formatOffset(this.fixed, format); - } - /** @override **/ - ; - - /** @override **/ - _proto.offset = function offset() { - return this.fixed; - } - /** @override **/ - ; - - _proto.equals = function equals(otherZone) { - return otherZone.type === "fixed" && otherZone.fixed === this.fixed; - } - /** @override **/ - ; - - _createClass(FixedOffsetZone, [{ - key: "type", - get: function get() { - return "fixed"; - } - /** @override **/ - - }, { - key: "name", - get: function get() { - return this.fixed === 0 ? "UTC" : "UTC" + formatOffset(this.fixed, "narrow"); - } - }, { - key: "universal", - get: function get() { - return true; - } - }, { - key: "isValid", - get: function get() { - return true; - } - }]); - - return FixedOffsetZone; -}(Zone); - -/** - * A zone that failed to parse. You should never need to instantiate this. - * @implements {Zone} - */ - -var InvalidZone = /*#__PURE__*/function (_Zone) { - _inheritsLoose(InvalidZone, _Zone); - - function InvalidZone(zoneName) { - var _this; - - _this = _Zone.call(this) || this; - /** @private */ - - _this.zoneName = zoneName; - return _this; - } - /** @override **/ - - - var _proto = InvalidZone.prototype; - - /** @override **/ - _proto.offsetName = function offsetName() { - return null; - } - /** @override **/ - ; - - _proto.formatOffset = function formatOffset() { - return ""; - } - /** @override **/ - ; - - _proto.offset = function offset() { - return NaN; - } - /** @override **/ - ; - - _proto.equals = function equals() { - return false; - } - /** @override **/ - ; - - _createClass(InvalidZone, [{ - key: "type", - get: function get() { - return "invalid"; - } - /** @override **/ - - }, { - key: "name", - get: function get() { - return this.zoneName; - } - /** @override **/ - - }, { - key: "universal", - get: function get() { - return false; - } - }, { - key: "isValid", - get: function get() { - return false; - } - }]); - - return InvalidZone; -}(Zone); - -/** - * @private - */ -function normalizeZone(input, defaultZone) { - var offset; - - if (isUndefined(input) || input === null) { - return defaultZone; - } else if (input instanceof Zone) { - return input; - } else if (isString(input)) { - var lowered = input.toLowerCase(); - if (lowered === "local") return defaultZone;else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance;else if ((offset = IANAZone.parseGMTOffset(input)) != null) { - // handle Etc/GMT-4, which V8 chokes on - return FixedOffsetZone.instance(offset); - } else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input);else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input); - } else if (isNumber(input)) { - return FixedOffsetZone.instance(input); - } else if (typeof input === "object" && input.offset && typeof input.offset === "number") { - // This is dumb, but the instanceof check above doesn't seem to really work - // so we're duck checking it - return input; - } else { - return new InvalidZone(input); - } -} - -var now = function now() { - return Date.now(); -}, - defaultZone = null, - // not setting this directly to LocalZone.instance bc loading order issues -defaultLocale = null, - defaultNumberingSystem = null, - defaultOutputCalendar = null, - throwOnInvalid = false; -/** - * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here. - */ - - -var Settings = /*#__PURE__*/function () { - function Settings() {} - - /** - * Reset Luxon's global caches. Should only be necessary in testing scenarios. - * @return {void} - */ - Settings.resetCaches = function resetCaches() { - Locale.resetCache(); - IANAZone.resetCache(); - }; - - _createClass(Settings, null, [{ - key: "now", - - /** - * Get the callback for returning the current timestamp. - * @type {function} - */ - get: function get() { - return now; - } - /** - * Set the callback for returning the current timestamp. - * The function should return a number, which will be interpreted as an Epoch millisecond count - * @type {function} - * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future - * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time - */ - , - set: function set(n) { - now = n; - } - /** - * Get the default time zone to create DateTimes in. - * @type {string} - */ - - }, { - key: "defaultZoneName", - get: function get() { - return Settings.defaultZone.name; - } - /** - * Set the default time zone to create DateTimes in. Does not affect existing instances. - * @type {string} - */ - , - set: function set(z) { - if (!z) { - defaultZone = null; - } else { - defaultZone = normalizeZone(z); - } - } - /** - * Get the default time zone object to create DateTimes in. Does not affect existing instances. - * @type {Zone} - */ - - }, { - key: "defaultZone", - get: function get() { - return defaultZone || LocalZone.instance; - } - /** - * Get the default locale to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - }, { - key: "defaultLocale", - get: function get() { - return defaultLocale; - } - /** - * Set the default locale to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - , - set: function set(locale) { - defaultLocale = locale; - } - /** - * Get the default numbering system to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - }, { - key: "defaultNumberingSystem", - get: function get() { - return defaultNumberingSystem; - } - /** - * Set the default numbering system to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - , - set: function set(numberingSystem) { - defaultNumberingSystem = numberingSystem; - } - /** - * Get the default output calendar to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - }, { - key: "defaultOutputCalendar", - get: function get() { - return defaultOutputCalendar; - } - /** - * Set the default output calendar to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - , - set: function set(outputCalendar) { - defaultOutputCalendar = outputCalendar; - } - /** - * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals - * @type {boolean} - */ - - }, { - key: "throwOnInvalid", - get: function get() { - return throwOnInvalid; - } - /** - * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals - * @type {boolean} - */ - , - set: function set(t) { - throwOnInvalid = t; - } - }]); - - return Settings; -}(); - -var intlDTCache = {}; - -function getCachedDTF(locString, opts) { - if (opts === void 0) { - opts = {}; - } - - var key = JSON.stringify([locString, opts]); - var dtf = intlDTCache[key]; - - if (!dtf) { - dtf = new Intl.DateTimeFormat(locString, opts); - intlDTCache[key] = dtf; - } - - return dtf; -} - -var intlNumCache = {}; - -function getCachedINF(locString, opts) { - if (opts === void 0) { - opts = {}; - } - - var key = JSON.stringify([locString, opts]); - var inf = intlNumCache[key]; - - if (!inf) { - inf = new Intl.NumberFormat(locString, opts); - intlNumCache[key] = inf; - } - - return inf; -} - -var intlRelCache = {}; - -function getCachedRTF(locString, opts) { - if (opts === void 0) { - opts = {}; - } - - var _opts = opts, - base = _opts.base, - cacheKeyOpts = _objectWithoutPropertiesLoose(_opts, ["base"]); // exclude `base` from the options - - - var key = JSON.stringify([locString, cacheKeyOpts]); - var inf = intlRelCache[key]; - - if (!inf) { - inf = new Intl.RelativeTimeFormat(locString, opts); - intlRelCache[key] = inf; - } - - return inf; -} - -var sysLocaleCache = null; - -function systemLocale() { - if (sysLocaleCache) { - return sysLocaleCache; - } else if (hasIntl()) { - var computedSys = new Intl.DateTimeFormat().resolvedOptions().locale; // node sometimes defaults to "und". Override that because that is dumb - - sysLocaleCache = !computedSys || computedSys === "und" ? "en-US" : computedSys; - return sysLocaleCache; - } else { - sysLocaleCache = "en-US"; - return sysLocaleCache; - } -} - -function parseLocaleString(localeStr) { - // I really want to avoid writing a BCP 47 parser - // see, e.g. https://github.com/wooorm/bcp-47 - // Instead, we'll do this: - // a) if the string has no -u extensions, just leave it alone - // b) if it does, use Intl to resolve everything - // c) if Intl fails, try again without the -u - var uIndex = localeStr.indexOf("-u-"); - - if (uIndex === -1) { - return [localeStr]; - } else { - var options; - var smaller = localeStr.substring(0, uIndex); - - try { - options = getCachedDTF(localeStr).resolvedOptions(); - } catch (e) { - options = getCachedDTF(smaller).resolvedOptions(); - } - - var _options = options, - numberingSystem = _options.numberingSystem, - calendar = _options.calendar; // return the smaller one so that we can append the calendar and numbering overrides to it - - return [smaller, numberingSystem, calendar]; - } -} - -function intlConfigString(localeStr, numberingSystem, outputCalendar) { - if (hasIntl()) { - if (outputCalendar || numberingSystem) { - localeStr += "-u"; - - if (outputCalendar) { - localeStr += "-ca-" + outputCalendar; - } - - if (numberingSystem) { - localeStr += "-nu-" + numberingSystem; - } - - return localeStr; - } else { - return localeStr; - } - } else { - return []; - } -} - -function mapMonths(f) { - var ms = []; - - for (var i = 1; i <= 12; i++) { - var dt = DateTime.utc(2016, i, 1); - ms.push(f(dt)); - } - - return ms; -} - -function mapWeekdays(f) { - var ms = []; - - for (var i = 1; i <= 7; i++) { - var dt = DateTime.utc(2016, 11, 13 + i); - ms.push(f(dt)); - } - - return ms; -} - -function listStuff(loc, length, defaultOK, englishFn, intlFn) { - var mode = loc.listingMode(defaultOK); - - if (mode === "error") { - return null; - } else if (mode === "en") { - return englishFn(length); - } else { - return intlFn(length); - } -} - -function supportsFastNumbers(loc) { - if (loc.numberingSystem && loc.numberingSystem !== "latn") { - return false; - } else { - return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || hasIntl() && new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === "latn"; - } -} -/** - * @private - */ - - -var PolyNumberFormatter = /*#__PURE__*/function () { - function PolyNumberFormatter(intl, forceSimple, opts) { - this.padTo = opts.padTo || 0; - this.floor = opts.floor || false; - - if (!forceSimple && hasIntl()) { - var intlOpts = { - useGrouping: false - }; - if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo; - this.inf = getCachedINF(intl, intlOpts); - } - } - - var _proto = PolyNumberFormatter.prototype; - - _proto.format = function format(i) { - if (this.inf) { - var fixed = this.floor ? Math.floor(i) : i; - return this.inf.format(fixed); - } else { - // to match the browser's numberformatter defaults - var _fixed = this.floor ? Math.floor(i) : roundTo(i, 3); - - return padStart(_fixed, this.padTo); - } - }; - - return PolyNumberFormatter; -}(); -/** - * @private - */ - - -var PolyDateFormatter = /*#__PURE__*/function () { - function PolyDateFormatter(dt, intl, opts) { - this.opts = opts; - this.hasIntl = hasIntl(); - var z; - - if (dt.zone.universal && this.hasIntl) { - // Chromium doesn't support fixed-offset zones like Etc/GMT+8 in its formatter, - // See https://bugs.chromium.org/p/chromium/issues/detail?id=364374. - // So we have to make do. Two cases: - // 1. The format options tell us to show the zone. We can't do that, so the best - // we can do is format the date in UTC. - // 2. The format options don't tell us to show the zone. Then we can adjust them - // the time and tell the formatter to show it to us in UTC, so that the time is right - // and the bad zone doesn't show up. - // We can clean all this up when Chrome fixes this. - z = "UTC"; - - if (opts.timeZoneName) { - this.dt = dt; - } else { - this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1000); - } - } else if (dt.zone.type === "local") { - this.dt = dt; - } else { - this.dt = dt; - z = dt.zone.name; - } - - if (this.hasIntl) { - var intlOpts = Object.assign({}, this.opts); - - if (z) { - intlOpts.timeZone = z; - } - - this.dtf = getCachedDTF(intl, intlOpts); - } - } - - var _proto2 = PolyDateFormatter.prototype; - - _proto2.format = function format() { - if (this.hasIntl) { - return this.dtf.format(this.dt.toJSDate()); - } else { - var tokenFormat = formatString(this.opts), - loc = Locale.create("en-US"); - return Formatter.create(loc).formatDateTimeFromString(this.dt, tokenFormat); - } - }; - - _proto2.formatToParts = function formatToParts() { - if (this.hasIntl && hasFormatToParts()) { - return this.dtf.formatToParts(this.dt.toJSDate()); - } else { - // This is kind of a cop out. We actually could do this for English. However, we couldn't do it for intl strings - // and IMO it's too weird to have an uncanny valley like that - return []; - } - }; - - _proto2.resolvedOptions = function resolvedOptions() { - if (this.hasIntl) { - return this.dtf.resolvedOptions(); - } else { - return { - locale: "en-US", - numberingSystem: "latn", - outputCalendar: "gregory" - }; - } - }; - - return PolyDateFormatter; -}(); -/** - * @private - */ - - -var PolyRelFormatter = /*#__PURE__*/function () { - function PolyRelFormatter(intl, isEnglish, opts) { - this.opts = Object.assign({ - style: "long" - }, opts); - - if (!isEnglish && hasRelative()) { - this.rtf = getCachedRTF(intl, opts); - } - } - - var _proto3 = PolyRelFormatter.prototype; - - _proto3.format = function format(count, unit) { - if (this.rtf) { - return this.rtf.format(count, unit); - } else { - return formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== "long"); - } - }; - - _proto3.formatToParts = function formatToParts(count, unit) { - if (this.rtf) { - return this.rtf.formatToParts(count, unit); - } else { - return []; - } - }; - - return PolyRelFormatter; -}(); -/** - * @private - */ - - -var Locale = /*#__PURE__*/function () { - Locale.fromOpts = function fromOpts(opts) { - return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN); - }; - - Locale.create = function create(locale, numberingSystem, outputCalendar, defaultToEN) { - if (defaultToEN === void 0) { - defaultToEN = false; - } - - var specifiedLocale = locale || Settings.defaultLocale, - // the system locale is useful for human readable strings but annoying for parsing/formatting known formats - localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale()), - numberingSystemR = numberingSystem || Settings.defaultNumberingSystem, - outputCalendarR = outputCalendar || Settings.defaultOutputCalendar; - return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale); - }; - - Locale.resetCache = function resetCache() { - sysLocaleCache = null; - intlDTCache = {}; - intlNumCache = {}; - intlRelCache = {}; - }; - - Locale.fromObject = function fromObject(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - locale = _ref.locale, - numberingSystem = _ref.numberingSystem, - outputCalendar = _ref.outputCalendar; - - return Locale.create(locale, numberingSystem, outputCalendar); - }; - - function Locale(locale, numbering, outputCalendar, specifiedLocale) { - var _parseLocaleString = parseLocaleString(locale), - parsedLocale = _parseLocaleString[0], - parsedNumberingSystem = _parseLocaleString[1], - parsedOutputCalendar = _parseLocaleString[2]; - - this.locale = parsedLocale; - this.numberingSystem = numbering || parsedNumberingSystem || null; - this.outputCalendar = outputCalendar || parsedOutputCalendar || null; - this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar); - this.weekdaysCache = { - format: {}, - standalone: {} - }; - this.monthsCache = { - format: {}, - standalone: {} - }; - this.meridiemCache = null; - this.eraCache = {}; - this.specifiedLocale = specifiedLocale; - this.fastNumbersCached = null; - } - - var _proto4 = Locale.prototype; - - _proto4.listingMode = function listingMode(defaultOK) { - if (defaultOK === void 0) { - defaultOK = true; - } - - var intl = hasIntl(), - hasFTP = intl && hasFormatToParts(), - isActuallyEn = this.isEnglish(), - hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory"); - - if (!hasFTP && !(isActuallyEn && hasNoWeirdness) && !defaultOK) { - return "error"; - } else if (!hasFTP || isActuallyEn && hasNoWeirdness) { - return "en"; - } else { - return "intl"; - } - }; - - _proto4.clone = function clone(alts) { - if (!alts || Object.getOwnPropertyNames(alts).length === 0) { - return this; - } else { - return Locale.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, alts.defaultToEN || false); - } - }; - - _proto4.redefaultToEN = function redefaultToEN(alts) { - if (alts === void 0) { - alts = {}; - } - - return this.clone(Object.assign({}, alts, { - defaultToEN: true - })); - }; - - _proto4.redefaultToSystem = function redefaultToSystem(alts) { - if (alts === void 0) { - alts = {}; - } - - return this.clone(Object.assign({}, alts, { - defaultToEN: false - })); - }; - - _proto4.months = function months$1(length, format, defaultOK) { - var _this = this; - - if (format === void 0) { - format = false; - } - - if (defaultOK === void 0) { - defaultOK = true; - } - - return listStuff(this, length, defaultOK, months, function () { - var intl = format ? { - month: length, - day: "numeric" - } : { - month: length - }, - formatStr = format ? "format" : "standalone"; - - if (!_this.monthsCache[formatStr][length]) { - _this.monthsCache[formatStr][length] = mapMonths(function (dt) { - return _this.extract(dt, intl, "month"); - }); - } - - return _this.monthsCache[formatStr][length]; - }); - }; - - _proto4.weekdays = function weekdays$1(length, format, defaultOK) { - var _this2 = this; - - if (format === void 0) { - format = false; - } - - if (defaultOK === void 0) { - defaultOK = true; - } - - return listStuff(this, length, defaultOK, weekdays, function () { - var intl = format ? { - weekday: length, - year: "numeric", - month: "long", - day: "numeric" - } : { - weekday: length - }, - formatStr = format ? "format" : "standalone"; - - if (!_this2.weekdaysCache[formatStr][length]) { - _this2.weekdaysCache[formatStr][length] = mapWeekdays(function (dt) { - return _this2.extract(dt, intl, "weekday"); - }); - } - - return _this2.weekdaysCache[formatStr][length]; - }); - }; - - _proto4.meridiems = function meridiems$1(defaultOK) { - var _this3 = this; - - if (defaultOK === void 0) { - defaultOK = true; - } - - return listStuff(this, undefined, defaultOK, function () { - return meridiems; - }, function () { - // In theory there could be aribitrary day periods. We're gonna assume there are exactly two - // for AM and PM. This is probably wrong, but it's makes parsing way easier. - if (!_this3.meridiemCache) { - var intl = { - hour: "numeric", - hour12: true - }; - _this3.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(function (dt) { - return _this3.extract(dt, intl, "dayperiod"); - }); - } - - return _this3.meridiemCache; - }); - }; - - _proto4.eras = function eras$1(length, defaultOK) { - var _this4 = this; - - if (defaultOK === void 0) { - defaultOK = true; - } - - return listStuff(this, length, defaultOK, eras, function () { - var intl = { - era: length - }; // This is utter bullshit. Different calendars are going to define eras totally differently. What I need is the minimum set of dates - // to definitely enumerate them. - - if (!_this4.eraCache[length]) { - _this4.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(function (dt) { - return _this4.extract(dt, intl, "era"); - }); - } - - return _this4.eraCache[length]; - }); - }; - - _proto4.extract = function extract(dt, intlOpts, field) { - var df = this.dtFormatter(dt, intlOpts), - results = df.formatToParts(), - matching = results.find(function (m) { - return m.type.toLowerCase() === field; - }); - return matching ? matching.value : null; - }; - - _proto4.numberFormatter = function numberFormatter(opts) { - if (opts === void 0) { - opts = {}; - } - - // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave) - // (in contrast, the rest of the condition is used heavily) - return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts); - }; - - _proto4.dtFormatter = function dtFormatter(dt, intlOpts) { - if (intlOpts === void 0) { - intlOpts = {}; - } - - return new PolyDateFormatter(dt, this.intl, intlOpts); - }; - - _proto4.relFormatter = function relFormatter(opts) { - if (opts === void 0) { - opts = {}; - } - - return new PolyRelFormatter(this.intl, this.isEnglish(), opts); - }; - - _proto4.isEnglish = function isEnglish() { - return this.locale === "en" || this.locale.toLowerCase() === "en-us" || hasIntl() && new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us"); - }; - - _proto4.equals = function equals(other) { - return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar; - }; - - _createClass(Locale, [{ - key: "fastNumbers", - get: function get() { - if (this.fastNumbersCached == null) { - this.fastNumbersCached = supportsFastNumbers(this); - } - - return this.fastNumbersCached; - } - }]); - - return Locale; -}(); - -/* - * This file handles parsing for well-specified formats. Here's how it works: - * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match. - * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object - * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence. - * Extractors can take a "cursor" representing the offset in the match to look at. This makes it easy to combine extractors. - * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions. - * Some extractions are super dumb and simpleParse and fromStrings help DRY them. - */ - -function combineRegexes() { - for (var _len = arguments.length, regexes = new Array(_len), _key = 0; _key < _len; _key++) { - regexes[_key] = arguments[_key]; - } - - var full = regexes.reduce(function (f, r) { - return f + r.source; - }, ""); - return RegExp("^" + full + "$"); -} - -function combineExtractors() { - for (var _len2 = arguments.length, extractors = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - extractors[_key2] = arguments[_key2]; - } - - return function (m) { - return extractors.reduce(function (_ref, ex) { - var mergedVals = _ref[0], - mergedZone = _ref[1], - cursor = _ref[2]; - - var _ex = ex(m, cursor), - val = _ex[0], - zone = _ex[1], - next = _ex[2]; - - return [Object.assign(mergedVals, val), mergedZone || zone, next]; - }, [{}, null, 1]).slice(0, 2); - }; -} - -function parse(s) { - if (s == null) { - return [null, null]; - } - - for (var _len3 = arguments.length, patterns = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { - patterns[_key3 - 1] = arguments[_key3]; - } - - for (var _i = 0, _patterns = patterns; _i < _patterns.length; _i++) { - var _patterns$_i = _patterns[_i], - regex = _patterns$_i[0], - extractor = _patterns$_i[1]; - var m = regex.exec(s); - - if (m) { - return extractor(m); - } - } - - return [null, null]; -} - -function simpleParse() { - for (var _len4 = arguments.length, keys = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - keys[_key4] = arguments[_key4]; - } - - return function (match, cursor) { - var ret = {}; - var i; - - for (i = 0; i < keys.length; i++) { - ret[keys[i]] = parseInteger(match[cursor + i]); - } - - return [ret, null, cursor + i]; - }; -} // ISO and SQL parsing - - -var offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, - isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, - isoTimeRegex = RegExp("" + isoTimeBaseRegex.source + offsetRegex.source + "?"), - isoTimeExtensionRegex = RegExp("(?:T" + isoTimeRegex.source + ")?"), - isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, - isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/, - isoOrdinalRegex = /(\d{4})-?(\d{3})/, - extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay"), - extractISOOrdinalData = simpleParse("year", "ordinal"), - sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/, - // dumbed-down version of the ISO one -sqlTimeRegex = RegExp(isoTimeBaseRegex.source + " ?(?:" + offsetRegex.source + "|(" + ianaRegex.source + "))?"), - sqlTimeExtensionRegex = RegExp("(?: " + sqlTimeRegex.source + ")?"); - -function int(match, pos, fallback) { - var m = match[pos]; - return isUndefined(m) ? fallback : parseInteger(m); -} - -function extractISOYmd(match, cursor) { - var item = { - year: int(match, cursor), - month: int(match, cursor + 1, 1), - day: int(match, cursor + 2, 1) - }; - return [item, null, cursor + 3]; -} - -function extractISOTime(match, cursor) { - var item = { - hour: int(match, cursor, 0), - minute: int(match, cursor + 1, 0), - second: int(match, cursor + 2, 0), - millisecond: parseMillis(match[cursor + 3]) - }; - return [item, null, cursor + 4]; -} - -function extractISOOffset(match, cursor) { - var local = !match[cursor] && !match[cursor + 1], - fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]), - zone = local ? null : FixedOffsetZone.instance(fullOffset); - return [{}, zone, cursor + 3]; -} - -function extractIANAZone(match, cursor) { - var zone = match[cursor] ? IANAZone.create(match[cursor]) : null; - return [{}, zone, cursor + 1]; -} // ISO duration parsing - - -var isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/; - -function extractISODuration(match) { - var s = match[0], - yearStr = match[1], - monthStr = match[2], - weekStr = match[3], - dayStr = match[4], - hourStr = match[5], - minuteStr = match[6], - secondStr = match[7], - millisecondsStr = match[8]; - var hasNegativePrefix = s[0] === "-"; - - var maybeNegate = function maybeNegate(num) { - return num && hasNegativePrefix ? -num : num; - }; - - return [{ - years: maybeNegate(parseInteger(yearStr)), - months: maybeNegate(parseInteger(monthStr)), - weeks: maybeNegate(parseInteger(weekStr)), - days: maybeNegate(parseInteger(dayStr)), - hours: maybeNegate(parseInteger(hourStr)), - minutes: maybeNegate(parseInteger(minuteStr)), - seconds: maybeNegate(parseInteger(secondStr)), - milliseconds: maybeNegate(parseMillis(millisecondsStr)) - }]; -} // These are a little braindead. EDT *should* tell us that we're in, say, America/New_York -// and not just that we're in -240 *right now*. But since I don't think these are used that often -// I'm just going to ignore that - - -var obsOffsets = { - GMT: 0, - EDT: -4 * 60, - EST: -5 * 60, - CDT: -5 * 60, - CST: -6 * 60, - MDT: -6 * 60, - MST: -7 * 60, - PDT: -7 * 60, - PST: -8 * 60 -}; - -function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { - var result = { - year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr), - month: monthsShort.indexOf(monthStr) + 1, - day: parseInteger(dayStr), - hour: parseInteger(hourStr), - minute: parseInteger(minuteStr) - }; - if (secondStr) result.second = parseInteger(secondStr); - - if (weekdayStr) { - result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1; - } - - return result; -} // RFC 2822/5322 - - -var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/; - -function extractRFC2822(match) { - var weekdayStr = match[1], - dayStr = match[2], - monthStr = match[3], - yearStr = match[4], - hourStr = match[5], - minuteStr = match[6], - secondStr = match[7], - obsOffset = match[8], - milOffset = match[9], - offHourStr = match[10], - offMinuteStr = match[11], - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - var offset; - - if (obsOffset) { - offset = obsOffsets[obsOffset]; - } else if (milOffset) { - offset = 0; - } else { - offset = signedOffset(offHourStr, offMinuteStr); - } - - return [result, new FixedOffsetZone(offset)]; -} - -function preprocessRFC2822(s) { - // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s.replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim(); -} // http date - - -var rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, - rfc850 = /^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, - ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/; - -function extractRFC1123Or850(match) { - var weekdayStr = match[1], - dayStr = match[2], - monthStr = match[3], - yearStr = match[4], - hourStr = match[5], - minuteStr = match[6], - secondStr = match[7], - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - return [result, FixedOffsetZone.utcInstance]; -} - -function extractASCII(match) { - var weekdayStr = match[1], - monthStr = match[2], - dayStr = match[3], - hourStr = match[4], - minuteStr = match[5], - secondStr = match[6], - yearStr = match[7], - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - return [result, FixedOffsetZone.utcInstance]; -} - -var isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex); -var isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex); -var isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex); -var isoTimeCombinedRegex = combineRegexes(isoTimeRegex); -var extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset); -var extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset); -var extractISOOrdinalDataAndTime = combineExtractors(extractISOOrdinalData, extractISOTime); -var extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset); -/** - * @private - */ - -function parseISODate(s) { - return parse(s, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDataAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]); -} -function parseRFC2822Date(s) { - return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]); -} -function parseHTTPDate(s) { - return parse(s, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]); -} -function parseISODuration(s) { - return parse(s, [isoDuration, extractISODuration]); -} -var sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex); -var sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex); -var extractISOYmdTimeOffsetAndIANAZone = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone); -var extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone); -function parseSQL(s) { - return parse(s, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeOffsetAndIANAZone], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]); -} - -var INVALID = "Invalid Duration"; // unit conversion constants - -var lowOrderMatrix = { - weeks: { - days: 7, - hours: 7 * 24, - minutes: 7 * 24 * 60, - seconds: 7 * 24 * 60 * 60, - milliseconds: 7 * 24 * 60 * 60 * 1000 - }, - days: { - hours: 24, - minutes: 24 * 60, - seconds: 24 * 60 * 60, - milliseconds: 24 * 60 * 60 * 1000 - }, - hours: { - minutes: 60, - seconds: 60 * 60, - milliseconds: 60 * 60 * 1000 - }, - minutes: { - seconds: 60, - milliseconds: 60 * 1000 - }, - seconds: { - milliseconds: 1000 - } -}, - casualMatrix = Object.assign({ - years: { - quarters: 4, - months: 12, - weeks: 52, - days: 365, - hours: 365 * 24, - minutes: 365 * 24 * 60, - seconds: 365 * 24 * 60 * 60, - milliseconds: 365 * 24 * 60 * 60 * 1000 - }, - quarters: { - months: 3, - weeks: 13, - days: 91, - hours: 91 * 24, - minutes: 91 * 24 * 60, - seconds: 91 * 24 * 60 * 60, - milliseconds: 91 * 24 * 60 * 60 * 1000 - }, - months: { - weeks: 4, - days: 30, - hours: 30 * 24, - minutes: 30 * 24 * 60, - seconds: 30 * 24 * 60 * 60, - milliseconds: 30 * 24 * 60 * 60 * 1000 - } -}, lowOrderMatrix), - daysInYearAccurate = 146097.0 / 400, - daysInMonthAccurate = 146097.0 / 4800, - accurateMatrix = Object.assign({ - years: { - quarters: 4, - months: 12, - weeks: daysInYearAccurate / 7, - days: daysInYearAccurate, - hours: daysInYearAccurate * 24, - minutes: daysInYearAccurate * 24 * 60, - seconds: daysInYearAccurate * 24 * 60 * 60, - milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 - }, - quarters: { - months: 3, - weeks: daysInYearAccurate / 28, - days: daysInYearAccurate / 4, - hours: daysInYearAccurate * 24 / 4, - minutes: daysInYearAccurate * 24 * 60 / 4, - seconds: daysInYearAccurate * 24 * 60 * 60 / 4, - milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 / 4 - }, - months: { - weeks: daysInMonthAccurate / 7, - days: daysInMonthAccurate, - hours: daysInMonthAccurate * 24, - minutes: daysInMonthAccurate * 24 * 60, - seconds: daysInMonthAccurate * 24 * 60 * 60, - milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000 - } -}, lowOrderMatrix); // units ordered by size - -var orderedUnits = ["years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"]; -var reverseUnits = orderedUnits.slice(0).reverse(); // clone really means "create another instance just like this one, but with these changes" - -function clone(dur, alts, clear) { - if (clear === void 0) { - clear = false; - } - - // deep merge for vals - var conf = { - values: clear ? alts.values : Object.assign({}, dur.values, alts.values || {}), - loc: dur.loc.clone(alts.loc), - conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy - }; - return new Duration(conf); -} - -function antiTrunc(n) { - return n < 0 ? Math.floor(n) : Math.ceil(n); -} // NB: mutates parameters - - -function convert(matrix, fromMap, fromUnit, toMap, toUnit) { - var conv = matrix[toUnit][fromUnit], - raw = fromMap[fromUnit] / conv, - sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]), - // ok, so this is wild, but see the matrix in the tests - added = !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw); - toMap[toUnit] += added; - fromMap[fromUnit] -= added * conv; -} // NB: mutates parameters - - -function normalizeValues(matrix, vals) { - reverseUnits.reduce(function (previous, current) { - if (!isUndefined(vals[current])) { - if (previous) { - convert(matrix, vals, previous, vals, current); - } - - return current; - } else { - return previous; - } - }, null); -} -/** - * A Duration object represents a period of time, like "2 months" or "1 day, 1 hour". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime.plus} to add a Duration object to a DateTime, producing another DateTime. - * - * Here is a brief overview of commonly used methods and getters in Duration: - * - * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}. - * * **Unit values** See the {@link Duration.years}, {@link Duration.months}, {@link Duration.weeks}, {@link Duration.days}, {@link Duration.hours}, {@link Duration.minutes}, {@link Duration.seconds}, {@link Duration.milliseconds} accessors. - * * **Configuration** See {@link Duration.locale} and {@link Duration.numberingSystem} accessors. - * * **Transformation** To create new Durations out of old ones use {@link Duration.plus}, {@link Duration.minus}, {@link Duration.normalize}, {@link Duration.set}, {@link Duration.reconfigure}, {@link Duration.shiftTo}, and {@link Duration.negate}. - * * **Output** To convert the Duration into other representations, see {@link Duration.as}, {@link Duration.toISO}, {@link Duration.toFormat}, and {@link Duration.toJSON} - * - * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation. - */ - - -var Duration = /*#__PURE__*/function () { - /** - * @private - */ - function Duration(config) { - var accurate = config.conversionAccuracy === "longterm" || false; - /** - * @access private - */ - - this.values = config.values; - /** - * @access private - */ - - this.loc = config.loc || Locale.create(); - /** - * @access private - */ - - this.conversionAccuracy = accurate ? "longterm" : "casual"; - /** - * @access private - */ - - this.invalid = config.invalid || null; - /** - * @access private - */ - - this.matrix = accurate ? accurateMatrix : casualMatrix; - /** - * @access private - */ - - this.isLuxonDuration = true; - } - /** - * Create Duration from a number of milliseconds. - * @param {number} count of milliseconds - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - - - Duration.fromMillis = function fromMillis(count, opts) { - return Duration.fromObject(Object.assign({ - milliseconds: count - }, opts)); - } - /** - * Create a Duration from a Javascript object with keys like 'years' and 'hours. - * If this object is empty then a zero milliseconds duration is returned. - * @param {Object} obj - the object to create the DateTime from - * @param {number} obj.years - * @param {number} obj.quarters - * @param {number} obj.months - * @param {number} obj.weeks - * @param {number} obj.days - * @param {number} obj.hours - * @param {number} obj.minutes - * @param {number} obj.seconds - * @param {number} obj.milliseconds - * @param {string} [obj.locale='en-US'] - the locale to use - * @param {string} obj.numberingSystem - the numbering system to use - * @param {string} [obj.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - ; - - Duration.fromObject = function fromObject(obj) { - if (obj == null || typeof obj !== "object") { - throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got " + (obj === null ? "null" : typeof obj)); - } - - return new Duration({ - values: normalizeObject(obj, Duration.normalizeUnit, ["locale", "numberingSystem", "conversionAccuracy", "zone" // a bit of debt; it's super inconvenient internally not to be able to blindly pass this - ]), - loc: Locale.fromObject(obj), - conversionAccuracy: obj.conversionAccuracy - }); - } - /** - * Create a Duration from an ISO 8601 duration string. - * @param {string} text - text to parse - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @see https://en.wikipedia.org/wiki/ISO_8601#Durations - * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 } - * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 } - * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 } - * @return {Duration} - */ - ; - - Duration.fromISO = function fromISO(text, opts) { - var _parseISODuration = parseISODuration(text), - parsed = _parseISODuration[0]; - - if (parsed) { - var obj = Object.assign(parsed, opts); - return Duration.fromObject(obj); - } else { - return Duration.invalid("unparsable", "the input \"" + text + "\" can't be parsed as ISO 8601"); - } - } - /** - * Create an invalid Duration. - * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {Duration} - */ - ; - - Duration.invalid = function invalid(reason, explanation) { - if (explanation === void 0) { - explanation = null; - } - - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the Duration is invalid"); - } - - var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidDurationError(invalid); - } else { - return new Duration({ - invalid: invalid - }); - } - } - /** - * @private - */ - ; - - Duration.normalizeUnit = function normalizeUnit(unit) { - var normalized = { - year: "years", - years: "years", - quarter: "quarters", - quarters: "quarters", - month: "months", - months: "months", - week: "weeks", - weeks: "weeks", - day: "days", - days: "days", - hour: "hours", - hours: "hours", - minute: "minutes", - minutes: "minutes", - second: "seconds", - seconds: "seconds", - millisecond: "milliseconds", - milliseconds: "milliseconds" - }[unit ? unit.toLowerCase() : unit]; - if (!normalized) throw new InvalidUnitError(unit); - return normalized; - } - /** - * Check if an object is a Duration. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - ; - - Duration.isDuration = function isDuration(o) { - return o && o.isLuxonDuration || false; - } - /** - * Get the locale of a Duration, such 'en-GB' - * @type {string} - */ - ; - - var _proto = Duration.prototype; - - /** - * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens: - * * `S` for milliseconds - * * `s` for seconds - * * `m` for minutes - * * `h` for hours - * * `d` for days - * * `M` for months - * * `y` for years - * Notes: - * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits - * * The duration will be converted to the set of units in the format string using {@link Duration.shiftTo} and the Durations's conversion accuracy setting. - * @param {string} fmt - the format string - * @param {Object} opts - options - * @param {boolean} [opts.floor=true] - floor numerical values - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2" - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002" - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000" - * @return {string} - */ - _proto.toFormat = function toFormat(fmt, opts) { - if (opts === void 0) { - opts = {}; - } - - // reverse-compat since 1.2; we always round down now, never up, and we do it by default - var fmtOpts = Object.assign({}, opts, { - floor: opts.round !== false && opts.floor !== false - }); - return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID; - } - /** - * Returns a Javascript object with this Duration's values. - * @param opts - options for generating the object - * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 } - * @return {Object} - */ - ; - - _proto.toObject = function toObject(opts) { - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid) return {}; - var base = Object.assign({}, this.values); - - if (opts.includeConfig) { - base.conversionAccuracy = this.conversionAccuracy; - base.numberingSystem = this.loc.numberingSystem; - base.locale = this.loc.locale; - } - - return base; - } - /** - * Returns an ISO 8601-compliant string representation of this Duration. - * @see https://en.wikipedia.org/wiki/ISO_8601#Durations - * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S' - * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S' - * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M' - * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M' - * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S' - * @return {string} - */ - ; - - _proto.toISO = function toISO() { - // we could use the formatter, but this is an easier way to get the minimum string - if (!this.isValid) return null; - var s = "P"; - if (this.years !== 0) s += this.years + "Y"; - if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + "M"; - if (this.weeks !== 0) s += this.weeks + "W"; - if (this.days !== 0) s += this.days + "D"; - if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) s += "T"; - if (this.hours !== 0) s += this.hours + "H"; - if (this.minutes !== 0) s += this.minutes + "M"; - if (this.seconds !== 0 || this.milliseconds !== 0) // this will handle "floating point madness" by removing extra decimal places - // https://stackoverflow.com/questions/588004/is-floating-point-math-broken - s += roundTo(this.seconds + this.milliseconds / 1000, 3) + "S"; - if (s === "P") s += "T0S"; - return s; - } - /** - * Returns an ISO 8601 representation of this Duration appropriate for use in JSON. - * @return {string} - */ - ; - - _proto.toJSON = function toJSON() { - return this.toISO(); - } - /** - * Returns an ISO 8601 representation of this Duration appropriate for use in debugging. - * @return {string} - */ - ; - - _proto.toString = function toString() { - return this.toISO(); - } - /** - * Returns an milliseconds value of this Duration. - * @return {number} - */ - ; - - _proto.valueOf = function valueOf() { - return this.as("milliseconds"); - } - /** - * Make this Duration longer by the specified amount. Return a newly-constructed Duration. - * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @return {Duration} - */ - ; - - _proto.plus = function plus(duration) { - if (!this.isValid) return this; - var dur = friendlyDuration(duration), - result = {}; - - for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits), _step; !(_step = _iterator()).done;) { - var k = _step.value; - - if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) { - result[k] = dur.get(k) + this.get(k); - } - } - - return clone(this, { - values: result - }, true); - } - /** - * Make this Duration shorter by the specified amount. Return a newly-constructed Duration. - * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @return {Duration} - */ - ; - - _proto.minus = function minus(duration) { - if (!this.isValid) return this; - var dur = friendlyDuration(duration); - return this.plus(dur.negate()); - } - /** - * Scale this Duration by the specified amount. Return a newly-constructed Duration. - * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number. - * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit(x => x * 2) //=> { hours: 2, minutes: 60 } - * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit((x, u) => u === "hour" ? x * 2 : x) //=> { hours: 2, minutes: 30 } - * @return {Duration} - */ - ; - - _proto.mapUnits = function mapUnits(fn) { - if (!this.isValid) return this; - var result = {}; - - for (var _i = 0, _Object$keys = Object.keys(this.values); _i < _Object$keys.length; _i++) { - var k = _Object$keys[_i]; - result[k] = asNumber(fn(this.values[k], k)); - } - - return clone(this, { - values: result - }, true); - } - /** - * Get the value of unit. - * @param {string} unit - a unit such as 'minute' or 'day' - * @example Duration.fromObject({years: 2, days: 3}).years //=> 2 - * @example Duration.fromObject({years: 2, days: 3}).months //=> 0 - * @example Duration.fromObject({years: 2, days: 3}).days //=> 3 - * @return {number} - */ - ; - - _proto.get = function get(unit) { - return this[Duration.normalizeUnit(unit)]; - } - /** - * "Set" the values of specified units. Return a newly-constructed Duration. - * @param {Object} values - a mapping of units to numbers - * @example dur.set({ years: 2017 }) - * @example dur.set({ hours: 8, minutes: 30 }) - * @return {Duration} - */ - ; - - _proto.set = function set(values) { - if (!this.isValid) return this; - var mixed = Object.assign(this.values, normalizeObject(values, Duration.normalizeUnit, [])); - return clone(this, { - values: mixed - }); - } - /** - * "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration. - * @example dur.reconfigure({ locale: 'en-GB' }) - * @return {Duration} - */ - ; - - _proto.reconfigure = function reconfigure(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - locale = _ref.locale, - numberingSystem = _ref.numberingSystem, - conversionAccuracy = _ref.conversionAccuracy; - - var loc = this.loc.clone({ - locale: locale, - numberingSystem: numberingSystem - }), - opts = { - loc: loc - }; - - if (conversionAccuracy) { - opts.conversionAccuracy = conversionAccuracy; - } - - return clone(this, opts); - } - /** - * Return the length of the duration in the specified unit. - * @param {string} unit - a unit such as 'minutes' or 'days' - * @example Duration.fromObject({years: 1}).as('days') //=> 365 - * @example Duration.fromObject({years: 1}).as('months') //=> 12 - * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5 - * @return {number} - */ - ; - - _proto.as = function as(unit) { - return this.isValid ? this.shiftTo(unit).get(unit) : NaN; - } - /** - * Reduce this Duration to its canonical representation in its current units. - * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 } - * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 } - * @return {Duration} - */ - ; - - _proto.normalize = function normalize() { - if (!this.isValid) return this; - var vals = this.toObject(); - normalizeValues(this.matrix, vals); - return clone(this, { - values: vals - }, true); - } - /** - * Convert this Duration into its representation in a different set of units. - * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 } - * @return {Duration} - */ - ; - - _proto.shiftTo = function shiftTo() { - for (var _len = arguments.length, units = new Array(_len), _key = 0; _key < _len; _key++) { - units[_key] = arguments[_key]; - } - - if (!this.isValid) return this; - - if (units.length === 0) { - return this; - } - - units = units.map(function (u) { - return Duration.normalizeUnit(u); - }); - var built = {}, - accumulated = {}, - vals = this.toObject(); - var lastUnit; - - for (var _iterator2 = _createForOfIteratorHelperLoose(orderedUnits), _step2; !(_step2 = _iterator2()).done;) { - var k = _step2.value; - - if (units.indexOf(k) >= 0) { - lastUnit = k; - var own = 0; // anything we haven't boiled down yet should get boiled to this unit - - for (var ak in accumulated) { - own += this.matrix[ak][k] * accumulated[ak]; - accumulated[ak] = 0; - } // plus anything that's already in this unit - - - if (isNumber(vals[k])) { - own += vals[k]; - } - - var i = Math.trunc(own); - built[k] = i; - accumulated[k] = own - i; // we'd like to absorb these fractions in another unit - // plus anything further down the chain that should be rolled up in to this - - for (var down in vals) { - if (orderedUnits.indexOf(down) > orderedUnits.indexOf(k)) { - convert(this.matrix, vals, down, built, k); - } - } // otherwise, keep it in the wings to boil it later - - } else if (isNumber(vals[k])) { - accumulated[k] = vals[k]; - } - } // anything leftover becomes the decimal for the last unit - // lastUnit must be defined since units is not empty - - - for (var key in accumulated) { - if (accumulated[key] !== 0) { - built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key]; - } - } - - return clone(this, { - values: built - }, true).normalize(); - } - /** - * Return the negative of this Duration. - * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 } - * @return {Duration} - */ - ; - - _proto.negate = function negate() { - if (!this.isValid) return this; - var negated = {}; - - for (var _i2 = 0, _Object$keys2 = Object.keys(this.values); _i2 < _Object$keys2.length; _i2++) { - var k = _Object$keys2[_i2]; - negated[k] = -this.values[k]; - } - - return clone(this, { - values: negated - }, true); - } - /** - * Get the years. - * @type {number} - */ - ; - - /** - * Equality check - * Two Durations are equal iff they have the same units and the same values for each unit. - * @param {Duration} other - * @return {boolean} - */ - _proto.equals = function equals(other) { - if (!this.isValid || !other.isValid) { - return false; - } - - if (!this.loc.equals(other.loc)) { - return false; - } - - for (var _iterator3 = _createForOfIteratorHelperLoose(orderedUnits), _step3; !(_step3 = _iterator3()).done;) { - var u = _step3.value; - - if (this.values[u] !== other.values[u]) { - return false; - } - } - - return true; - }; - - _createClass(Duration, [{ - key: "locale", - get: function get() { - return this.isValid ? this.loc.locale : null; - } - /** - * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration - * - * @type {string} - */ - - }, { - key: "numberingSystem", - get: function get() { - return this.isValid ? this.loc.numberingSystem : null; - } - }, { - key: "years", - get: function get() { - return this.isValid ? this.values.years || 0 : NaN; - } - /** - * Get the quarters. - * @type {number} - */ - - }, { - key: "quarters", - get: function get() { - return this.isValid ? this.values.quarters || 0 : NaN; - } - /** - * Get the months. - * @type {number} - */ - - }, { - key: "months", - get: function get() { - return this.isValid ? this.values.months || 0 : NaN; - } - /** - * Get the weeks - * @type {number} - */ - - }, { - key: "weeks", - get: function get() { - return this.isValid ? this.values.weeks || 0 : NaN; - } - /** - * Get the days. - * @type {number} - */ - - }, { - key: "days", - get: function get() { - return this.isValid ? this.values.days || 0 : NaN; - } - /** - * Get the hours. - * @type {number} - */ - - }, { - key: "hours", - get: function get() { - return this.isValid ? this.values.hours || 0 : NaN; - } - /** - * Get the minutes. - * @type {number} - */ - - }, { - key: "minutes", - get: function get() { - return this.isValid ? this.values.minutes || 0 : NaN; - } - /** - * Get the seconds. - * @return {number} - */ - - }, { - key: "seconds", - get: function get() { - return this.isValid ? this.values.seconds || 0 : NaN; - } - /** - * Get the milliseconds. - * @return {number} - */ - - }, { - key: "milliseconds", - get: function get() { - return this.isValid ? this.values.milliseconds || 0 : NaN; - } - /** - * Returns whether the Duration is invalid. Invalid durations are returned by diff operations - * on invalid DateTimes or Intervals. - * @return {boolean} - */ - - }, { - key: "isValid", - get: function get() { - return this.invalid === null; - } - /** - * Returns an error code if this Duration became invalid, or null if the Duration is valid - * @return {string} - */ - - }, { - key: "invalidReason", - get: function get() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this Duration became invalid, or null if the Duration is valid - * @type {string} - */ - - }, { - key: "invalidExplanation", - get: function get() { - return this.invalid ? this.invalid.explanation : null; - } - }]); - - return Duration; -}(); -function friendlyDuration(durationish) { - if (isNumber(durationish)) { - return Duration.fromMillis(durationish); - } else if (Duration.isDuration(durationish)) { - return durationish; - } else if (typeof durationish === "object") { - return Duration.fromObject(durationish); - } else { - throw new InvalidArgumentError("Unknown duration argument " + durationish + " of type " + typeof durationish); - } -} - -var INVALID$1 = "Invalid Interval"; // checks if the start is equal to or before the end - -function validateStartEnd(start, end) { - if (!start || !start.isValid) { - return Interval.invalid("missing or invalid start"); - } else if (!end || !end.isValid) { - return Interval.invalid("missing or invalid end"); - } else if (end < start) { - return Interval.invalid("end before start", "The end of an interval must be after its start, but you had start=" + start.toISO() + " and end=" + end.toISO()); - } else { - return null; - } -} -/** - * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them. - * - * Here is a brief overview of the most commonly used methods and getters in Interval: - * - * * **Creation** To create an Interval, use {@link fromDateTimes}, {@link after}, {@link before}, or {@link fromISO}. - * * **Accessors** Use {@link start} and {@link end} to get the start and end. - * * **Interrogation** To analyze the Interval, use {@link count}, {@link length}, {@link hasSame}, {@link contains}, {@link isAfter}, or {@link isBefore}. - * * **Transformation** To create other Intervals out of this one, use {@link set}, {@link splitAt}, {@link splitBy}, {@link divideEqually}, {@link merge}, {@link xor}, {@link union}, {@link intersection}, or {@link difference}. - * * **Comparison** To compare this Interval to another one, use {@link equals}, {@link overlaps}, {@link abutsStart}, {@link abutsEnd}, {@link engulfs}. - * * **Output** To convert the Interval into other representations, see {@link toString}, {@link toISO}, {@link toISODate}, {@link toISOTime}, {@link toFormat}, and {@link toDuration}. - */ - - -var Interval = /*#__PURE__*/function () { - /** - * @private - */ - function Interval(config) { - /** - * @access private - */ - this.s = config.start; - /** - * @access private - */ - - this.e = config.end; - /** - * @access private - */ - - this.invalid = config.invalid || null; - /** - * @access private - */ - - this.isLuxonInterval = true; - } - /** - * Create an invalid Interval. - * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {Interval} - */ - - - Interval.invalid = function invalid(reason, explanation) { - if (explanation === void 0) { - explanation = null; - } - - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the Interval is invalid"); - } - - var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidIntervalError(invalid); - } else { - return new Interval({ - invalid: invalid - }); - } - } - /** - * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end. - * @param {DateTime|Date|Object} start - * @param {DateTime|Date|Object} end - * @return {Interval} - */ - ; - - Interval.fromDateTimes = function fromDateTimes(start, end) { - var builtStart = friendlyDateTime(start), - builtEnd = friendlyDateTime(end); - var validateError = validateStartEnd(builtStart, builtEnd); - - if (validateError == null) { - return new Interval({ - start: builtStart, - end: builtEnd - }); - } else { - return validateError; - } - } - /** - * Create an Interval from a start DateTime and a Duration to extend to. - * @param {DateTime|Date|Object} start - * @param {Duration|Object|number} duration - the length of the Interval. - * @return {Interval} - */ - ; - - Interval.after = function after(start, duration) { - var dur = friendlyDuration(duration), - dt = friendlyDateTime(start); - return Interval.fromDateTimes(dt, dt.plus(dur)); - } - /** - * Create an Interval from an end DateTime and a Duration to extend backwards to. - * @param {DateTime|Date|Object} end - * @param {Duration|Object|number} duration - the length of the Interval. - * @return {Interval} - */ - ; - - Interval.before = function before(end, duration) { - var dur = friendlyDuration(duration), - dt = friendlyDateTime(end); - return Interval.fromDateTimes(dt.minus(dur), dt); - } - /** - * Create an Interval from an ISO 8601 string. - * Accepts `/`, `/`, and `/` formats. - * @param {string} text - the ISO string to parse - * @param {Object} [opts] - options to pass {@link DateTime.fromISO} and optionally {@link Duration.fromISO} - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @return {Interval} - */ - ; - - Interval.fromISO = function fromISO(text, opts) { - var _split = (text || "").split("/", 2), - s = _split[0], - e = _split[1]; - - if (s && e) { - var start, startIsValid; - - try { - start = DateTime.fromISO(s, opts); - startIsValid = start.isValid; - } catch (e) { - startIsValid = false; - } - - var end, endIsValid; - - try { - end = DateTime.fromISO(e, opts); - endIsValid = end.isValid; - } catch (e) { - endIsValid = false; - } - - if (startIsValid && endIsValid) { - return Interval.fromDateTimes(start, end); - } - - if (startIsValid) { - var dur = Duration.fromISO(e, opts); - - if (dur.isValid) { - return Interval.after(start, dur); - } - } else if (endIsValid) { - var _dur = Duration.fromISO(s, opts); - - if (_dur.isValid) { - return Interval.before(end, _dur); - } - } - } - - return Interval.invalid("unparsable", "the input \"" + text + "\" can't be parsed as ISO 8601"); - } - /** - * Check if an object is an Interval. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - ; - - Interval.isInterval = function isInterval(o) { - return o && o.isLuxonInterval || false; - } - /** - * Returns the start of the Interval - * @type {DateTime} - */ - ; - - var _proto = Interval.prototype; - - /** - * Returns the length of the Interval in the specified unit. - * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in. - * @return {number} - */ - _proto.length = function length(unit) { - if (unit === void 0) { - unit = "milliseconds"; - } - - return this.isValid ? this.toDuration.apply(this, [unit]).get(unit) : NaN; - } - /** - * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part. - * Unlike {@link length} this counts sections of the calendar, not periods of time, e.g. specifying 'day' - * asks 'what dates are included in this interval?', not 'how many days long is this interval?' - * @param {string} [unit='milliseconds'] - the unit of time to count. - * @return {number} - */ - ; - - _proto.count = function count(unit) { - if (unit === void 0) { - unit = "milliseconds"; - } - - if (!this.isValid) return NaN; - var start = this.start.startOf(unit), - end = this.end.startOf(unit); - return Math.floor(end.diff(start, unit).get(unit)) + 1; - } - /** - * Returns whether this Interval's start and end are both in the same unit of time - * @param {string} unit - the unit of time to check sameness on - * @return {boolean} - */ - ; - - _proto.hasSame = function hasSame(unit) { - return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false; - } - /** - * Return whether this Interval has the same start and end DateTimes. - * @return {boolean} - */ - ; - - _proto.isEmpty = function isEmpty() { - return this.s.valueOf() === this.e.valueOf(); - } - /** - * Return whether this Interval's start is after the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - ; - - _proto.isAfter = function isAfter(dateTime) { - if (!this.isValid) return false; - return this.s > dateTime; - } - /** - * Return whether this Interval's end is before the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - ; - - _proto.isBefore = function isBefore(dateTime) { - if (!this.isValid) return false; - return this.e <= dateTime; - } - /** - * Return whether this Interval contains the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - ; - - _proto.contains = function contains(dateTime) { - if (!this.isValid) return false; - return this.s <= dateTime && this.e > dateTime; - } - /** - * "Sets" the start and/or end dates. Returns a newly-constructed Interval. - * @param {Object} values - the values to set - * @param {DateTime} values.start - the starting DateTime - * @param {DateTime} values.end - the ending DateTime - * @return {Interval} - */ - ; - - _proto.set = function set(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - start = _ref.start, - end = _ref.end; - - if (!this.isValid) return this; - return Interval.fromDateTimes(start || this.s, end || this.e); - } - /** - * Split this Interval at each of the specified DateTimes - * @param {...[DateTime]} dateTimes - the unit of time to count. - * @return {[Interval]} - */ - ; - - _proto.splitAt = function splitAt() { - var _this = this; - - if (!this.isValid) return []; - - for (var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++) { - dateTimes[_key] = arguments[_key]; - } - - var sorted = dateTimes.map(friendlyDateTime).filter(function (d) { - return _this.contains(d); - }).sort(), - results = []; - var s = this.s, - i = 0; - - while (s < this.e) { - var added = sorted[i] || this.e, - next = +added > +this.e ? this.e : added; - results.push(Interval.fromDateTimes(s, next)); - s = next; - i += 1; - } - - return results; - } - /** - * Split this Interval into smaller Intervals, each of the specified length. - * Left over time is grouped into a smaller interval - * @param {Duration|Object|number} duration - The length of each resulting interval. - * @return {[Interval]} - */ - ; - - _proto.splitBy = function splitBy(duration) { - var dur = friendlyDuration(duration); - - if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) { - return []; - } - - var s = this.s, - added, - next; - var results = []; - - while (s < this.e) { - added = s.plus(dur); - next = +added > +this.e ? this.e : added; - results.push(Interval.fromDateTimes(s, next)); - s = next; - } - - return results; - } - /** - * Split this Interval into the specified number of smaller intervals. - * @param {number} numberOfParts - The number of Intervals to divide the Interval into. - * @return {[Interval]} - */ - ; - - _proto.divideEqually = function divideEqually(numberOfParts) { - if (!this.isValid) return []; - return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts); - } - /** - * Return whether this Interval overlaps with the specified Interval - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.overlaps = function overlaps(other) { - return this.e > other.s && this.s < other.e; - } - /** - * Return whether this Interval's end is adjacent to the specified Interval's start. - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.abutsStart = function abutsStart(other) { - if (!this.isValid) return false; - return +this.e === +other.s; - } - /** - * Return whether this Interval's start is adjacent to the specified Interval's end. - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.abutsEnd = function abutsEnd(other) { - if (!this.isValid) return false; - return +other.e === +this.s; - } - /** - * Return whether this Interval engulfs the start and end of the specified Interval. - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.engulfs = function engulfs(other) { - if (!this.isValid) return false; - return this.s <= other.s && this.e >= other.e; - } - /** - * Return whether this Interval has the same start and end as the specified Interval. - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.equals = function equals(other) { - if (!this.isValid || !other.isValid) { - return false; - } - - return this.s.equals(other.s) && this.e.equals(other.e); - } - /** - * Return an Interval representing the intersection of this Interval and the specified Interval. - * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals. - * Returns null if the intersection is empty, meaning, the intervals don't intersect. - * @param {Interval} other - * @return {Interval} - */ - ; - - _proto.intersection = function intersection(other) { - if (!this.isValid) return this; - var s = this.s > other.s ? this.s : other.s, - e = this.e < other.e ? this.e : other.e; - - if (s > e) { - return null; - } else { - return Interval.fromDateTimes(s, e); - } - } - /** - * Return an Interval representing the union of this Interval and the specified Interval. - * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals. - * @param {Interval} other - * @return {Interval} - */ - ; - - _proto.union = function union(other) { - if (!this.isValid) return this; - var s = this.s < other.s ? this.s : other.s, - e = this.e > other.e ? this.e : other.e; - return Interval.fromDateTimes(s, e); - } - /** - * Merge an array of Intervals into a equivalent minimal set of Intervals. - * Combines overlapping and adjacent Intervals. - * @param {[Interval]} intervals - * @return {[Interval]} - */ - ; - - Interval.merge = function merge(intervals) { - var _intervals$sort$reduc = intervals.sort(function (a, b) { - return a.s - b.s; - }).reduce(function (_ref2, item) { - var sofar = _ref2[0], - current = _ref2[1]; - - if (!current) { - return [sofar, item]; - } else if (current.overlaps(item) || current.abutsStart(item)) { - return [sofar, current.union(item)]; - } else { - return [sofar.concat([current]), item]; - } - }, [[], null]), - found = _intervals$sort$reduc[0], - final = _intervals$sort$reduc[1]; - - if (final) { - found.push(final); - } - - return found; - } - /** - * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals. - * @param {[Interval]} intervals - * @return {[Interval]} - */ - ; - - Interval.xor = function xor(intervals) { - var _Array$prototype; - - var start = null, - currentCount = 0; - - var results = [], - ends = intervals.map(function (i) { - return [{ - time: i.s, - type: "s" - }, { - time: i.e, - type: "e" - }]; - }), - flattened = (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, ends), - arr = flattened.sort(function (a, b) { - return a.time - b.time; - }); - - for (var _iterator = _createForOfIteratorHelperLoose(arr), _step; !(_step = _iterator()).done;) { - var i = _step.value; - currentCount += i.type === "s" ? 1 : -1; - - if (currentCount === 1) { - start = i.time; - } else { - if (start && +start !== +i.time) { - results.push(Interval.fromDateTimes(start, i.time)); - } - - start = null; - } - } - - return Interval.merge(results); - } - /** - * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals. - * @param {...Interval} intervals - * @return {[Interval]} - */ - ; - - _proto.difference = function difference() { - var _this2 = this; - - for (var _len2 = arguments.length, intervals = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - intervals[_key2] = arguments[_key2]; - } - - return Interval.xor([this].concat(intervals)).map(function (i) { - return _this2.intersection(i); - }).filter(function (i) { - return i && !i.isEmpty(); - }); - } - /** - * Returns a string representation of this Interval appropriate for debugging. - * @return {string} - */ - ; - - _proto.toString = function toString() { - if (!this.isValid) return INVALID$1; - return "[" + this.s.toISO() + " \u2013 " + this.e.toISO() + ")"; - } - /** - * Returns an ISO 8601-compliant string representation of this Interval. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @param {Object} opts - The same options as {@link DateTime.toISO} - * @return {string} - */ - ; - - _proto.toISO = function toISO(opts) { - if (!this.isValid) return INVALID$1; - return this.s.toISO(opts) + "/" + this.e.toISO(opts); - } - /** - * Returns an ISO 8601-compliant string representation of date of this Interval. - * The time components are ignored. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @return {string} - */ - ; - - _proto.toISODate = function toISODate() { - if (!this.isValid) return INVALID$1; - return this.s.toISODate() + "/" + this.e.toISODate(); - } - /** - * Returns an ISO 8601-compliant string representation of time of this Interval. - * The date components are ignored. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @param {Object} opts - The same options as {@link DateTime.toISO} - * @return {string} - */ - ; - - _proto.toISOTime = function toISOTime(opts) { - if (!this.isValid) return INVALID$1; - return this.s.toISOTime(opts) + "/" + this.e.toISOTime(opts); - } - /** - * Returns a string representation of this Interval formatted according to the specified format string. - * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime.toFormat} for details. - * @param {Object} opts - options - * @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations - * @return {string} - */ - ; - - _proto.toFormat = function toFormat(dateFormat, _temp2) { - var _ref3 = _temp2 === void 0 ? {} : _temp2, - _ref3$separator = _ref3.separator, - separator = _ref3$separator === void 0 ? " – " : _ref3$separator; - - if (!this.isValid) return INVALID$1; - return "" + this.s.toFormat(dateFormat) + separator + this.e.toFormat(dateFormat); - } - /** - * Return a Duration representing the time spanned by this interval. - * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration. - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 } - * @return {Duration} - */ - ; - - _proto.toDuration = function toDuration(unit, opts) { - if (!this.isValid) { - return Duration.invalid(this.invalidReason); - } - - return this.e.diff(this.s, unit, opts); - } - /** - * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes - * @param {function} mapFn - * @return {Interval} - * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC()) - * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 })) - */ - ; - - _proto.mapEndpoints = function mapEndpoints(mapFn) { - return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e)); - }; - - _createClass(Interval, [{ - key: "start", - get: function get() { - return this.isValid ? this.s : null; - } - /** - * Returns the end of the Interval - * @type {DateTime} - */ - - }, { - key: "end", - get: function get() { - return this.isValid ? this.e : null; - } - /** - * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'. - * @type {boolean} - */ - - }, { - key: "isValid", - get: function get() { - return this.invalidReason === null; - } - /** - * Returns an error code if this Interval is invalid, or null if the Interval is valid - * @type {string} - */ - - }, { - key: "invalidReason", - get: function get() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this Interval became invalid, or null if the Interval is valid - * @type {string} - */ - - }, { - key: "invalidExplanation", - get: function get() { - return this.invalid ? this.invalid.explanation : null; - } - }]); - - return Interval; -}(); - -/** - * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment. - */ - -var Info = /*#__PURE__*/function () { - function Info() {} - - /** - * Return whether the specified zone contains a DST. - * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone. - * @return {boolean} - */ - Info.hasDST = function hasDST(zone) { - if (zone === void 0) { - zone = Settings.defaultZone; - } - - var proto = DateTime.local().setZone(zone).set({ - month: 12 - }); - return !zone.universal && proto.offset !== proto.set({ - month: 6 - }).offset; - } - /** - * Return whether the specified zone is a valid IANA specifier. - * @param {string} zone - Zone to check - * @return {boolean} - */ - ; - - Info.isValidIANAZone = function isValidIANAZone(zone) { - return IANAZone.isValidSpecifier(zone) && IANAZone.isValidZone(zone); - } - /** - * Converts the input into a {@link Zone} instance. - * - * * If `input` is already a Zone instance, it is returned unchanged. - * * If `input` is a string containing a valid time zone name, a Zone instance - * with that name is returned. - * * If `input` is a string that doesn't refer to a known time zone, a Zone - * instance with {@link Zone.isValid} == false is returned. - * * If `input is a number, a Zone instance with the specified fixed offset - * in minutes is returned. - * * If `input` is `null` or `undefined`, the default zone is returned. - * @param {string|Zone|number} [input] - the value to be converted - * @return {Zone} - */ - ; - - Info.normalizeZone = function normalizeZone$1(input) { - return normalizeZone(input, Settings.defaultZone); - } - /** - * Return an array of standalone month names. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.outputCalendar='gregory'] - the calendar - * @example Info.months()[0] //=> 'January' - * @example Info.months('short')[0] //=> 'Jan' - * @example Info.months('numeric')[0] //=> '1' - * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.' - * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١' - * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I' - * @return {[string]} - */ - ; - - Info.months = function months(length, _temp) { - if (length === void 0) { - length = "long"; - } - - var _ref = _temp === void 0 ? {} : _temp, - _ref$locale = _ref.locale, - locale = _ref$locale === void 0 ? null : _ref$locale, - _ref$numberingSystem = _ref.numberingSystem, - numberingSystem = _ref$numberingSystem === void 0 ? null : _ref$numberingSystem, - _ref$outputCalendar = _ref.outputCalendar, - outputCalendar = _ref$outputCalendar === void 0 ? "gregory" : _ref$outputCalendar; - - return Locale.create(locale, numberingSystem, outputCalendar).months(length); - } - /** - * Return an array of format month names. - * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that - * changes the string. - * See {@link months} - * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.outputCalendar='gregory'] - the calendar - * @return {[string]} - */ - ; - - Info.monthsFormat = function monthsFormat(length, _temp2) { - if (length === void 0) { - length = "long"; - } - - var _ref2 = _temp2 === void 0 ? {} : _temp2, - _ref2$locale = _ref2.locale, - locale = _ref2$locale === void 0 ? null : _ref2$locale, - _ref2$numberingSystem = _ref2.numberingSystem, - numberingSystem = _ref2$numberingSystem === void 0 ? null : _ref2$numberingSystem, - _ref2$outputCalendar = _ref2.outputCalendar, - outputCalendar = _ref2$outputCalendar === void 0 ? "gregory" : _ref2$outputCalendar; - - return Locale.create(locale, numberingSystem, outputCalendar).months(length, true); - } - /** - * Return an array of standalone week names. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @example Info.weekdays()[0] //=> 'Monday' - * @example Info.weekdays('short')[0] //=> 'Mon' - * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.' - * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين' - * @return {[string]} - */ - ; - - Info.weekdays = function weekdays(length, _temp3) { - if (length === void 0) { - length = "long"; - } - - var _ref3 = _temp3 === void 0 ? {} : _temp3, - _ref3$locale = _ref3.locale, - locale = _ref3$locale === void 0 ? null : _ref3$locale, - _ref3$numberingSystem = _ref3.numberingSystem, - numberingSystem = _ref3$numberingSystem === void 0 ? null : _ref3$numberingSystem; - - return Locale.create(locale, numberingSystem, null).weekdays(length); - } - /** - * Return an array of format week names. - * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that - * changes the string. - * See {@link weekdays} - * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". - * @param {Object} opts - options - * @param {string} [opts.locale=null] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @return {[string]} - */ - ; - - Info.weekdaysFormat = function weekdaysFormat(length, _temp4) { - if (length === void 0) { - length = "long"; - } - - var _ref4 = _temp4 === void 0 ? {} : _temp4, - _ref4$locale = _ref4.locale, - locale = _ref4$locale === void 0 ? null : _ref4$locale, - _ref4$numberingSystem = _ref4.numberingSystem, - numberingSystem = _ref4$numberingSystem === void 0 ? null : _ref4$numberingSystem; - - return Locale.create(locale, numberingSystem, null).weekdays(length, true); - } - /** - * Return an array of meridiems. - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @example Info.meridiems() //=> [ 'AM', 'PM' ] - * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ] - * @return {[string]} - */ - ; - - Info.meridiems = function meridiems(_temp5) { - var _ref5 = _temp5 === void 0 ? {} : _temp5, - _ref5$locale = _ref5.locale, - locale = _ref5$locale === void 0 ? null : _ref5$locale; - - return Locale.create(locale).meridiems(); - } - /** - * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian. - * @param {string} [length='short'] - the length of the era representation, such as "short" or "long". - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @example Info.eras() //=> [ 'BC', 'AD' ] - * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ] - * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ] - * @return {[string]} - */ - ; - - Info.eras = function eras(length, _temp6) { - if (length === void 0) { - length = "short"; - } - - var _ref6 = _temp6 === void 0 ? {} : _temp6, - _ref6$locale = _ref6.locale, - locale = _ref6$locale === void 0 ? null : _ref6$locale; - - return Locale.create(locale, null, "gregory").eras(length); - } - /** - * Return the set of available features in this environment. - * Some features of Luxon are not available in all environments. For example, on older browsers, timezone support is not available. Use this function to figure out if that's the case. - * Keys: - * * `zones`: whether this environment supports IANA timezones - * * `intlTokens`: whether this environment supports internationalized token-based formatting/parsing - * * `intl`: whether this environment supports general internationalization - * * `relative`: whether this environment supports relative time formatting - * @example Info.features() //=> { intl: true, intlTokens: false, zones: true, relative: false } - * @return {Object} - */ - ; - - Info.features = function features() { - var intl = false, - intlTokens = false, - zones = false, - relative = false; - - if (hasIntl()) { - intl = true; - intlTokens = hasFormatToParts(); - relative = hasRelative(); - - try { - zones = new Intl.DateTimeFormat("en", { - timeZone: "America/New_York" - }).resolvedOptions().timeZone === "America/New_York"; - } catch (e) { - zones = false; - } - } - - return { - intl: intl, - intlTokens: intlTokens, - zones: zones, - relative: relative - }; - }; - - return Info; -}(); - -function dayDiff(earlier, later) { - var utcDayStart = function utcDayStart(dt) { - return dt.toUTC(0, { - keepLocalTime: true - }).startOf("day").valueOf(); - }, - ms = utcDayStart(later) - utcDayStart(earlier); - - return Math.floor(Duration.fromMillis(ms).as("days")); -} - -function highOrderDiffs(cursor, later, units) { - var differs = [["years", function (a, b) { - return b.year - a.year; - }], ["months", function (a, b) { - return b.month - a.month + (b.year - a.year) * 12; - }], ["weeks", function (a, b) { - var days = dayDiff(a, b); - return (days - days % 7) / 7; - }], ["days", dayDiff]]; - var results = {}; - var lowestOrder, highWater; - - for (var _i = 0, _differs = differs; _i < _differs.length; _i++) { - var _differs$_i = _differs[_i], - unit = _differs$_i[0], - differ = _differs$_i[1]; - - if (units.indexOf(unit) >= 0) { - var _cursor$plus; - - lowestOrder = unit; - var delta = differ(cursor, later); - highWater = cursor.plus((_cursor$plus = {}, _cursor$plus[unit] = delta, _cursor$plus)); - - if (highWater > later) { - var _cursor$plus2; - - cursor = cursor.plus((_cursor$plus2 = {}, _cursor$plus2[unit] = delta - 1, _cursor$plus2)); - delta -= 1; - } else { - cursor = highWater; - } - - results[unit] = delta; - } - } - - return [cursor, results, highWater, lowestOrder]; -} - -function _diff (earlier, later, units, opts) { - var _highOrderDiffs = highOrderDiffs(earlier, later, units), - cursor = _highOrderDiffs[0], - results = _highOrderDiffs[1], - highWater = _highOrderDiffs[2], - lowestOrder = _highOrderDiffs[3]; - - var remainingMillis = later - cursor; - var lowerOrderUnits = units.filter(function (u) { - return ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0; - }); - - if (lowerOrderUnits.length === 0) { - if (highWater < later) { - var _cursor$plus3; - - highWater = cursor.plus((_cursor$plus3 = {}, _cursor$plus3[lowestOrder] = 1, _cursor$plus3)); - } - - if (highWater !== cursor) { - results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor); - } - } - - var duration = Duration.fromObject(Object.assign(results, opts)); - - if (lowerOrderUnits.length > 0) { - var _Duration$fromMillis; - - return (_Duration$fromMillis = Duration.fromMillis(remainingMillis, opts)).shiftTo.apply(_Duration$fromMillis, lowerOrderUnits).plus(duration); - } else { - return duration; - } -} - -var numberingSystems = { - arab: "[\u0660-\u0669]", - arabext: "[\u06F0-\u06F9]", - bali: "[\u1B50-\u1B59]", - beng: "[\u09E6-\u09EF]", - deva: "[\u0966-\u096F]", - fullwide: "[\uFF10-\uFF19]", - gujr: "[\u0AE6-\u0AEF]", - hanidec: "[〇|一|二|三|四|五|六|七|八|九]", - khmr: "[\u17E0-\u17E9]", - knda: "[\u0CE6-\u0CEF]", - laoo: "[\u0ED0-\u0ED9]", - limb: "[\u1946-\u194F]", - mlym: "[\u0D66-\u0D6F]", - mong: "[\u1810-\u1819]", - mymr: "[\u1040-\u1049]", - orya: "[\u0B66-\u0B6F]", - tamldec: "[\u0BE6-\u0BEF]", - telu: "[\u0C66-\u0C6F]", - thai: "[\u0E50-\u0E59]", - tibt: "[\u0F20-\u0F29]", - latn: "\\d" -}; -var numberingSystemsUTF16 = { - arab: [1632, 1641], - arabext: [1776, 1785], - bali: [6992, 7001], - beng: [2534, 2543], - deva: [2406, 2415], - fullwide: [65296, 65303], - gujr: [2790, 2799], - khmr: [6112, 6121], - knda: [3302, 3311], - laoo: [3792, 3801], - limb: [6470, 6479], - mlym: [3430, 3439], - mong: [6160, 6169], - mymr: [4160, 4169], - orya: [2918, 2927], - tamldec: [3046, 3055], - telu: [3174, 3183], - thai: [3664, 3673], - tibt: [3872, 3881] -}; // eslint-disable-next-line - -var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split(""); -function parseDigits(str) { - var value = parseInt(str, 10); - - if (isNaN(value)) { - value = ""; - - for (var i = 0; i < str.length; i++) { - var code = str.charCodeAt(i); - - if (str[i].search(numberingSystems.hanidec) !== -1) { - value += hanidecChars.indexOf(str[i]); - } else { - for (var key in numberingSystemsUTF16) { - var _numberingSystemsUTF = numberingSystemsUTF16[key], - min = _numberingSystemsUTF[0], - max = _numberingSystemsUTF[1]; - - if (code >= min && code <= max) { - value += code - min; - } - } - } - } - - return parseInt(value, 10); - } else { - return value; - } -} -function digitRegex(_ref, append) { - var numberingSystem = _ref.numberingSystem; - - if (append === void 0) { - append = ""; - } - - return new RegExp("" + numberingSystems[numberingSystem || "latn"] + append); -} - -var MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support"; - -function intUnit(regex, post) { - if (post === void 0) { - post = function post(i) { - return i; - }; - } - - return { - regex: regex, - deser: function deser(_ref) { - var s = _ref[0]; - return post(parseDigits(s)); - } - }; -} - -var NBSP = String.fromCharCode(160); -var spaceOrNBSP = "( |" + NBSP + ")"; -var spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g"); - -function fixListRegex(s) { - // make dots optional and also make them literal - // make space and non breakable space characters interchangeable - return s.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP); -} - -function stripInsensitivities(s) { - return s.replace(/\./g, "") // ignore dots that were made optional - .replace(spaceOrNBSPRegExp, " ") // interchange space and nbsp - .toLowerCase(); -} - -function oneOf(strings, startIndex) { - if (strings === null) { - return null; - } else { - return { - regex: RegExp(strings.map(fixListRegex).join("|")), - deser: function deser(_ref2) { - var s = _ref2[0]; - return strings.findIndex(function (i) { - return stripInsensitivities(s) === stripInsensitivities(i); - }) + startIndex; - } - }; - } -} - -function offset(regex, groups) { - return { - regex: regex, - deser: function deser(_ref3) { - var h = _ref3[1], - m = _ref3[2]; - return signedOffset(h, m); - }, - groups: groups - }; -} - -function simple(regex) { - return { - regex: regex, - deser: function deser(_ref4) { - var s = _ref4[0]; - return s; - } - }; -} - -function escapeToken(value) { - // eslint-disable-next-line no-useless-escape - return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); -} - -function unitForToken(token, loc) { - var one = digitRegex(loc), - two = digitRegex(loc, "{2}"), - three = digitRegex(loc, "{3}"), - four = digitRegex(loc, "{4}"), - six = digitRegex(loc, "{6}"), - oneOrTwo = digitRegex(loc, "{1,2}"), - oneToThree = digitRegex(loc, "{1,3}"), - oneToSix = digitRegex(loc, "{1,6}"), - oneToNine = digitRegex(loc, "{1,9}"), - twoToFour = digitRegex(loc, "{2,4}"), - fourToSix = digitRegex(loc, "{4,6}"), - literal = function literal(t) { - return { - regex: RegExp(escapeToken(t.val)), - deser: function deser(_ref5) { - var s = _ref5[0]; - return s; - }, - literal: true - }; - }, - unitate = function unitate(t) { - if (token.literal) { - return literal(t); - } - - switch (t.val) { - // era - case "G": - return oneOf(loc.eras("short", false), 0); - - case "GG": - return oneOf(loc.eras("long", false), 0); - // years - - case "y": - return intUnit(oneToSix); - - case "yy": - return intUnit(twoToFour, untruncateYear); - - case "yyyy": - return intUnit(four); - - case "yyyyy": - return intUnit(fourToSix); - - case "yyyyyy": - return intUnit(six); - // months - - case "M": - return intUnit(oneOrTwo); - - case "MM": - return intUnit(two); - - case "MMM": - return oneOf(loc.months("short", true, false), 1); - - case "MMMM": - return oneOf(loc.months("long", true, false), 1); - - case "L": - return intUnit(oneOrTwo); - - case "LL": - return intUnit(two); - - case "LLL": - return oneOf(loc.months("short", false, false), 1); - - case "LLLL": - return oneOf(loc.months("long", false, false), 1); - // dates - - case "d": - return intUnit(oneOrTwo); - - case "dd": - return intUnit(two); - // ordinals - - case "o": - return intUnit(oneToThree); - - case "ooo": - return intUnit(three); - // time - - case "HH": - return intUnit(two); - - case "H": - return intUnit(oneOrTwo); - - case "hh": - return intUnit(two); - - case "h": - return intUnit(oneOrTwo); - - case "mm": - return intUnit(two); - - case "m": - return intUnit(oneOrTwo); - - case "q": - return intUnit(oneOrTwo); - - case "qq": - return intUnit(two); - - case "s": - return intUnit(oneOrTwo); - - case "ss": - return intUnit(two); - - case "S": - return intUnit(oneToThree); - - case "SSS": - return intUnit(three); - - case "u": - return simple(oneToNine); - // meridiem - - case "a": - return oneOf(loc.meridiems(), 0); - // weekYear (k) - - case "kkkk": - return intUnit(four); - - case "kk": - return intUnit(twoToFour, untruncateYear); - // weekNumber (W) - - case "W": - return intUnit(oneOrTwo); - - case "WW": - return intUnit(two); - // weekdays - - case "E": - case "c": - return intUnit(one); - - case "EEE": - return oneOf(loc.weekdays("short", false, false), 1); - - case "EEEE": - return oneOf(loc.weekdays("long", false, false), 1); - - case "ccc": - return oneOf(loc.weekdays("short", true, false), 1); - - case "cccc": - return oneOf(loc.weekdays("long", true, false), 1); - // offset/zone - - case "Z": - case "ZZ": - return offset(new RegExp("([+-]" + oneOrTwo.source + ")(?::(" + two.source + "))?"), 2); - - case "ZZZ": - return offset(new RegExp("([+-]" + oneOrTwo.source + ")(" + two.source + ")?"), 2); - // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing - // because we don't have any way to figure out what they are - - case "z": - return simple(/[a-z_+-/]{1,256}?/i); - - default: - return literal(t); - } - }; - - var unit = unitate(token) || { - invalidReason: MISSING_FTP - }; - unit.token = token; - return unit; -} - -var partTypeStyleToTokenVal = { - year: { - "2-digit": "yy", - numeric: "yyyyy" - }, - month: { - numeric: "M", - "2-digit": "MM", - short: "MMM", - long: "MMMM" - }, - day: { - numeric: "d", - "2-digit": "dd" - }, - weekday: { - short: "EEE", - long: "EEEE" - }, - dayperiod: "a", - dayPeriod: "a", - hour: { - numeric: "h", - "2-digit": "hh" - }, - minute: { - numeric: "m", - "2-digit": "mm" - }, - second: { - numeric: "s", - "2-digit": "ss" - } -}; - -function tokenForPart(part, locale, formatOpts) { - var type = part.type, - value = part.value; - - if (type === "literal") { - return { - literal: true, - val: value - }; - } - - var style = formatOpts[type]; - var val = partTypeStyleToTokenVal[type]; - - if (typeof val === "object") { - val = val[style]; - } - - if (val) { - return { - literal: false, - val: val - }; - } - - return undefined; -} - -function buildRegex(units) { - var re = units.map(function (u) { - return u.regex; - }).reduce(function (f, r) { - return f + "(" + r.source + ")"; - }, ""); - return ["^" + re + "$", units]; -} - -function match(input, regex, handlers) { - var matches = input.match(regex); - - if (matches) { - var all = {}; - var matchIndex = 1; - - for (var i in handlers) { - if (hasOwnProperty(handlers, i)) { - var h = handlers[i], - groups = h.groups ? h.groups + 1 : 1; - - if (!h.literal && h.token) { - all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups)); - } - - matchIndex += groups; - } - } - - return [matches, all]; - } else { - return [matches, {}]; - } -} - -function dateTimeFromMatches(matches) { - var toField = function toField(token) { - switch (token) { - case "S": - return "millisecond"; - - case "s": - return "second"; - - case "m": - return "minute"; - - case "h": - case "H": - return "hour"; - - case "d": - return "day"; - - case "o": - return "ordinal"; - - case "L": - case "M": - return "month"; - - case "y": - return "year"; - - case "E": - case "c": - return "weekday"; - - case "W": - return "weekNumber"; - - case "k": - return "weekYear"; - - case "q": - return "quarter"; - - default: - return null; - } - }; - - var zone; - - if (!isUndefined(matches.Z)) { - zone = new FixedOffsetZone(matches.Z); - } else if (!isUndefined(matches.z)) { - zone = IANAZone.create(matches.z); - } else { - zone = null; - } - - if (!isUndefined(matches.q)) { - matches.M = (matches.q - 1) * 3 + 1; - } - - if (!isUndefined(matches.h)) { - if (matches.h < 12 && matches.a === 1) { - matches.h += 12; - } else if (matches.h === 12 && matches.a === 0) { - matches.h = 0; - } - } - - if (matches.G === 0 && matches.y) { - matches.y = -matches.y; - } - - if (!isUndefined(matches.u)) { - matches.S = parseMillis(matches.u); - } - - var vals = Object.keys(matches).reduce(function (r, k) { - var f = toField(k); - - if (f) { - r[f] = matches[k]; - } - - return r; - }, {}); - return [vals, zone]; -} - -var dummyDateTimeCache = null; - -function getDummyDateTime() { - if (!dummyDateTimeCache) { - dummyDateTimeCache = DateTime.fromMillis(1555555555555); - } - - return dummyDateTimeCache; -} - -function maybeExpandMacroToken(token, locale) { - if (token.literal) { - return token; - } - - var formatOpts = Formatter.macroTokenToFormatOpts(token.val); - - if (!formatOpts) { - return token; - } - - var formatter = Formatter.create(locale, formatOpts); - var parts = formatter.formatDateTimeParts(getDummyDateTime()); - var tokens = parts.map(function (p) { - return tokenForPart(p, locale, formatOpts); - }); - - if (tokens.includes(undefined)) { - return token; - } - - return tokens; -} - -function expandMacroTokens(tokens, locale) { - var _Array$prototype; - - return (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, tokens.map(function (t) { - return maybeExpandMacroToken(t, locale); - })); -} -/** - * @private - */ - - -function explainFromTokens(locale, input, format) { - var tokens = expandMacroTokens(Formatter.parseFormat(format), locale), - units = tokens.map(function (t) { - return unitForToken(t, locale); - }), - disqualifyingUnit = units.find(function (t) { - return t.invalidReason; - }); - - if (disqualifyingUnit) { - return { - input: input, - tokens: tokens, - invalidReason: disqualifyingUnit.invalidReason - }; - } else { - var _buildRegex = buildRegex(units), - regexString = _buildRegex[0], - handlers = _buildRegex[1], - regex = RegExp(regexString, "i"), - _match = match(input, regex, handlers), - rawMatches = _match[0], - matches = _match[1], - _ref6 = matches ? dateTimeFromMatches(matches) : [null, null], - result = _ref6[0], - zone = _ref6[1]; - - if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) { - throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format"); - } - - return { - input: input, - tokens: tokens, - regex: regex, - rawMatches: rawMatches, - matches: matches, - result: result, - zone: zone - }; - } -} -function parseFromTokens(locale, input, format) { - var _explainFromTokens = explainFromTokens(locale, input, format), - result = _explainFromTokens.result, - zone = _explainFromTokens.zone, - invalidReason = _explainFromTokens.invalidReason; - - return [result, zone, invalidReason]; -} - -var nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], - leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; - -function unitOutOfRange(unit, value) { - return new Invalid("unit out of range", "you specified " + value + " (of type " + typeof value + ") as a " + unit + ", which is invalid"); -} - -function dayOfWeek(year, month, day) { - var js = new Date(Date.UTC(year, month - 1, day)).getUTCDay(); - return js === 0 ? 7 : js; -} - -function computeOrdinal(year, month, day) { - return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1]; -} - -function uncomputeOrdinal(year, ordinal) { - var table = isLeapYear(year) ? leapLadder : nonLeapLadder, - month0 = table.findIndex(function (i) { - return i < ordinal; - }), - day = ordinal - table[month0]; - return { - month: month0 + 1, - day: day - }; -} -/** - * @private - */ - - -function gregorianToWeek(gregObj) { - var year = gregObj.year, - month = gregObj.month, - day = gregObj.day, - ordinal = computeOrdinal(year, month, day), - weekday = dayOfWeek(year, month, day); - var weekNumber = Math.floor((ordinal - weekday + 10) / 7), - weekYear; - - if (weekNumber < 1) { - weekYear = year - 1; - weekNumber = weeksInWeekYear(weekYear); - } else if (weekNumber > weeksInWeekYear(year)) { - weekYear = year + 1; - weekNumber = 1; - } else { - weekYear = year; - } - - return Object.assign({ - weekYear: weekYear, - weekNumber: weekNumber, - weekday: weekday - }, timeObject(gregObj)); -} -function weekToGregorian(weekData) { - var weekYear = weekData.weekYear, - weekNumber = weekData.weekNumber, - weekday = weekData.weekday, - weekdayOfJan4 = dayOfWeek(weekYear, 1, 4), - yearInDays = daysInYear(weekYear); - var ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3, - year; - - if (ordinal < 1) { - year = weekYear - 1; - ordinal += daysInYear(year); - } else if (ordinal > yearInDays) { - year = weekYear + 1; - ordinal -= daysInYear(weekYear); - } else { - year = weekYear; - } - - var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal), - month = _uncomputeOrdinal.month, - day = _uncomputeOrdinal.day; - - return Object.assign({ - year: year, - month: month, - day: day - }, timeObject(weekData)); -} -function gregorianToOrdinal(gregData) { - var year = gregData.year, - month = gregData.month, - day = gregData.day, - ordinal = computeOrdinal(year, month, day); - return Object.assign({ - year: year, - ordinal: ordinal - }, timeObject(gregData)); -} -function ordinalToGregorian(ordinalData) { - var year = ordinalData.year, - ordinal = ordinalData.ordinal, - _uncomputeOrdinal2 = uncomputeOrdinal(year, ordinal), - month = _uncomputeOrdinal2.month, - day = _uncomputeOrdinal2.day; - - return Object.assign({ - year: year, - month: month, - day: day - }, timeObject(ordinalData)); -} -function hasInvalidWeekData(obj) { - var validYear = isInteger(obj.weekYear), - validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear)), - validWeekday = integerBetween(obj.weekday, 1, 7); - - if (!validYear) { - return unitOutOfRange("weekYear", obj.weekYear); - } else if (!validWeek) { - return unitOutOfRange("week", obj.week); - } else if (!validWeekday) { - return unitOutOfRange("weekday", obj.weekday); - } else return false; -} -function hasInvalidOrdinalData(obj) { - var validYear = isInteger(obj.year), - validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year)); - - if (!validYear) { - return unitOutOfRange("year", obj.year); - } else if (!validOrdinal) { - return unitOutOfRange("ordinal", obj.ordinal); - } else return false; -} -function hasInvalidGregorianData(obj) { - var validYear = isInteger(obj.year), - validMonth = integerBetween(obj.month, 1, 12), - validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month)); - - if (!validYear) { - return unitOutOfRange("year", obj.year); - } else if (!validMonth) { - return unitOutOfRange("month", obj.month); - } else if (!validDay) { - return unitOutOfRange("day", obj.day); - } else return false; -} -function hasInvalidTimeData(obj) { - var hour = obj.hour, - minute = obj.minute, - second = obj.second, - millisecond = obj.millisecond; - var validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, - validMinute = integerBetween(minute, 0, 59), - validSecond = integerBetween(second, 0, 59), - validMillisecond = integerBetween(millisecond, 0, 999); - - if (!validHour) { - return unitOutOfRange("hour", hour); - } else if (!validMinute) { - return unitOutOfRange("minute", minute); - } else if (!validSecond) { - return unitOutOfRange("second", second); - } else if (!validMillisecond) { - return unitOutOfRange("millisecond", millisecond); - } else return false; -} - -var INVALID$2 = "Invalid DateTime"; -var MAX_DATE = 8.64e15; - -function unsupportedZone(zone) { - return new Invalid("unsupported zone", "the zone \"" + zone.name + "\" is not supported"); -} // we cache week data on the DT object and this intermediates the cache - - -function possiblyCachedWeekData(dt) { - if (dt.weekData === null) { - dt.weekData = gregorianToWeek(dt.c); - } - - return dt.weekData; -} // clone really means, "make a new object with these modifications". all "setters" really use this -// to create a new object while only changing some of the properties - - -function clone$1(inst, alts) { - var current = { - ts: inst.ts, - zone: inst.zone, - c: inst.c, - o: inst.o, - loc: inst.loc, - invalid: inst.invalid - }; - return new DateTime(Object.assign({}, current, alts, { - old: current - })); -} // find the right offset a given local time. The o input is our guess, which determines which -// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST) - - -function fixOffset(localTS, o, tz) { - // Our UTC time is just a guess because our offset is just a guess - var utcGuess = localTS - o * 60 * 1000; // Test whether the zone matches the offset for this ts - - var o2 = tz.offset(utcGuess); // If so, offset didn't change and we're done - - if (o === o2) { - return [utcGuess, o]; - } // If not, change the ts by the difference in the offset - - - utcGuess -= (o2 - o) * 60 * 1000; // If that gives us the local time we want, we're done - - var o3 = tz.offset(utcGuess); - - if (o2 === o3) { - return [utcGuess, o2]; - } // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time - - - return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)]; -} // convert an epoch timestamp into a calendar object with the given offset - - -function tsToObj(ts, offset) { - ts += offset * 60 * 1000; - var d = new Date(ts); - return { - year: d.getUTCFullYear(), - month: d.getUTCMonth() + 1, - day: d.getUTCDate(), - hour: d.getUTCHours(), - minute: d.getUTCMinutes(), - second: d.getUTCSeconds(), - millisecond: d.getUTCMilliseconds() - }; -} // convert a calendar object to a epoch timestamp - - -function objToTS(obj, offset, zone) { - return fixOffset(objToLocalTS(obj), offset, zone); -} // create a new DT instance by adding a duration, adjusting for DSTs - - -function adjustTime(inst, dur) { - var oPre = inst.o, - year = inst.c.year + Math.trunc(dur.years), - month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, - c = Object.assign({}, inst.c, { - year: year, - month: month, - day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7 - }), - millisToAdd = Duration.fromObject({ - years: dur.years - Math.trunc(dur.years), - quarters: dur.quarters - Math.trunc(dur.quarters), - months: dur.months - Math.trunc(dur.months), - weeks: dur.weeks - Math.trunc(dur.weeks), - days: dur.days - Math.trunc(dur.days), - hours: dur.hours, - minutes: dur.minutes, - seconds: dur.seconds, - milliseconds: dur.milliseconds - }).as("milliseconds"), - localTS = objToLocalTS(c); - - var _fixOffset = fixOffset(localTS, oPre, inst.zone), - ts = _fixOffset[0], - o = _fixOffset[1]; - - if (millisToAdd !== 0) { - ts += millisToAdd; // that could have changed the offset by going over a DST, but we want to keep the ts the same - - o = inst.zone.offset(ts); - } - - return { - ts: ts, - o: o - }; -} // helper useful in turning the results of parsing into real dates -// by handling the zone options - - -function parseDataToDateTime(parsed, parsedZone, opts, format, text) { - var setZone = opts.setZone, - zone = opts.zone; - - if (parsed && Object.keys(parsed).length !== 0) { - var interpretationZone = parsedZone || zone, - inst = DateTime.fromObject(Object.assign(parsed, opts, { - zone: interpretationZone, - // setZone is a valid option in the calling methods, but not in fromObject - setZone: undefined - })); - return setZone ? inst : inst.setZone(zone); - } else { - return DateTime.invalid(new Invalid("unparsable", "the input \"" + text + "\" can't be parsed as " + format)); - } -} // if you want to output a technical format (e.g. RFC 2822), this helper -// helps handle the details - - -function toTechFormat(dt, format, allowZ) { - if (allowZ === void 0) { - allowZ = true; - } - - return dt.isValid ? Formatter.create(Locale.create("en-US"), { - allowZ: allowZ, - forceSimple: true - }).formatDateTimeFromString(dt, format) : null; -} // technical time formats (e.g. the time part of ISO 8601), take some options -// and this commonizes their handling - - -function toTechTimeFormat(dt, _ref) { - var _ref$suppressSeconds = _ref.suppressSeconds, - suppressSeconds = _ref$suppressSeconds === void 0 ? false : _ref$suppressSeconds, - _ref$suppressMillisec = _ref.suppressMilliseconds, - suppressMilliseconds = _ref$suppressMillisec === void 0 ? false : _ref$suppressMillisec, - includeOffset = _ref.includeOffset, - _ref$includeZone = _ref.includeZone, - includeZone = _ref$includeZone === void 0 ? false : _ref$includeZone, - _ref$spaceZone = _ref.spaceZone, - spaceZone = _ref$spaceZone === void 0 ? false : _ref$spaceZone, - _ref$format = _ref.format, - format = _ref$format === void 0 ? "extended" : _ref$format; - var fmt = format === "basic" ? "HHmm" : "HH:mm"; - - if (!suppressSeconds || dt.second !== 0 || dt.millisecond !== 0) { - fmt += format === "basic" ? "ss" : ":ss"; - - if (!suppressMilliseconds || dt.millisecond !== 0) { - fmt += ".SSS"; - } - } - - if ((includeZone || includeOffset) && spaceZone) { - fmt += " "; - } - - if (includeZone) { - fmt += "z"; - } else if (includeOffset) { - fmt += format === "basic" ? "ZZZ" : "ZZ"; - } - - return toTechFormat(dt, fmt); -} // defaults for unspecified units in the supported calendars - - -var defaultUnitValues = { - month: 1, - day: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 -}, - defaultWeekUnitValues = { - weekNumber: 1, - weekday: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 -}, - defaultOrdinalUnitValues = { - ordinal: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 -}; // Units in the supported calendars, sorted by bigness - -var orderedUnits$1 = ["year", "month", "day", "hour", "minute", "second", "millisecond"], - orderedWeekUnits = ["weekYear", "weekNumber", "weekday", "hour", "minute", "second", "millisecond"], - orderedOrdinalUnits = ["year", "ordinal", "hour", "minute", "second", "millisecond"]; // standardize case and plurality in units - -function normalizeUnit(unit) { - var normalized = { - year: "year", - years: "year", - month: "month", - months: "month", - day: "day", - days: "day", - hour: "hour", - hours: "hour", - minute: "minute", - minutes: "minute", - quarter: "quarter", - quarters: "quarter", - second: "second", - seconds: "second", - millisecond: "millisecond", - milliseconds: "millisecond", - weekday: "weekday", - weekdays: "weekday", - weeknumber: "weekNumber", - weeksnumber: "weekNumber", - weeknumbers: "weekNumber", - weekyear: "weekYear", - weekyears: "weekYear", - ordinal: "ordinal" - }[unit.toLowerCase()]; - if (!normalized) throw new InvalidUnitError(unit); - return normalized; -} // this is a dumbed down version of fromObject() that runs about 60% faster -// but doesn't do any validation, makes a bunch of assumptions about what units -// are present, and so on. - - -function quickDT(obj, zone) { - // assume we have the higher-order units - for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits$1), _step; !(_step = _iterator()).done;) { - var u = _step.value; - - if (isUndefined(obj[u])) { - obj[u] = defaultUnitValues[u]; - } - } - - var invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj); - - if (invalid) { - return DateTime.invalid(invalid); - } - - var tsNow = Settings.now(), - offsetProvis = zone.offset(tsNow), - _objToTS = objToTS(obj, offsetProvis, zone), - ts = _objToTS[0], - o = _objToTS[1]; - - return new DateTime({ - ts: ts, - zone: zone, - o: o - }); -} - -function diffRelative(start, end, opts) { - var round = isUndefined(opts.round) ? true : opts.round, - format = function format(c, unit) { - c = roundTo(c, round || opts.calendary ? 0 : 2, true); - var formatter = end.loc.clone(opts).relFormatter(opts); - return formatter.format(c, unit); - }, - differ = function differ(unit) { - if (opts.calendary) { - if (!end.hasSame(start, unit)) { - return end.startOf(unit).diff(start.startOf(unit), unit).get(unit); - } else return 0; - } else { - return end.diff(start, unit).get(unit); - } - }; - - if (opts.unit) { - return format(differ(opts.unit), opts.unit); - } - - for (var _iterator2 = _createForOfIteratorHelperLoose(opts.units), _step2; !(_step2 = _iterator2()).done;) { - var unit = _step2.value; - var count = differ(unit); - - if (Math.abs(count) >= 1) { - return format(count, unit); - } - } - - return format(0, opts.units[opts.units.length - 1]); -} -/** - * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them. - * - * A DateTime comprises of: - * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch. - * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone). - * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`. - * - * Here is a brief overview of the most commonly used functionality it provides: - * - * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link local}, {@link utc}, and (most flexibly) {@link fromObject}. To create one from a standard string format, use {@link fromISO}, {@link fromHTTP}, and {@link fromRFC2822}. To create one from a custom string format, use {@link fromFormat}. To create one from a native JS date, use {@link fromJSDate}. - * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link toObject}), use the {@link year}, {@link month}, - * {@link day}, {@link hour}, {@link minute}, {@link second}, {@link millisecond} accessors. - * * **Week calendar**: For ISO week calendar attributes, see the {@link weekYear}, {@link weekNumber}, and {@link weekday} accessors. - * * **Configuration** See the {@link locale} and {@link numberingSystem} accessors. - * * **Transformation**: To transform the DateTime into other DateTimes, use {@link set}, {@link reconfigure}, {@link setZone}, {@link setLocale}, {@link plus}, {@link minus}, {@link endOf}, {@link startOf}, {@link toUTC}, and {@link toLocal}. - * * **Output**: To convert the DateTime to other representations, use the {@link toRelative}, {@link toRelativeCalendar}, {@link toJSON}, {@link toISO}, {@link toHTTP}, {@link toObject}, {@link toRFC2822}, {@link toString}, {@link toLocaleString}, {@link toFormat}, {@link toMillis} and {@link toJSDate}. - * - * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation. - */ - - -var DateTime = /*#__PURE__*/function () { - /** - * @access private - */ - function DateTime(config) { - var zone = config.zone || Settings.defaultZone; - var invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null); - /** - * @access private - */ - - this.ts = isUndefined(config.ts) ? Settings.now() : config.ts; - var c = null, - o = null; - - if (!invalid) { - var unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone); - - if (unchanged) { - var _ref2 = [config.old.c, config.old.o]; - c = _ref2[0]; - o = _ref2[1]; - } else { - var ot = zone.offset(this.ts); - c = tsToObj(this.ts, ot); - invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null; - c = invalid ? null : c; - o = invalid ? null : ot; - } - } - /** - * @access private - */ - - - this._zone = zone; - /** - * @access private - */ - - this.loc = config.loc || Locale.create(); - /** - * @access private - */ - - this.invalid = invalid; - /** - * @access private - */ - - this.weekData = null; - /** - * @access private - */ - - this.c = c; - /** - * @access private - */ - - this.o = o; - /** - * @access private - */ - - this.isLuxonDateTime = true; - } // CONSTRUCT - - /** - * Create a local DateTime - * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used - * @param {number} [month=1] - The month, 1-indexed - * @param {number} [day=1] - The day of the month - * @param {number} [hour=0] - The hour of the day, in 24-hour time - * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 - * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 - * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 - * @example DateTime.local() //~> now - * @example DateTime.local(2017) //~> 2017-01-01T00:00:00 - * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00 - * @example DateTime.local(2017, 3, 12) //~> 2017-03-12T00:00:00 - * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00 - * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00 - * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10 - * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765 - * @return {DateTime} - */ - - - DateTime.local = function local(year, month, day, hour, minute, second, millisecond) { - if (isUndefined(year)) { - return new DateTime({ - ts: Settings.now() - }); - } else { - return quickDT({ - year: year, - month: month, - day: day, - hour: hour, - minute: minute, - second: second, - millisecond: millisecond - }, Settings.defaultZone); - } - } - /** - * Create a DateTime in UTC - * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used - * @param {number} [month=1] - The month, 1-indexed - * @param {number} [day=1] - The day of the month - * @param {number} [hour=0] - The hour of the day, in 24-hour time - * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 - * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 - * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 - * @example DateTime.utc() //~> now - * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z - * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z - * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z - * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z - * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z - * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z - * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765Z - * @return {DateTime} - */ - ; - - DateTime.utc = function utc(year, month, day, hour, minute, second, millisecond) { - if (isUndefined(year)) { - return new DateTime({ - ts: Settings.now(), - zone: FixedOffsetZone.utcInstance - }); - } else { - return quickDT({ - year: year, - month: month, - day: day, - hour: hour, - minute: minute, - second: second, - millisecond: millisecond - }, FixedOffsetZone.utcInstance); - } - } - /** - * Create a DateTime from a Javascript Date object. Uses the default zone. - * @param {Date} date - a Javascript Date object - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @return {DateTime} - */ - ; - - DateTime.fromJSDate = function fromJSDate(date, options) { - if (options === void 0) { - options = {}; - } - - var ts = isDate(date) ? date.valueOf() : NaN; - - if (Number.isNaN(ts)) { - return DateTime.invalid("invalid input"); - } - - var zoneToUse = normalizeZone(options.zone, Settings.defaultZone); - - if (!zoneToUse.isValid) { - return DateTime.invalid(unsupportedZone(zoneToUse)); - } - - return new DateTime({ - ts: ts, - zone: zoneToUse, - loc: Locale.fromObject(options) - }); - } - /** - * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. - * @param {number} milliseconds - a number of milliseconds since 1970 UTC - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance - * @return {DateTime} - */ - ; - - DateTime.fromMillis = function fromMillis(milliseconds, options) { - if (options === void 0) { - options = {}; - } - - if (!isNumber(milliseconds)) { - throw new InvalidArgumentError("fromMillis requires a numerical input, but received a " + typeof milliseconds + " with value " + milliseconds); - } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) { - // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start - return DateTime.invalid("Timestamp out of range"); - } else { - return new DateTime({ - ts: milliseconds, - zone: normalizeZone(options.zone, Settings.defaultZone), - loc: Locale.fromObject(options) - }); - } - } - /** - * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. - * @param {number} seconds - a number of seconds since 1970 UTC - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance - * @return {DateTime} - */ - ; - - DateTime.fromSeconds = function fromSeconds(seconds, options) { - if (options === void 0) { - options = {}; - } - - if (!isNumber(seconds)) { - throw new InvalidArgumentError("fromSeconds requires a numerical input"); - } else { - return new DateTime({ - ts: seconds * 1000, - zone: normalizeZone(options.zone, Settings.defaultZone), - loc: Locale.fromObject(options) - }); - } - } - /** - * Create a DateTime from a Javascript object with keys like 'year' and 'hour' with reasonable defaults. - * @param {Object} obj - the object to create the DateTime from - * @param {number} obj.year - a year, such as 1987 - * @param {number} obj.month - a month, 1-12 - * @param {number} obj.day - a day of the month, 1-31, depending on the month - * @param {number} obj.ordinal - day of the year, 1-365 or 366 - * @param {number} obj.weekYear - an ISO week year - * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year - * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday - * @param {number} obj.hour - hour of the day, 0-23 - * @param {number} obj.minute - minute of the hour, 0-59 - * @param {number} obj.second - second of the minute, 0-59 - * @param {number} obj.millisecond - millisecond of the second, 0-999 - * @param {string|Zone} [obj.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone() - * @param {string} [obj.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} obj.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} obj.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25' - * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01' - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06 - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'utc' }), - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'local' }) - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'America/New_York' }) - * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13' - * @return {DateTime} - */ - ; - - DateTime.fromObject = function fromObject(obj) { - var zoneToUse = normalizeZone(obj.zone, Settings.defaultZone); - - if (!zoneToUse.isValid) { - return DateTime.invalid(unsupportedZone(zoneToUse)); - } - - var tsNow = Settings.now(), - offsetProvis = zoneToUse.offset(tsNow), - normalized = normalizeObject(obj, normalizeUnit, ["zone", "locale", "outputCalendar", "numberingSystem"]), - containsOrdinal = !isUndefined(normalized.ordinal), - containsGregorYear = !isUndefined(normalized.year), - containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), - containsGregor = containsGregorYear || containsGregorMD, - definiteWeekDef = normalized.weekYear || normalized.weekNumber, - loc = Locale.fromObject(obj); // cases: - // just a weekday -> this week's instance of that weekday, no worries - // (gregorian data or ordinal) + (weekYear or weekNumber) -> error - // (gregorian month or day) + ordinal -> error - // otherwise just use weeks or ordinals or gregorian, depending on what's specified - - if ((containsGregor || containsOrdinal) && definiteWeekDef) { - throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); - } - - if (containsGregorMD && containsOrdinal) { - throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); - } - - var useWeekData = definiteWeekDef || normalized.weekday && !containsGregor; // configure ourselves to deal with gregorian dates or week stuff - - var units, - defaultValues, - objNow = tsToObj(tsNow, offsetProvis); - - if (useWeekData) { - units = orderedWeekUnits; - defaultValues = defaultWeekUnitValues; - objNow = gregorianToWeek(objNow); - } else if (containsOrdinal) { - units = orderedOrdinalUnits; - defaultValues = defaultOrdinalUnitValues; - objNow = gregorianToOrdinal(objNow); - } else { - units = orderedUnits$1; - defaultValues = defaultUnitValues; - } // set default values for missing stuff - - - var foundFirst = false; - - for (var _iterator3 = _createForOfIteratorHelperLoose(units), _step3; !(_step3 = _iterator3()).done;) { - var u = _step3.value; - var v = normalized[u]; - - if (!isUndefined(v)) { - foundFirst = true; - } else if (foundFirst) { - normalized[u] = defaultValues[u]; - } else { - normalized[u] = objNow[u]; - } - } // make sure the values we have are in range - - - var higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), - invalid = higherOrderInvalid || hasInvalidTimeData(normalized); - - if (invalid) { - return DateTime.invalid(invalid); - } // compute the actual time - - - var gregorian = useWeekData ? weekToGregorian(normalized) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, - _objToTS2 = objToTS(gregorian, offsetProvis, zoneToUse), - tsFinal = _objToTS2[0], - offsetFinal = _objToTS2[1], - inst = new DateTime({ - ts: tsFinal, - zone: zoneToUse, - o: offsetFinal, - loc: loc - }); // gregorian data + weekday serves only to validate - - - if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) { - return DateTime.invalid("mismatched weekday", "you can't specify both a weekday of " + normalized.weekday + " and a date of " + inst.toISO()); - } - - return inst; - } - /** - * Create a DateTime from an ISO 8601 string - * @param {string} text - the ISO string - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromISO('2016-05-25T09:08:34.123') - * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00') - * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true}) - * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'}) - * @example DateTime.fromISO('2016-W05-4') - * @return {DateTime} - */ - ; - - DateTime.fromISO = function fromISO(text, opts) { - if (opts === void 0) { - opts = {}; - } - - var _parseISODate = parseISODate(text), - vals = _parseISODate[0], - parsedZone = _parseISODate[1]; - - return parseDataToDateTime(vals, parsedZone, opts, "ISO 8601", text); - } - /** - * Create a DateTime from an RFC 2822 string - * @param {string} text - the RFC 2822 string - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. - * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT') - * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600') - * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z') - * @return {DateTime} - */ - ; - - DateTime.fromRFC2822 = function fromRFC2822(text, opts) { - if (opts === void 0) { - opts = {}; - } - - var _parseRFC2822Date = parseRFC2822Date(text), - vals = _parseRFC2822Date[0], - parsedZone = _parseRFC2822Date[1]; - - return parseDataToDateTime(vals, parsedZone, opts, "RFC 2822", text); - } - /** - * Create a DateTime from an HTTP header date - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 - * @param {string} text - the HTTP header date - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. - * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods. - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT') - * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT') - * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994') - * @return {DateTime} - */ - ; - - DateTime.fromHTTP = function fromHTTP(text, opts) { - if (opts === void 0) { - opts = {}; - } - - var _parseHTTPDate = parseHTTPDate(text), - vals = _parseHTTPDate[0], - parsedZone = _parseHTTPDate[1]; - - return parseDataToDateTime(vals, parsedZone, opts, "HTTP", opts); - } - /** - * Create a DateTime from an input string and format string. - * Defaults to en-US if no locale has been specified, regardless of the system's locale. - * @see https://moment.github.io/luxon/docs/manual/parsing.html#table-of-tokens - * @param {string} text - the string to parse - * @param {string} fmt - the format the string is expected to be in (see the link below for the formats) - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale - * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @return {DateTime} - */ - ; - - DateTime.fromFormat = function fromFormat(text, fmt, opts) { - if (opts === void 0) { - opts = {}; - } - - if (isUndefined(text) || isUndefined(fmt)) { - throw new InvalidArgumentError("fromFormat requires an input string and a format"); - } - - var _opts = opts, - _opts$locale = _opts.locale, - locale = _opts$locale === void 0 ? null : _opts$locale, - _opts$numberingSystem = _opts.numberingSystem, - numberingSystem = _opts$numberingSystem === void 0 ? null : _opts$numberingSystem, - localeToUse = Locale.fromOpts({ - locale: locale, - numberingSystem: numberingSystem, - defaultToEN: true - }), - _parseFromTokens = parseFromTokens(localeToUse, text, fmt), - vals = _parseFromTokens[0], - parsedZone = _parseFromTokens[1], - invalid = _parseFromTokens[2]; - - if (invalid) { - return DateTime.invalid(invalid); - } else { - return parseDataToDateTime(vals, parsedZone, opts, "format " + fmt, text); - } - } - /** - * @deprecated use fromFormat instead - */ - ; - - DateTime.fromString = function fromString(text, fmt, opts) { - if (opts === void 0) { - opts = {}; - } - - return DateTime.fromFormat(text, fmt, opts); - } - /** - * Create a DateTime from a SQL date, time, or datetime - * Defaults to en-US if no locale has been specified, regardless of the system's locale - * @param {string} text - the string to parse - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale - * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @example DateTime.fromSQL('2017-05-15') - * @example DateTime.fromSQL('2017-05-15 09:12:34') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true }) - * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' }) - * @example DateTime.fromSQL('09:12:34.342') - * @return {DateTime} - */ - ; - - DateTime.fromSQL = function fromSQL(text, opts) { - if (opts === void 0) { - opts = {}; - } - - var _parseSQL = parseSQL(text), - vals = _parseSQL[0], - parsedZone = _parseSQL[1]; - - return parseDataToDateTime(vals, parsedZone, opts, "SQL", text); - } - /** - * Create an invalid DateTime. - * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {DateTime} - */ - ; - - DateTime.invalid = function invalid(reason, explanation) { - if (explanation === void 0) { - explanation = null; - } - - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the DateTime is invalid"); - } - - var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidDateTimeError(invalid); - } else { - return new DateTime({ - invalid: invalid - }); - } - } - /** - * Check if an object is a DateTime. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - ; - - DateTime.isDateTime = function isDateTime(o) { - return o && o.isLuxonDateTime || false; - } // INFO - - /** - * Get the value of unit. - * @param {string} unit - a unit such as 'minute' or 'day' - * @example DateTime.local(2017, 7, 4).get('month'); //=> 7 - * @example DateTime.local(2017, 7, 4).get('day'); //=> 4 - * @return {number} - */ - ; - - var _proto = DateTime.prototype; - - _proto.get = function get(unit) { - return this[unit]; - } - /** - * Returns whether the DateTime is valid. Invalid DateTimes occur when: - * * The DateTime was created from invalid calendar information, such as the 13th month or February 30 - * * The DateTime was created by an operation on another invalid date - * @type {boolean} - */ - ; - - /** - * Returns the resolved Intl options for this DateTime. - * This is useful in understanding the behavior of formatting methods - * @param {Object} opts - the same options as toLocaleString - * @return {Object} - */ - _proto.resolvedLocaleOpts = function resolvedLocaleOpts(opts) { - if (opts === void 0) { - opts = {}; - } - - var _Formatter$create$res = Formatter.create(this.loc.clone(opts), opts).resolvedOptions(this), - locale = _Formatter$create$res.locale, - numberingSystem = _Formatter$create$res.numberingSystem, - calendar = _Formatter$create$res.calendar; - - return { - locale: locale, - numberingSystem: numberingSystem, - outputCalendar: calendar - }; - } // TRANSFORM - - /** - * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime. - * - * Equivalent to {@link setZone}('utc') - * @param {number} [offset=0] - optionally, an offset from UTC in minutes - * @param {Object} [opts={}] - options to pass to `setZone()` - * @return {DateTime} - */ - ; - - _proto.toUTC = function toUTC(offset, opts) { - if (offset === void 0) { - offset = 0; - } - - if (opts === void 0) { - opts = {}; - } - - return this.setZone(FixedOffsetZone.instance(offset), opts); - } - /** - * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime. - * - * Equivalent to `setZone('local')` - * @return {DateTime} - */ - ; - - _proto.toLocal = function toLocal() { - return this.setZone(Settings.defaultZone); - } - /** - * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime. - * - * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link plus}. You may wish to use {@link toLocal} and {@link toUTC} which provide simple convenience wrappers for commonly used zones. - * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link Zone} class. - * @param {Object} opts - options - * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this. - * @return {DateTime} - */ - ; - - _proto.setZone = function setZone(zone, _temp) { - var _ref3 = _temp === void 0 ? {} : _temp, - _ref3$keepLocalTime = _ref3.keepLocalTime, - keepLocalTime = _ref3$keepLocalTime === void 0 ? false : _ref3$keepLocalTime, - _ref3$keepCalendarTim = _ref3.keepCalendarTime, - keepCalendarTime = _ref3$keepCalendarTim === void 0 ? false : _ref3$keepCalendarTim; - - zone = normalizeZone(zone, Settings.defaultZone); - - if (zone.equals(this.zone)) { - return this; - } else if (!zone.isValid) { - return DateTime.invalid(unsupportedZone(zone)); - } else { - var newTS = this.ts; - - if (keepLocalTime || keepCalendarTime) { - var offsetGuess = zone.offset(this.ts); - var asObj = this.toObject(); - - var _objToTS3 = objToTS(asObj, offsetGuess, zone); - - newTS = _objToTS3[0]; - } - - return clone$1(this, { - ts: newTS, - zone: zone - }); - } - } - /** - * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime. - * @param {Object} properties - the properties to set - * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' }) - * @return {DateTime} - */ - ; - - _proto.reconfigure = function reconfigure(_temp2) { - var _ref4 = _temp2 === void 0 ? {} : _temp2, - locale = _ref4.locale, - numberingSystem = _ref4.numberingSystem, - outputCalendar = _ref4.outputCalendar; - - var loc = this.loc.clone({ - locale: locale, - numberingSystem: numberingSystem, - outputCalendar: outputCalendar - }); - return clone$1(this, { - loc: loc - }); - } - /** - * "Set" the locale. Returns a newly-constructed DateTime. - * Just a convenient alias for reconfigure({ locale }) - * @example DateTime.local(2017, 5, 25).setLocale('en-GB') - * @return {DateTime} - */ - ; - - _proto.setLocale = function setLocale(locale) { - return this.reconfigure({ - locale: locale - }); - } - /** - * "Set" the values of specified units. Returns a newly-constructed DateTime. - * You can only set units with this method; for "setting" metadata, see {@link reconfigure} and {@link setZone}. - * @param {Object} values - a mapping of units to numbers - * @example dt.set({ year: 2017 }) - * @example dt.set({ hour: 8, minute: 30 }) - * @example dt.set({ weekday: 5 }) - * @example dt.set({ year: 2005, ordinal: 234 }) - * @return {DateTime} - */ - ; - - _proto.set = function set(values) { - if (!this.isValid) return this; - var normalized = normalizeObject(values, normalizeUnit, []), - settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday); - var mixed; - - if (settingWeekStuff) { - mixed = weekToGregorian(Object.assign(gregorianToWeek(this.c), normalized)); - } else if (!isUndefined(normalized.ordinal)) { - mixed = ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c), normalized)); - } else { - mixed = Object.assign(this.toObject(), normalized); // if we didn't set the day but we ended up on an overflow date, - // use the last day of the right month - - if (isUndefined(normalized.day)) { - mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day); - } - } - - var _objToTS4 = objToTS(mixed, this.o, this.zone), - ts = _objToTS4[0], - o = _objToTS4[1]; - - return clone$1(this, { - ts: ts, - o: o - }); - } - /** - * Add a period of time to this DateTime and return the resulting DateTime - * - * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between. - * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @example DateTime.local().plus(123) //~> in 123 milliseconds - * @example DateTime.local().plus({ minutes: 15 }) //~> in 15 minutes - * @example DateTime.local().plus({ days: 1 }) //~> this time tomorrow - * @example DateTime.local().plus({ days: -1 }) //~> this time yesterday - * @example DateTime.local().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min - * @example DateTime.local().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min - * @return {DateTime} - */ - ; - - _proto.plus = function plus(duration) { - if (!this.isValid) return this; - var dur = friendlyDuration(duration); - return clone$1(this, adjustTime(this, dur)); - } - /** - * Subtract a period of time to this DateTime and return the resulting DateTime - * See {@link plus} - * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - @return {DateTime} - */ - ; - - _proto.minus = function minus(duration) { - if (!this.isValid) return this; - var dur = friendlyDuration(duration).negate(); - return clone$1(this, adjustTime(this, dur)); - } - /** - * "Set" this DateTime to the beginning of a unit of time. - * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. - * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01' - * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01' - * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00' - * @return {DateTime} - */ - ; - - _proto.startOf = function startOf(unit) { - if (!this.isValid) return this; - var o = {}, - normalizedUnit = Duration.normalizeUnit(unit); - - switch (normalizedUnit) { - case "years": - o.month = 1; - // falls through - - case "quarters": - case "months": - o.day = 1; - // falls through - - case "weeks": - case "days": - o.hour = 0; - // falls through - - case "hours": - o.minute = 0; - // falls through - - case "minutes": - o.second = 0; - // falls through - - case "seconds": - o.millisecond = 0; - break; - // no default, invalid units throw in normalizeUnit() - } - - if (normalizedUnit === "weeks") { - o.weekday = 1; - } - - if (normalizedUnit === "quarters") { - var q = Math.ceil(this.month / 3); - o.month = (q - 1) * 3 + 1; - } - - return this.set(o); - } - /** - * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time - * @param {string} unit - The unit to go to the end of. Can be 'year', 'month', 'day', 'hour', 'minute', 'second', or 'millisecond'. - * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00' - * @return {DateTime} - */ - ; - - _proto.endOf = function endOf(unit) { - var _this$plus; - - return this.isValid ? this.plus((_this$plus = {}, _this$plus[unit] = 1, _this$plus)).startOf(unit).minus(1) : this; - } // OUTPUT - - /** - * Returns a string representation of this DateTime formatted according to the specified format string. - * **You may not want this.** See {@link toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens). - * Defaults to en-US if no locale has been specified, regardless of the system's locale. - * @see https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens - * @param {string} fmt - the format string - * @param {Object} opts - opts to override the configuration options - * @example DateTime.local().toFormat('yyyy LLL dd') //=> '2017 Apr 22' - * @example DateTime.local().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22' - * @example DateTime.local().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22' - * @example DateTime.local().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes' - * @return {string} - */ - ; - - _proto.toFormat = function toFormat(fmt, opts) { - if (opts === void 0) { - opts = {}; - } - - return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID$2; - } - /** - * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`. - * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation - * of the DateTime in the assigned locale. - * Defaults to the system's locale if no locale has been specified - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param opts {Object} - Intl.DateTimeFormat constructor options and configuration options - * @example DateTime.local().toLocaleString(); //=> 4/20/2017 - * @example DateTime.local().setLocale('en-gb').toLocaleString(); //=> '20/04/2017' - * @example DateTime.local().toLocaleString({ locale: 'en-gb' }); //=> '20/04/2017' - * @example DateTime.local().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017' - * @example DateTime.local().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM' - * @example DateTime.local().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM' - * @example DateTime.local().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20' - * @example DateTime.local().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM' - * @example DateTime.local().toLocaleString({ hour: '2-digit', minute: '2-digit', hour12: false }); //=> '11:32' - * @return {string} - */ - ; - - _proto.toLocaleString = function toLocaleString(opts) { - if (opts === void 0) { - opts = DATE_SHORT; - } - - return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTime(this) : INVALID$2; - } - /** - * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output. - * Defaults to the system's locale if no locale has been specified - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts - * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`. - * @example DateTime.local().toLocaleParts(); //=> [ - * //=> { type: 'day', value: '25' }, - * //=> { type: 'literal', value: '/' }, - * //=> { type: 'month', value: '05' }, - * //=> { type: 'literal', value: '/' }, - * //=> { type: 'year', value: '1982' } - * //=> ] - */ - ; - - _proto.toLocaleParts = function toLocaleParts(opts) { - if (opts === void 0) { - opts = {}; - } - - return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : []; - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc(1982, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z' - * @example DateTime.local().toISO() //=> '2017-04-22T20:47:05.335-04:00' - * @example DateTime.local().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335' - * @example DateTime.local().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400' - * @return {string} - */ - ; - - _proto.toISO = function toISO(opts) { - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid) { - return null; - } - - return this.toISODate(opts) + "T" + this.toISOTime(opts); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's date component - * @param {Object} opts - options - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25' - * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525' - * @return {string} - */ - ; - - _proto.toISODate = function toISODate(_temp3) { - var _ref5 = _temp3 === void 0 ? {} : _temp3, - _ref5$format = _ref5.format, - format = _ref5$format === void 0 ? "extended" : _ref5$format; - - var fmt = format === "basic" ? "yyyyMMdd" : "yyyy-MM-dd"; - - if (this.year > 9999) { - fmt = "+" + fmt; - } - - return toTechFormat(this, fmt); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's week date - * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2' - * @return {string} - */ - ; - - _proto.toISOWeekDate = function toISOWeekDate() { - return toTechFormat(this, "kkkk-'W'WW-c"); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's time component - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z' - * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z' - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z' - * @return {string} - */ - ; - - _proto.toISOTime = function toISOTime(_temp4) { - var _ref6 = _temp4 === void 0 ? {} : _temp4, - _ref6$suppressMillise = _ref6.suppressMilliseconds, - suppressMilliseconds = _ref6$suppressMillise === void 0 ? false : _ref6$suppressMillise, - _ref6$suppressSeconds = _ref6.suppressSeconds, - suppressSeconds = _ref6$suppressSeconds === void 0 ? false : _ref6$suppressSeconds, - _ref6$includeOffset = _ref6.includeOffset, - includeOffset = _ref6$includeOffset === void 0 ? true : _ref6$includeOffset, - _ref6$format = _ref6.format, - format = _ref6$format === void 0 ? "extended" : _ref6$format; - - return toTechTimeFormat(this, { - suppressSeconds: suppressSeconds, - suppressMilliseconds: suppressMilliseconds, - includeOffset: includeOffset, - format: format - }); - } - /** - * Returns an RFC 2822-compatible string representation of this DateTime, always in UTC - * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000' - * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400' - * @return {string} - */ - ; - - _proto.toRFC2822 = function toRFC2822() { - return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false); - } - /** - * Returns a string representation of this DateTime appropriate for use in HTTP headers. - * Specifically, the string conforms to RFC 1123. - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 - * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT' - * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT' - * @return {string} - */ - ; - - _proto.toHTTP = function toHTTP() { - return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL Date - * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13' - * @return {string} - */ - ; - - _proto.toSQLDate = function toSQLDate() { - return toTechFormat(this, "yyyy-MM-dd"); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL Time - * @param {Object} opts - options - * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @example DateTime.utc().toSQL() //=> '05:15:16.345' - * @example DateTime.local().toSQL() //=> '05:15:16.345 -04:00' - * @example DateTime.local().toSQL({ includeOffset: false }) //=> '05:15:16.345' - * @example DateTime.local().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York' - * @return {string} - */ - ; - - _proto.toSQLTime = function toSQLTime(_temp5) { - var _ref7 = _temp5 === void 0 ? {} : _temp5, - _ref7$includeOffset = _ref7.includeOffset, - includeOffset = _ref7$includeOffset === void 0 ? true : _ref7$includeOffset, - _ref7$includeZone = _ref7.includeZone, - includeZone = _ref7$includeZone === void 0 ? false : _ref7$includeZone; - - return toTechTimeFormat(this, { - includeOffset: includeOffset, - includeZone: includeZone, - spaceZone: true - }); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL DateTime - * @param {Object} opts - options - * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z' - * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00' - * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000' - * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York' - * @return {string} - */ - ; - - _proto.toSQL = function toSQL(opts) { - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid) { - return null; - } - - return this.toSQLDate() + " " + this.toSQLTime(opts); - } - /** - * Returns a string representation of this DateTime appropriate for debugging - * @return {string} - */ - ; - - _proto.toString = function toString() { - return this.isValid ? this.toISO() : INVALID$2; - } - /** - * Returns the epoch milliseconds of this DateTime. Alias of {@link toMillis} - * @return {number} - */ - ; - - _proto.valueOf = function valueOf() { - return this.toMillis(); - } - /** - * Returns the epoch milliseconds of this DateTime. - * @return {number} - */ - ; - - _proto.toMillis = function toMillis() { - return this.isValid ? this.ts : NaN; - } - /** - * Returns the epoch seconds of this DateTime. - * @return {number} - */ - ; - - _proto.toSeconds = function toSeconds() { - return this.isValid ? this.ts / 1000 : NaN; - } - /** - * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON. - * @return {string} - */ - ; - - _proto.toJSON = function toJSON() { - return this.toISO(); - } - /** - * Returns a BSON serializable equivalent to this DateTime. - * @return {Date} - */ - ; - - _proto.toBSON = function toBSON() { - return this.toJSDate(); - } - /** - * Returns a Javascript object with this DateTime's year, month, day, and so on. - * @param opts - options for generating the object - * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output - * @example DateTime.local().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 } - * @return {Object} - */ - ; - - _proto.toObject = function toObject(opts) { - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid) return {}; - var base = Object.assign({}, this.c); - - if (opts.includeConfig) { - base.outputCalendar = this.outputCalendar; - base.numberingSystem = this.loc.numberingSystem; - base.locale = this.loc.locale; - } - - return base; - } - /** - * Returns a Javascript Date equivalent to this DateTime. - * @return {Date} - */ - ; - - _proto.toJSDate = function toJSDate() { - return new Date(this.isValid ? this.ts : NaN); - } // COMPARE - - /** - * Return the difference between two DateTimes as a Duration. - * @param {DateTime} otherDateTime - the DateTime to compare this one to - * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration. - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @example - * var i1 = DateTime.fromISO('1982-05-25T09:45'), - * i2 = DateTime.fromISO('1983-10-14T10:30'); - * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 } - * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 } - * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 } - * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 } - * @return {Duration} - */ - ; - - _proto.diff = function diff(otherDateTime, unit, opts) { - if (unit === void 0) { - unit = "milliseconds"; - } - - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid || !otherDateTime.isValid) { - return Duration.invalid(this.invalid || otherDateTime.invalid, "created by diffing an invalid DateTime"); - } - - var durOpts = Object.assign({ - locale: this.locale, - numberingSystem: this.numberingSystem - }, opts); - - var units = maybeArray(unit).map(Duration.normalizeUnit), - otherIsLater = otherDateTime.valueOf() > this.valueOf(), - earlier = otherIsLater ? this : otherDateTime, - later = otherIsLater ? otherDateTime : this, - diffed = _diff(earlier, later, units, durOpts); - - return otherIsLater ? diffed.negate() : diffed; - } - /** - * Return the difference between this DateTime and right now. - * See {@link diff} - * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - ; - - _proto.diffNow = function diffNow(unit, opts) { - if (unit === void 0) { - unit = "milliseconds"; - } - - if (opts === void 0) { - opts = {}; - } - - return this.diff(DateTime.local(), unit, opts); - } - /** - * Return an Interval spanning between this DateTime and another DateTime - * @param {DateTime} otherDateTime - the other end point of the Interval - * @return {Interval} - */ - ; - - _proto.until = function until(otherDateTime) { - return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this; - } - /** - * Return whether this DateTime is in the same unit of time as another DateTime - * @param {DateTime} otherDateTime - the other DateTime - * @param {string} unit - the unit of time to check sameness on - * @example DateTime.local().hasSame(otherDT, 'day'); //~> true if both the same calendar day - * @return {boolean} - */ - ; - - _proto.hasSame = function hasSame(otherDateTime, unit) { - if (!this.isValid) return false; - - if (unit === "millisecond") { - return this.valueOf() === otherDateTime.valueOf(); - } else { - var inputMs = otherDateTime.valueOf(); - return this.startOf(unit) <= inputMs && inputMs <= this.endOf(unit); - } - } - /** - * Equality check - * Two DateTimes are equal iff they represent the same millisecond, have the same zone and location, and are both valid. - * To compare just the millisecond values, use `+dt1 === +dt2`. - * @param {DateTime} other - the other DateTime - * @return {boolean} - */ - ; - - _proto.equals = function equals(other) { - return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc); - } - /** - * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your - * platform supports Intl.RelativeTimeFormat. Rounds down by default. - * @param {Object} options - options that affect the output - * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now. - * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow" - * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds" - * @param {boolean} [options.round=true] - whether to round the numbers in the output. - * @param {boolean} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding. - * @param {string} options.locale - override the locale of this DateTime - * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this - * @example DateTime.local().plus({ days: 1 }).toRelative() //=> "in 1 day" - * @example DateTime.local().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día" - * @example DateTime.local().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures" - * @example DateTime.local().minus({ days: 2 }).toRelative() //=> "2 days ago" - * @example DateTime.local().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago" - * @example DateTime.local().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago" - */ - ; - - _proto.toRelative = function toRelative(options) { - if (options === void 0) { - options = {}; - } - - if (!this.isValid) return null; - var base = options.base || DateTime.fromObject({ - zone: this.zone - }), - padding = options.padding ? this < base ? -options.padding : options.padding : 0; - return diffRelative(base, this.plus(padding), Object.assign(options, { - numeric: "always", - units: ["years", "months", "days", "hours", "minutes", "seconds"] - })); - } - /** - * Returns a string representation of this date relative to today, such as "yesterday" or "next month". - * Only internationalizes on platforms that supports Intl.RelativeTimeFormat. - * @param {Object} options - options that affect the output - * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now. - * @param {string} options.locale - override the locale of this DateTime - * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days" - * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this - * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow" - * @example DateTime.local().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana" - * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain" - * @example DateTime.local().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago" - */ - ; - - _proto.toRelativeCalendar = function toRelativeCalendar(options) { - if (options === void 0) { - options = {}; - } - - if (!this.isValid) return null; - return diffRelative(options.base || DateTime.fromObject({ - zone: this.zone - }), this, Object.assign(options, { - numeric: "auto", - units: ["years", "months", "days"], - calendary: true - })); - } - /** - * Return the min of several date times - * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum - * @return {DateTime} the min DateTime, or undefined if called with no argument - */ - ; - - DateTime.min = function min() { - for (var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++) { - dateTimes[_key] = arguments[_key]; - } - - if (!dateTimes.every(DateTime.isDateTime)) { - throw new InvalidArgumentError("min requires all arguments be DateTimes"); - } - - return bestBy(dateTimes, function (i) { - return i.valueOf(); - }, Math.min); - } - /** - * Return the max of several date times - * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum - * @return {DateTime} the max DateTime, or undefined if called with no argument - */ - ; - - DateTime.max = function max() { - for (var _len2 = arguments.length, dateTimes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - dateTimes[_key2] = arguments[_key2]; - } - - if (!dateTimes.every(DateTime.isDateTime)) { - throw new InvalidArgumentError("max requires all arguments be DateTimes"); - } - - return bestBy(dateTimes, function (i) { - return i.valueOf(); - }, Math.max); - } // MISC - - /** - * Explain how a string would be parsed by fromFormat() - * @param {string} text - the string to parse - * @param {string} fmt - the format the string is expected to be in (see description) - * @param {Object} options - options taken by fromFormat() - * @return {Object} - */ - ; - - DateTime.fromFormatExplain = function fromFormatExplain(text, fmt, options) { - if (options === void 0) { - options = {}; - } - - var _options = options, - _options$locale = _options.locale, - locale = _options$locale === void 0 ? null : _options$locale, - _options$numberingSys = _options.numberingSystem, - numberingSystem = _options$numberingSys === void 0 ? null : _options$numberingSys, - localeToUse = Locale.fromOpts({ - locale: locale, - numberingSystem: numberingSystem, - defaultToEN: true - }); - return explainFromTokens(localeToUse, text, fmt); - } - /** - * @deprecated use fromFormatExplain instead - */ - ; - - DateTime.fromStringExplain = function fromStringExplain(text, fmt, options) { - if (options === void 0) { - options = {}; - } - - return DateTime.fromFormatExplain(text, fmt, options); - } // FORMAT PRESETS - - /** - * {@link toLocaleString} format like 10/14/1983 - * @type {Object} - */ - ; - - _createClass(DateTime, [{ - key: "isValid", - get: function get() { - return this.invalid === null; - } - /** - * Returns an error code if this DateTime is invalid, or null if the DateTime is valid - * @type {string} - */ - - }, { - key: "invalidReason", - get: function get() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid - * @type {string} - */ - - }, { - key: "invalidExplanation", - get: function get() { - return this.invalid ? this.invalid.explanation : null; - } - /** - * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime - * - * @type {string} - */ - - }, { - key: "locale", - get: function get() { - return this.isValid ? this.loc.locale : null; - } - /** - * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime - * - * @type {string} - */ - - }, { - key: "numberingSystem", - get: function get() { - return this.isValid ? this.loc.numberingSystem : null; - } - /** - * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime - * - * @type {string} - */ - - }, { - key: "outputCalendar", - get: function get() { - return this.isValid ? this.loc.outputCalendar : null; - } - /** - * Get the time zone associated with this DateTime. - * @type {Zone} - */ - - }, { - key: "zone", - get: function get() { - return this._zone; - } - /** - * Get the name of the time zone. - * @type {string} - */ - - }, { - key: "zoneName", - get: function get() { - return this.isValid ? this.zone.name : null; - } - /** - * Get the year - * @example DateTime.local(2017, 5, 25).year //=> 2017 - * @type {number} - */ - - }, { - key: "year", - get: function get() { - return this.isValid ? this.c.year : NaN; - } - /** - * Get the quarter - * @example DateTime.local(2017, 5, 25).quarter //=> 2 - * @type {number} - */ - - }, { - key: "quarter", - get: function get() { - return this.isValid ? Math.ceil(this.c.month / 3) : NaN; - } - /** - * Get the month (1-12). - * @example DateTime.local(2017, 5, 25).month //=> 5 - * @type {number} - */ - - }, { - key: "month", - get: function get() { - return this.isValid ? this.c.month : NaN; - } - /** - * Get the day of the month (1-30ish). - * @example DateTime.local(2017, 5, 25).day //=> 25 - * @type {number} - */ - - }, { - key: "day", - get: function get() { - return this.isValid ? this.c.day : NaN; - } - /** - * Get the hour of the day (0-23). - * @example DateTime.local(2017, 5, 25, 9).hour //=> 9 - * @type {number} - */ - - }, { - key: "hour", - get: function get() { - return this.isValid ? this.c.hour : NaN; - } - /** - * Get the minute of the hour (0-59). - * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30 - * @type {number} - */ - - }, { - key: "minute", - get: function get() { - return this.isValid ? this.c.minute : NaN; - } - /** - * Get the second of the minute (0-59). - * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52 - * @type {number} - */ - - }, { - key: "second", - get: function get() { - return this.isValid ? this.c.second : NaN; - } - /** - * Get the millisecond of the second (0-999). - * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654 - * @type {number} - */ - - }, { - key: "millisecond", - get: function get() { - return this.isValid ? this.c.millisecond : NaN; - } - /** - * Get the week year - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2014, 11, 31).weekYear //=> 2015 - * @type {number} - */ - - }, { - key: "weekYear", - get: function get() { - return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN; - } - /** - * Get the week number of the week year (1-52ish). - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2017, 5, 25).weekNumber //=> 21 - * @type {number} - */ - - }, { - key: "weekNumber", - get: function get() { - return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN; - } - /** - * Get the day of the week. - * 1 is Monday and 7 is Sunday - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2014, 11, 31).weekday //=> 4 - * @type {number} - */ - - }, { - key: "weekday", - get: function get() { - return this.isValid ? possiblyCachedWeekData(this).weekday : NaN; - } - /** - * Get the ordinal (meaning the day of the year) - * @example DateTime.local(2017, 5, 25).ordinal //=> 145 - * @type {number|DateTime} - */ - - }, { - key: "ordinal", - get: function get() { - return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN; - } - /** - * Get the human readable short month name, such as 'Oct'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).monthShort //=> Oct - * @type {string} - */ - - }, { - key: "monthShort", - get: function get() { - return this.isValid ? Info.months("short", { - locale: this.locale - })[this.month - 1] : null; - } - /** - * Get the human readable long month name, such as 'October'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).monthLong //=> October - * @type {string} - */ - - }, { - key: "monthLong", - get: function get() { - return this.isValid ? Info.months("long", { - locale: this.locale - })[this.month - 1] : null; - } - /** - * Get the human readable short weekday, such as 'Mon'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon - * @type {string} - */ - - }, { - key: "weekdayShort", - get: function get() { - return this.isValid ? Info.weekdays("short", { - locale: this.locale - })[this.weekday - 1] : null; - } - /** - * Get the human readable long weekday, such as 'Monday'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday - * @type {string} - */ - - }, { - key: "weekdayLong", - get: function get() { - return this.isValid ? Info.weekdays("long", { - locale: this.locale - })[this.weekday - 1] : null; - } - /** - * Get the UTC offset of this DateTime in minutes - * @example DateTime.local().offset //=> -240 - * @example DateTime.utc().offset //=> 0 - * @type {number} - */ - - }, { - key: "offset", - get: function get() { - return this.isValid ? +this.o : NaN; - } - /** - * Get the short human name for the zone's current offset, for example "EST" or "EDT". - * Defaults to the system's locale if no locale has been specified - * @type {string} - */ - - }, { - key: "offsetNameShort", - get: function get() { - if (this.isValid) { - return this.zone.offsetName(this.ts, { - format: "short", - locale: this.locale - }); - } else { - return null; - } - } - /** - * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time". - * Defaults to the system's locale if no locale has been specified - * @type {string} - */ - - }, { - key: "offsetNameLong", - get: function get() { - if (this.isValid) { - return this.zone.offsetName(this.ts, { - format: "long", - locale: this.locale - }); - } else { - return null; - } - } - /** - * Get whether this zone's offset ever changes, as in a DST. - * @type {boolean} - */ - - }, { - key: "isOffsetFixed", - get: function get() { - return this.isValid ? this.zone.universal : null; - } - /** - * Get whether the DateTime is in a DST. - * @type {boolean} - */ - - }, { - key: "isInDST", - get: function get() { - if (this.isOffsetFixed) { - return false; - } else { - return this.offset > this.set({ - month: 1 - }).offset || this.offset > this.set({ - month: 5 - }).offset; - } - } - /** - * Returns true if this DateTime is in a leap year, false otherwise - * @example DateTime.local(2016).isInLeapYear //=> true - * @example DateTime.local(2013).isInLeapYear //=> false - * @type {boolean} - */ - - }, { - key: "isInLeapYear", - get: function get() { - return isLeapYear(this.year); - } - /** - * Returns the number of days in this DateTime's month - * @example DateTime.local(2016, 2).daysInMonth //=> 29 - * @example DateTime.local(2016, 3).daysInMonth //=> 31 - * @type {number} - */ - - }, { - key: "daysInMonth", - get: function get() { - return daysInMonth(this.year, this.month); - } - /** - * Returns the number of days in this DateTime's year - * @example DateTime.local(2016).daysInYear //=> 366 - * @example DateTime.local(2013).daysInYear //=> 365 - * @type {number} - */ - - }, { - key: "daysInYear", - get: function get() { - return this.isValid ? daysInYear(this.year) : NaN; - } - /** - * Returns the number of weeks in this DateTime's year - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2004).weeksInWeekYear //=> 53 - * @example DateTime.local(2013).weeksInWeekYear //=> 52 - * @type {number} - */ - - }, { - key: "weeksInWeekYear", - get: function get() { - return this.isValid ? weeksInWeekYear(this.weekYear) : NaN; - } - }], [{ - key: "DATE_SHORT", - get: function get() { - return DATE_SHORT; - } - /** - * {@link toLocaleString} format like 'Oct 14, 1983' - * @type {Object} - */ - - }, { - key: "DATE_MED", - get: function get() { - return DATE_MED; - } - /** - * {@link toLocaleString} format like 'Fri, Oct 14, 1983' - * @type {Object} - */ - - }, { - key: "DATE_MED_WITH_WEEKDAY", - get: function get() { - return DATE_MED_WITH_WEEKDAY; - } - /** - * {@link toLocaleString} format like 'October 14, 1983' - * @type {Object} - */ - - }, { - key: "DATE_FULL", - get: function get() { - return DATE_FULL; - } - /** - * {@link toLocaleString} format like 'Tuesday, October 14, 1983' - * @type {Object} - */ - - }, { - key: "DATE_HUGE", - get: function get() { - return DATE_HUGE; - } - /** - * {@link toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "TIME_SIMPLE", - get: function get() { - return TIME_SIMPLE; - } - /** - * {@link toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "TIME_WITH_SECONDS", - get: function get() { - return TIME_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "TIME_WITH_SHORT_OFFSET", - get: function get() { - return TIME_WITH_SHORT_OFFSET; - } - /** - * {@link toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "TIME_WITH_LONG_OFFSET", - get: function get() { - return TIME_WITH_LONG_OFFSET; - } - /** - * {@link toLocaleString} format like '09:30', always 24-hour. - * @type {Object} - */ - - }, { - key: "TIME_24_SIMPLE", - get: function get() { - return TIME_24_SIMPLE; - } - /** - * {@link toLocaleString} format like '09:30:23', always 24-hour. - * @type {Object} - */ - - }, { - key: "TIME_24_WITH_SECONDS", - get: function get() { - return TIME_24_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like '09:30:23 EDT', always 24-hour. - * @type {Object} - */ - - }, { - key: "TIME_24_WITH_SHORT_OFFSET", - get: function get() { - return TIME_24_WITH_SHORT_OFFSET; - } - /** - * {@link toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour. - * @type {Object} - */ - - }, { - key: "TIME_24_WITH_LONG_OFFSET", - get: function get() { - return TIME_24_WITH_LONG_OFFSET; - } - /** - * {@link toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_SHORT", - get: function get() { - return DATETIME_SHORT; - } - /** - * {@link toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_SHORT_WITH_SECONDS", - get: function get() { - return DATETIME_SHORT_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_MED", - get: function get() { - return DATETIME_MED; - } - /** - * {@link toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_MED_WITH_SECONDS", - get: function get() { - return DATETIME_MED_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_MED_WITH_WEEKDAY", - get: function get() { - return DATETIME_MED_WITH_WEEKDAY; - } - /** - * {@link toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_FULL", - get: function get() { - return DATETIME_FULL; - } - /** - * {@link toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_FULL_WITH_SECONDS", - get: function get() { - return DATETIME_FULL_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_HUGE", - get: function get() { - return DATETIME_HUGE; - } - /** - * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_HUGE_WITH_SECONDS", - get: function get() { - return DATETIME_HUGE_WITH_SECONDS; - } - }]); - - return DateTime; -}(); -function friendlyDateTime(dateTimeish) { - if (DateTime.isDateTime(dateTimeish)) { - return dateTimeish; - } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) { - return DateTime.fromJSDate(dateTimeish); - } else if (dateTimeish && typeof dateTimeish === "object") { - return DateTime.fromObject(dateTimeish); - } else { - throw new InvalidArgumentError("Unknown datetime argument: " + dateTimeish + ", of type " + typeof dateTimeish); - } -} - -exports.DateTime = DateTime; -exports.Duration = Duration; -exports.FixedOffsetZone = FixedOffsetZone; -exports.IANAZone = IANAZone; -exports.Info = Info; -exports.Interval = Interval; -exports.InvalidZone = InvalidZone; -exports.LocalZone = LocalZone; -exports.Settings = Settings; -exports.Zone = Zone; -//# sourceMappingURL=luxon.js.map diff --git a/node_modules/luxon/build/cjs-browser/luxon.js.map b/node_modules/luxon/build/cjs-browser/luxon.js.map deleted file mode 100644 index 721c2f8..0000000 --- a/node_modules/luxon/build/cjs-browser/luxon.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"luxon.js","sources":["../../src/errors.js","../../src/impl/formats.js","../../src/impl/util.js","../../src/impl/english.js","../../src/impl/formatter.js","../../src/impl/invalid.js","../../src/zone.js","../../src/zones/localZone.js","../../src/zones/IANAZone.js","../../src/zones/fixedOffsetZone.js","../../src/zones/invalidZone.js","../../src/impl/zoneUtil.js","../../src/settings.js","../../src/impl/locale.js","../../src/impl/regexParser.js","../../src/duration.js","../../src/interval.js","../../src/info.js","../../src/impl/diff.js","../../src/impl/digits.js","../../src/impl/tokenParser.js","../../src/impl/conversions.js","../../src/datetime.js"],"sourcesContent":["// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nexport class InvalidDateTimeError extends LuxonError {\n constructor(reason) {\n super(`Invalid DateTime: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidIntervalError extends LuxonError {\n constructor(reason) {\n super(`Invalid Interval: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidDurationError extends LuxonError {\n constructor(reason) {\n super(`Invalid Duration: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nexport class InvalidUnitError extends LuxonError {\n constructor(unit) {\n super(`Invalid unit ${unit}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nexport class ZoneIsAbstractError extends LuxonError {\n constructor() {\n super(\"Zone is an abstract class\");\n }\n}\n","/**\n * @private\n */\n\nconst n = \"numeric\",\n s = \"short\",\n l = \"long\";\n\nexport const DATE_SHORT = {\n year: n,\n month: n,\n day: n\n};\n\nexport const DATE_MED = {\n year: n,\n month: s,\n day: n\n};\n\nexport const DATE_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s\n};\n\nexport const DATE_FULL = {\n year: n,\n month: l,\n day: n\n};\n\nexport const DATE_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l\n};\n\nexport const TIME_SIMPLE = {\n hour: n,\n minute: n\n};\n\nexport const TIME_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n\n};\n\nexport const TIME_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s\n};\n\nexport const TIME_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l\n};\n\nexport const TIME_24_SIMPLE = {\n hour: n,\n minute: n,\n hour12: false\n};\n\n/**\n * {@link toLocaleString}; format like '09:30:23', always 24-hour.\n */\nexport const TIME_24_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n hour12: false\n};\n\n/**\n * {@link toLocaleString}; format like '09:30:23 EDT', always 24-hour.\n */\nexport const TIME_24_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hour12: false,\n timeZoneName: s\n};\n\n/**\n * {@link toLocaleString}; format like '09:30:23 Eastern Daylight Time', always 24-hour.\n */\nexport const TIME_24_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hour12: false,\n timeZoneName: l\n};\n\n/**\n * {@link toLocaleString}; format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n */\nexport const DATETIME_SHORT = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n\n};\n\n/**\n * {@link toLocaleString}; format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n */\nexport const DATETIME_SHORT_WITH_SECONDS = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n second: n\n};\n\nexport const DATETIME_MED = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n\n};\n\nexport const DATETIME_MED_WITH_SECONDS = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n second: n\n};\n\nexport const DATETIME_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n hour: n,\n minute: n\n};\n\nexport const DATETIME_FULL = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n timeZoneName: s\n};\n\nexport const DATETIME_FULL_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s\n};\n\nexport const DATETIME_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n timeZoneName: l\n};\n\nexport const DATETIME_HUGE_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l\n};\n","/*\n This is just a junk drawer, containing anything used across multiple classes.\n Because Luxon is small(ish), this should stay small and we won't worry about splitting\n it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\nimport { InvalidArgumentError } from \"../errors.js\";\n\n/**\n * @private\n */\n\n// TYPES\n\nexport function isUndefined(o) {\n return typeof o === \"undefined\";\n}\n\nexport function isNumber(o) {\n return typeof o === \"number\";\n}\n\nexport function isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\n\nexport function isString(o) {\n return typeof o === \"string\";\n}\n\nexport function isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nexport function hasIntl() {\n try {\n return typeof Intl !== \"undefined\" && Intl.DateTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\nexport function hasFormatToParts() {\n return !isUndefined(Intl.DateTimeFormat.prototype.formatToParts);\n}\n\nexport function hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\n// OBJECTS AND ARRAYS\n\nexport function maybeArray(thing) {\n return Array.isArray(thing) ? thing : [thing];\n}\n\nexport function bestBy(arr, by, compare) {\n if (arr.length === 0) {\n return undefined;\n }\n return arr.reduce((best, next) => {\n const pair = [by(next), next];\n if (!best) {\n return pair;\n } else if (compare(best[0], pair[0]) === best[0]) {\n return best;\n } else {\n return pair;\n }\n }, null)[1];\n}\n\nexport function pick(obj, keys) {\n return keys.reduce((a, k) => {\n a[k] = obj[k];\n return a;\n }, {});\n}\n\nexport function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n// NUMBERS AND STRINGS\n\nexport function integerBetween(thing, bottom, top) {\n return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nexport function floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\n\nexport function padStart(input, n = 2) {\n if (input.toString().length < n) {\n return (\"0\".repeat(n) + input).slice(-n);\n } else {\n return input.toString();\n }\n}\n\nexport function parseInteger(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseInt(string, 10);\n }\n}\n\nexport function parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n return undefined;\n } else {\n const f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\n\nexport function roundTo(number, digits, towardZero = false) {\n const factor = 10 ** digits,\n rounder = towardZero ? Math.trunc : Math.round;\n return rounder(number * factor) / factor;\n}\n\n// DATE BASICS\n\nexport function isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\nexport function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nexport function daysInMonth(year, month) {\n const modMonth = floorMod(month - 1, 12) + 1,\n modYear = year + (month - modMonth) / 12;\n\n if (modMonth === 2) {\n return isLeapYear(modYear) ? 29 : 28;\n } else {\n return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n }\n}\n\n// covert a calendar object to a local timestamp (epoch, but with the offset baked in)\nexport function objToLocalTS(obj) {\n let d = Date.UTC(\n obj.year,\n obj.month - 1,\n obj.day,\n obj.hour,\n obj.minute,\n obj.second,\n obj.millisecond\n );\n\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n return +d;\n}\n\nexport function weeksInWeekYear(weekYear) {\n const p1 =\n (weekYear +\n Math.floor(weekYear / 4) -\n Math.floor(weekYear / 100) +\n Math.floor(weekYear / 400)) %\n 7,\n last = weekYear - 1,\n p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7;\n return p1 === 4 || p2 === 3 ? 53 : 52;\n}\n\nexport function untruncateYear(year) {\n if (year > 99) {\n return year;\n } else return year > 60 ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nexport function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n const date = new Date(ts),\n intlOpts = {\n hour12: false,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\"\n };\n\n if (timeZone) {\n intlOpts.timeZone = timeZone;\n }\n\n const modified = Object.assign({ timeZoneName: offsetFormat }, intlOpts),\n intl = hasIntl();\n\n if (intl && hasFormatToParts()) {\n const parsed = new Intl.DateTimeFormat(locale, modified)\n .formatToParts(date)\n .find(m => m.type.toLowerCase() === \"timezonename\");\n return parsed ? parsed.value : null;\n } else if (intl) {\n // this probably doesn't work for all locales\n const without = new Intl.DateTimeFormat(locale, intlOpts).format(date),\n included = new Intl.DateTimeFormat(locale, modified).format(date),\n diffed = included.substring(without.length),\n trimmed = diffed.replace(/^[, \\u200e]+/, \"\");\n return trimmed;\n } else {\n return null;\n }\n}\n\n// signedOffset('-5', '30') -> -330\nexport function signedOffset(offHourStr, offMinuteStr) {\n let offHour = parseInt(offHourStr, 10);\n\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) {\n offHour = 0;\n }\n\n const offMin = parseInt(offMinuteStr, 10) || 0,\n offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nexport function asNumber(value) {\n const numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || Number.isNaN(numericValue))\n throw new InvalidArgumentError(`Invalid unit value ${value}`);\n return numericValue;\n}\n\nexport function normalizeObject(obj, normalizer, nonUnitKeys) {\n const normalized = {};\n for (const u in obj) {\n if (hasOwnProperty(obj, u)) {\n if (nonUnitKeys.indexOf(u) >= 0) continue;\n const v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = asNumber(v);\n }\n }\n return normalized;\n}\n\nexport function formatOffset(offset, format) {\n const hours = Math.trunc(Math.abs(offset / 60)),\n minutes = Math.trunc(Math.abs(offset % 60)),\n sign = offset >= 0 ? \"+\" : \"-\";\n\n switch (format) {\n case \"short\":\n return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n case \"narrow\":\n return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n case \"techie\":\n return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n default:\n throw new RangeError(`Value format ${format} is out of range for property format`);\n }\n}\n\nexport function timeObject(obj) {\n return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n\nexport const ianaRegex = /[A-Za-z_+-]{1,256}(:?\\/[A-Za-z_+-]{1,256}(\\/[A-Za-z_+-]{1,256})?)?/;\n","import * as Formats from \"./formats.js\";\nimport { pick } from \"./util.js\";\n\nfunction stringify(obj) {\n return JSON.stringify(obj, Object.keys(obj).sort());\n}\n\n/**\n * @private\n */\n\nexport const monthsLong = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n];\n\nexport const monthsShort = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\"\n];\n\nexport const monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\n\nexport function months(length) {\n switch (length) {\n case \"narrow\":\n return monthsNarrow;\n case \"short\":\n return monthsShort;\n case \"long\":\n return monthsLong;\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n case \"2-digit\":\n return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n default:\n return null;\n }\n}\n\nexport const weekdaysLong = [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\"\n];\n\nexport const weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nexport const weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\n\nexport function weekdays(length) {\n switch (length) {\n case \"narrow\":\n return weekdaysNarrow;\n case \"short\":\n return weekdaysShort;\n case \"long\":\n return weekdaysLong;\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n default:\n return null;\n }\n}\n\nexport const meridiems = [\"AM\", \"PM\"];\n\nexport const erasLong = [\"Before Christ\", \"Anno Domini\"];\n\nexport const erasShort = [\"BC\", \"AD\"];\n\nexport const erasNarrow = [\"B\", \"A\"];\n\nexport function eras(length) {\n switch (length) {\n case \"narrow\":\n return erasNarrow;\n case \"short\":\n return erasShort;\n case \"long\":\n return erasLong;\n default:\n return null;\n }\n}\n\nexport function meridiemForDateTime(dt) {\n return meridiems[dt.hour < 12 ? 0 : 1];\n}\n\nexport function weekdayForDateTime(dt, length) {\n return weekdays(length)[dt.weekday - 1];\n}\n\nexport function monthForDateTime(dt, length) {\n return months(length)[dt.month - 1];\n}\n\nexport function eraForDateTime(dt, length) {\n return eras(length)[dt.year < 0 ? 0 : 1];\n}\n\nexport function formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n const units = {\n years: [\"year\", \"yr.\"],\n quarters: [\"quarter\", \"qtr.\"],\n months: [\"month\", \"mo.\"],\n weeks: [\"week\", \"wk.\"],\n days: [\"day\", \"day\", \"days\"],\n hours: [\"hour\", \"hr.\"],\n minutes: [\"minute\", \"min.\"],\n seconds: [\"second\", \"sec.\"]\n };\n\n const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n\n if (numeric === \"auto\" && lastable) {\n const isDay = unit === \"days\";\n switch (count) {\n case 1:\n return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n case -1:\n return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n case 0:\n return isDay ? \"today\" : `this ${units[unit][0]}`;\n default: // fall through\n }\n }\n\n const isInPast = Object.is(count, -0) || count < 0,\n fmtValue = Math.abs(count),\n singular = fmtValue === 1,\n lilUnits = units[unit],\n fmtUnit = narrow\n ? singular\n ? lilUnits[1]\n : lilUnits[2] || lilUnits[1]\n : singular\n ? units[unit][0]\n : unit;\n return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nexport function formatString(knownFormat) {\n // these all have the offsets removed because we don't have access to them\n // without all the intl stuff this is backfilling\n const filtered = pick(knownFormat, [\n \"weekday\",\n \"era\",\n \"year\",\n \"month\",\n \"day\",\n \"hour\",\n \"minute\",\n \"second\",\n \"timeZoneName\",\n \"hour12\"\n ]),\n key = stringify(filtered),\n dateTimeHuge = \"EEEE, LLLL d, yyyy, h:mm a\";\n switch (key) {\n case stringify(Formats.DATE_SHORT):\n return \"M/d/yyyy\";\n case stringify(Formats.DATE_MED):\n return \"LLL d, yyyy\";\n case stringify(Formats.DATE_MED_WITH_WEEKDAY):\n return \"EEE, LLL d, yyyy\";\n case stringify(Formats.DATE_FULL):\n return \"LLLL d, yyyy\";\n case stringify(Formats.DATE_HUGE):\n return \"EEEE, LLLL d, yyyy\";\n case stringify(Formats.TIME_SIMPLE):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_SECONDS):\n return \"h:mm:ss a\";\n case stringify(Formats.TIME_WITH_SHORT_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_LONG_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_24_SIMPLE):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_SECONDS):\n return \"HH:mm:ss\";\n case stringify(Formats.TIME_24_WITH_SHORT_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_LONG_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.DATETIME_SHORT):\n return \"M/d/yyyy, h:mm a\";\n case stringify(Formats.DATETIME_MED):\n return \"LLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL):\n return \"LLLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_HUGE):\n return dateTimeHuge;\n case stringify(Formats.DATETIME_SHORT_WITH_SECONDS):\n return \"M/d/yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_SECONDS):\n return \"LLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):\n return \"EEE, d LLL yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL_WITH_SECONDS):\n return \"LLLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_HUGE_WITH_SECONDS):\n return \"EEEE, LLLL d, yyyy, h:mm:ss a\";\n default:\n return dateTimeHuge;\n }\n}\n","import * as English from \"./english.js\";\nimport * as Formats from \"./formats.js\";\nimport { hasFormatToParts, padStart } from \"./util.js\";\n\nfunction stringifyTokens(splits, tokenToString) {\n let s = \"\";\n for (const token of splits) {\n if (token.literal) {\n s += token.val;\n } else {\n s += tokenToString(token.val);\n }\n }\n return s;\n}\n\nconst macroTokenToFormatOpts = {\n D: Formats.DATE_SHORT,\n DD: Formats.DATE_MED,\n DDD: Formats.DATE_FULL,\n DDDD: Formats.DATE_HUGE,\n t: Formats.TIME_SIMPLE,\n tt: Formats.TIME_WITH_SECONDS,\n ttt: Formats.TIME_WITH_SHORT_OFFSET,\n tttt: Formats.TIME_WITH_LONG_OFFSET,\n T: Formats.TIME_24_SIMPLE,\n TT: Formats.TIME_24_WITH_SECONDS,\n TTT: Formats.TIME_24_WITH_SHORT_OFFSET,\n TTTT: Formats.TIME_24_WITH_LONG_OFFSET,\n f: Formats.DATETIME_SHORT,\n ff: Formats.DATETIME_MED,\n fff: Formats.DATETIME_FULL,\n ffff: Formats.DATETIME_HUGE,\n F: Formats.DATETIME_SHORT_WITH_SECONDS,\n FF: Formats.DATETIME_MED_WITH_SECONDS,\n FFF: Formats.DATETIME_FULL_WITH_SECONDS,\n FFFF: Formats.DATETIME_HUGE_WITH_SECONDS\n};\n\n/**\n * @private\n */\n\nexport default class Formatter {\n static create(locale, opts = {}) {\n return new Formatter(locale, opts);\n }\n\n static parseFormat(fmt) {\n let current = null,\n currentFull = \"\",\n bracketed = false;\n const splits = [];\n for (let i = 0; i < fmt.length; i++) {\n const c = fmt.charAt(i);\n if (c === \"'\") {\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed, val: currentFull });\n }\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) {\n currentFull += c;\n } else if (c === current) {\n currentFull += c;\n } else {\n if (currentFull.length > 0) {\n splits.push({ literal: false, val: currentFull });\n }\n currentFull = c;\n current = c;\n }\n }\n\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed, val: currentFull });\n }\n\n return splits;\n }\n\n static macroTokenToFormatOpts(token) {\n return macroTokenToFormatOpts[token];\n }\n\n constructor(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n\n formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) {\n this.systemLoc = this.loc.redefaultToSystem();\n }\n const df = this.systemLoc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.format();\n }\n\n formatDateTime(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.format();\n }\n\n formatDateTimeParts(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.formatToParts();\n }\n\n resolvedOptions(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.resolvedOptions();\n }\n\n num(n, p = 0) {\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) {\n return padStart(n, p);\n }\n\n const opts = Object.assign({}, this.opts);\n\n if (p > 0) {\n opts.padTo = p;\n }\n\n return this.loc.numberFormatter(opts).format(n);\n }\n\n formatDateTimeFromString(dt, fmt) {\n const knownEnglish = this.loc.listingMode() === \"en\",\n useDateTimeFormatter =\n this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\" && hasFormatToParts(),\n string = (opts, extract) => this.loc.extract(dt, opts, extract),\n formatOffset = opts => {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n return \"Z\";\n }\n\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n },\n meridiem = () =>\n knownEnglish\n ? English.meridiemForDateTime(dt)\n : string({ hour: \"numeric\", hour12: true }, \"dayperiod\"),\n month = (length, standalone) =>\n knownEnglish\n ? English.monthForDateTime(dt, length)\n : string(standalone ? { month: length } : { month: length, day: \"numeric\" }, \"month\"),\n weekday = (length, standalone) =>\n knownEnglish\n ? English.weekdayForDateTime(dt, length)\n : string(\n standalone ? { weekday: length } : { weekday: length, month: \"long\", day: \"numeric\" },\n \"weekday\"\n ),\n maybeMacro = token => {\n const formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) {\n return this.formatWithSystemDefault(dt, formatOpts);\n } else {\n return token;\n }\n },\n era = length =>\n knownEnglish ? English.eraForDateTime(dt, length) : string({ era: length }, \"era\"),\n tokenToString = token => {\n // Where possible: http://cldr.unicode.org/translation/date-time#TOC-Stand-Alone-vs.-Format-Styles\n switch (token) {\n // ms\n case \"S\":\n return this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return this.num(dt.second);\n case \"ss\":\n return this.num(dt.second, 2);\n // minutes\n case \"m\":\n return this.num(dt.minute);\n case \"mm\":\n return this.num(dt.minute, 2);\n // hours\n case \"h\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return this.num(dt.hour);\n case \"HH\":\n return this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({ format: \"narrow\", allowZ: this.opts.allowZ });\n case \"ZZ\":\n // like +06:00\n return formatOffset({ format: \"short\", allowZ: this.opts.allowZ });\n case \"ZZZ\":\n // like +0600\n return formatOffset({ format: \"techie\", allowZ: this.opts.allowZ });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, { format: \"short\", locale: this.loc.locale });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, { format: \"long\", locale: this.loc.locale });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({ day: \"numeric\" }, \"day\") : this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({ day: \"2-digit\" }, \"day\") : this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\", day: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter\n ? string({ month: \"2-digit\", day: \"numeric\" }, \"month\")\n : this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter\n ? string({ month: \"2-digit\" }, \"month\")\n : this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({ year: \"numeric\" }, \"year\") : this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter\n ? string({ year: \"2-digit\" }, \"year\")\n : this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return this.num(dt.weekYear, 4);\n case \"W\":\n return this.num(dt.weekNumber);\n case \"WW\":\n return this.num(dt.weekNumber, 2);\n case \"o\":\n return this.num(dt.ordinal);\n case \"ooo\":\n return this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return this.num(dt.quarter);\n case \"qq\":\n // like 01\n return this.num(dt.quarter, 2);\n case \"X\":\n return this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n\n return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n }\n\n formatDurationFromString(dur, fmt) {\n const tokenToField = token => {\n switch (token[0]) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n default:\n return null;\n }\n },\n tokenToString = lildur => token => {\n const mapped = tokenToField(token);\n if (mapped) {\n return this.num(lildur.get(mapped), token.length);\n } else {\n return token;\n }\n },\n tokens = Formatter.parseFormat(fmt),\n realTokens = tokens.reduce(\n (found, { literal, val }) => (literal ? found : found.concat(val)),\n []\n ),\n collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter(t => t));\n return stringifyTokens(tokens, tokenToString(collapsed));\n }\n}\n","export default class Invalid {\n constructor(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n\n toMessage() {\n if (this.explanation) {\n return `${this.reason}: ${this.explanation}`;\n } else {\n return this.reason;\n }\n }\n}\n","/* eslint no-unused-vars: \"off\" */\nimport { ZoneIsAbstractError } from \"./errors.js\";\n\n/**\n * @interface\n */\nexport default class Zone {\n /**\n * The type of zone\n * @abstract\n * @type {string}\n */\n get type() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The name of this zone.\n * @abstract\n * @type {string}\n */\n get name() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year.\n * @abstract\n * @type {boolean}\n */\n get universal() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, opts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */\n get isValid() {\n throw new ZoneIsAbstractError();\n }\n}\n","import { formatOffset, parseZoneInfo, hasIntl } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * Represents the local zone for this Javascript environment.\n * @implements {Zone}\n */\nexport default class LocalZone extends Zone {\n /**\n * Get a singleton instance of the local zone\n * @return {LocalZone}\n */\n static get instance() {\n if (singleton === null) {\n singleton = new LocalZone();\n }\n return singleton;\n }\n\n /** @override **/\n get type() {\n return \"local\";\n }\n\n /** @override **/\n get name() {\n if (hasIntl()) {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n } else return \"local\";\n }\n\n /** @override **/\n get universal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"local\";\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import { formatOffset, parseZoneInfo, isUndefined, ianaRegex, objToLocalTS } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nconst matchingRegex = RegExp(`^${ianaRegex.source}$`);\n\nlet dtfCache = {};\nfunction makeDTF(zone) {\n if (!dtfCache[zone]) {\n dtfCache[zone] = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\"\n });\n }\n return dtfCache[zone];\n}\n\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n hour: 3,\n minute: 4,\n second: 5\n};\n\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n parsed = /(\\d+)\\/(\\d+)\\/(\\d+),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed;\n return [fYear, fMonth, fDay, fHour, fMinute, fSecond];\n}\n\nfunction partsOffset(dtf, date) {\n const formatted = dtf.formatToParts(date),\n filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const { type, value } = formatted[i],\n pos = typeToPos[type];\n\n if (!isUndefined(pos)) {\n filled[pos] = parseInt(value, 10);\n }\n }\n return filled;\n}\n\nlet ianaZoneCache = {};\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nexport default class IANAZone extends Zone {\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */\n static create(name) {\n if (!ianaZoneCache[name]) {\n ianaZoneCache[name] = new IANAZone(name);\n }\n return ianaZoneCache[name];\n }\n\n /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCache() {\n ianaZoneCache = {};\n dtfCache = {};\n }\n\n /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Fantasia/Castle\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidSpecifier(s) {\n return !!(s && s.match(matchingRegex));\n }\n\n /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidZone(zone) {\n try {\n new Intl.DateTimeFormat(\"en-US\", { timeZone: zone }).format();\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Etc/GMT+8 -> -480\n /** @ignore */\n static parseGMTOffset(specifier) {\n if (specifier) {\n const match = specifier.match(/^Etc\\/GMT([+-]\\d{1,2})$/i);\n if (match) {\n return -60 * parseInt(match[1]);\n }\n }\n return null;\n }\n\n constructor(name) {\n super();\n /** @private **/\n this.zoneName = name;\n /** @private **/\n this.valid = IANAZone.isValidZone(name);\n }\n\n /** @override **/\n get type() {\n return \"iana\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get universal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale, this.name);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n const date = new Date(ts),\n dtf = makeDTF(this.name),\n [year, month, day, hour, minute, second] = dtf.formatToParts\n ? partsOffset(dtf, date)\n : hackyOffset(dtf, date),\n // work around https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n adjustedHour = hour === 24 ? 0 : hour;\n\n const asUTC = objToLocalTS({\n year,\n month,\n day,\n hour: adjustedHour,\n minute,\n second,\n millisecond: 0\n });\n\n let asTS = +date;\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / (60 * 1000);\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n }\n\n /** @override **/\n get isValid() {\n return this.valid;\n }\n}\n","import { formatOffset, signedOffset } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nexport default class FixedOffsetZone extends Zone {\n /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */\n static get utcInstance() {\n if (singleton === null) {\n singleton = new FixedOffsetZone(0);\n }\n return singleton;\n }\n\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */\n static instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n }\n\n /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */\n static parseSpecifier(s) {\n if (s) {\n const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) {\n return new FixedOffsetZone(signedOffset(r[1], r[2]));\n }\n }\n return null;\n }\n\n constructor(offset) {\n super();\n /** @private **/\n this.fixed = offset;\n }\n\n /** @override **/\n get type() {\n return \"fixed\";\n }\n\n /** @override **/\n get name() {\n return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n }\n\n /** @override **/\n offsetName() {\n return this.name;\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.fixed, format);\n }\n\n /** @override **/\n get universal() {\n return true;\n }\n\n /** @override **/\n offset() {\n return this.fixed;\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import Zone from \"../zone.js\";\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nexport default class InvalidZone extends Zone {\n constructor(zoneName) {\n super();\n /** @private */\n this.zoneName = zoneName;\n }\n\n /** @override **/\n get type() {\n return \"invalid\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get universal() {\n return false;\n }\n\n /** @override **/\n offsetName() {\n return null;\n }\n\n /** @override **/\n formatOffset() {\n return \"\";\n }\n\n /** @override **/\n offset() {\n return NaN;\n }\n\n /** @override **/\n equals() {\n return false;\n }\n\n /** @override **/\n get isValid() {\n return false;\n }\n}\n","/**\n * @private\n */\n\nimport Zone from \"../zone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport InvalidZone from \"../zones/invalidZone.js\";\n\nimport { isUndefined, isString, isNumber } from \"./util.js\";\n\nexport function normalizeZone(input, defaultZone) {\n let offset;\n if (isUndefined(input) || input === null) {\n return defaultZone;\n } else if (input instanceof Zone) {\n return input;\n } else if (isString(input)) {\n const lowered = input.toLowerCase();\n if (lowered === \"local\") return defaultZone;\n else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;\n else if ((offset = IANAZone.parseGMTOffset(input)) != null) {\n // handle Etc/GMT-4, which V8 chokes on\n return FixedOffsetZone.instance(offset);\n } else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input);\n else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input);\n } else if (isNumber(input)) {\n return FixedOffsetZone.instance(input);\n } else if (typeof input === \"object\" && input.offset && typeof input.offset === \"number\") {\n // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n } else {\n return new InvalidZone(input);\n }\n}\n","import LocalZone from \"./zones/localZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport Locale from \"./impl/locale.js\";\n\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nlet now = () => Date.now(),\n defaultZone = null, // not setting this directly to LocalZone.instance bc loading order issues\n defaultLocale = null,\n defaultNumberingSystem = null,\n defaultOutputCalendar = null,\n throwOnInvalid = false;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nexport default class Settings {\n /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */\n static get now() {\n return now;\n }\n\n /**\n * Set the callback for returning the current timestamp.\n * The function should return a number, which will be interpreted as an Epoch millisecond count\n * @type {function}\n * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n */\n static set now(n) {\n now = n;\n }\n\n /**\n * Get the default time zone to create DateTimes in.\n * @type {string}\n */\n static get defaultZoneName() {\n return Settings.defaultZone.name;\n }\n\n /**\n * Set the default time zone to create DateTimes in. Does not affect existing instances.\n * @type {string}\n */\n static set defaultZoneName(z) {\n if (!z) {\n defaultZone = null;\n } else {\n defaultZone = normalizeZone(z);\n }\n }\n\n /**\n * Get the default time zone object to create DateTimes in. Does not affect existing instances.\n * @type {Zone}\n */\n static get defaultZone() {\n return defaultZone || LocalZone.instance;\n }\n\n /**\n * Get the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultLocale() {\n return defaultLocale;\n }\n\n /**\n * Set the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultLocale(locale) {\n defaultLocale = locale;\n }\n\n /**\n * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultNumberingSystem() {\n return defaultNumberingSystem;\n }\n\n /**\n * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultNumberingSystem(numberingSystem) {\n defaultNumberingSystem = numberingSystem;\n }\n\n /**\n * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultOutputCalendar() {\n return defaultOutputCalendar;\n }\n\n /**\n * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultOutputCalendar(outputCalendar) {\n defaultOutputCalendar = outputCalendar;\n }\n\n /**\n * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static get throwOnInvalid() {\n return throwOnInvalid;\n }\n\n /**\n * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static set throwOnInvalid(t) {\n throwOnInvalid = t;\n }\n\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCaches() {\n Locale.resetCache();\n IANAZone.resetCache();\n }\n}\n","import { hasFormatToParts, hasIntl, padStart, roundTo, hasRelative } from \"./util.js\";\nimport * as English from \"./english.js\";\nimport Settings from \"../settings.js\";\nimport DateTime from \"../datetime.js\";\nimport Formatter from \"./formatter.js\";\n\nlet intlDTCache = {};\nfunction getCachedDTF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlDTCache[key];\n if (!dtf) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n intlDTCache[key] = dtf;\n }\n return dtf;\n}\n\nlet intlNumCache = {};\nfunction getCachedINF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let inf = intlNumCache[key];\n if (!inf) {\n inf = new Intl.NumberFormat(locString, opts);\n intlNumCache[key] = inf;\n }\n return inf;\n}\n\nlet intlRelCache = {};\nfunction getCachedRTF(locString, opts = {}) {\n const { base, ...cacheKeyOpts } = opts; // exclude `base` from the options\n const key = JSON.stringify([locString, cacheKeyOpts]);\n let inf = intlRelCache[key];\n if (!inf) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n intlRelCache[key] = inf;\n }\n return inf;\n}\n\nlet sysLocaleCache = null;\nfunction systemLocale() {\n if (sysLocaleCache) {\n return sysLocaleCache;\n } else if (hasIntl()) {\n const computedSys = new Intl.DateTimeFormat().resolvedOptions().locale;\n // node sometimes defaults to \"und\". Override that because that is dumb\n sysLocaleCache = !computedSys || computedSys === \"und\" ? \"en-US\" : computedSys;\n return sysLocaleCache;\n } else {\n sysLocaleCache = \"en-US\";\n return sysLocaleCache;\n }\n}\n\nfunction parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n\n const uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) {\n return [localeStr];\n } else {\n let options;\n const smaller = localeStr.substring(0, uIndex);\n try {\n options = getCachedDTF(localeStr).resolvedOptions();\n } catch (e) {\n options = getCachedDTF(smaller).resolvedOptions();\n }\n\n const { numberingSystem, calendar } = options;\n // return the smaller one so that we can append the calendar and numbering overrides to it\n return [smaller, numberingSystem, calendar];\n }\n}\n\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (hasIntl()) {\n if (outputCalendar || numberingSystem) {\n localeStr += \"-u\";\n\n if (outputCalendar) {\n localeStr += `-ca-${outputCalendar}`;\n }\n\n if (numberingSystem) {\n localeStr += `-nu-${numberingSystem}`;\n }\n return localeStr;\n } else {\n return localeStr;\n }\n } else {\n return [];\n }\n}\n\nfunction mapMonths(f) {\n const ms = [];\n for (let i = 1; i <= 12; i++) {\n const dt = DateTime.utc(2016, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction mapWeekdays(f) {\n const ms = [];\n for (let i = 1; i <= 7; i++) {\n const dt = DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction listStuff(loc, length, defaultOK, englishFn, intlFn) {\n const mode = loc.listingMode(defaultOK);\n\n if (mode === \"error\") {\n return null;\n } else if (mode === \"en\") {\n return englishFn(length);\n } else {\n return intlFn(length);\n }\n}\n\nfunction supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n return false;\n } else {\n return (\n loc.numberingSystem === \"latn\" ||\n !loc.locale ||\n loc.locale.startsWith(\"en\") ||\n (hasIntl() && new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === \"latn\")\n );\n }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n constructor(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n\n if (!forceSimple && hasIntl()) {\n const intlOpts = { useGrouping: false };\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = getCachedINF(intl, intlOpts);\n }\n }\n\n format(i) {\n if (this.inf) {\n const fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n return padStart(fixed, this.padTo);\n }\n }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n constructor(dt, intl, opts) {\n this.opts = opts;\n this.hasIntl = hasIntl();\n\n let z;\n if (dt.zone.universal && this.hasIntl) {\n // Chromium doesn't support fixed-offset zones like Etc/GMT+8 in its formatter,\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=364374.\n // So we have to make do. Two cases:\n // 1. The format options tell us to show the zone. We can't do that, so the best\n // we can do is format the date in UTC.\n // 2. The format options don't tell us to show the zone. Then we can adjust them\n // the time and tell the formatter to show it to us in UTC, so that the time is right\n // and the bad zone doesn't show up.\n // We can clean all this up when Chrome fixes this.\n z = \"UTC\";\n if (opts.timeZoneName) {\n this.dt = dt;\n } else {\n this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1000);\n }\n } else if (dt.zone.type === \"local\") {\n this.dt = dt;\n } else {\n this.dt = dt;\n z = dt.zone.name;\n }\n\n if (this.hasIntl) {\n const intlOpts = Object.assign({}, this.opts);\n if (z) {\n intlOpts.timeZone = z;\n }\n this.dtf = getCachedDTF(intl, intlOpts);\n }\n }\n\n format() {\n if (this.hasIntl) {\n return this.dtf.format(this.dt.toJSDate());\n } else {\n const tokenFormat = English.formatString(this.opts),\n loc = Locale.create(\"en-US\");\n return Formatter.create(loc).formatDateTimeFromString(this.dt, tokenFormat);\n }\n }\n\n formatToParts() {\n if (this.hasIntl && hasFormatToParts()) {\n return this.dtf.formatToParts(this.dt.toJSDate());\n } else {\n // This is kind of a cop out. We actually could do this for English. However, we couldn't do it for intl strings\n // and IMO it's too weird to have an uncanny valley like that\n return [];\n }\n }\n\n resolvedOptions() {\n if (this.hasIntl) {\n return this.dtf.resolvedOptions();\n } else {\n return {\n locale: \"en-US\",\n numberingSystem: \"latn\",\n outputCalendar: \"gregory\"\n };\n }\n }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n constructor(intl, isEnglish, opts) {\n this.opts = Object.assign({ style: \"long\" }, opts);\n if (!isEnglish && hasRelative()) {\n this.rtf = getCachedRTF(intl, opts);\n }\n }\n\n format(count, unit) {\n if (this.rtf) {\n return this.rtf.format(count, unit);\n } else {\n return English.formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n }\n }\n\n formatToParts(count, unit) {\n if (this.rtf) {\n return this.rtf.formatToParts(count, unit);\n } else {\n return [];\n }\n }\n}\n\n/**\n * @private\n */\n\nexport default class Locale {\n static fromOpts(opts) {\n return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN);\n }\n\n static create(locale, numberingSystem, outputCalendar, defaultToEN = false) {\n const specifiedLocale = locale || Settings.defaultLocale,\n // the system locale is useful for human readable strings but annoying for parsing/formatting known formats\n localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale()),\n numberingSystemR = numberingSystem || Settings.defaultNumberingSystem,\n outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale);\n }\n\n static resetCache() {\n sysLocaleCache = null;\n intlDTCache = {};\n intlNumCache = {};\n intlRelCache = {};\n }\n\n static fromObject({ locale, numberingSystem, outputCalendar } = {}) {\n return Locale.create(locale, numberingSystem, outputCalendar);\n }\n\n constructor(locale, numbering, outputCalendar, specifiedLocale) {\n const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n\n this.weekdaysCache = { format: {}, standalone: {} };\n this.monthsCache = { format: {}, standalone: {} };\n this.meridiemCache = null;\n this.eraCache = {};\n\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n\n get fastNumbers() {\n if (this.fastNumbersCached == null) {\n this.fastNumbersCached = supportsFastNumbers(this);\n }\n\n return this.fastNumbersCached;\n }\n\n listingMode(defaultOK = true) {\n const intl = hasIntl(),\n hasFTP = intl && hasFormatToParts(),\n isActuallyEn = this.isEnglish(),\n hasNoWeirdness =\n (this.numberingSystem === null || this.numberingSystem === \"latn\") &&\n (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n\n if (!hasFTP && !(isActuallyEn && hasNoWeirdness) && !defaultOK) {\n return \"error\";\n } else if (!hasFTP || (isActuallyEn && hasNoWeirdness)) {\n return \"en\";\n } else {\n return \"intl\";\n }\n }\n\n clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n return this;\n } else {\n return Locale.create(\n alts.locale || this.specifiedLocale,\n alts.numberingSystem || this.numberingSystem,\n alts.outputCalendar || this.outputCalendar,\n alts.defaultToEN || false\n );\n }\n }\n\n redefaultToEN(alts = {}) {\n return this.clone(Object.assign({}, alts, { defaultToEN: true }));\n }\n\n redefaultToSystem(alts = {}) {\n return this.clone(Object.assign({}, alts, { defaultToEN: false }));\n }\n\n months(length, format = false, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.months, () => {\n const intl = format ? { month: length, day: \"numeric\" } : { month: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.monthsCache[formatStr][length]) {\n this.monthsCache[formatStr][length] = mapMonths(dt => this.extract(dt, intl, \"month\"));\n }\n return this.monthsCache[formatStr][length];\n });\n }\n\n weekdays(length, format = false, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.weekdays, () => {\n const intl = format\n ? { weekday: length, year: \"numeric\", month: \"long\", day: \"numeric\" }\n : { weekday: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.weekdaysCache[formatStr][length]) {\n this.weekdaysCache[formatStr][length] = mapWeekdays(dt =>\n this.extract(dt, intl, \"weekday\")\n );\n }\n return this.weekdaysCache[formatStr][length];\n });\n }\n\n meridiems(defaultOK = true) {\n return listStuff(\n this,\n undefined,\n defaultOK,\n () => English.meridiems,\n () => {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!this.meridiemCache) {\n const intl = { hour: \"numeric\", hour12: true };\n this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(\n dt => this.extract(dt, intl, \"dayperiod\")\n );\n }\n\n return this.meridiemCache;\n }\n );\n }\n\n eras(length, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.eras, () => {\n const intl = { era: length };\n\n // This is utter bullshit. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!this.eraCache[length]) {\n this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(dt =>\n this.extract(dt, intl, \"era\")\n );\n }\n\n return this.eraCache[length];\n });\n }\n\n extract(dt, intlOpts, field) {\n const df = this.dtFormatter(dt, intlOpts),\n results = df.formatToParts(),\n matching = results.find(m => m.type.toLowerCase() === field);\n return matching ? matching.value : null;\n }\n\n numberFormatter(opts = {}) {\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n }\n\n dtFormatter(dt, intlOpts = {}) {\n return new PolyDateFormatter(dt, this.intl, intlOpts);\n }\n\n relFormatter(opts = {}) {\n return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n }\n\n isEnglish() {\n return (\n this.locale === \"en\" ||\n this.locale.toLowerCase() === \"en-us\" ||\n (hasIntl() && new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith(\"en-us\"))\n );\n }\n\n equals(other) {\n return (\n this.locale === other.locale &&\n this.numberingSystem === other.numberingSystem &&\n this.outputCalendar === other.outputCalendar\n );\n }\n}\n","import {\n untruncateYear,\n signedOffset,\n parseInteger,\n parseMillis,\n ianaRegex,\n isUndefined\n} from \"./util.js\";\nimport * as English from \"./english.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nfunction combineRegexes(...regexes) {\n const full = regexes.reduce((f, r) => f + r.source, \"\");\n return RegExp(`^${full}$`);\n}\n\nfunction combineExtractors(...extractors) {\n return m =>\n extractors\n .reduce(\n ([mergedVals, mergedZone, cursor], ex) => {\n const [val, zone, next] = ex(m, cursor);\n return [Object.assign(mergedVals, val), mergedZone || zone, next];\n },\n [{}, null, 1]\n )\n .slice(0, 2);\n}\n\nfunction parse(s, ...patterns) {\n if (s == null) {\n return [null, null];\n }\n\n for (const [regex, extractor] of patterns) {\n const m = regex.exec(s);\n if (m) {\n return extractor(m);\n }\n }\n return [null, null];\n}\n\nfunction simpleParse(...keys) {\n return (match, cursor) => {\n const ret = {};\n let i;\n\n for (i = 0; i < keys.length; i++) {\n ret[keys[i]] = parseInteger(match[cursor + i]);\n }\n return [ret, null, cursor + i];\n };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:(Z)|([+-]\\d\\d)(?::?(\\d\\d))?)/,\n isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/,\n isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${offsetRegex.source}?`),\n isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`),\n isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/,\n isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/,\n isoOrdinalRegex = /(\\d{4})-?(\\d{3})/,\n extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\"),\n extractISOOrdinalData = simpleParse(\"year\", \"ordinal\"),\n sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/, // dumbed-down version of the ISO one\n sqlTimeRegex = RegExp(\n `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`\n ),\n sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\n\nfunction int(match, pos, fallback) {\n const m = match[pos];\n return isUndefined(m) ? fallback : parseInteger(m);\n}\n\nfunction extractISOYmd(match, cursor) {\n const item = {\n year: int(match, cursor),\n month: int(match, cursor + 1, 1),\n day: int(match, cursor + 2, 1)\n };\n\n return [item, null, cursor + 3];\n}\n\nfunction extractISOTime(match, cursor) {\n const item = {\n hour: int(match, cursor, 0),\n minute: int(match, cursor + 1, 0),\n second: int(match, cursor + 2, 0),\n millisecond: parseMillis(match[cursor + 3])\n };\n\n return [item, null, cursor + 4];\n}\n\nfunction extractISOOffset(match, cursor) {\n const local = !match[cursor] && !match[cursor + 1],\n fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n zone = local ? null : FixedOffsetZone.instance(fullOffset);\n return [{}, zone, cursor + 3];\n}\n\nfunction extractIANAZone(match, cursor) {\n const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n return [{}, zone, cursor + 1];\n}\n\n// ISO duration parsing\n\nconst isoDuration = /^-?P(?:(?:(-?\\d{1,9})Y)?(?:(-?\\d{1,9})M)?(?:(-?\\d{1,9})W)?(?:(-?\\d{1,9})D)?(?:T(?:(-?\\d{1,9})H)?(?:(-?\\d{1,9})M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,9}))?S)?)?)$/;\n\nfunction extractISODuration(match) {\n const [\n s,\n yearStr,\n monthStr,\n weekStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr,\n millisecondsStr\n ] = match;\n\n const hasNegativePrefix = s[0] === \"-\";\n\n const maybeNegate = num => (num && hasNegativePrefix ? -num : num);\n\n return [\n {\n years: maybeNegate(parseInteger(yearStr)),\n months: maybeNegate(parseInteger(monthStr)),\n weeks: maybeNegate(parseInteger(weekStr)),\n days: maybeNegate(parseInteger(dayStr)),\n hours: maybeNegate(parseInteger(hourStr)),\n minutes: maybeNegate(parseInteger(minuteStr)),\n seconds: maybeNegate(parseInteger(secondStr)),\n milliseconds: maybeNegate(parseMillis(millisecondsStr))\n }\n ];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n};\n\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n const result = {\n year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n month: English.monthsShort.indexOf(monthStr) + 1,\n day: parseInteger(dayStr),\n hour: parseInteger(hourStr),\n minute: parseInteger(minuteStr)\n };\n\n if (secondStr) result.second = parseInteger(secondStr);\n if (weekdayStr) {\n result.weekday =\n weekdayStr.length > 3\n ? English.weekdaysLong.indexOf(weekdayStr) + 1\n : English.weekdaysShort.indexOf(weekdayStr) + 1;\n }\n\n return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\n\nfunction extractRFC2822(match) {\n const [\n ,\n weekdayStr,\n dayStr,\n monthStr,\n yearStr,\n hourStr,\n minuteStr,\n secondStr,\n obsOffset,\n milOffset,\n offHourStr,\n offMinuteStr\n ] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n\n let offset;\n if (obsOffset) {\n offset = obsOffsets[obsOffset];\n } else if (milOffset) {\n offset = 0;\n } else {\n offset = signedOffset(offHourStr, offMinuteStr);\n }\n\n return [result, new FixedOffsetZone(offset)];\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^)]*\\)|[\\n\\t]/g, \" \")\n .replace(/(\\s\\s+)/g, \" \")\n .trim();\n}\n\n// http date\n\nconst rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n rfc850 = /^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\n\nfunction extractRFC1123Or850(match) {\n const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nfunction extractASCII(match) {\n const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\n\nconst extractISOYmdTimeAndOffset = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset\n);\nconst extractISOWeekTimeAndOffset = combineExtractors(\n extractISOWeekData,\n extractISOTime,\n extractISOOffset\n);\nconst extractISOOrdinalDataAndTime = combineExtractors(extractISOOrdinalData, extractISOTime);\nconst extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset);\n\n/**\n * @private\n */\n\nexport function parseISODate(s) {\n return parse(\n s,\n [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],\n [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDataAndTime],\n [isoTimeCombinedRegex, extractISOTimeAndOffset]\n );\n}\n\nexport function parseRFC2822Date(s) {\n return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\n\nexport function parseHTTPDate(s) {\n return parse(\n s,\n [rfc1123, extractRFC1123Or850],\n [rfc850, extractRFC1123Or850],\n [ascii, extractASCII]\n );\n}\n\nexport function parseISODuration(s) {\n return parse(s, [isoDuration, extractISODuration]);\n}\n\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\n\nconst extractISOYmdTimeOffsetAndIANAZone = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\nexport function parseSQL(s) {\n return parse(\n s,\n [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeOffsetAndIANAZone],\n [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]\n );\n}\n","import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from \"./errors.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Locale from \"./impl/locale.js\";\nimport { parseISODuration } from \"./impl/regexParser.js\";\nimport {\n asNumber,\n hasOwnProperty,\n isNumber,\n isUndefined,\n normalizeObject,\n roundTo\n} from \"./impl/util.js\";\nimport Settings from \"./settings.js\";\n\nconst INVALID = \"Invalid Duration\";\n\n// unit conversion constants\nconst lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 7 * 24,\n minutes: 7 * 24 * 60,\n seconds: 7 * 24 * 60 * 60,\n milliseconds: 7 * 24 * 60 * 60 * 1000\n },\n days: {\n hours: 24,\n minutes: 24 * 60,\n seconds: 24 * 60 * 60,\n milliseconds: 24 * 60 * 60 * 1000\n },\n hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1000 },\n minutes: { seconds: 60, milliseconds: 60 * 1000 },\n seconds: { milliseconds: 1000 }\n },\n casualMatrix = Object.assign(\n {\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 365 * 24,\n minutes: 365 * 24 * 60,\n seconds: 365 * 24 * 60 * 60,\n milliseconds: 365 * 24 * 60 * 60 * 1000\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 91 * 24,\n minutes: 91 * 24 * 60,\n seconds: 91 * 24 * 60 * 60,\n milliseconds: 91 * 24 * 60 * 60 * 1000\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 30 * 24,\n minutes: 30 * 24 * 60,\n seconds: 30 * 24 * 60 * 60,\n milliseconds: 30 * 24 * 60 * 60 * 1000\n }\n },\n lowOrderMatrix\n ),\n daysInYearAccurate = 146097.0 / 400,\n daysInMonthAccurate = 146097.0 / 4800,\n accurateMatrix = Object.assign(\n {\n years: {\n quarters: 4,\n months: 12,\n weeks: daysInYearAccurate / 7,\n days: daysInYearAccurate,\n hours: daysInYearAccurate * 24,\n minutes: daysInYearAccurate * 24 * 60,\n seconds: daysInYearAccurate * 24 * 60 * 60,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000\n },\n quarters: {\n months: 3,\n weeks: daysInYearAccurate / 28,\n days: daysInYearAccurate / 4,\n hours: (daysInYearAccurate * 24) / 4,\n minutes: (daysInYearAccurate * 24 * 60) / 4,\n seconds: (daysInYearAccurate * 24 * 60 * 60) / 4,\n milliseconds: (daysInYearAccurate * 24 * 60 * 60 * 1000) / 4\n },\n months: {\n weeks: daysInMonthAccurate / 7,\n days: daysInMonthAccurate,\n hours: daysInMonthAccurate * 24,\n minutes: daysInMonthAccurate * 24 * 60,\n seconds: daysInMonthAccurate * 24 * 60 * 60,\n milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000\n }\n },\n lowOrderMatrix\n );\n\n// units ordered by size\nconst orderedUnits = [\n \"years\",\n \"quarters\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\"\n];\n\nconst reverseUnits = orderedUnits.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone(dur, alts, clear = false) {\n // deep merge for vals\n const conf = {\n values: clear ? alts.values : Object.assign({}, dur.values, alts.values || {}),\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy\n };\n return new Duration(conf);\n}\n\nfunction antiTrunc(n) {\n return n < 0 ? Math.floor(n) : Math.ceil(n);\n}\n\n// NB: mutates parameters\nfunction convert(matrix, fromMap, fromUnit, toMap, toUnit) {\n const conv = matrix[toUnit][fromUnit],\n raw = fromMap[fromUnit] / conv,\n sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]),\n // ok, so this is wild, but see the matrix in the tests\n added =\n !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw);\n toMap[toUnit] += added;\n fromMap[fromUnit] -= added * conv;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n reverseUnits.reduce((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n convert(matrix, vals, previous, vals, current);\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime.plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration.years}, {@link Duration.months}, {@link Duration.weeks}, {@link Duration.days}, {@link Duration.hours}, {@link Duration.minutes}, {@link Duration.seconds}, {@link Duration.milliseconds} accessors.\n * * **Configuration** See {@link Duration.locale} and {@link Duration.numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration.plus}, {@link Duration.minus}, {@link Duration.normalize}, {@link Duration.set}, {@link Duration.reconfigure}, {@link Duration.shiftTo}, and {@link Duration.negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration.as}, {@link Duration.toISO}, {@link Duration.toFormat}, and {@link Duration.toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nexport default class Duration {\n /**\n * @private\n */\n constructor(config) {\n const accurate = config.conversionAccuracy === \"longterm\" || false;\n /**\n * @access private\n */\n this.values = config.values;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.matrix = accurate ? accurateMatrix : casualMatrix;\n /**\n * @access private\n */\n this.isLuxonDuration = true;\n }\n\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromMillis(count, opts) {\n return Duration.fromObject(Object.assign({ milliseconds: count }, opts));\n }\n\n /**\n * Create a Duration from a Javascript object with keys like 'years' and 'hours.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {string} [obj.locale='en-US'] - the locale to use\n * @param {string} obj.numberingSystem - the numbering system to use\n * @param {string} [obj.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromObject(obj) {\n if (obj == null || typeof obj !== \"object\") {\n throw new InvalidArgumentError(\n `Duration.fromObject: argument expected to be an object, got ${\n obj === null ? \"null\" : typeof obj\n }`\n );\n }\n return new Duration({\n values: normalizeObject(obj, Duration.normalizeUnit, [\n \"locale\",\n \"numberingSystem\",\n \"conversionAccuracy\",\n \"zone\" // a bit of debt; it's super inconvenient internally not to be able to blindly pass this\n ]),\n loc: Locale.fromObject(obj),\n conversionAccuracy: obj.conversionAccuracy\n });\n }\n\n /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */\n static fromISO(text, opts) {\n const [parsed] = parseISODuration(text);\n if (parsed) {\n const obj = Object.assign(parsed, opts);\n return Duration.fromObject(obj);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDurationError(invalid);\n } else {\n return new Duration({ invalid });\n }\n }\n\n /**\n * @private\n */\n static normalizeUnit(unit) {\n const normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\"\n }[unit ? unit.toLowerCase() : unit];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n }\n\n /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDuration(o) {\n return (o && o.isLuxonDuration) || false;\n }\n\n /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * The duration will be converted to the set of units in the format string using {@link Duration.shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n const fmtOpts = Object.assign({}, opts, {\n floor: opts.round !== false && opts.floor !== false\n });\n return this.isValid\n ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a Javascript object with this Duration's values.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = Object.assign({}, this.values);\n\n if (opts.includeConfig) {\n base.conversionAccuracy = this.conversionAccuracy;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */\n toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n\n let s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)\n s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0)\n // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */\n toString() {\n return this.toISO();\n }\n\n /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */\n valueOf() {\n return this.as(\"milliseconds\");\n }\n\n /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n plus(duration) {\n if (!this.isValid) return this;\n\n const dur = friendlyDuration(duration),\n result = {};\n\n for (const k of orderedUnits) {\n if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n result[k] = dur.get(k) + this.get(k);\n }\n }\n\n return clone(this, { values: result }, true);\n }\n\n /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n minus(duration) {\n if (!this.isValid) return this;\n\n const dur = friendlyDuration(duration);\n return this.plus(dur.negate());\n }\n\n /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit((x, u) => u === \"hour\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */\n mapUnits(fn) {\n if (!this.isValid) return this;\n const result = {};\n for (const k of Object.keys(this.values)) {\n result[k] = asNumber(fn(this.values[k], k));\n }\n return clone(this, { values: result }, true);\n }\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).years //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).months //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).days //=> 3\n * @return {number}\n */\n get(unit) {\n return this[Duration.normalizeUnit(unit)];\n }\n\n /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const mixed = Object.assign(this.values, normalizeObject(values, Duration.normalizeUnit, []));\n return clone(this, { values: mixed });\n }\n\n /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */\n reconfigure({ locale, numberingSystem, conversionAccuracy } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem }),\n opts = { loc };\n\n if (conversionAccuracy) {\n opts.conversionAccuracy = conversionAccuracy;\n }\n\n return clone(this, opts);\n }\n\n /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */\n as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n }\n\n /**\n * Reduce this Duration to its canonical representation in its current units.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @return {Duration}\n */\n normalize() {\n if (!this.isValid) return this;\n const vals = this.toObject();\n normalizeValues(this.matrix, vals);\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */\n shiftTo(...units) {\n if (!this.isValid) return this;\n\n if (units.length === 0) {\n return this;\n }\n\n units = units.map(u => Duration.normalizeUnit(u));\n\n const built = {},\n accumulated = {},\n vals = this.toObject();\n let lastUnit;\n\n for (const k of orderedUnits) {\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n\n let own = 0;\n\n // anything we haven't boiled down yet should get boiled to this unit\n for (const ak in accumulated) {\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n\n // plus anything that's already in this unit\n if (isNumber(vals[k])) {\n own += vals[k];\n }\n\n const i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = own - i; // we'd like to absorb these fractions in another unit\n\n // plus anything further down the chain that should be rolled up in to this\n for (const down in vals) {\n if (orderedUnits.indexOf(down) > orderedUnits.indexOf(k)) {\n convert(this.matrix, vals, down, built, k);\n }\n }\n // otherwise, keep it in the wings to boil it later\n } else if (isNumber(vals[k])) {\n accumulated[k] = vals[k];\n }\n }\n\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for (const key in accumulated) {\n if (accumulated[key] !== 0) {\n built[lastUnit] +=\n key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n }\n }\n\n return clone(this, { values: built }, true).normalize();\n }\n\n /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */\n negate() {\n if (!this.isValid) return this;\n const negated = {};\n for (const k of Object.keys(this.values)) {\n negated[k] = -this.values[k];\n }\n return clone(this, { values: negated }, true);\n }\n\n /**\n * Get the years.\n * @type {number}\n */\n get years() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n\n /**\n * Get the quarters.\n * @type {number}\n */\n get quarters() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n\n /**\n * Get the months.\n * @type {number}\n */\n get months() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n\n /**\n * Get the weeks\n * @type {number}\n */\n get weeks() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n\n /**\n * Get the days.\n * @type {number}\n */\n get days() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n\n /**\n * Get the hours.\n * @type {number}\n */\n get hours() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n\n /**\n * Get the minutes.\n * @type {number}\n */\n get minutes() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n\n /**\n * Get the seconds.\n * @return {number}\n */\n get seconds() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n\n /**\n * Get the milliseconds.\n * @return {number}\n */\n get milliseconds() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n\n /**\n * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n * on invalid DateTimes or Intervals.\n * @return {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this Duration became invalid, or null if the Duration is valid\n * @return {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n if (!this.loc.equals(other.loc)) {\n return false;\n }\n\n for (const u of orderedUnits) {\n if (this.values[u] !== other.values[u]) {\n return false;\n }\n }\n return true;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDuration(durationish) {\n if (isNumber(durationish)) {\n return Duration.fromMillis(durationish);\n } else if (Duration.isDuration(durationish)) {\n return durationish;\n } else if (typeof durationish === \"object\") {\n return Duration.fromObject(durationish);\n } else {\n throw new InvalidArgumentError(\n `Unknown duration argument ${durationish} of type ${typeof durationish}`\n );\n }\n}\n","import DateTime, { friendlyDateTime } from \"./datetime.js\";\nimport Duration, { friendlyDuration } from \"./duration.js\";\nimport Settings from \"./settings.js\";\nimport { InvalidArgumentError, InvalidIntervalError } from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\n \"end before start\",\n `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`\n );\n } else {\n return null;\n }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link fromDateTimes}, {@link after}, {@link before}, or {@link fromISO}.\n * * **Accessors** Use {@link start} and {@link end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link count}, {@link length}, {@link hasSame}, {@link contains}, {@link isAfter}, or {@link isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link set}, {@link splitAt}, {@link splitBy}, {@link divideEqually}, {@link merge}, {@link xor}, {@link union}, {@link intersection}, or {@link difference}.\n * * **Comparison** To compare this Interval to another one, use {@link equals}, {@link overlaps}, {@link abutsStart}, {@link abutsEnd}, {@link engulfs}.\n * * **Output** To convert the Interval into other representations, see {@link toString}, {@link toISO}, {@link toISODate}, {@link toISOTime}, {@link toFormat}, and {@link toDuration}.\n */\nexport default class Interval {\n /**\n * @private\n */\n constructor(config) {\n /**\n * @access private\n */\n this.s = config.start;\n /**\n * @access private\n */\n this.e = config.end;\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.isLuxonInterval = true;\n }\n\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidIntervalError(invalid);\n } else {\n return new Interval({ invalid });\n }\n }\n\n /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */\n static fromDateTimes(start, end) {\n const builtStart = friendlyDateTime(start),\n builtEnd = friendlyDateTime(end);\n\n const validateError = validateStartEnd(builtStart, builtEnd);\n\n if (validateError == null) {\n return new Interval({\n start: builtStart,\n end: builtEnd\n });\n } else {\n return validateError;\n }\n }\n\n /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static after(start, duration) {\n const dur = friendlyDuration(duration),\n dt = friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n }\n\n /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static before(end, duration) {\n const dur = friendlyDuration(duration),\n dt = friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n }\n\n /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `/`, `/`, and `/` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime.fromISO} and optionally {@link Duration.fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */\n static fromISO(text, opts) {\n const [s, e] = (text || \"\").split(\"/\", 2);\n if (s && e) {\n let start, startIsValid;\n try {\n start = DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n\n let end, endIsValid;\n try {\n end = DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n\n if (startIsValid && endIsValid) {\n return Interval.fromDateTimes(start, end);\n }\n\n if (startIsValid) {\n const dur = Duration.fromISO(e, opts);\n if (dur.isValid) {\n return Interval.after(start, dur);\n }\n } else if (endIsValid) {\n const dur = Duration.fromISO(s, opts);\n if (dur.isValid) {\n return Interval.before(end, dur);\n }\n }\n }\n return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n\n /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isInterval(o) {\n return (o && o.isLuxonInterval) || false;\n }\n\n /**\n * Returns the start of the Interval\n * @type {DateTime}\n */\n get start() {\n return this.isValid ? this.s : null;\n }\n\n /**\n * Returns the end of the Interval\n * @type {DateTime}\n */\n get end() {\n return this.isValid ? this.e : null;\n }\n\n /**\n * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n * @type {boolean}\n */\n get isValid() {\n return this.invalidReason === null;\n }\n\n /**\n * Returns an error code if this Interval is invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */\n length(unit = \"milliseconds\") {\n return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n }\n\n /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @return {number}\n */\n count(unit = \"milliseconds\") {\n if (!this.isValid) return NaN;\n const start = this.start.startOf(unit),\n end = this.end.startOf(unit);\n return Math.floor(end.diff(start, unit).get(unit)) + 1;\n }\n\n /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */\n hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n }\n\n /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */\n isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n }\n\n /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n }\n\n /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n }\n\n /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n }\n\n /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */\n set({ start, end } = {}) {\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n }\n\n /**\n * Split this Interval at each of the specified DateTimes\n * @param {...[DateTime]} dateTimes - the unit of time to count.\n * @return {[Interval]}\n */\n splitAt(...dateTimes) {\n if (!this.isValid) return [];\n const sorted = dateTimes\n .map(friendlyDateTime)\n .filter(d => this.contains(d))\n .sort(),\n results = [];\n let { s } = this,\n i = 0;\n\n while (s < this.e) {\n const added = sorted[i] || this.e,\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {[Interval]}\n */\n splitBy(duration) {\n const dur = friendlyDuration(duration);\n\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n return [];\n }\n\n let { s } = this,\n added,\n next;\n\n const results = [];\n while (s < this.e) {\n added = s.plus(dur);\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {[Interval]}\n */\n divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n }\n\n /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */\n overlaps(other) {\n return this.e > other.s && this.s < other.e;\n }\n\n /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n }\n\n /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n }\n\n /**\n * Return whether this Interval engulfs the start and end of the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n }\n\n /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n return this.s.equals(other.s) && this.e.equals(other.e);\n }\n\n /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */\n intersection(other) {\n if (!this.isValid) return this;\n const s = this.s > other.s ? this.s : other.s,\n e = this.e < other.e ? this.e : other.e;\n\n if (s > e) {\n return null;\n } else {\n return Interval.fromDateTimes(s, e);\n }\n }\n\n /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */\n union(other) {\n if (!this.isValid) return this;\n const s = this.s < other.s ? this.s : other.s,\n e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n }\n\n /**\n * Merge an array of Intervals into a equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * @param {[Interval]} intervals\n * @return {[Interval]}\n */\n static merge(intervals) {\n const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(\n ([sofar, current], item) => {\n if (!current) {\n return [sofar, item];\n } else if (current.overlaps(item) || current.abutsStart(item)) {\n return [sofar, current.union(item)];\n } else {\n return [sofar.concat([current]), item];\n }\n },\n [[], null]\n );\n if (final) {\n found.push(final);\n }\n return found;\n }\n\n /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {[Interval]} intervals\n * @return {[Interval]}\n */\n static xor(intervals) {\n let start = null,\n currentCount = 0;\n const results = [],\n ends = intervals.map(i => [{ time: i.s, type: \"s\" }, { time: i.e, type: \"e\" }]),\n flattened = Array.prototype.concat(...ends),\n arr = flattened.sort((a, b) => a.time - b.time);\n\n for (const i of arr) {\n currentCount += i.type === \"s\" ? 1 : -1;\n\n if (currentCount === 1) {\n start = i.time;\n } else {\n if (start && +start !== +i.time) {\n results.push(Interval.fromDateTimes(start, i.time));\n }\n\n start = null;\n }\n }\n\n return Interval.merge(results);\n }\n\n /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {[Interval]}\n */\n difference(...intervals) {\n return Interval.xor([this].concat(intervals))\n .map(i => this.intersection(i))\n .filter(i => i && !i.isEmpty());\n }\n\n /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */\n toString() {\n if (!this.isValid) return INVALID;\n return `[${this.s.toISO()} – ${this.e.toISO()})`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime.toISO}\n * @return {string}\n */\n toISO(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */\n toISODate() {\n if (!this.isValid) return INVALID;\n return `${this.s.toISODate()}/${this.e.toISODate()}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime.toISO}\n * @return {string}\n */\n toISOTime(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this Interval formatted according to the specified format string.\n * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime.toFormat} for details.\n * @param {Object} opts - options\n * @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations\n * @return {string}\n */\n toFormat(dateFormat, { separator = \" – \" } = {}) {\n if (!this.isValid) return INVALID;\n return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n }\n\n /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */\n toDuration(unit, opts) {\n if (!this.isValid) {\n return Duration.invalid(this.invalidReason);\n }\n return this.e.diff(this.s, unit, opts);\n }\n\n /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */\n mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n }\n}\n","import DateTime from \"./datetime.js\";\nimport Settings from \"./settings.js\";\nimport Locale from \"./impl/locale.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nimport { hasFormatToParts, hasIntl, hasRelative } from \"./impl/util.js\";\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nexport default class Info {\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */\n static hasDST(zone = Settings.defaultZone) {\n const proto = DateTime.local()\n .setZone(zone)\n .set({ month: 12 });\n\n return !zone.universal && proto.offset !== proto.set({ month: 6 }).offset;\n }\n\n /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */\n static isValidIANAZone(zone) {\n return IANAZone.isValidSpecifier(zone) && IANAZone.isValidZone(zone);\n }\n\n /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone.isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */\n static normalizeZone(input) {\n return normalizeZone(input, Settings.defaultZone);\n }\n\n /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {[string]}\n */\n static months(\n length = \"long\",\n { locale = null, numberingSystem = null, outputCalendar = \"gregory\" } = {}\n ) {\n return Locale.create(locale, numberingSystem, outputCalendar).months(length);\n }\n\n /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {[string]}\n */\n static monthsFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, outputCalendar = \"gregory\" } = {}\n ) {\n return Locale.create(locale, numberingSystem, outputCalendar).months(length, true);\n }\n\n /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {[string]}\n */\n static weekdays(length = \"long\", { locale = null, numberingSystem = null } = {}) {\n return Locale.create(locale, numberingSystem, null).weekdays(length);\n }\n\n /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link weekdays}\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @return {[string]}\n */\n static weekdaysFormat(length = \"long\", { locale = null, numberingSystem = null } = {}) {\n return Locale.create(locale, numberingSystem, null).weekdays(length, true);\n }\n\n /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {[string]}\n */\n static meridiems({ locale = null } = {}) {\n return Locale.create(locale).meridiems();\n }\n\n /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {[string]}\n */\n static eras(length = \"short\", { locale = null } = {}) {\n return Locale.create(locale, null, \"gregory\").eras(length);\n }\n\n /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, timezone support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `zones`: whether this environment supports IANA timezones\n * * `intlTokens`: whether this environment supports internationalized token-based formatting/parsing\n * * `intl`: whether this environment supports general internationalization\n * * `relative`: whether this environment supports relative time formatting\n * @example Info.features() //=> { intl: true, intlTokens: false, zones: true, relative: false }\n * @return {Object}\n */\n static features() {\n let intl = false,\n intlTokens = false,\n zones = false,\n relative = false;\n\n if (hasIntl()) {\n intl = true;\n intlTokens = hasFormatToParts();\n relative = hasRelative();\n\n try {\n zones =\n new Intl.DateTimeFormat(\"en\", { timeZone: \"America/New_York\" }).resolvedOptions()\n .timeZone === \"America/New_York\";\n } catch (e) {\n zones = false;\n }\n }\n\n return { intl, intlTokens, zones, relative };\n }\n}\n","import Duration from \"../duration.js\";\n\nfunction dayDiff(earlier, later) {\n const utcDayStart = dt =>\n dt\n .toUTC(0, { keepLocalTime: true })\n .startOf(\"day\")\n .valueOf(),\n ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\n\nfunction highOrderDiffs(cursor, later, units) {\n const differs = [\n [\"years\", (a, b) => b.year - a.year],\n [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12],\n [\n \"weeks\",\n (a, b) => {\n const days = dayDiff(a, b);\n return (days - (days % 7)) / 7;\n }\n ],\n [\"days\", dayDiff]\n ];\n\n const results = {};\n let lowestOrder, highWater;\n\n for (const [unit, differ] of differs) {\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n\n let delta = differ(cursor, later);\n highWater = cursor.plus({ [unit]: delta });\n\n if (highWater > later) {\n cursor = cursor.plus({ [unit]: delta - 1 });\n delta -= 1;\n } else {\n cursor = highWater;\n }\n\n results[unit] = delta;\n }\n }\n\n return [cursor, results, highWater, lowestOrder];\n}\n\nexport default function(earlier, later, units, opts) {\n let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n\n const remainingMillis = later - cursor;\n\n const lowerOrderUnits = units.filter(\n u => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0\n );\n\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n highWater = cursor.plus({ [lowestOrder]: 1 });\n }\n\n if (highWater !== cursor) {\n results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n }\n\n const duration = Duration.fromObject(Object.assign(results, opts));\n\n if (lowerOrderUnits.length > 0) {\n return Duration.fromMillis(remainingMillis, opts)\n .shiftTo(...lowerOrderUnits)\n .plus(duration);\n } else {\n return duration;\n }\n}\n","const numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\"\n};\n\nconst numberingSystemsUTF16 = {\n arab: [1632, 1641],\n arabext: [1776, 1785],\n bali: [6992, 7001],\n beng: [2534, 2543],\n deva: [2406, 2415],\n fullwide: [65296, 65303],\n gujr: [2790, 2799],\n khmr: [6112, 6121],\n knda: [3302, 3311],\n laoo: [3792, 3801],\n limb: [6470, 6479],\n mlym: [3430, 3439],\n mong: [6160, 6169],\n mymr: [4160, 4169],\n orya: [2918, 2927],\n tamldec: [3046, 3055],\n telu: [3174, 3183],\n thai: [3664, 3673],\n tibt: [3872, 3881]\n};\n\n// eslint-disable-next-line\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\n\nexport function parseDigits(str) {\n let value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (str[i].search(numberingSystems.hanidec) !== -1) {\n value += hanidecChars.indexOf(str[i]);\n } else {\n for (const key in numberingSystemsUTF16) {\n const [min, max] = numberingSystemsUTF16[key];\n if (code >= min && code <= max) {\n value += code - min;\n }\n }\n }\n }\n return parseInt(value, 10);\n } else {\n return value;\n }\n}\n\nexport function digitRegex({ numberingSystem }, append = \"\") {\n return new RegExp(`${numberingSystems[numberingSystem || \"latn\"]}${append}`);\n}\n","import { parseMillis, isUndefined, untruncateYear, signedOffset, hasOwnProperty } from \"./util.js\";\nimport Formatter from \"./formatter.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport DateTime from \"../datetime.js\";\nimport { digitRegex, parseDigits } from \"./digits.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\n\nfunction intUnit(regex, post = i => i) {\n return { regex, deser: ([s]) => post(parseDigits(s)) };\n}\n\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `( |${NBSP})`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\n\nfunction fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\n\nfunction stripInsensitivities(s) {\n return s\n .replace(/\\./g, \"\") // ignore dots that were made optional\n .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\n\nfunction oneOf(strings, startIndex) {\n if (strings === null) {\n return null;\n } else {\n return {\n regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n deser: ([s]) =>\n strings.findIndex(i => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex\n };\n }\n}\n\nfunction offset(regex, groups) {\n return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };\n}\n\nfunction simple(regex) {\n return { regex, deser: ([s]) => s };\n}\n\nfunction escapeToken(value) {\n // eslint-disable-next-line no-useless-escape\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\nfunction unitForToken(token, loc) {\n const one = digitRegex(loc),\n two = digitRegex(loc, \"{2}\"),\n three = digitRegex(loc, \"{3}\"),\n four = digitRegex(loc, \"{4}\"),\n six = digitRegex(loc, \"{6}\"),\n oneOrTwo = digitRegex(loc, \"{1,2}\"),\n oneToThree = digitRegex(loc, \"{1,3}\"),\n oneToSix = digitRegex(loc, \"{1,6}\"),\n oneToNine = digitRegex(loc, \"{1,9}\"),\n twoToFour = digitRegex(loc, \"{2,4}\"),\n fourToSix = digitRegex(loc, \"{4,6}\"),\n literal = t => ({ regex: RegExp(escapeToken(t.val)), deser: ([s]) => s, literal: true }),\n unitate = t => {\n if (token.literal) {\n return literal(t);\n }\n switch (t.val) {\n // era\n case \"G\":\n return oneOf(loc.eras(\"short\", false), 0);\n case \"GG\":\n return oneOf(loc.eras(\"long\", false), 0);\n // years\n case \"y\":\n return intUnit(oneToSix);\n case \"yy\":\n return intUnit(twoToFour, untruncateYear);\n case \"yyyy\":\n return intUnit(four);\n case \"yyyyy\":\n return intUnit(fourToSix);\n case \"yyyyyy\":\n return intUnit(six);\n // months\n case \"M\":\n return intUnit(oneOrTwo);\n case \"MM\":\n return intUnit(two);\n case \"MMM\":\n return oneOf(loc.months(\"short\", true, false), 1);\n case \"MMMM\":\n return oneOf(loc.months(\"long\", true, false), 1);\n case \"L\":\n return intUnit(oneOrTwo);\n case \"LL\":\n return intUnit(two);\n case \"LLL\":\n return oneOf(loc.months(\"short\", false, false), 1);\n case \"LLLL\":\n return oneOf(loc.months(\"long\", false, false), 1);\n // dates\n case \"d\":\n return intUnit(oneOrTwo);\n case \"dd\":\n return intUnit(two);\n // ordinals\n case \"o\":\n return intUnit(oneToThree);\n case \"ooo\":\n return intUnit(three);\n // time\n case \"HH\":\n return intUnit(two);\n case \"H\":\n return intUnit(oneOrTwo);\n case \"hh\":\n return intUnit(two);\n case \"h\":\n return intUnit(oneOrTwo);\n case \"mm\":\n return intUnit(two);\n case \"m\":\n return intUnit(oneOrTwo);\n case \"q\":\n return intUnit(oneOrTwo);\n case \"qq\":\n return intUnit(two);\n case \"s\":\n return intUnit(oneOrTwo);\n case \"ss\":\n return intUnit(two);\n case \"S\":\n return intUnit(oneToThree);\n case \"SSS\":\n return intUnit(three);\n case \"u\":\n return simple(oneToNine);\n // meridiem\n case \"a\":\n return oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return intUnit(four);\n case \"kk\":\n return intUnit(twoToFour, untruncateYear);\n // weekNumber (W)\n case \"W\":\n return intUnit(oneOrTwo);\n case \"WW\":\n return intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return intUnit(one);\n case \"EEE\":\n return oneOf(loc.weekdays(\"short\", false, false), 1);\n case \"EEEE\":\n return oneOf(loc.weekdays(\"long\", false, false), 1);\n case \"ccc\":\n return oneOf(loc.weekdays(\"short\", true, false), 1);\n case \"cccc\":\n return oneOf(loc.weekdays(\"long\", true, false), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n case \"ZZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return simple(/[a-z_+-/]{1,256}?/i);\n default:\n return literal(t);\n }\n };\n\n const unit = unitate(token) || {\n invalidReason: MISSING_FTP\n };\n\n unit.token = token;\n\n return unit;\n}\n\nconst partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\"\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\"\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\"\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\"\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour: {\n numeric: \"h\",\n \"2-digit\": \"hh\"\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\"\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\"\n }\n};\n\nfunction tokenForPart(part, locale, formatOpts) {\n const { type, value } = part;\n\n if (type === \"literal\") {\n return {\n literal: true,\n val: value\n };\n }\n\n const style = formatOpts[type];\n\n let val = partTypeStyleToTokenVal[type];\n if (typeof val === \"object\") {\n val = val[style];\n }\n\n if (val) {\n return {\n literal: false,\n val\n };\n }\n\n return undefined;\n}\n\nfunction buildRegex(units) {\n const re = units.map(u => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n return [`^${re}$`, units];\n}\n\nfunction match(input, regex, handlers) {\n const matches = input.match(regex);\n\n if (matches) {\n const all = {};\n let matchIndex = 1;\n for (const i in handlers) {\n if (hasOwnProperty(handlers, i)) {\n const h = handlers[i],\n groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) {\n all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n }\n matchIndex += groups;\n }\n }\n return [matches, all];\n } else {\n return [matches, {}];\n }\n}\n\nfunction dateTimeFromMatches(matches) {\n const toField = token => {\n switch (token) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n\n let zone;\n if (!isUndefined(matches.Z)) {\n zone = new FixedOffsetZone(matches.Z);\n } else if (!isUndefined(matches.z)) {\n zone = IANAZone.create(matches.z);\n } else {\n zone = null;\n }\n\n if (!isUndefined(matches.q)) {\n matches.M = (matches.q - 1) * 3 + 1;\n }\n\n if (!isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) {\n matches.h += 12;\n } else if (matches.h === 12 && matches.a === 0) {\n matches.h = 0;\n }\n }\n\n if (matches.G === 0 && matches.y) {\n matches.y = -matches.y;\n }\n\n if (!isUndefined(matches.u)) {\n matches.S = parseMillis(matches.u);\n }\n\n const vals = Object.keys(matches).reduce((r, k) => {\n const f = toField(k);\n if (f) {\n r[f] = matches[k];\n }\n\n return r;\n }, {});\n\n return [vals, zone];\n}\n\nlet dummyDateTimeCache = null;\n\nfunction getDummyDateTime() {\n if (!dummyDateTimeCache) {\n dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n }\n\n return dummyDateTimeCache;\n}\n\nfunction maybeExpandMacroToken(token, locale) {\n if (token.literal) {\n return token;\n }\n\n const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n\n if (!formatOpts) {\n return token;\n }\n\n const formatter = Formatter.create(locale, formatOpts);\n const parts = formatter.formatDateTimeParts(getDummyDateTime());\n\n const tokens = parts.map(p => tokenForPart(p, locale, formatOpts));\n\n if (tokens.includes(undefined)) {\n return token;\n }\n\n return tokens;\n}\n\nfunction expandMacroTokens(tokens, locale) {\n return Array.prototype.concat(...tokens.map(t => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nexport function explainFromTokens(locale, input, format) {\n const tokens = expandMacroTokens(Formatter.parseFormat(format), locale),\n units = tokens.map(t => unitForToken(t, locale)),\n disqualifyingUnit = units.find(t => t.invalidReason);\n\n if (disqualifyingUnit) {\n return { input, tokens, invalidReason: disqualifyingUnit.invalidReason };\n } else {\n const [regexString, handlers] = buildRegex(units),\n regex = RegExp(regexString, \"i\"),\n [rawMatches, matches] = match(input, regex, handlers),\n [result, zone] = matches ? dateTimeFromMatches(matches) : [null, null];\n if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n throw new ConflictingSpecificationError(\n \"Can't include meridiem when specifying 24-hour format\"\n );\n }\n return { input, tokens, regex, rawMatches, matches, result, zone };\n }\n}\n\nexport function parseFromTokens(locale, input, format) {\n const { result, zone, invalidReason } = explainFromTokens(locale, input, format);\n return [result, zone, invalidReason];\n}\n","import {\n integerBetween,\n isLeapYear,\n timeObject,\n daysInYear,\n daysInMonth,\n weeksInWeekYear,\n isInteger\n} from \"./util.js\";\nimport Invalid from \"./invalid.js\";\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\nfunction unitOutOfRange(unit, value) {\n return new Invalid(\n \"unit out of range\",\n `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`\n );\n}\n\nfunction dayOfWeek(year, month, day) {\n const js = new Date(Date.UTC(year, month - 1, day)).getUTCDay();\n return js === 0 ? 7 : js;\n}\n\nfunction computeOrdinal(year, month, day) {\n return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\n\nfunction uncomputeOrdinal(year, ordinal) {\n const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n month0 = table.findIndex(i => i < ordinal),\n day = ordinal - table[month0];\n return { month: month0 + 1, day };\n}\n\n/**\n * @private\n */\n\nexport function gregorianToWeek(gregObj) {\n const { year, month, day } = gregObj,\n ordinal = computeOrdinal(year, month, day),\n weekday = dayOfWeek(year, month, day);\n\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7),\n weekYear;\n\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = weeksInWeekYear(weekYear);\n } else if (weekNumber > weeksInWeekYear(year)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else {\n weekYear = year;\n }\n\n return Object.assign({ weekYear, weekNumber, weekday }, timeObject(gregObj));\n}\n\nexport function weekToGregorian(weekData) {\n const { weekYear, weekNumber, weekday } = weekData,\n weekdayOfJan4 = dayOfWeek(weekYear, 1, 4),\n yearInDays = daysInYear(weekYear);\n\n let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3,\n year;\n\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= daysInYear(weekYear);\n } else {\n year = weekYear;\n }\n\n const { month, day } = uncomputeOrdinal(year, ordinal);\n\n return Object.assign({ year, month, day }, timeObject(weekData));\n}\n\nexport function gregorianToOrdinal(gregData) {\n const { year, month, day } = gregData,\n ordinal = computeOrdinal(year, month, day);\n\n return Object.assign({ year, ordinal }, timeObject(gregData));\n}\n\nexport function ordinalToGregorian(ordinalData) {\n const { year, ordinal } = ordinalData,\n { month, day } = uncomputeOrdinal(year, ordinal);\n\n return Object.assign({ year, month, day }, timeObject(ordinalData));\n}\n\nexport function hasInvalidWeekData(obj) {\n const validYear = isInteger(obj.weekYear),\n validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear)),\n validWeekday = integerBetween(obj.weekday, 1, 7);\n\n if (!validYear) {\n return unitOutOfRange(\"weekYear\", obj.weekYear);\n } else if (!validWeek) {\n return unitOutOfRange(\"week\", obj.week);\n } else if (!validWeekday) {\n return unitOutOfRange(\"weekday\", obj.weekday);\n } else return false;\n}\n\nexport function hasInvalidOrdinalData(obj) {\n const validYear = isInteger(obj.year),\n validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validOrdinal) {\n return unitOutOfRange(\"ordinal\", obj.ordinal);\n } else return false;\n}\n\nexport function hasInvalidGregorianData(obj) {\n const validYear = isInteger(obj.year),\n validMonth = integerBetween(obj.month, 1, 12),\n validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validMonth) {\n return unitOutOfRange(\"month\", obj.month);\n } else if (!validDay) {\n return unitOutOfRange(\"day\", obj.day);\n } else return false;\n}\n\nexport function hasInvalidTimeData(obj) {\n const { hour, minute, second, millisecond } = obj;\n const validHour =\n integerBetween(hour, 0, 23) ||\n (hour === 24 && minute === 0 && second === 0 && millisecond === 0),\n validMinute = integerBetween(minute, 0, 59),\n validSecond = integerBetween(second, 0, 59),\n validMillisecond = integerBetween(millisecond, 0, 999);\n\n if (!validHour) {\n return unitOutOfRange(\"hour\", hour);\n } else if (!validMinute) {\n return unitOutOfRange(\"minute\", minute);\n } else if (!validSecond) {\n return unitOutOfRange(\"second\", second);\n } else if (!validMillisecond) {\n return unitOutOfRange(\"millisecond\", millisecond);\n } else return false;\n}\n","import Duration, { friendlyDuration } from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Settings from \"./settings.js\";\nimport Info from \"./info.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport {\n isUndefined,\n maybeArray,\n isDate,\n isNumber,\n bestBy,\n daysInMonth,\n daysInYear,\n isLeapYear,\n weeksInWeekYear,\n normalizeObject,\n roundTo,\n objToLocalTS\n} from \"./impl/util.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport diff from \"./impl/diff.js\";\nimport { parseRFC2822Date, parseISODate, parseHTTPDate, parseSQL } from \"./impl/regexParser.js\";\nimport { parseFromTokens, explainFromTokens } from \"./impl/tokenParser.js\";\nimport {\n gregorianToWeek,\n weekToGregorian,\n gregorianToOrdinal,\n ordinalToGregorian,\n hasInvalidGregorianData,\n hasInvalidWeekData,\n hasInvalidOrdinalData,\n hasInvalidTimeData\n} from \"./impl/conversions.js\";\nimport * as Formats from \"./impl/formats.js\";\nimport {\n InvalidArgumentError,\n ConflictingSpecificationError,\n InvalidUnitError,\n InvalidDateTimeError\n} from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\n\nfunction unsupportedZone(zone) {\n return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\nfunction possiblyCachedWeekData(dt) {\n if (dt.weekData === null) {\n dt.weekData = gregorianToWeek(dt.c);\n }\n return dt.weekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n const current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid\n };\n return new DateTime(Object.assign({}, current, alts, { old: current }));\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n const o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n const o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n ts += offset * 60 * 1000;\n\n const d = new Date(ts);\n\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds()\n };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n const oPre = inst.o,\n year = inst.c.year + Math.trunc(dur.years),\n month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n c = Object.assign({}, inst.c, {\n year,\n month,\n day:\n Math.min(inst.c.day, daysInMonth(year, month)) +\n Math.trunc(dur.days) +\n Math.trunc(dur.weeks) * 7\n }),\n millisToAdd = Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds\n }).as(\"milliseconds\"),\n localTS = objToLocalTS(c);\n\n let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n\n return { ts, o };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text) {\n const { setZone, zone } = opts;\n if (parsed && Object.keys(parsed).length !== 0) {\n const interpretationZone = parsedZone || zone,\n inst = DateTime.fromObject(\n Object.assign(parsed, opts, {\n zone: interpretationZone,\n // setZone is a valid option in the calling methods, but not in fromObject\n setZone: undefined\n })\n );\n return setZone ? inst : inst.setZone(zone);\n } else {\n return DateTime.invalid(\n new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`)\n );\n }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n return dt.isValid\n ? Formatter.create(Locale.create(\"en-US\"), {\n allowZ,\n forceSimple: true\n }).formatDateTimeFromString(dt, format)\n : null;\n}\n\n// technical time formats (e.g. the time part of ISO 8601), take some options\n// and this commonizes their handling\nfunction toTechTimeFormat(\n dt,\n {\n suppressSeconds = false,\n suppressMilliseconds = false,\n includeOffset,\n includeZone = false,\n spaceZone = false,\n format = \"extended\"\n }\n) {\n let fmt = format === \"basic\" ? \"HHmm\" : \"HH:mm\";\n\n if (!suppressSeconds || dt.second !== 0 || dt.millisecond !== 0) {\n fmt += format === \"basic\" ? \"ss\" : \":ss\";\n if (!suppressMilliseconds || dt.millisecond !== 0) {\n fmt += \".SSS\";\n }\n }\n\n if ((includeZone || includeOffset) && spaceZone) {\n fmt += \" \";\n }\n\n if (includeZone) {\n fmt += \"z\";\n } else if (includeOffset) {\n fmt += format === \"basic\" ? \"ZZZ\" : \"ZZ\";\n }\n\n return toTechFormat(dt, fmt);\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n },\n defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n },\n defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedWeekUnits = [\n \"weekYear\",\n \"weekNumber\",\n \"weekday\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\"\n ],\n orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, zone) {\n // assume we have the higher-order units\n for (const u of orderedUnits) {\n if (isUndefined(obj[u])) {\n obj[u] = defaultUnitValues[u];\n }\n }\n\n const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n const tsNow = Settings.now(),\n offsetProvis = zone.offset(tsNow),\n [ts, o] = objToTS(obj, offsetProvis, zone);\n\n return new DateTime({\n ts,\n zone,\n o\n });\n}\n\nfunction diffRelative(start, end, opts) {\n const round = isUndefined(opts.round) ? true : opts.round,\n format = (c, unit) => {\n c = roundTo(c, round || opts.calendary ? 0 : 2, true);\n const formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n },\n differ = unit => {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) {\n return end\n .startOf(unit)\n .diff(start.startOf(unit), unit)\n .get(unit);\n } else return 0;\n } else {\n return end.diff(start, unit).get(unit);\n }\n };\n\n if (opts.unit) {\n return format(differ(opts.unit), opts.unit);\n }\n\n for (const unit of opts.units) {\n const count = differ(unit);\n if (Math.abs(count) >= 1) {\n return format(count, unit);\n }\n }\n return format(0, opts.units[opts.units.length - 1]);\n}\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link local}, {@link utc}, and (most flexibly) {@link fromObject}. To create one from a standard string format, use {@link fromISO}, {@link fromHTTP}, and {@link fromRFC2822}. To create one from a custom string format, use {@link fromFormat}. To create one from a native JS date, use {@link fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link toObject}), use the {@link year}, {@link month},\n * {@link day}, {@link hour}, {@link minute}, {@link second}, {@link millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link weekYear}, {@link weekNumber}, and {@link weekday} accessors.\n * * **Configuration** See the {@link locale} and {@link numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link set}, {@link reconfigure}, {@link setZone}, {@link setLocale}, {@link plus}, {@link minus}, {@link endOf}, {@link startOf}, {@link toUTC}, and {@link toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link toRelative}, {@link toRelativeCalendar}, {@link toJSON}, {@link toISO}, {@link toHTTP}, {@link toObject}, {@link toRFC2822}, {@link toString}, {@link toLocaleString}, {@link toFormat}, {@link toMillis} and {@link toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nexport default class DateTime {\n /**\n * @access private\n */\n constructor(config) {\n const zone = config.zone || Settings.defaultZone;\n\n let invalid =\n config.invalid ||\n (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) ||\n (!zone.isValid ? unsupportedZone(zone) : null);\n /**\n * @access private\n */\n this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n\n let c = null,\n o = null;\n if (!invalid) {\n const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n\n if (unchanged) {\n [c, o] = [config.old.c, config.old.o];\n } else {\n const ot = zone.offset(this.ts);\n c = tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n\n /**\n * @access private\n */\n this._zone = zone;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.invalid = invalid;\n /**\n * @access private\n */\n this.weekData = null;\n /**\n * @access private\n */\n this.c = c;\n /**\n * @access private\n */\n this.o = o;\n /**\n * @access private\n */\n this.isLuxonDateTime = true;\n }\n\n // CONSTRUCT\n\n /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12) //~> 2017-03-12T00:00:00\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */\n static local(year, month, day, hour, minute, second, millisecond) {\n if (isUndefined(year)) {\n return new DateTime({ ts: Settings.now() });\n } else {\n return quickDT(\n {\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond\n },\n Settings.defaultZone\n );\n }\n }\n\n /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765Z\n * @return {DateTime}\n */\n static utc(year, month, day, hour, minute, second, millisecond) {\n if (isUndefined(year)) {\n return new DateTime({\n ts: Settings.now(),\n zone: FixedOffsetZone.utcInstance\n });\n } else {\n return quickDT(\n {\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond\n },\n FixedOffsetZone.utcInstance\n );\n }\n }\n\n /**\n * Create a DateTime from a Javascript Date object. Uses the default zone.\n * @param {Date} date - a Javascript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */\n static fromJSDate(date, options = {}) {\n const ts = isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) {\n return DateTime.invalid(\"invalid input\");\n }\n\n const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: Locale.fromObject(options)\n });\n }\n\n /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromMillis(milliseconds, options = {}) {\n if (!isNumber(milliseconds)) {\n throw new InvalidArgumentError(\n `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`\n );\n } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n } else {\n return new DateTime({\n ts: milliseconds,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options)\n });\n }\n }\n\n /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromSeconds(seconds, options = {}) {\n if (!isNumber(seconds)) {\n throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n } else {\n return new DateTime({\n ts: seconds * 1000,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options)\n });\n }\n }\n\n /**\n * Create a DateTime from a Javascript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {string|Zone} [obj.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [obj.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} obj.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} obj.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @return {DateTime}\n */\n static fromObject(obj) {\n const zoneToUse = normalizeZone(obj.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n const tsNow = Settings.now(),\n offsetProvis = zoneToUse.offset(tsNow),\n normalized = normalizeObject(obj, normalizeUnit, [\n \"zone\",\n \"locale\",\n \"outputCalendar\",\n \"numberingSystem\"\n ]),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber,\n loc = Locale.fromObject(obj);\n\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n const useWeekData = definiteWeekDef || (normalized.weekday && !containsGregor);\n\n // configure ourselves to deal with gregorian dates or week stuff\n let units,\n defaultValues,\n objNow = tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = orderedWeekUnits;\n defaultValues = defaultWeekUnitValues;\n objNow = gregorianToWeek(objNow);\n } else if (containsOrdinal) {\n units = orderedOrdinalUnits;\n defaultValues = defaultOrdinalUnitValues;\n objNow = gregorianToOrdinal(objNow);\n } else {\n units = orderedUnits;\n defaultValues = defaultUnitValues;\n }\n\n // set default values for missing stuff\n let foundFirst = false;\n for (const u of units) {\n const v = normalized[u];\n if (!isUndefined(v)) {\n foundFirst = true;\n } else if (foundFirst) {\n normalized[u] = defaultValues[u];\n } else {\n normalized[u] = objNow[u];\n }\n }\n\n // make sure the values we have are in range\n const higherOrderInvalid = useWeekData\n ? hasInvalidWeekData(normalized)\n : containsOrdinal\n ? hasInvalidOrdinalData(normalized)\n : hasInvalidGregorianData(normalized),\n invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n // compute the actual time\n const gregorian = useWeekData\n ? weekToGregorian(normalized)\n : containsOrdinal\n ? ordinalToGregorian(normalized)\n : normalized,\n [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc\n });\n\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n return DateTime.invalid(\n \"mismatched weekday\",\n `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`\n );\n }\n\n return inst;\n }\n\n /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */\n static fromISO(text, opts = {}) {\n const [vals, parsedZone] = parseISODate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n }\n\n /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */\n static fromRFC2822(text, opts = {}) {\n const [vals, parsedZone] = parseRFC2822Date(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n }\n\n /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */\n static fromHTTP(text, opts = {}) {\n const [vals, parsedZone] = parseHTTPDate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n }\n\n /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @see https://moment.github.io/luxon/docs/manual/parsing.html#table-of-tokens\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromFormat(text, fmt, opts = {}) {\n if (isUndefined(text) || isUndefined(fmt)) {\n throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n }\n\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true\n }),\n [vals, parsedZone, invalid] = parseFromTokens(localeToUse, text, fmt);\n if (invalid) {\n return DateTime.invalid(invalid);\n } else {\n return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text);\n }\n }\n\n /**\n * @deprecated use fromFormat instead\n */\n static fromString(text, fmt, opts = {}) {\n return DateTime.fromFormat(text, fmt, opts);\n }\n\n /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */\n static fromSQL(text, opts = {}) {\n const [vals, parsedZone] = parseSQL(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n }\n\n /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDateTimeError(invalid);\n } else {\n return new DateTime({ invalid });\n }\n }\n\n /**\n * Check if an object is a DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDateTime(o) {\n return (o && o.isLuxonDateTime) || false;\n }\n\n // INFO\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */\n get(unit) {\n return this[unit];\n }\n\n /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n *\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n *\n * @type {string}\n */\n get outputCalendar() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n\n /**\n * Get the time zone associated with this DateTime.\n * @type {Zone}\n */\n get zone() {\n return this._zone;\n }\n\n /**\n * Get the name of the time zone.\n * @type {string}\n */\n get zoneName() {\n return this.isValid ? this.zone.name : null;\n }\n\n /**\n * Get the year\n * @example DateTime.local(2017, 5, 25).year //=> 2017\n * @type {number}\n */\n get year() {\n return this.isValid ? this.c.year : NaN;\n }\n\n /**\n * Get the quarter\n * @example DateTime.local(2017, 5, 25).quarter //=> 2\n * @type {number}\n */\n get quarter() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n\n /**\n * Get the month (1-12).\n * @example DateTime.local(2017, 5, 25).month //=> 5\n * @type {number}\n */\n get month() {\n return this.isValid ? this.c.month : NaN;\n }\n\n /**\n * Get the day of the month (1-30ish).\n * @example DateTime.local(2017, 5, 25).day //=> 25\n * @type {number}\n */\n get day() {\n return this.isValid ? this.c.day : NaN;\n }\n\n /**\n * Get the hour of the day (0-23).\n * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n * @type {number}\n */\n get hour() {\n return this.isValid ? this.c.hour : NaN;\n }\n\n /**\n * Get the minute of the hour (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n * @type {number}\n */\n get minute() {\n return this.isValid ? this.c.minute : NaN;\n }\n\n /**\n * Get the second of the minute (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n * @type {number}\n */\n get second() {\n return this.isValid ? this.c.second : NaN;\n }\n\n /**\n * Get the millisecond of the second (0-999).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n * @type {number}\n */\n get millisecond() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n\n /**\n * Get the week year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekYear //=> 2015\n * @type {number}\n */\n get weekYear() {\n return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the week number of the week year (1-52ish).\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n * @type {number}\n */\n get weekNumber() {\n return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the day of the week.\n * 1 is Monday and 7 is Sunday\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekday //=> 4\n * @type {number}\n */\n get weekday() {\n return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n }\n\n /**\n * Get the ordinal (meaning the day of the year)\n * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n * @type {number|DateTime}\n */\n get ordinal() {\n return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n }\n\n /**\n * Get the human readable short month name, such as 'Oct'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n * @type {string}\n */\n get monthShort() {\n return this.isValid ? Info.months(\"short\", { locale: this.locale })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable long month name, such as 'October'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthLong //=> October\n * @type {string}\n */\n get monthLong() {\n return this.isValid ? Info.months(\"long\", { locale: this.locale })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable short weekday, such as 'Mon'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n * @type {string}\n */\n get weekdayShort() {\n return this.isValid ? Info.weekdays(\"short\", { locale: this.locale })[this.weekday - 1] : null;\n }\n\n /**\n * Get the human readable long weekday, such as 'Monday'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n * @type {string}\n */\n get weekdayLong() {\n return this.isValid ? Info.weekdays(\"long\", { locale: this.locale })[this.weekday - 1] : null;\n }\n\n /**\n * Get the UTC offset of this DateTime in minutes\n * @example DateTime.local().offset //=> -240\n * @example DateTime.utc().offset //=> 0\n * @type {number}\n */\n get offset() {\n return this.isValid ? +this.o : NaN;\n }\n\n /**\n * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameShort() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameLong() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get whether this zone's offset ever changes, as in a DST.\n * @type {boolean}\n */\n get isOffsetFixed() {\n return this.isValid ? this.zone.universal : null;\n }\n\n /**\n * Get whether the DateTime is in a DST.\n * @type {boolean}\n */\n get isInDST() {\n if (this.isOffsetFixed) {\n return false;\n } else {\n return (\n this.offset > this.set({ month: 1 }).offset || this.offset > this.set({ month: 5 }).offset\n );\n }\n }\n\n /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */\n get isInLeapYear() {\n return isLeapYear(this.year);\n }\n\n /**\n * Returns the number of days in this DateTime's month\n * @example DateTime.local(2016, 2).daysInMonth //=> 29\n * @example DateTime.local(2016, 3).daysInMonth //=> 31\n * @type {number}\n */\n get daysInMonth() {\n return daysInMonth(this.year, this.month);\n }\n\n /**\n * Returns the number of days in this DateTime's year\n * @example DateTime.local(2016).daysInYear //=> 366\n * @example DateTime.local(2013).daysInYear //=> 365\n * @type {number}\n */\n get daysInYear() {\n return this.isValid ? daysInYear(this.year) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2004).weeksInWeekYear //=> 53\n * @example DateTime.local(2013).weeksInWeekYear //=> 52\n * @type {number}\n */\n get weeksInWeekYear() {\n return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n }\n\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */\n resolvedLocaleOpts(opts = {}) {\n const { locale, numberingSystem, calendar } = Formatter.create(\n this.loc.clone(opts),\n opts\n ).resolvedOptions(this);\n return { locale, numberingSystem, outputCalendar: calendar };\n }\n\n // TRANSFORM\n\n /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */\n toUTC(offset = 0, opts = {}) {\n return this.setZone(FixedOffsetZone.instance(offset), opts);\n }\n\n /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */\n toLocal() {\n return this.setZone(Settings.defaultZone);\n }\n\n /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link plus}. You may wish to use {@link toLocal} and {@link toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */\n setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {\n zone = normalizeZone(zone, Settings.defaultZone);\n if (zone.equals(this.zone)) {\n return this;\n } else if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n } else {\n let newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n const offsetGuess = zone.offset(this.ts);\n const asObj = this.toObject();\n [newTS] = objToTS(asObj, offsetGuess, zone);\n }\n return clone(this, { ts: newTS, zone });\n }\n }\n\n /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */\n reconfigure({ locale, numberingSystem, outputCalendar } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });\n return clone(this, { loc });\n }\n\n /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */\n setLocale(locale) {\n return this.reconfigure({ locale });\n }\n\n /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link reconfigure} and {@link setZone}.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const normalized = normalizeObject(values, normalizeUnit, []),\n settingWeekStuff =\n !isUndefined(normalized.weekYear) ||\n !isUndefined(normalized.weekNumber) ||\n !isUndefined(normalized.weekday);\n\n let mixed;\n if (settingWeekStuff) {\n mixed = weekToGregorian(Object.assign(gregorianToWeek(this.c), normalized));\n } else if (!isUndefined(normalized.ordinal)) {\n mixed = ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c), normalized));\n } else {\n mixed = Object.assign(this.toObject(), normalized);\n\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if (isUndefined(normalized.day)) {\n mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n }\n\n const [ts, o] = objToTS(mixed, this.o, this.zone);\n return clone(this, { ts, o });\n }\n\n /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.local().plus(123) //~> in 123 milliseconds\n * @example DateTime.local().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.local().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.local().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.local().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.local().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */\n plus(duration) {\n if (!this.isValid) return this;\n const dur = friendlyDuration(duration);\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */\n minus(duration) {\n if (!this.isValid) return this;\n const dur = friendlyDuration(duration).negate();\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */\n startOf(unit) {\n if (!this.isValid) return this;\n const o = {},\n normalizedUnit = Duration.normalizeUnit(unit);\n switch (normalizedUnit) {\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n case \"milliseconds\":\n break;\n // no default, invalid units throw in normalizeUnit()\n }\n\n if (normalizedUnit === \"weeks\") {\n o.weekday = 1;\n }\n\n if (normalizedUnit === \"quarters\") {\n const q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n\n return this.set(o);\n }\n\n /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'month', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */\n endOf(unit) {\n return this.isValid\n ? this.plus({ [unit]: 1 })\n .startOf(unit)\n .minus(1)\n : this;\n }\n\n // OUTPUT\n\n /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @see https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options\n * @example DateTime.local().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.local().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.local().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.local().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param opts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @example DateTime.local().toLocaleString(); //=> 4/20/2017\n * @example DateTime.local().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.local().toLocaleString({ locale: 'en-gb' }); //=> '20/04/2017'\n * @example DateTime.local().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.local().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.local().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.local().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.local().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.local().toLocaleString({ hour: '2-digit', minute: '2-digit', hour12: false }); //=> '11:32'\n * @return {string}\n */\n toLocaleString(opts = Formats.DATE_SHORT) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTime(this)\n : INVALID;\n }\n\n /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.local().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */\n toLocaleParts(opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this)\n : [];\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.local().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.local().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.local().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @return {string}\n */\n toISO(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toISODate(opts)}T${this.toISOTime(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @return {string}\n */\n toISODate({ format = \"extended\" } = {}) {\n let fmt = format === \"basic\" ? \"yyyyMMdd\" : \"yyyy-MM-dd\";\n if (this.year > 9999) {\n fmt = \"+\" + fmt;\n }\n\n return toTechFormat(this, fmt);\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */\n toISOWeekDate() {\n return toTechFormat(this, \"kkkk-'W'WW-c\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @return {string}\n */\n toISOTime({\n suppressMilliseconds = false,\n suppressSeconds = false,\n includeOffset = true,\n format = \"extended\"\n } = {}) {\n return toTechTimeFormat(this, {\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n format\n });\n }\n\n /**\n * Returns an RFC 2822-compatible string representation of this DateTime, always in UTC\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */\n toRFC2822() {\n return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */\n toHTTP() {\n return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string}\n */\n toSQLDate() {\n return toTechFormat(this, \"yyyy-MM-dd\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.local().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.local().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.local().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */\n toSQLTime({ includeOffset = true, includeZone = false } = {}) {\n return toTechTimeFormat(this, {\n includeOffset,\n includeZone,\n spaceZone: true\n });\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */\n toSQL(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */\n toString() {\n return this.isValid ? this.toISO() : INVALID;\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */\n toMillis() {\n return this.isValid ? this.ts : NaN;\n }\n\n /**\n * Returns the epoch seconds of this DateTime.\n * @return {number}\n */\n toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n }\n\n /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */\n toBSON() {\n return this.toJSDate();\n }\n\n /**\n * Returns a Javascript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.local().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = Object.assign({}, this.c);\n\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns a Javascript Date equivalent to this DateTime.\n * @return {Date}\n */\n toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n }\n\n // COMPARE\n\n /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */\n diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n if (!this.isValid || !otherDateTime.isValid) {\n return Duration.invalid(\n this.invalid || otherDateTime.invalid,\n \"created by diffing an invalid DateTime\"\n );\n }\n\n const durOpts = Object.assign(\n { locale: this.locale, numberingSystem: this.numberingSystem },\n opts\n );\n\n const units = maybeArray(unit).map(Duration.normalizeUnit),\n otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n earlier = otherIsLater ? this : otherDateTime,\n later = otherIsLater ? otherDateTime : this,\n diffed = diff(earlier, later, units, durOpts);\n\n return otherIsLater ? diffed.negate() : diffed;\n }\n\n /**\n * Return the difference between this DateTime and right now.\n * See {@link diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n diffNow(unit = \"milliseconds\", opts = {}) {\n return this.diff(DateTime.local(), unit, opts);\n }\n\n /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval}\n */\n until(otherDateTime) {\n return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n }\n\n /**\n * Return whether this DateTime is in the same unit of time as another DateTime\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @example DateTime.local().hasSame(otherDT, 'day'); //~> true if both the same calendar day\n * @return {boolean}\n */\n hasSame(otherDateTime, unit) {\n if (!this.isValid) return false;\n if (unit === \"millisecond\") {\n return this.valueOf() === otherDateTime.valueOf();\n } else {\n const inputMs = otherDateTime.valueOf();\n return this.startOf(unit) <= inputMs && inputMs <= this.endOf(unit);\n }\n }\n\n /**\n * Equality check\n * Two DateTimes are equal iff they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */\n equals(other) {\n return (\n this.isValid &&\n other.isValid &&\n this.valueOf() === other.valueOf() &&\n this.zone.equals(other.zone) &&\n this.loc.equals(other.loc)\n );\n }\n\n /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds down by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {boolean} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.local().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.local().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.local().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.local().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.local().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.local().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */\n toRelative(options = {}) {\n if (!this.isValid) return null;\n const base = options.base || DateTime.fromObject({ zone: this.zone }),\n padding = options.padding ? (this < base ? -options.padding : options.padding) : 0;\n return diffRelative(\n base,\n this.plus(padding),\n Object.assign(options, {\n numeric: \"always\",\n units: [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"]\n })\n );\n }\n\n /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.local().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.local().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */\n toRelativeCalendar(options = {}) {\n if (!this.isValid) return null;\n\n return diffRelative(\n options.base || DateTime.fromObject({ zone: this.zone }),\n this,\n Object.assign(options, {\n numeric: \"auto\",\n units: [\"years\", \"months\", \"days\"],\n calendary: true\n })\n );\n }\n\n /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */\n static min(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, i => i.valueOf(), Math.min);\n }\n\n /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */\n static max(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, i => i.valueOf(), Math.max);\n }\n\n // MISC\n\n /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */\n static fromFormatExplain(text, fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true\n });\n return explainFromTokens(localeToUse, text, fmt);\n }\n\n /**\n * @deprecated use fromFormatExplain instead\n */\n static fromStringExplain(text, fmt, options = {}) {\n return DateTime.fromFormatExplain(text, fmt, options);\n }\n\n // FORMAT PRESETS\n\n /**\n * {@link toLocaleString} format like 10/14/1983\n * @type {Object}\n */\n static get DATE_SHORT() {\n return Formats.DATE_SHORT;\n }\n\n /**\n * {@link toLocaleString} format like 'Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED() {\n return Formats.DATE_MED;\n }\n\n /**\n * {@link toLocaleString} format like 'Fri, Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED_WITH_WEEKDAY() {\n return Formats.DATE_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link toLocaleString} format like 'October 14, 1983'\n * @type {Object}\n */\n static get DATE_FULL() {\n return Formats.DATE_FULL;\n }\n\n /**\n * {@link toLocaleString} format like 'Tuesday, October 14, 1983'\n * @type {Object}\n */\n static get DATE_HUGE() {\n return Formats.DATE_HUGE;\n }\n\n /**\n * {@link toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_SIMPLE() {\n return Formats.TIME_SIMPLE;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SECONDS() {\n return Formats.TIME_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SHORT_OFFSET() {\n return Formats.TIME_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_LONG_OFFSET() {\n return Formats.TIME_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '09:30', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_SIMPLE() {\n return Formats.TIME_24_SIMPLE;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SECONDS() {\n return Formats.TIME_24_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 EDT', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SHORT_OFFSET() {\n return Formats.TIME_24_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_LONG_OFFSET() {\n return Formats.TIME_24_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT() {\n return Formats.DATETIME_SHORT;\n }\n\n /**\n * {@link toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT_WITH_SECONDS() {\n return Formats.DATETIME_SHORT_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED() {\n return Formats.DATETIME_MED;\n }\n\n /**\n * {@link toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_SECONDS() {\n return Formats.DATETIME_MED_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_WEEKDAY() {\n return Formats.DATETIME_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL() {\n return Formats.DATETIME_FULL;\n }\n\n /**\n * {@link toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL_WITH_SECONDS() {\n return Formats.DATETIME_FULL_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE() {\n return Formats.DATETIME_HUGE;\n }\n\n /**\n * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE_WITH_SECONDS() {\n return Formats.DATETIME_HUGE_WITH_SECONDS;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDateTime(dateTimeish) {\n if (DateTime.isDateTime(dateTimeish)) {\n return dateTimeish;\n } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n return DateTime.fromJSDate(dateTimeish);\n } else if (dateTimeish && typeof dateTimeish === \"object\") {\n return DateTime.fromObject(dateTimeish);\n } else {\n throw new InvalidArgumentError(\n `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`\n );\n }\n}\n"],"names":["LuxonError","Error","InvalidDateTimeError","reason","toMessage","InvalidIntervalError","InvalidDurationError","ConflictingSpecificationError","InvalidUnitError","unit","InvalidArgumentError","ZoneIsAbstractError","n","s","l","DATE_SHORT","year","month","day","DATE_MED","DATE_MED_WITH_WEEKDAY","weekday","DATE_FULL","DATE_HUGE","TIME_SIMPLE","hour","minute","TIME_WITH_SECONDS","second","TIME_WITH_SHORT_OFFSET","timeZoneName","TIME_WITH_LONG_OFFSET","TIME_24_SIMPLE","hour12","TIME_24_WITH_SECONDS","TIME_24_WITH_SHORT_OFFSET","TIME_24_WITH_LONG_OFFSET","DATETIME_SHORT","DATETIME_SHORT_WITH_SECONDS","DATETIME_MED","DATETIME_MED_WITH_SECONDS","DATETIME_MED_WITH_WEEKDAY","DATETIME_FULL","DATETIME_FULL_WITH_SECONDS","DATETIME_HUGE","DATETIME_HUGE_WITH_SECONDS","isUndefined","o","isNumber","isInteger","isString","isDate","Object","prototype","toString","call","hasIntl","Intl","DateTimeFormat","e","hasFormatToParts","formatToParts","hasRelative","RelativeTimeFormat","maybeArray","thing","Array","isArray","bestBy","arr","by","compare","length","undefined","reduce","best","next","pair","pick","obj","keys","a","k","hasOwnProperty","prop","integerBetween","bottom","top","floorMod","x","Math","floor","padStart","input","repeat","slice","parseInteger","string","parseInt","parseMillis","fraction","f","parseFloat","roundTo","number","digits","towardZero","factor","rounder","trunc","round","isLeapYear","daysInYear","daysInMonth","modMonth","modYear","objToLocalTS","d","Date","UTC","millisecond","setUTCFullYear","getUTCFullYear","weeksInWeekYear","weekYear","p1","last","p2","untruncateYear","parseZoneInfo","ts","offsetFormat","locale","timeZone","date","intlOpts","modified","assign","intl","parsed","find","m","type","toLowerCase","value","without","format","included","diffed","substring","trimmed","replace","signedOffset","offHourStr","offMinuteStr","offHour","Number","isNaN","offMin","offMinSigned","is","asNumber","numericValue","normalizeObject","normalizer","nonUnitKeys","normalized","u","indexOf","v","formatOffset","offset","hours","abs","minutes","sign","RangeError","timeObject","ianaRegex","stringify","JSON","sort","monthsLong","monthsShort","monthsNarrow","months","weekdaysLong","weekdaysShort","weekdaysNarrow","weekdays","meridiems","erasLong","erasShort","erasNarrow","eras","meridiemForDateTime","dt","weekdayForDateTime","monthForDateTime","eraForDateTime","formatRelativeTime","count","numeric","narrow","units","years","quarters","weeks","days","seconds","lastable","isDay","isInPast","fmtValue","singular","lilUnits","fmtUnit","formatString","knownFormat","filtered","key","dateTimeHuge","Formats","stringifyTokens","splits","tokenToString","token","literal","val","macroTokenToFormatOpts","D","DD","DDD","DDDD","t","tt","ttt","tttt","T","TT","TTT","TTTT","ff","fff","ffff","F","FF","FFF","FFFF","Formatter","create","opts","parseFormat","fmt","current","currentFull","bracketed","i","c","charAt","push","formatOpts","loc","systemLoc","formatWithSystemDefault","redefaultToSystem","df","dtFormatter","formatDateTime","formatDateTimeParts","resolvedOptions","num","p","forceSimple","padTo","numberFormatter","formatDateTimeFromString","knownEnglish","listingMode","useDateTimeFormatter","outputCalendar","extract","isOffsetFixed","allowZ","isValid","zone","meridiem","English","standalone","maybeMacro","era","offsetName","zoneName","weekNumber","ordinal","quarter","formatDurationFromString","dur","tokenToField","lildur","mapped","get","tokens","realTokens","found","concat","collapsed","shiftTo","map","filter","Invalid","explanation","Zone","equals","otherZone","singleton","LocalZone","getTimezoneOffset","matchingRegex","RegExp","source","dtfCache","makeDTF","typeToPos","hackyOffset","dtf","formatted","exec","fMonth","fDay","fYear","fHour","fMinute","fSecond","partsOffset","filled","pos","ianaZoneCache","IANAZone","name","resetCache","isValidSpecifier","match","isValidZone","parseGMTOffset","specifier","valid","adjustedHour","asUTC","asTS","over","FixedOffsetZone","instance","utcInstance","parseSpecifier","r","fixed","InvalidZone","NaN","normalizeZone","defaultZone","lowered","now","defaultLocale","defaultNumberingSystem","defaultOutputCalendar","throwOnInvalid","Settings","resetCaches","Locale","z","numberingSystem","intlDTCache","getCachedDTF","locString","intlNumCache","getCachedINF","inf","NumberFormat","intlRelCache","getCachedRTF","base","cacheKeyOpts","sysLocaleCache","systemLocale","computedSys","parseLocaleString","localeStr","uIndex","options","smaller","calendar","intlConfigString","mapMonths","ms","DateTime","utc","mapWeekdays","listStuff","defaultOK","englishFn","intlFn","mode","supportsFastNumbers","startsWith","PolyNumberFormatter","useGrouping","minimumIntegerDigits","PolyDateFormatter","universal","fromMillis","toJSDate","tokenFormat","PolyRelFormatter","isEnglish","style","rtf","fromOpts","defaultToEN","specifiedLocale","localeR","numberingSystemR","outputCalendarR","fromObject","numbering","parsedLocale","parsedNumberingSystem","parsedOutputCalendar","weekdaysCache","monthsCache","meridiemCache","eraCache","fastNumbersCached","hasFTP","isActuallyEn","hasNoWeirdness","clone","alts","getOwnPropertyNames","redefaultToEN","formatStr","field","results","matching","fastNumbers","relFormatter","other","combineRegexes","regexes","full","combineExtractors","extractors","ex","mergedVals","mergedZone","cursor","parse","patterns","regex","extractor","simpleParse","ret","offsetRegex","isoTimeBaseRegex","isoTimeRegex","isoTimeExtensionRegex","isoYmdRegex","isoWeekRegex","isoOrdinalRegex","extractISOWeekData","extractISOOrdinalData","sqlYmdRegex","sqlTimeRegex","sqlTimeExtensionRegex","int","fallback","extractISOYmd","item","extractISOTime","extractISOOffset","local","fullOffset","extractIANAZone","isoDuration","extractISODuration","yearStr","monthStr","weekStr","dayStr","hourStr","minuteStr","secondStr","millisecondsStr","hasNegativePrefix","maybeNegate","milliseconds","obsOffsets","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","fromStrings","weekdayStr","result","rfc2822","extractRFC2822","obsOffset","milOffset","preprocessRFC2822","trim","rfc1123","rfc850","ascii","extractRFC1123Or850","extractASCII","isoYmdWithTimeExtensionRegex","isoWeekWithTimeExtensionRegex","isoOrdinalWithTimeExtensionRegex","isoTimeCombinedRegex","extractISOYmdTimeAndOffset","extractISOWeekTimeAndOffset","extractISOOrdinalDataAndTime","extractISOTimeAndOffset","parseISODate","parseRFC2822Date","parseHTTPDate","parseISODuration","sqlYmdWithTimeExtensionRegex","sqlTimeCombinedRegex","extractISOYmdTimeOffsetAndIANAZone","extractISOTimeOffsetAndIANAZone","parseSQL","INVALID","lowOrderMatrix","casualMatrix","daysInYearAccurate","daysInMonthAccurate","accurateMatrix","orderedUnits","reverseUnits","reverse","clear","conf","values","conversionAccuracy","Duration","antiTrunc","ceil","convert","matrix","fromMap","fromUnit","toMap","toUnit","conv","raw","sameSign","added","normalizeValues","vals","previous","config","accurate","invalid","isLuxonDuration","normalizeUnit","fromISO","text","week","isDuration","toFormat","fmtOpts","toObject","includeConfig","toISO","toJSON","valueOf","as","plus","duration","friendlyDuration","minus","negate","mapUnits","fn","set","mixed","reconfigure","normalize","built","accumulated","lastUnit","own","ak","down","negated","durationish","validateStartEnd","start","end","Interval","isLuxonInterval","fromDateTimes","builtStart","friendlyDateTime","builtEnd","validateError","after","before","split","startIsValid","endIsValid","isInterval","toDuration","startOf","diff","hasSame","isEmpty","isAfter","dateTime","isBefore","contains","splitAt","dateTimes","sorted","splitBy","divideEqually","numberOfParts","overlaps","abutsStart","abutsEnd","engulfs","intersection","union","merge","intervals","b","sofar","final","xor","currentCount","ends","time","flattened","difference","toISODate","toISOTime","dateFormat","separator","invalidReason","mapEndpoints","mapFn","Info","hasDST","proto","setZone","isValidIANAZone","monthsFormat","weekdaysFormat","features","intlTokens","zones","relative","dayDiff","earlier","later","utcDayStart","toUTC","keepLocalTime","highOrderDiffs","differs","lowestOrder","highWater","differ","delta","remainingMillis","lowerOrderUnits","numberingSystems","arab","arabext","bali","beng","deva","fullwide","gujr","hanidec","khmr","knda","laoo","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt","latn","numberingSystemsUTF16","hanidecChars","parseDigits","str","code","charCodeAt","search","min","max","digitRegex","append","MISSING_FTP","intUnit","post","deser","NBSP","String","fromCharCode","spaceOrNBSP","spaceOrNBSPRegExp","fixListRegex","stripInsensitivities","oneOf","strings","startIndex","join","findIndex","groups","h","simple","escapeToken","unitForToken","one","two","three","four","six","oneOrTwo","oneToThree","oneToSix","oneToNine","twoToFour","fourToSix","unitate","partTypeStyleToTokenVal","short","long","dayperiod","dayPeriod","tokenForPart","part","buildRegex","re","handlers","matches","all","matchIndex","dateTimeFromMatches","toField","Z","q","M","G","y","S","dummyDateTimeCache","getDummyDateTime","maybeExpandMacroToken","formatter","parts","includes","expandMacroTokens","explainFromTokens","disqualifyingUnit","regexString","rawMatches","parseFromTokens","nonLeapLadder","leapLadder","unitOutOfRange","dayOfWeek","js","getUTCDay","computeOrdinal","uncomputeOrdinal","table","month0","gregorianToWeek","gregObj","weekToGregorian","weekData","weekdayOfJan4","yearInDays","gregorianToOrdinal","gregData","ordinalToGregorian","ordinalData","hasInvalidWeekData","validYear","validWeek","validWeekday","hasInvalidOrdinalData","validOrdinal","hasInvalidGregorianData","validMonth","validDay","hasInvalidTimeData","validHour","validMinute","validSecond","validMillisecond","MAX_DATE","unsupportedZone","possiblyCachedWeekData","inst","old","fixOffset","localTS","tz","utcGuess","o2","o3","tsToObj","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","objToTS","adjustTime","oPre","millisToAdd","parseDataToDateTime","parsedZone","interpretationZone","toTechFormat","toTechTimeFormat","suppressSeconds","suppressMilliseconds","includeOffset","includeZone","spaceZone","defaultUnitValues","defaultWeekUnitValues","defaultOrdinalUnitValues","orderedWeekUnits","orderedOrdinalUnits","weeknumber","weeksnumber","weeknumbers","weekyear","weekyears","quickDT","tsNow","offsetProvis","diffRelative","calendary","unchanged","ot","_zone","isLuxonDateTime","fromJSDate","zoneToUse","fromSeconds","containsOrdinal","containsGregorYear","containsGregorMD","containsGregor","definiteWeekDef","useWeekData","defaultValues","objNow","foundFirst","higherOrderInvalid","gregorian","tsFinal","offsetFinal","fromRFC2822","fromHTTP","fromFormat","localeToUse","fromString","fromSQL","isDateTime","resolvedLocaleOpts","toLocal","keepCalendarTime","newTS","offsetGuess","asObj","setLocale","settingWeekStuff","normalizedUnit","endOf","toLocaleString","toLocaleParts","toISOWeekDate","toRFC2822","toHTTP","toSQLDate","toSQLTime","toSQL","toMillis","toSeconds","toBSON","otherDateTime","durOpts","otherIsLater","diffNow","until","inputMs","toRelative","padding","toRelativeCalendar","every","fromFormatExplain","fromStringExplain","dateTimeish"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEA;;;IAGMA;;;;;;;;iCAAmBC;AAEzB;;;;;IAGaC,oBAAb;AAAA;;AACE,gCAAYC,MAAZ,EAAoB;AAAA,WAClB,8CAA2BA,MAAM,CAACC,SAAP,EAA3B,CADkB;AAEnB;;AAHH;AAAA,EAA0CJ,UAA1C;AAMA;;;;IAGaK,oBAAb;AAAA;;AACE,gCAAYF,MAAZ,EAAoB;AAAA,WAClB,+CAA2BA,MAAM,CAACC,SAAP,EAA3B,CADkB;AAEnB;;AAHH;AAAA,EAA0CJ,UAA1C;AAMA;;;;IAGaM,oBAAb;AAAA;;AACE,gCAAYH,MAAZ,EAAoB;AAAA,WAClB,+CAA2BA,MAAM,CAACC,SAAP,EAA3B,CADkB;AAEnB;;AAHH;AAAA,EAA0CJ,UAA1C;AAMA;;;;IAGaO,6BAAb;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA,EAAm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;;wBAIuC;AACrC,aAAOA,yBAAP;AACD;AAED;;;;;;;wBAI2B;AACzB,aAAOA,aAAP;AACD;AAED;;;;;;;wBAIwC;AACtC,aAAOA,0BAAP;AACD;AAED;;;;;;;wBAI2B;AACzB,aAAOA,aAAP;AACD;AAED;;;;;;;wBAIwC;AACtC,aAAOA,0BAAP;AACD;;;;;AAGH,AAGO,SAASmY,gBAAT,CAA0ByT,WAA1B,EAAuC;AAC5C,MAAI/gB,QAAQ,CAAC6e,UAAT,CAAoBkC,WAApB,CAAJ,EAAsC;AACpC,WAAOA,WAAP;AACD,GAFD,MAEO,IAAIA,WAAW,IAAIA,WAAW,CAACrV,OAA3B,IAAsCrhB,QAAQ,CAAC02B,WAAW,CAACrV,OAAZ,EAAD,CAAlD,EAA2E;AAChF,WAAO1L,QAAQ,CAACud,UAAT,CAAoBwD,WAApB,CAAP;AACD,GAFM,MAEA,IAAIA,WAAW,IAAI,OAAOA,WAAP,KAAuB,QAA1C,EAAoD;AACzD,WAAO/gB,QAAQ,CAAC4B,UAAT,CAAoBmf,WAApB,CAAP;AACD,GAFM,MAEA;AACL,UAAM,IAAIh5B,oBAAJ,iCAC0Bg5B,WAD1B,kBACkD,OAAOA,WADzD,CAAN;AAGD;AACF;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/luxon/build/global/luxon.js b/node_modules/luxon/build/global/luxon.js deleted file mode 100644 index 094b987..0000000 --- a/node_modules/luxon/build/global/luxon.js +++ /dev/null @@ -1,8296 +0,0 @@ -var luxon = (function (exports) { - 'use strict'; - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; - } - - function _getPrototypeOf(o) { - _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { - return o.__proto__ || Object.getPrototypeOf(o); - }; - return _getPrototypeOf(o); - } - - function _setPrototypeOf(o, p) { - _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { - o.__proto__ = p; - return o; - }; - - return _setPrototypeOf(o, p); - } - - function _isNativeReflectConstruct() { - if (typeof Reflect === "undefined" || !Reflect.construct) return false; - if (Reflect.construct.sham) return false; - if (typeof Proxy === "function") return true; - - try { - Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); - return true; - } catch (e) { - return false; - } - } - - function _construct(Parent, args, Class) { - if (_isNativeReflectConstruct()) { - _construct = Reflect.construct; - } else { - _construct = function _construct(Parent, args, Class) { - var a = [null]; - a.push.apply(a, args); - var Constructor = Function.bind.apply(Parent, a); - var instance = new Constructor(); - if (Class) _setPrototypeOf(instance, Class.prototype); - return instance; - }; - } - - return _construct.apply(null, arguments); - } - - function _isNativeFunction(fn) { - return Function.toString.call(fn).indexOf("[native code]") !== -1; - } - - function _wrapNativeSuper(Class) { - var _cache = typeof Map === "function" ? new Map() : undefined; - - _wrapNativeSuper = function _wrapNativeSuper(Class) { - if (Class === null || !_isNativeFunction(Class)) return Class; - - if (typeof Class !== "function") { - throw new TypeError("Super expression must either be null or a function"); - } - - if (typeof _cache !== "undefined") { - if (_cache.has(Class)) return _cache.get(Class); - - _cache.set(Class, Wrapper); - } - - function Wrapper() { - return _construct(Class, arguments, _getPrototypeOf(this).constructor); - } - - Wrapper.prototype = Object.create(Class.prototype, { - constructor: { - value: Wrapper, - enumerable: false, - writable: true, - configurable: true - } - }); - return _setPrototypeOf(Wrapper, Class); - }; - - return _wrapNativeSuper(Class); - } - - function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(n); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; - } - - function _createForOfIteratorHelperLoose(o) { - var i = 0; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) return function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }; - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - i = o[Symbol.iterator](); - return i.next.bind(i); - } - - // these aren't really private, but nor are they really useful to document - - /** - * @private - */ - var LuxonError = /*#__PURE__*/function (_Error) { - _inheritsLoose(LuxonError, _Error); - - function LuxonError() { - return _Error.apply(this, arguments) || this; - } - - return LuxonError; - }( /*#__PURE__*/_wrapNativeSuper(Error)); - /** - * @private - */ - - - var InvalidDateTimeError = /*#__PURE__*/function (_LuxonError) { - _inheritsLoose(InvalidDateTimeError, _LuxonError); - - function InvalidDateTimeError(reason) { - return _LuxonError.call(this, "Invalid DateTime: " + reason.toMessage()) || this; - } - - return InvalidDateTimeError; - }(LuxonError); - /** - * @private - */ - - var InvalidIntervalError = /*#__PURE__*/function (_LuxonError2) { - _inheritsLoose(InvalidIntervalError, _LuxonError2); - - function InvalidIntervalError(reason) { - return _LuxonError2.call(this, "Invalid Interval: " + reason.toMessage()) || this; - } - - return InvalidIntervalError; - }(LuxonError); - /** - * @private - */ - - var InvalidDurationError = /*#__PURE__*/function (_LuxonError3) { - _inheritsLoose(InvalidDurationError, _LuxonError3); - - function InvalidDurationError(reason) { - return _LuxonError3.call(this, "Invalid Duration: " + reason.toMessage()) || this; - } - - return InvalidDurationError; - }(LuxonError); - /** - * @private - */ - - var ConflictingSpecificationError = /*#__PURE__*/function (_LuxonError4) { - _inheritsLoose(ConflictingSpecificationError, _LuxonError4); - - function ConflictingSpecificationError() { - return _LuxonError4.apply(this, arguments) || this; - } - - return ConflictingSpecificationError; - }(LuxonError); - /** - * @private - */ - - var InvalidUnitError = /*#__PURE__*/function (_LuxonError5) { - _inheritsLoose(InvalidUnitError, _LuxonError5); - - function InvalidUnitError(unit) { - return _LuxonError5.call(this, "Invalid unit " + unit) || this; - } - - return InvalidUnitError; - }(LuxonError); - /** - * @private - */ - - var InvalidArgumentError = /*#__PURE__*/function (_LuxonError6) { - _inheritsLoose(InvalidArgumentError, _LuxonError6); - - function InvalidArgumentError() { - return _LuxonError6.apply(this, arguments) || this; - } - - return InvalidArgumentError; - }(LuxonError); - /** - * @private - */ - - var ZoneIsAbstractError = /*#__PURE__*/function (_LuxonError7) { - _inheritsLoose(ZoneIsAbstractError, _LuxonError7); - - function ZoneIsAbstractError() { - return _LuxonError7.call(this, "Zone is an abstract class") || this; - } - - return ZoneIsAbstractError; - }(LuxonError); - - /** - * @private - */ - var n = "numeric", - s = "short", - l = "long"; - var DATE_SHORT = { - year: n, - month: n, - day: n - }; - var DATE_MED = { - year: n, - month: s, - day: n - }; - var DATE_MED_WITH_WEEKDAY = { - year: n, - month: s, - day: n, - weekday: s - }; - var DATE_FULL = { - year: n, - month: l, - day: n - }; - var DATE_HUGE = { - year: n, - month: l, - day: n, - weekday: l - }; - var TIME_SIMPLE = { - hour: n, - minute: n - }; - var TIME_WITH_SECONDS = { - hour: n, - minute: n, - second: n - }; - var TIME_WITH_SHORT_OFFSET = { - hour: n, - minute: n, - second: n, - timeZoneName: s - }; - var TIME_WITH_LONG_OFFSET = { - hour: n, - minute: n, - second: n, - timeZoneName: l - }; - var TIME_24_SIMPLE = { - hour: n, - minute: n, - hour12: false - }; - /** - * {@link toLocaleString}; format like '09:30:23', always 24-hour. - */ - - var TIME_24_WITH_SECONDS = { - hour: n, - minute: n, - second: n, - hour12: false - }; - /** - * {@link toLocaleString}; format like '09:30:23 EDT', always 24-hour. - */ - - var TIME_24_WITH_SHORT_OFFSET = { - hour: n, - minute: n, - second: n, - hour12: false, - timeZoneName: s - }; - /** - * {@link toLocaleString}; format like '09:30:23 Eastern Daylight Time', always 24-hour. - */ - - var TIME_24_WITH_LONG_OFFSET = { - hour: n, - minute: n, - second: n, - hour12: false, - timeZoneName: l - }; - /** - * {@link toLocaleString}; format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. - */ - - var DATETIME_SHORT = { - year: n, - month: n, - day: n, - hour: n, - minute: n - }; - /** - * {@link toLocaleString}; format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. - */ - - var DATETIME_SHORT_WITH_SECONDS = { - year: n, - month: n, - day: n, - hour: n, - minute: n, - second: n - }; - var DATETIME_MED = { - year: n, - month: s, - day: n, - hour: n, - minute: n - }; - var DATETIME_MED_WITH_SECONDS = { - year: n, - month: s, - day: n, - hour: n, - minute: n, - second: n - }; - var DATETIME_MED_WITH_WEEKDAY = { - year: n, - month: s, - day: n, - weekday: s, - hour: n, - minute: n - }; - var DATETIME_FULL = { - year: n, - month: l, - day: n, - hour: n, - minute: n, - timeZoneName: s - }; - var DATETIME_FULL_WITH_SECONDS = { - year: n, - month: l, - day: n, - hour: n, - minute: n, - second: n, - timeZoneName: s - }; - var DATETIME_HUGE = { - year: n, - month: l, - day: n, - weekday: l, - hour: n, - minute: n, - timeZoneName: l - }; - var DATETIME_HUGE_WITH_SECONDS = { - year: n, - month: l, - day: n, - weekday: l, - hour: n, - minute: n, - second: n, - timeZoneName: l - }; - - /* - This is just a junk drawer, containing anything used across multiple classes. - Because Luxon is small(ish), this should stay small and we won't worry about splitting - it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area. - */ - /** - * @private - */ - // TYPES - - function isUndefined(o) { - return typeof o === "undefined"; - } - function isNumber(o) { - return typeof o === "number"; - } - function isInteger(o) { - return typeof o === "number" && o % 1 === 0; - } - function isString(o) { - return typeof o === "string"; - } - function isDate(o) { - return Object.prototype.toString.call(o) === "[object Date]"; - } // CAPABILITIES - - function hasIntl() { - try { - return typeof Intl !== "undefined" && Intl.DateTimeFormat; - } catch (e) { - return false; - } - } - function hasFormatToParts() { - return !isUndefined(Intl.DateTimeFormat.prototype.formatToParts); - } - function hasRelative() { - try { - return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat; - } catch (e) { - return false; - } - } // OBJECTS AND ARRAYS - - function maybeArray(thing) { - return Array.isArray(thing) ? thing : [thing]; - } - function bestBy(arr, by, compare) { - if (arr.length === 0) { - return undefined; - } - - return arr.reduce(function (best, next) { - var pair = [by(next), next]; - - if (!best) { - return pair; - } else if (compare(best[0], pair[0]) === best[0]) { - return best; - } else { - return pair; - } - }, null)[1]; - } - function pick(obj, keys) { - return keys.reduce(function (a, k) { - a[k] = obj[k]; - return a; - }, {}); - } - function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); - } // NUMBERS AND STRINGS - - function integerBetween(thing, bottom, top) { - return isInteger(thing) && thing >= bottom && thing <= top; - } // x % n but takes the sign of n instead of x - - function floorMod(x, n) { - return x - n * Math.floor(x / n); - } - function padStart(input, n) { - if (n === void 0) { - n = 2; - } - - if (input.toString().length < n) { - return ("0".repeat(n) + input).slice(-n); - } else { - return input.toString(); - } - } - function parseInteger(string) { - if (isUndefined(string) || string === null || string === "") { - return undefined; - } else { - return parseInt(string, 10); - } - } - function parseMillis(fraction) { - // Return undefined (instead of 0) in these cases, where fraction is not set - if (isUndefined(fraction) || fraction === null || fraction === "") { - return undefined; - } else { - var f = parseFloat("0." + fraction) * 1000; - return Math.floor(f); - } - } - function roundTo(number, digits, towardZero) { - if (towardZero === void 0) { - towardZero = false; - } - - var factor = Math.pow(10, digits), - rounder = towardZero ? Math.trunc : Math.round; - return rounder(number * factor) / factor; - } // DATE BASICS - - function isLeapYear(year) { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); - } - function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; - } - function daysInMonth(year, month) { - var modMonth = floorMod(month - 1, 12) + 1, - modYear = year + (month - modMonth) / 12; - - if (modMonth === 2) { - return isLeapYear(modYear) ? 29 : 28; - } else { - return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1]; - } - } // covert a calendar object to a local timestamp (epoch, but with the offset baked in) - - function objToLocalTS(obj) { - var d = Date.UTC(obj.year, obj.month - 1, obj.day, obj.hour, obj.minute, obj.second, obj.millisecond); // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that - - if (obj.year < 100 && obj.year >= 0) { - d = new Date(d); - d.setUTCFullYear(d.getUTCFullYear() - 1900); - } - - return +d; - } - function weeksInWeekYear(weekYear) { - var p1 = (weekYear + Math.floor(weekYear / 4) - Math.floor(weekYear / 100) + Math.floor(weekYear / 400)) % 7, - last = weekYear - 1, - p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7; - return p1 === 4 || p2 === 3 ? 53 : 52; - } - function untruncateYear(year) { - if (year > 99) { - return year; - } else return year > 60 ? 1900 + year : 2000 + year; - } // PARSING - - function parseZoneInfo(ts, offsetFormat, locale, timeZone) { - if (timeZone === void 0) { - timeZone = null; - } - - var date = new Date(ts), - intlOpts = { - hour12: false, - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit" - }; - - if (timeZone) { - intlOpts.timeZone = timeZone; - } - - var modified = Object.assign({ - timeZoneName: offsetFormat - }, intlOpts), - intl = hasIntl(); - - if (intl && hasFormatToParts()) { - var parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(function (m) { - return m.type.toLowerCase() === "timezonename"; - }); - return parsed ? parsed.value : null; - } else if (intl) { - // this probably doesn't work for all locales - var without = new Intl.DateTimeFormat(locale, intlOpts).format(date), - included = new Intl.DateTimeFormat(locale, modified).format(date), - diffed = included.substring(without.length), - trimmed = diffed.replace(/^[, \u200e]+/, ""); - return trimmed; - } else { - return null; - } - } // signedOffset('-5', '30') -> -330 - - function signedOffset(offHourStr, offMinuteStr) { - var offHour = parseInt(offHourStr, 10); // don't || this because we want to preserve -0 - - if (Number.isNaN(offHour)) { - offHour = 0; - } - - var offMin = parseInt(offMinuteStr, 10) || 0, - offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin; - return offHour * 60 + offMinSigned; - } // COERCION - - function asNumber(value) { - var numericValue = Number(value); - if (typeof value === "boolean" || value === "" || Number.isNaN(numericValue)) throw new InvalidArgumentError("Invalid unit value " + value); - return numericValue; - } - function normalizeObject(obj, normalizer, nonUnitKeys) { - var normalized = {}; - - for (var u in obj) { - if (hasOwnProperty(obj, u)) { - if (nonUnitKeys.indexOf(u) >= 0) continue; - var v = obj[u]; - if (v === undefined || v === null) continue; - normalized[normalizer(u)] = asNumber(v); - } - } - - return normalized; - } - function formatOffset(offset, format) { - var hours = Math.trunc(Math.abs(offset / 60)), - minutes = Math.trunc(Math.abs(offset % 60)), - sign = offset >= 0 ? "+" : "-"; - - switch (format) { - case "short": - return "" + sign + padStart(hours, 2) + ":" + padStart(minutes, 2); - - case "narrow": - return "" + sign + hours + (minutes > 0 ? ":" + minutes : ""); - - case "techie": - return "" + sign + padStart(hours, 2) + padStart(minutes, 2); - - default: - throw new RangeError("Value format " + format + " is out of range for property format"); - } - } - function timeObject(obj) { - return pick(obj, ["hour", "minute", "second", "millisecond"]); - } - var ianaRegex = /[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/; - - function stringify(obj) { - return JSON.stringify(obj, Object.keys(obj).sort()); - } - /** - * @private - */ - - - var monthsLong = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; - var monthsShort = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; - var monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]; - function months(length) { - switch (length) { - case "narrow": - return monthsNarrow; - - case "short": - return monthsShort; - - case "long": - return monthsLong; - - case "numeric": - return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]; - - case "2-digit": - return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]; - - default: - return null; - } - } - var weekdaysLong = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]; - var weekdaysShort = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; - var weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"]; - function weekdays(length) { - switch (length) { - case "narrow": - return weekdaysNarrow; - - case "short": - return weekdaysShort; - - case "long": - return weekdaysLong; - - case "numeric": - return ["1", "2", "3", "4", "5", "6", "7"]; - - default: - return null; - } - } - var meridiems = ["AM", "PM"]; - var erasLong = ["Before Christ", "Anno Domini"]; - var erasShort = ["BC", "AD"]; - var erasNarrow = ["B", "A"]; - function eras(length) { - switch (length) { - case "narrow": - return erasNarrow; - - case "short": - return erasShort; - - case "long": - return erasLong; - - default: - return null; - } - } - function meridiemForDateTime(dt) { - return meridiems[dt.hour < 12 ? 0 : 1]; - } - function weekdayForDateTime(dt, length) { - return weekdays(length)[dt.weekday - 1]; - } - function monthForDateTime(dt, length) { - return months(length)[dt.month - 1]; - } - function eraForDateTime(dt, length) { - return eras(length)[dt.year < 0 ? 0 : 1]; - } - function formatRelativeTime(unit, count, numeric, narrow) { - if (numeric === void 0) { - numeric = "always"; - } - - if (narrow === void 0) { - narrow = false; - } - - var units = { - years: ["year", "yr."], - quarters: ["quarter", "qtr."], - months: ["month", "mo."], - weeks: ["week", "wk."], - days: ["day", "day", "days"], - hours: ["hour", "hr."], - minutes: ["minute", "min."], - seconds: ["second", "sec."] - }; - var lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1; - - if (numeric === "auto" && lastable) { - var isDay = unit === "days"; - - switch (count) { - case 1: - return isDay ? "tomorrow" : "next " + units[unit][0]; - - case -1: - return isDay ? "yesterday" : "last " + units[unit][0]; - - case 0: - return isDay ? "today" : "this " + units[unit][0]; - - } - } - - var isInPast = Object.is(count, -0) || count < 0, - fmtValue = Math.abs(count), - singular = fmtValue === 1, - lilUnits = units[unit], - fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit; - return isInPast ? fmtValue + " " + fmtUnit + " ago" : "in " + fmtValue + " " + fmtUnit; - } - function formatString(knownFormat) { - // these all have the offsets removed because we don't have access to them - // without all the intl stuff this is backfilling - var filtered = pick(knownFormat, ["weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZoneName", "hour12"]), - key = stringify(filtered), - dateTimeHuge = "EEEE, LLLL d, yyyy, h:mm a"; - - switch (key) { - case stringify(DATE_SHORT): - return "M/d/yyyy"; - - case stringify(DATE_MED): - return "LLL d, yyyy"; - - case stringify(DATE_MED_WITH_WEEKDAY): - return "EEE, LLL d, yyyy"; - - case stringify(DATE_FULL): - return "LLLL d, yyyy"; - - case stringify(DATE_HUGE): - return "EEEE, LLLL d, yyyy"; - - case stringify(TIME_SIMPLE): - return "h:mm a"; - - case stringify(TIME_WITH_SECONDS): - return "h:mm:ss a"; - - case stringify(TIME_WITH_SHORT_OFFSET): - return "h:mm a"; - - case stringify(TIME_WITH_LONG_OFFSET): - return "h:mm a"; - - case stringify(TIME_24_SIMPLE): - return "HH:mm"; - - case stringify(TIME_24_WITH_SECONDS): - return "HH:mm:ss"; - - case stringify(TIME_24_WITH_SHORT_OFFSET): - return "HH:mm"; - - case stringify(TIME_24_WITH_LONG_OFFSET): - return "HH:mm"; - - case stringify(DATETIME_SHORT): - return "M/d/yyyy, h:mm a"; - - case stringify(DATETIME_MED): - return "LLL d, yyyy, h:mm a"; - - case stringify(DATETIME_FULL): - return "LLLL d, yyyy, h:mm a"; - - case stringify(DATETIME_HUGE): - return dateTimeHuge; - - case stringify(DATETIME_SHORT_WITH_SECONDS): - return "M/d/yyyy, h:mm:ss a"; - - case stringify(DATETIME_MED_WITH_SECONDS): - return "LLL d, yyyy, h:mm:ss a"; - - case stringify(DATETIME_MED_WITH_WEEKDAY): - return "EEE, d LLL yyyy, h:mm a"; - - case stringify(DATETIME_FULL_WITH_SECONDS): - return "LLLL d, yyyy, h:mm:ss a"; - - case stringify(DATETIME_HUGE_WITH_SECONDS): - return "EEEE, LLLL d, yyyy, h:mm:ss a"; - - default: - return dateTimeHuge; - } - } - - function stringifyTokens(splits, tokenToString) { - var s = ""; - - for (var _iterator = _createForOfIteratorHelperLoose(splits), _step; !(_step = _iterator()).done;) { - var token = _step.value; - - if (token.literal) { - s += token.val; - } else { - s += tokenToString(token.val); - } - } - - return s; - } - - var _macroTokenToFormatOpts = { - D: DATE_SHORT, - DD: DATE_MED, - DDD: DATE_FULL, - DDDD: DATE_HUGE, - t: TIME_SIMPLE, - tt: TIME_WITH_SECONDS, - ttt: TIME_WITH_SHORT_OFFSET, - tttt: TIME_WITH_LONG_OFFSET, - T: TIME_24_SIMPLE, - TT: TIME_24_WITH_SECONDS, - TTT: TIME_24_WITH_SHORT_OFFSET, - TTTT: TIME_24_WITH_LONG_OFFSET, - f: DATETIME_SHORT, - ff: DATETIME_MED, - fff: DATETIME_FULL, - ffff: DATETIME_HUGE, - F: DATETIME_SHORT_WITH_SECONDS, - FF: DATETIME_MED_WITH_SECONDS, - FFF: DATETIME_FULL_WITH_SECONDS, - FFFF: DATETIME_HUGE_WITH_SECONDS - }; - /** - * @private - */ - - var Formatter = /*#__PURE__*/function () { - Formatter.create = function create(locale, opts) { - if (opts === void 0) { - opts = {}; - } - - return new Formatter(locale, opts); - }; - - Formatter.parseFormat = function parseFormat(fmt) { - var current = null, - currentFull = "", - bracketed = false; - var splits = []; - - for (var i = 0; i < fmt.length; i++) { - var c = fmt.charAt(i); - - if (c === "'") { - if (currentFull.length > 0) { - splits.push({ - literal: bracketed, - val: currentFull - }); - } - - current = null; - currentFull = ""; - bracketed = !bracketed; - } else if (bracketed) { - currentFull += c; - } else if (c === current) { - currentFull += c; - } else { - if (currentFull.length > 0) { - splits.push({ - literal: false, - val: currentFull - }); - } - - currentFull = c; - current = c; - } - } - - if (currentFull.length > 0) { - splits.push({ - literal: bracketed, - val: currentFull - }); - } - - return splits; - }; - - Formatter.macroTokenToFormatOpts = function macroTokenToFormatOpts(token) { - return _macroTokenToFormatOpts[token]; - }; - - function Formatter(locale, formatOpts) { - this.opts = formatOpts; - this.loc = locale; - this.systemLoc = null; - } - - var _proto = Formatter.prototype; - - _proto.formatWithSystemDefault = function formatWithSystemDefault(dt, opts) { - if (this.systemLoc === null) { - this.systemLoc = this.loc.redefaultToSystem(); - } - - var df = this.systemLoc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.format(); - }; - - _proto.formatDateTime = function formatDateTime(dt, opts) { - if (opts === void 0) { - opts = {}; - } - - var df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.format(); - }; - - _proto.formatDateTimeParts = function formatDateTimeParts(dt, opts) { - if (opts === void 0) { - opts = {}; - } - - var df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.formatToParts(); - }; - - _proto.resolvedOptions = function resolvedOptions(dt, opts) { - if (opts === void 0) { - opts = {}; - } - - var df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.resolvedOptions(); - }; - - _proto.num = function num(n, p) { - if (p === void 0) { - p = 0; - } - - // we get some perf out of doing this here, annoyingly - if (this.opts.forceSimple) { - return padStart(n, p); - } - - var opts = Object.assign({}, this.opts); - - if (p > 0) { - opts.padTo = p; - } - - return this.loc.numberFormatter(opts).format(n); - }; - - _proto.formatDateTimeFromString = function formatDateTimeFromString(dt, fmt) { - var _this = this; - - var knownEnglish = this.loc.listingMode() === "en", - useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory" && hasFormatToParts(), - string = function string(opts, extract) { - return _this.loc.extract(dt, opts, extract); - }, - formatOffset = function formatOffset(opts) { - if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) { - return "Z"; - } - - return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : ""; - }, - meridiem = function meridiem() { - return knownEnglish ? meridiemForDateTime(dt) : string({ - hour: "numeric", - hour12: true - }, "dayperiod"); - }, - month = function month(length, standalone) { - return knownEnglish ? monthForDateTime(dt, length) : string(standalone ? { - month: length - } : { - month: length, - day: "numeric" - }, "month"); - }, - weekday = function weekday(length, standalone) { - return knownEnglish ? weekdayForDateTime(dt, length) : string(standalone ? { - weekday: length - } : { - weekday: length, - month: "long", - day: "numeric" - }, "weekday"); - }, - maybeMacro = function maybeMacro(token) { - var formatOpts = Formatter.macroTokenToFormatOpts(token); - - if (formatOpts) { - return _this.formatWithSystemDefault(dt, formatOpts); - } else { - return token; - } - }, - era = function era(length) { - return knownEnglish ? eraForDateTime(dt, length) : string({ - era: length - }, "era"); - }, - tokenToString = function tokenToString(token) { - // Where possible: http://cldr.unicode.org/translation/date-time#TOC-Stand-Alone-vs.-Format-Styles - switch (token) { - // ms - case "S": - return _this.num(dt.millisecond); - - case "u": // falls through - - case "SSS": - return _this.num(dt.millisecond, 3); - // seconds - - case "s": - return _this.num(dt.second); - - case "ss": - return _this.num(dt.second, 2); - // minutes - - case "m": - return _this.num(dt.minute); - - case "mm": - return _this.num(dt.minute, 2); - // hours - - case "h": - return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12); - - case "hh": - return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2); - - case "H": - return _this.num(dt.hour); - - case "HH": - return _this.num(dt.hour, 2); - // offset - - case "Z": - // like +6 - return formatOffset({ - format: "narrow", - allowZ: _this.opts.allowZ - }); - - case "ZZ": - // like +06:00 - return formatOffset({ - format: "short", - allowZ: _this.opts.allowZ - }); - - case "ZZZ": - // like +0600 - return formatOffset({ - format: "techie", - allowZ: _this.opts.allowZ - }); - - case "ZZZZ": - // like EST - return dt.zone.offsetName(dt.ts, { - format: "short", - locale: _this.loc.locale - }); - - case "ZZZZZ": - // like Eastern Standard Time - return dt.zone.offsetName(dt.ts, { - format: "long", - locale: _this.loc.locale - }); - // zone - - case "z": - // like America/New_York - return dt.zoneName; - // meridiems - - case "a": - return meridiem(); - // dates - - case "d": - return useDateTimeFormatter ? string({ - day: "numeric" - }, "day") : _this.num(dt.day); - - case "dd": - return useDateTimeFormatter ? string({ - day: "2-digit" - }, "day") : _this.num(dt.day, 2); - // weekdays - standalone - - case "c": - // like 1 - return _this.num(dt.weekday); - - case "ccc": - // like 'Tues' - return weekday("short", true); - - case "cccc": - // like 'Tuesday' - return weekday("long", true); - - case "ccccc": - // like 'T' - return weekday("narrow", true); - // weekdays - format - - case "E": - // like 1 - return _this.num(dt.weekday); - - case "EEE": - // like 'Tues' - return weekday("short", false); - - case "EEEE": - // like 'Tuesday' - return weekday("long", false); - - case "EEEEE": - // like 'T' - return weekday("narrow", false); - // months - standalone - - case "L": - // like 1 - return useDateTimeFormatter ? string({ - month: "numeric", - day: "numeric" - }, "month") : _this.num(dt.month); - - case "LL": - // like 01, doesn't seem to work - return useDateTimeFormatter ? string({ - month: "2-digit", - day: "numeric" - }, "month") : _this.num(dt.month, 2); - - case "LLL": - // like Jan - return month("short", true); - - case "LLLL": - // like January - return month("long", true); - - case "LLLLL": - // like J - return month("narrow", true); - // months - format - - case "M": - // like 1 - return useDateTimeFormatter ? string({ - month: "numeric" - }, "month") : _this.num(dt.month); - - case "MM": - // like 01 - return useDateTimeFormatter ? string({ - month: "2-digit" - }, "month") : _this.num(dt.month, 2); - - case "MMM": - // like Jan - return month("short", false); - - case "MMMM": - // like January - return month("long", false); - - case "MMMMM": - // like J - return month("narrow", false); - // years - - case "y": - // like 2014 - return useDateTimeFormatter ? string({ - year: "numeric" - }, "year") : _this.num(dt.year); - - case "yy": - // like 14 - return useDateTimeFormatter ? string({ - year: "2-digit" - }, "year") : _this.num(dt.year.toString().slice(-2), 2); - - case "yyyy": - // like 0012 - return useDateTimeFormatter ? string({ - year: "numeric" - }, "year") : _this.num(dt.year, 4); - - case "yyyyyy": - // like 000012 - return useDateTimeFormatter ? string({ - year: "numeric" - }, "year") : _this.num(dt.year, 6); - // eras - - case "G": - // like AD - return era("short"); - - case "GG": - // like Anno Domini - return era("long"); - - case "GGGGG": - return era("narrow"); - - case "kk": - return _this.num(dt.weekYear.toString().slice(-2), 2); - - case "kkkk": - return _this.num(dt.weekYear, 4); - - case "W": - return _this.num(dt.weekNumber); - - case "WW": - return _this.num(dt.weekNumber, 2); - - case "o": - return _this.num(dt.ordinal); - - case "ooo": - return _this.num(dt.ordinal, 3); - - case "q": - // like 1 - return _this.num(dt.quarter); - - case "qq": - // like 01 - return _this.num(dt.quarter, 2); - - case "X": - return _this.num(Math.floor(dt.ts / 1000)); - - case "x": - return _this.num(dt.ts); - - default: - return maybeMacro(token); - } - }; - - return stringifyTokens(Formatter.parseFormat(fmt), tokenToString); - }; - - _proto.formatDurationFromString = function formatDurationFromString(dur, fmt) { - var _this2 = this; - - var tokenToField = function tokenToField(token) { - switch (token[0]) { - case "S": - return "millisecond"; - - case "s": - return "second"; - - case "m": - return "minute"; - - case "h": - return "hour"; - - case "d": - return "day"; - - case "M": - return "month"; - - case "y": - return "year"; - - default: - return null; - } - }, - tokenToString = function tokenToString(lildur) { - return function (token) { - var mapped = tokenToField(token); - - if (mapped) { - return _this2.num(lildur.get(mapped), token.length); - } else { - return token; - } - }; - }, - tokens = Formatter.parseFormat(fmt), - realTokens = tokens.reduce(function (found, _ref) { - var literal = _ref.literal, - val = _ref.val; - return literal ? found : found.concat(val); - }, []), - collapsed = dur.shiftTo.apply(dur, realTokens.map(tokenToField).filter(function (t) { - return t; - })); - - return stringifyTokens(tokens, tokenToString(collapsed)); - }; - - return Formatter; - }(); - - var Invalid = /*#__PURE__*/function () { - function Invalid(reason, explanation) { - this.reason = reason; - this.explanation = explanation; - } - - var _proto = Invalid.prototype; - - _proto.toMessage = function toMessage() { - if (this.explanation) { - return this.reason + ": " + this.explanation; - } else { - return this.reason; - } - }; - - return Invalid; - }(); - - /** - * @interface - */ - - var Zone = /*#__PURE__*/function () { - function Zone() {} - - var _proto = Zone.prototype; - - /** - * Returns the offset's common name (such as EST) at the specified timestamp - * @abstract - * @param {number} ts - Epoch milliseconds for which to get the name - * @param {Object} opts - Options to affect the format - * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. - * @param {string} opts.locale - What locale to return the offset name in. - * @return {string} - */ - _proto.offsetName = function offsetName(ts, opts) { - throw new ZoneIsAbstractError(); - } - /** - * Returns the offset's value as a string - * @abstract - * @param {number} ts - Epoch milliseconds for which to get the offset - * @param {string} format - What style of offset to return. - * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively - * @return {string} - */ - ; - - _proto.formatOffset = function formatOffset(ts, format) { - throw new ZoneIsAbstractError(); - } - /** - * Return the offset in minutes for this zone at the specified timestamp. - * @abstract - * @param {number} ts - Epoch milliseconds for which to compute the offset - * @return {number} - */ - ; - - _proto.offset = function offset(ts) { - throw new ZoneIsAbstractError(); - } - /** - * Return whether this Zone is equal to another zone - * @abstract - * @param {Zone} otherZone - the zone to compare - * @return {boolean} - */ - ; - - _proto.equals = function equals(otherZone) { - throw new ZoneIsAbstractError(); - } - /** - * Return whether this Zone is valid. - * @abstract - * @type {boolean} - */ - ; - - _createClass(Zone, [{ - key: "type", - - /** - * The type of zone - * @abstract - * @type {string} - */ - get: function get() { - throw new ZoneIsAbstractError(); - } - /** - * The name of this zone. - * @abstract - * @type {string} - */ - - }, { - key: "name", - get: function get() { - throw new ZoneIsAbstractError(); - } - /** - * Returns whether the offset is known to be fixed for the whole year. - * @abstract - * @type {boolean} - */ - - }, { - key: "universal", - get: function get() { - throw new ZoneIsAbstractError(); - } - }, { - key: "isValid", - get: function get() { - throw new ZoneIsAbstractError(); - } - }]); - - return Zone; - }(); - - var singleton = null; - /** - * Represents the local zone for this Javascript environment. - * @implements {Zone} - */ - - var LocalZone = /*#__PURE__*/function (_Zone) { - _inheritsLoose(LocalZone, _Zone); - - function LocalZone() { - return _Zone.apply(this, arguments) || this; - } - - var _proto = LocalZone.prototype; - - /** @override **/ - _proto.offsetName = function offsetName(ts, _ref) { - var format = _ref.format, - locale = _ref.locale; - return parseZoneInfo(ts, format, locale); - } - /** @override **/ - ; - - _proto.formatOffset = function formatOffset$1(ts, format) { - return formatOffset(this.offset(ts), format); - } - /** @override **/ - ; - - _proto.offset = function offset(ts) { - return -new Date(ts).getTimezoneOffset(); - } - /** @override **/ - ; - - _proto.equals = function equals(otherZone) { - return otherZone.type === "local"; - } - /** @override **/ - ; - - _createClass(LocalZone, [{ - key: "type", - - /** @override **/ - get: function get() { - return "local"; - } - /** @override **/ - - }, { - key: "name", - get: function get() { - if (hasIntl()) { - return new Intl.DateTimeFormat().resolvedOptions().timeZone; - } else return "local"; - } - /** @override **/ - - }, { - key: "universal", - get: function get() { - return false; - } - }, { - key: "isValid", - get: function get() { - return true; - } - }], [{ - key: "instance", - - /** - * Get a singleton instance of the local zone - * @return {LocalZone} - */ - get: function get() { - if (singleton === null) { - singleton = new LocalZone(); - } - - return singleton; - } - }]); - - return LocalZone; - }(Zone); - - var matchingRegex = RegExp("^" + ianaRegex.source + "$"); - var dtfCache = {}; - - function makeDTF(zone) { - if (!dtfCache[zone]) { - dtfCache[zone] = new Intl.DateTimeFormat("en-US", { - hour12: false, - timeZone: zone, - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit", - second: "2-digit" - }); - } - - return dtfCache[zone]; - } - - var typeToPos = { - year: 0, - month: 1, - day: 2, - hour: 3, - minute: 4, - second: 5 - }; - - function hackyOffset(dtf, date) { - var formatted = dtf.format(date).replace(/\u200E/g, ""), - parsed = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(formatted), - fMonth = parsed[1], - fDay = parsed[2], - fYear = parsed[3], - fHour = parsed[4], - fMinute = parsed[5], - fSecond = parsed[6]; - return [fYear, fMonth, fDay, fHour, fMinute, fSecond]; - } - - function partsOffset(dtf, date) { - var formatted = dtf.formatToParts(date), - filled = []; - - for (var i = 0; i < formatted.length; i++) { - var _formatted$i = formatted[i], - type = _formatted$i.type, - value = _formatted$i.value, - pos = typeToPos[type]; - - if (!isUndefined(pos)) { - filled[pos] = parseInt(value, 10); - } - } - - return filled; - } - - var ianaZoneCache = {}; - /** - * A zone identified by an IANA identifier, like America/New_York - * @implements {Zone} - */ - - var IANAZone = /*#__PURE__*/function (_Zone) { - _inheritsLoose(IANAZone, _Zone); - - /** - * @param {string} name - Zone name - * @return {IANAZone} - */ - IANAZone.create = function create(name) { - if (!ianaZoneCache[name]) { - ianaZoneCache[name] = new IANAZone(name); - } - - return ianaZoneCache[name]; - } - /** - * Reset local caches. Should only be necessary in testing scenarios. - * @return {void} - */ - ; - - IANAZone.resetCache = function resetCache() { - ianaZoneCache = {}; - dtfCache = {}; - } - /** - * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that. - * @param {string} s - The string to check validity on - * @example IANAZone.isValidSpecifier("America/New_York") //=> true - * @example IANAZone.isValidSpecifier("Fantasia/Castle") //=> true - * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false - * @return {boolean} - */ - ; - - IANAZone.isValidSpecifier = function isValidSpecifier(s) { - return !!(s && s.match(matchingRegex)); - } - /** - * Returns whether the provided string identifies a real zone - * @param {string} zone - The string to check - * @example IANAZone.isValidZone("America/New_York") //=> true - * @example IANAZone.isValidZone("Fantasia/Castle") //=> false - * @example IANAZone.isValidZone("Sport~~blorp") //=> false - * @return {boolean} - */ - ; - - IANAZone.isValidZone = function isValidZone(zone) { - try { - new Intl.DateTimeFormat("en-US", { - timeZone: zone - }).format(); - return true; - } catch (e) { - return false; - } - } // Etc/GMT+8 -> -480 - - /** @ignore */ - ; - - IANAZone.parseGMTOffset = function parseGMTOffset(specifier) { - if (specifier) { - var match = specifier.match(/^Etc\/GMT([+-]\d{1,2})$/i); - - if (match) { - return -60 * parseInt(match[1]); - } - } - - return null; - }; - - function IANAZone(name) { - var _this; - - _this = _Zone.call(this) || this; - /** @private **/ - - _this.zoneName = name; - /** @private **/ - - _this.valid = IANAZone.isValidZone(name); - return _this; - } - /** @override **/ - - - var _proto = IANAZone.prototype; - - /** @override **/ - _proto.offsetName = function offsetName(ts, _ref) { - var format = _ref.format, - locale = _ref.locale; - return parseZoneInfo(ts, format, locale, this.name); - } - /** @override **/ - ; - - _proto.formatOffset = function formatOffset$1(ts, format) { - return formatOffset(this.offset(ts), format); - } - /** @override **/ - ; - - _proto.offset = function offset(ts) { - var date = new Date(ts), - dtf = makeDTF(this.name), - _ref2 = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date), - year = _ref2[0], - month = _ref2[1], - day = _ref2[2], - hour = _ref2[3], - minute = _ref2[4], - second = _ref2[5], - adjustedHour = hour === 24 ? 0 : hour; - - var asUTC = objToLocalTS({ - year: year, - month: month, - day: day, - hour: adjustedHour, - minute: minute, - second: second, - millisecond: 0 - }); - var asTS = +date; - var over = asTS % 1000; - asTS -= over >= 0 ? over : 1000 + over; - return (asUTC - asTS) / (60 * 1000); - } - /** @override **/ - ; - - _proto.equals = function equals(otherZone) { - return otherZone.type === "iana" && otherZone.name === this.name; - } - /** @override **/ - ; - - _createClass(IANAZone, [{ - key: "type", - get: function get() { - return "iana"; - } - /** @override **/ - - }, { - key: "name", - get: function get() { - return this.zoneName; - } - /** @override **/ - - }, { - key: "universal", - get: function get() { - return false; - } - }, { - key: "isValid", - get: function get() { - return this.valid; - } - }]); - - return IANAZone; - }(Zone); - - var singleton$1 = null; - /** - * A zone with a fixed offset (meaning no DST) - * @implements {Zone} - */ - - var FixedOffsetZone = /*#__PURE__*/function (_Zone) { - _inheritsLoose(FixedOffsetZone, _Zone); - - /** - * Get an instance with a specified offset - * @param {number} offset - The offset in minutes - * @return {FixedOffsetZone} - */ - FixedOffsetZone.instance = function instance(offset) { - return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset); - } - /** - * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6" - * @param {string} s - The offset string to parse - * @example FixedOffsetZone.parseSpecifier("UTC+6") - * @example FixedOffsetZone.parseSpecifier("UTC+06") - * @example FixedOffsetZone.parseSpecifier("UTC-6:00") - * @return {FixedOffsetZone} - */ - ; - - FixedOffsetZone.parseSpecifier = function parseSpecifier(s) { - if (s) { - var r = s.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); - - if (r) { - return new FixedOffsetZone(signedOffset(r[1], r[2])); - } - } - - return null; - }; - - _createClass(FixedOffsetZone, null, [{ - key: "utcInstance", - - /** - * Get a singleton instance of UTC - * @return {FixedOffsetZone} - */ - get: function get() { - if (singleton$1 === null) { - singleton$1 = new FixedOffsetZone(0); - } - - return singleton$1; - } - }]); - - function FixedOffsetZone(offset) { - var _this; - - _this = _Zone.call(this) || this; - /** @private **/ - - _this.fixed = offset; - return _this; - } - /** @override **/ - - - var _proto = FixedOffsetZone.prototype; - - /** @override **/ - _proto.offsetName = function offsetName() { - return this.name; - } - /** @override **/ - ; - - _proto.formatOffset = function formatOffset$1(ts, format) { - return formatOffset(this.fixed, format); - } - /** @override **/ - ; - - /** @override **/ - _proto.offset = function offset() { - return this.fixed; - } - /** @override **/ - ; - - _proto.equals = function equals(otherZone) { - return otherZone.type === "fixed" && otherZone.fixed === this.fixed; - } - /** @override **/ - ; - - _createClass(FixedOffsetZone, [{ - key: "type", - get: function get() { - return "fixed"; - } - /** @override **/ - - }, { - key: "name", - get: function get() { - return this.fixed === 0 ? "UTC" : "UTC" + formatOffset(this.fixed, "narrow"); - } - }, { - key: "universal", - get: function get() { - return true; - } - }, { - key: "isValid", - get: function get() { - return true; - } - }]); - - return FixedOffsetZone; - }(Zone); - - /** - * A zone that failed to parse. You should never need to instantiate this. - * @implements {Zone} - */ - - var InvalidZone = /*#__PURE__*/function (_Zone) { - _inheritsLoose(InvalidZone, _Zone); - - function InvalidZone(zoneName) { - var _this; - - _this = _Zone.call(this) || this; - /** @private */ - - _this.zoneName = zoneName; - return _this; - } - /** @override **/ - - - var _proto = InvalidZone.prototype; - - /** @override **/ - _proto.offsetName = function offsetName() { - return null; - } - /** @override **/ - ; - - _proto.formatOffset = function formatOffset() { - return ""; - } - /** @override **/ - ; - - _proto.offset = function offset() { - return NaN; - } - /** @override **/ - ; - - _proto.equals = function equals() { - return false; - } - /** @override **/ - ; - - _createClass(InvalidZone, [{ - key: "type", - get: function get() { - return "invalid"; - } - /** @override **/ - - }, { - key: "name", - get: function get() { - return this.zoneName; - } - /** @override **/ - - }, { - key: "universal", - get: function get() { - return false; - } - }, { - key: "isValid", - get: function get() { - return false; - } - }]); - - return InvalidZone; - }(Zone); - - /** - * @private - */ - function normalizeZone(input, defaultZone) { - var offset; - - if (isUndefined(input) || input === null) { - return defaultZone; - } else if (input instanceof Zone) { - return input; - } else if (isString(input)) { - var lowered = input.toLowerCase(); - if (lowered === "local") return defaultZone;else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance;else if ((offset = IANAZone.parseGMTOffset(input)) != null) { - // handle Etc/GMT-4, which V8 chokes on - return FixedOffsetZone.instance(offset); - } else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input);else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input); - } else if (isNumber(input)) { - return FixedOffsetZone.instance(input); - } else if (typeof input === "object" && input.offset && typeof input.offset === "number") { - // This is dumb, but the instanceof check above doesn't seem to really work - // so we're duck checking it - return input; - } else { - return new InvalidZone(input); - } - } - - var now = function now() { - return Date.now(); - }, - defaultZone = null, - // not setting this directly to LocalZone.instance bc loading order issues - defaultLocale = null, - defaultNumberingSystem = null, - defaultOutputCalendar = null, - throwOnInvalid = false; - /** - * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here. - */ - - - var Settings = /*#__PURE__*/function () { - function Settings() {} - - /** - * Reset Luxon's global caches. Should only be necessary in testing scenarios. - * @return {void} - */ - Settings.resetCaches = function resetCaches() { - Locale.resetCache(); - IANAZone.resetCache(); - }; - - _createClass(Settings, null, [{ - key: "now", - - /** - * Get the callback for returning the current timestamp. - * @type {function} - */ - get: function get() { - return now; - } - /** - * Set the callback for returning the current timestamp. - * The function should return a number, which will be interpreted as an Epoch millisecond count - * @type {function} - * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future - * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time - */ - , - set: function set(n) { - now = n; - } - /** - * Get the default time zone to create DateTimes in. - * @type {string} - */ - - }, { - key: "defaultZoneName", - get: function get() { - return Settings.defaultZone.name; - } - /** - * Set the default time zone to create DateTimes in. Does not affect existing instances. - * @type {string} - */ - , - set: function set(z) { - if (!z) { - defaultZone = null; - } else { - defaultZone = normalizeZone(z); - } - } - /** - * Get the default time zone object to create DateTimes in. Does not affect existing instances. - * @type {Zone} - */ - - }, { - key: "defaultZone", - get: function get() { - return defaultZone || LocalZone.instance; - } - /** - * Get the default locale to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - }, { - key: "defaultLocale", - get: function get() { - return defaultLocale; - } - /** - * Set the default locale to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - , - set: function set(locale) { - defaultLocale = locale; - } - /** - * Get the default numbering system to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - }, { - key: "defaultNumberingSystem", - get: function get() { - return defaultNumberingSystem; - } - /** - * Set the default numbering system to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - , - set: function set(numberingSystem) { - defaultNumberingSystem = numberingSystem; - } - /** - * Get the default output calendar to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - }, { - key: "defaultOutputCalendar", - get: function get() { - return defaultOutputCalendar; - } - /** - * Set the default output calendar to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - , - set: function set(outputCalendar) { - defaultOutputCalendar = outputCalendar; - } - /** - * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals - * @type {boolean} - */ - - }, { - key: "throwOnInvalid", - get: function get() { - return throwOnInvalid; - } - /** - * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals - * @type {boolean} - */ - , - set: function set(t) { - throwOnInvalid = t; - } - }]); - - return Settings; - }(); - - var intlDTCache = {}; - - function getCachedDTF(locString, opts) { - if (opts === void 0) { - opts = {}; - } - - var key = JSON.stringify([locString, opts]); - var dtf = intlDTCache[key]; - - if (!dtf) { - dtf = new Intl.DateTimeFormat(locString, opts); - intlDTCache[key] = dtf; - } - - return dtf; - } - - var intlNumCache = {}; - - function getCachedINF(locString, opts) { - if (opts === void 0) { - opts = {}; - } - - var key = JSON.stringify([locString, opts]); - var inf = intlNumCache[key]; - - if (!inf) { - inf = new Intl.NumberFormat(locString, opts); - intlNumCache[key] = inf; - } - - return inf; - } - - var intlRelCache = {}; - - function getCachedRTF(locString, opts) { - if (opts === void 0) { - opts = {}; - } - - var _opts = opts, - base = _opts.base, - cacheKeyOpts = _objectWithoutPropertiesLoose(_opts, ["base"]); // exclude `base` from the options - - - var key = JSON.stringify([locString, cacheKeyOpts]); - var inf = intlRelCache[key]; - - if (!inf) { - inf = new Intl.RelativeTimeFormat(locString, opts); - intlRelCache[key] = inf; - } - - return inf; - } - - var sysLocaleCache = null; - - function systemLocale() { - if (sysLocaleCache) { - return sysLocaleCache; - } else if (hasIntl()) { - var computedSys = new Intl.DateTimeFormat().resolvedOptions().locale; // node sometimes defaults to "und". Override that because that is dumb - - sysLocaleCache = !computedSys || computedSys === "und" ? "en-US" : computedSys; - return sysLocaleCache; - } else { - sysLocaleCache = "en-US"; - return sysLocaleCache; - } - } - - function parseLocaleString(localeStr) { - // I really want to avoid writing a BCP 47 parser - // see, e.g. https://github.com/wooorm/bcp-47 - // Instead, we'll do this: - // a) if the string has no -u extensions, just leave it alone - // b) if it does, use Intl to resolve everything - // c) if Intl fails, try again without the -u - var uIndex = localeStr.indexOf("-u-"); - - if (uIndex === -1) { - return [localeStr]; - } else { - var options; - var smaller = localeStr.substring(0, uIndex); - - try { - options = getCachedDTF(localeStr).resolvedOptions(); - } catch (e) { - options = getCachedDTF(smaller).resolvedOptions(); - } - - var _options = options, - numberingSystem = _options.numberingSystem, - calendar = _options.calendar; // return the smaller one so that we can append the calendar and numbering overrides to it - - return [smaller, numberingSystem, calendar]; - } - } - - function intlConfigString(localeStr, numberingSystem, outputCalendar) { - if (hasIntl()) { - if (outputCalendar || numberingSystem) { - localeStr += "-u"; - - if (outputCalendar) { - localeStr += "-ca-" + outputCalendar; - } - - if (numberingSystem) { - localeStr += "-nu-" + numberingSystem; - } - - return localeStr; - } else { - return localeStr; - } - } else { - return []; - } - } - - function mapMonths(f) { - var ms = []; - - for (var i = 1; i <= 12; i++) { - var dt = DateTime.utc(2016, i, 1); - ms.push(f(dt)); - } - - return ms; - } - - function mapWeekdays(f) { - var ms = []; - - for (var i = 1; i <= 7; i++) { - var dt = DateTime.utc(2016, 11, 13 + i); - ms.push(f(dt)); - } - - return ms; - } - - function listStuff(loc, length, defaultOK, englishFn, intlFn) { - var mode = loc.listingMode(defaultOK); - - if (mode === "error") { - return null; - } else if (mode === "en") { - return englishFn(length); - } else { - return intlFn(length); - } - } - - function supportsFastNumbers(loc) { - if (loc.numberingSystem && loc.numberingSystem !== "latn") { - return false; - } else { - return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || hasIntl() && new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === "latn"; - } - } - /** - * @private - */ - - - var PolyNumberFormatter = /*#__PURE__*/function () { - function PolyNumberFormatter(intl, forceSimple, opts) { - this.padTo = opts.padTo || 0; - this.floor = opts.floor || false; - - if (!forceSimple && hasIntl()) { - var intlOpts = { - useGrouping: false - }; - if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo; - this.inf = getCachedINF(intl, intlOpts); - } - } - - var _proto = PolyNumberFormatter.prototype; - - _proto.format = function format(i) { - if (this.inf) { - var fixed = this.floor ? Math.floor(i) : i; - return this.inf.format(fixed); - } else { - // to match the browser's numberformatter defaults - var _fixed = this.floor ? Math.floor(i) : roundTo(i, 3); - - return padStart(_fixed, this.padTo); - } - }; - - return PolyNumberFormatter; - }(); - /** - * @private - */ - - - var PolyDateFormatter = /*#__PURE__*/function () { - function PolyDateFormatter(dt, intl, opts) { - this.opts = opts; - this.hasIntl = hasIntl(); - var z; - - if (dt.zone.universal && this.hasIntl) { - // Chromium doesn't support fixed-offset zones like Etc/GMT+8 in its formatter, - // See https://bugs.chromium.org/p/chromium/issues/detail?id=364374. - // So we have to make do. Two cases: - // 1. The format options tell us to show the zone. We can't do that, so the best - // we can do is format the date in UTC. - // 2. The format options don't tell us to show the zone. Then we can adjust them - // the time and tell the formatter to show it to us in UTC, so that the time is right - // and the bad zone doesn't show up. - // We can clean all this up when Chrome fixes this. - z = "UTC"; - - if (opts.timeZoneName) { - this.dt = dt; - } else { - this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1000); - } - } else if (dt.zone.type === "local") { - this.dt = dt; - } else { - this.dt = dt; - z = dt.zone.name; - } - - if (this.hasIntl) { - var intlOpts = Object.assign({}, this.opts); - - if (z) { - intlOpts.timeZone = z; - } - - this.dtf = getCachedDTF(intl, intlOpts); - } - } - - var _proto2 = PolyDateFormatter.prototype; - - _proto2.format = function format() { - if (this.hasIntl) { - return this.dtf.format(this.dt.toJSDate()); - } else { - var tokenFormat = formatString(this.opts), - loc = Locale.create("en-US"); - return Formatter.create(loc).formatDateTimeFromString(this.dt, tokenFormat); - } - }; - - _proto2.formatToParts = function formatToParts() { - if (this.hasIntl && hasFormatToParts()) { - return this.dtf.formatToParts(this.dt.toJSDate()); - } else { - // This is kind of a cop out. We actually could do this for English. However, we couldn't do it for intl strings - // and IMO it's too weird to have an uncanny valley like that - return []; - } - }; - - _proto2.resolvedOptions = function resolvedOptions() { - if (this.hasIntl) { - return this.dtf.resolvedOptions(); - } else { - return { - locale: "en-US", - numberingSystem: "latn", - outputCalendar: "gregory" - }; - } - }; - - return PolyDateFormatter; - }(); - /** - * @private - */ - - - var PolyRelFormatter = /*#__PURE__*/function () { - function PolyRelFormatter(intl, isEnglish, opts) { - this.opts = Object.assign({ - style: "long" - }, opts); - - if (!isEnglish && hasRelative()) { - this.rtf = getCachedRTF(intl, opts); - } - } - - var _proto3 = PolyRelFormatter.prototype; - - _proto3.format = function format(count, unit) { - if (this.rtf) { - return this.rtf.format(count, unit); - } else { - return formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== "long"); - } - }; - - _proto3.formatToParts = function formatToParts(count, unit) { - if (this.rtf) { - return this.rtf.formatToParts(count, unit); - } else { - return []; - } - }; - - return PolyRelFormatter; - }(); - /** - * @private - */ - - - var Locale = /*#__PURE__*/function () { - Locale.fromOpts = function fromOpts(opts) { - return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN); - }; - - Locale.create = function create(locale, numberingSystem, outputCalendar, defaultToEN) { - if (defaultToEN === void 0) { - defaultToEN = false; - } - - var specifiedLocale = locale || Settings.defaultLocale, - // the system locale is useful for human readable strings but annoying for parsing/formatting known formats - localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale()), - numberingSystemR = numberingSystem || Settings.defaultNumberingSystem, - outputCalendarR = outputCalendar || Settings.defaultOutputCalendar; - return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale); - }; - - Locale.resetCache = function resetCache() { - sysLocaleCache = null; - intlDTCache = {}; - intlNumCache = {}; - intlRelCache = {}; - }; - - Locale.fromObject = function fromObject(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - locale = _ref.locale, - numberingSystem = _ref.numberingSystem, - outputCalendar = _ref.outputCalendar; - - return Locale.create(locale, numberingSystem, outputCalendar); - }; - - function Locale(locale, numbering, outputCalendar, specifiedLocale) { - var _parseLocaleString = parseLocaleString(locale), - parsedLocale = _parseLocaleString[0], - parsedNumberingSystem = _parseLocaleString[1], - parsedOutputCalendar = _parseLocaleString[2]; - - this.locale = parsedLocale; - this.numberingSystem = numbering || parsedNumberingSystem || null; - this.outputCalendar = outputCalendar || parsedOutputCalendar || null; - this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar); - this.weekdaysCache = { - format: {}, - standalone: {} - }; - this.monthsCache = { - format: {}, - standalone: {} - }; - this.meridiemCache = null; - this.eraCache = {}; - this.specifiedLocale = specifiedLocale; - this.fastNumbersCached = null; - } - - var _proto4 = Locale.prototype; - - _proto4.listingMode = function listingMode(defaultOK) { - if (defaultOK === void 0) { - defaultOK = true; - } - - var intl = hasIntl(), - hasFTP = intl && hasFormatToParts(), - isActuallyEn = this.isEnglish(), - hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory"); - - if (!hasFTP && !(isActuallyEn && hasNoWeirdness) && !defaultOK) { - return "error"; - } else if (!hasFTP || isActuallyEn && hasNoWeirdness) { - return "en"; - } else { - return "intl"; - } - }; - - _proto4.clone = function clone(alts) { - if (!alts || Object.getOwnPropertyNames(alts).length === 0) { - return this; - } else { - return Locale.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, alts.defaultToEN || false); - } - }; - - _proto4.redefaultToEN = function redefaultToEN(alts) { - if (alts === void 0) { - alts = {}; - } - - return this.clone(Object.assign({}, alts, { - defaultToEN: true - })); - }; - - _proto4.redefaultToSystem = function redefaultToSystem(alts) { - if (alts === void 0) { - alts = {}; - } - - return this.clone(Object.assign({}, alts, { - defaultToEN: false - })); - }; - - _proto4.months = function months$1(length, format, defaultOK) { - var _this = this; - - if (format === void 0) { - format = false; - } - - if (defaultOK === void 0) { - defaultOK = true; - } - - return listStuff(this, length, defaultOK, months, function () { - var intl = format ? { - month: length, - day: "numeric" - } : { - month: length - }, - formatStr = format ? "format" : "standalone"; - - if (!_this.monthsCache[formatStr][length]) { - _this.monthsCache[formatStr][length] = mapMonths(function (dt) { - return _this.extract(dt, intl, "month"); - }); - } - - return _this.monthsCache[formatStr][length]; - }); - }; - - _proto4.weekdays = function weekdays$1(length, format, defaultOK) { - var _this2 = this; - - if (format === void 0) { - format = false; - } - - if (defaultOK === void 0) { - defaultOK = true; - } - - return listStuff(this, length, defaultOK, weekdays, function () { - var intl = format ? { - weekday: length, - year: "numeric", - month: "long", - day: "numeric" - } : { - weekday: length - }, - formatStr = format ? "format" : "standalone"; - - if (!_this2.weekdaysCache[formatStr][length]) { - _this2.weekdaysCache[formatStr][length] = mapWeekdays(function (dt) { - return _this2.extract(dt, intl, "weekday"); - }); - } - - return _this2.weekdaysCache[formatStr][length]; - }); - }; - - _proto4.meridiems = function meridiems$1(defaultOK) { - var _this3 = this; - - if (defaultOK === void 0) { - defaultOK = true; - } - - return listStuff(this, undefined, defaultOK, function () { - return meridiems; - }, function () { - // In theory there could be aribitrary day periods. We're gonna assume there are exactly two - // for AM and PM. This is probably wrong, but it's makes parsing way easier. - if (!_this3.meridiemCache) { - var intl = { - hour: "numeric", - hour12: true - }; - _this3.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(function (dt) { - return _this3.extract(dt, intl, "dayperiod"); - }); - } - - return _this3.meridiemCache; - }); - }; - - _proto4.eras = function eras$1(length, defaultOK) { - var _this4 = this; - - if (defaultOK === void 0) { - defaultOK = true; - } - - return listStuff(this, length, defaultOK, eras, function () { - var intl = { - era: length - }; // This is utter bullshit. Different calendars are going to define eras totally differently. What I need is the minimum set of dates - // to definitely enumerate them. - - if (!_this4.eraCache[length]) { - _this4.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(function (dt) { - return _this4.extract(dt, intl, "era"); - }); - } - - return _this4.eraCache[length]; - }); - }; - - _proto4.extract = function extract(dt, intlOpts, field) { - var df = this.dtFormatter(dt, intlOpts), - results = df.formatToParts(), - matching = results.find(function (m) { - return m.type.toLowerCase() === field; - }); - return matching ? matching.value : null; - }; - - _proto4.numberFormatter = function numberFormatter(opts) { - if (opts === void 0) { - opts = {}; - } - - // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave) - // (in contrast, the rest of the condition is used heavily) - return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts); - }; - - _proto4.dtFormatter = function dtFormatter(dt, intlOpts) { - if (intlOpts === void 0) { - intlOpts = {}; - } - - return new PolyDateFormatter(dt, this.intl, intlOpts); - }; - - _proto4.relFormatter = function relFormatter(opts) { - if (opts === void 0) { - opts = {}; - } - - return new PolyRelFormatter(this.intl, this.isEnglish(), opts); - }; - - _proto4.isEnglish = function isEnglish() { - return this.locale === "en" || this.locale.toLowerCase() === "en-us" || hasIntl() && new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us"); - }; - - _proto4.equals = function equals(other) { - return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar; - }; - - _createClass(Locale, [{ - key: "fastNumbers", - get: function get() { - if (this.fastNumbersCached == null) { - this.fastNumbersCached = supportsFastNumbers(this); - } - - return this.fastNumbersCached; - } - }]); - - return Locale; - }(); - - /* - * This file handles parsing for well-specified formats. Here's how it works: - * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match. - * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object - * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence. - * Extractors can take a "cursor" representing the offset in the match to look at. This makes it easy to combine extractors. - * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions. - * Some extractions are super dumb and simpleParse and fromStrings help DRY them. - */ - - function combineRegexes() { - for (var _len = arguments.length, regexes = new Array(_len), _key = 0; _key < _len; _key++) { - regexes[_key] = arguments[_key]; - } - - var full = regexes.reduce(function (f, r) { - return f + r.source; - }, ""); - return RegExp("^" + full + "$"); - } - - function combineExtractors() { - for (var _len2 = arguments.length, extractors = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - extractors[_key2] = arguments[_key2]; - } - - return function (m) { - return extractors.reduce(function (_ref, ex) { - var mergedVals = _ref[0], - mergedZone = _ref[1], - cursor = _ref[2]; - - var _ex = ex(m, cursor), - val = _ex[0], - zone = _ex[1], - next = _ex[2]; - - return [Object.assign(mergedVals, val), mergedZone || zone, next]; - }, [{}, null, 1]).slice(0, 2); - }; - } - - function parse(s) { - if (s == null) { - return [null, null]; - } - - for (var _len3 = arguments.length, patterns = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { - patterns[_key3 - 1] = arguments[_key3]; - } - - for (var _i = 0, _patterns = patterns; _i < _patterns.length; _i++) { - var _patterns$_i = _patterns[_i], - regex = _patterns$_i[0], - extractor = _patterns$_i[1]; - var m = regex.exec(s); - - if (m) { - return extractor(m); - } - } - - return [null, null]; - } - - function simpleParse() { - for (var _len4 = arguments.length, keys = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { - keys[_key4] = arguments[_key4]; - } - - return function (match, cursor) { - var ret = {}; - var i; - - for (i = 0; i < keys.length; i++) { - ret[keys[i]] = parseInteger(match[cursor + i]); - } - - return [ret, null, cursor + i]; - }; - } // ISO and SQL parsing - - - var offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, - isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, - isoTimeRegex = RegExp("" + isoTimeBaseRegex.source + offsetRegex.source + "?"), - isoTimeExtensionRegex = RegExp("(?:T" + isoTimeRegex.source + ")?"), - isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, - isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/, - isoOrdinalRegex = /(\d{4})-?(\d{3})/, - extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay"), - extractISOOrdinalData = simpleParse("year", "ordinal"), - sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/, - // dumbed-down version of the ISO one - sqlTimeRegex = RegExp(isoTimeBaseRegex.source + " ?(?:" + offsetRegex.source + "|(" + ianaRegex.source + "))?"), - sqlTimeExtensionRegex = RegExp("(?: " + sqlTimeRegex.source + ")?"); - - function int(match, pos, fallback) { - var m = match[pos]; - return isUndefined(m) ? fallback : parseInteger(m); - } - - function extractISOYmd(match, cursor) { - var item = { - year: int(match, cursor), - month: int(match, cursor + 1, 1), - day: int(match, cursor + 2, 1) - }; - return [item, null, cursor + 3]; - } - - function extractISOTime(match, cursor) { - var item = { - hour: int(match, cursor, 0), - minute: int(match, cursor + 1, 0), - second: int(match, cursor + 2, 0), - millisecond: parseMillis(match[cursor + 3]) - }; - return [item, null, cursor + 4]; - } - - function extractISOOffset(match, cursor) { - var local = !match[cursor] && !match[cursor + 1], - fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]), - zone = local ? null : FixedOffsetZone.instance(fullOffset); - return [{}, zone, cursor + 3]; - } - - function extractIANAZone(match, cursor) { - var zone = match[cursor] ? IANAZone.create(match[cursor]) : null; - return [{}, zone, cursor + 1]; - } // ISO duration parsing - - - var isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/; - - function extractISODuration(match) { - var s = match[0], - yearStr = match[1], - monthStr = match[2], - weekStr = match[3], - dayStr = match[4], - hourStr = match[5], - minuteStr = match[6], - secondStr = match[7], - millisecondsStr = match[8]; - var hasNegativePrefix = s[0] === "-"; - - var maybeNegate = function maybeNegate(num) { - return num && hasNegativePrefix ? -num : num; - }; - - return [{ - years: maybeNegate(parseInteger(yearStr)), - months: maybeNegate(parseInteger(monthStr)), - weeks: maybeNegate(parseInteger(weekStr)), - days: maybeNegate(parseInteger(dayStr)), - hours: maybeNegate(parseInteger(hourStr)), - minutes: maybeNegate(parseInteger(minuteStr)), - seconds: maybeNegate(parseInteger(secondStr)), - milliseconds: maybeNegate(parseMillis(millisecondsStr)) - }]; - } // These are a little braindead. EDT *should* tell us that we're in, say, America/New_York - // and not just that we're in -240 *right now*. But since I don't think these are used that often - // I'm just going to ignore that - - - var obsOffsets = { - GMT: 0, - EDT: -4 * 60, - EST: -5 * 60, - CDT: -5 * 60, - CST: -6 * 60, - MDT: -6 * 60, - MST: -7 * 60, - PDT: -7 * 60, - PST: -8 * 60 - }; - - function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { - var result = { - year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr), - month: monthsShort.indexOf(monthStr) + 1, - day: parseInteger(dayStr), - hour: parseInteger(hourStr), - minute: parseInteger(minuteStr) - }; - if (secondStr) result.second = parseInteger(secondStr); - - if (weekdayStr) { - result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1; - } - - return result; - } // RFC 2822/5322 - - - var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/; - - function extractRFC2822(match) { - var weekdayStr = match[1], - dayStr = match[2], - monthStr = match[3], - yearStr = match[4], - hourStr = match[5], - minuteStr = match[6], - secondStr = match[7], - obsOffset = match[8], - milOffset = match[9], - offHourStr = match[10], - offMinuteStr = match[11], - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - var offset; - - if (obsOffset) { - offset = obsOffsets[obsOffset]; - } else if (milOffset) { - offset = 0; - } else { - offset = signedOffset(offHourStr, offMinuteStr); - } - - return [result, new FixedOffsetZone(offset)]; - } - - function preprocessRFC2822(s) { - // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s.replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim(); - } // http date - - - var rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, - rfc850 = /^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, - ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/; - - function extractRFC1123Or850(match) { - var weekdayStr = match[1], - dayStr = match[2], - monthStr = match[3], - yearStr = match[4], - hourStr = match[5], - minuteStr = match[6], - secondStr = match[7], - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - return [result, FixedOffsetZone.utcInstance]; - } - - function extractASCII(match) { - var weekdayStr = match[1], - monthStr = match[2], - dayStr = match[3], - hourStr = match[4], - minuteStr = match[5], - secondStr = match[6], - yearStr = match[7], - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - return [result, FixedOffsetZone.utcInstance]; - } - - var isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex); - var isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex); - var isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex); - var isoTimeCombinedRegex = combineRegexes(isoTimeRegex); - var extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset); - var extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset); - var extractISOOrdinalDataAndTime = combineExtractors(extractISOOrdinalData, extractISOTime); - var extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset); - /** - * @private - */ - - function parseISODate(s) { - return parse(s, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDataAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]); - } - function parseRFC2822Date(s) { - return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]); - } - function parseHTTPDate(s) { - return parse(s, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]); - } - function parseISODuration(s) { - return parse(s, [isoDuration, extractISODuration]); - } - var sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex); - var sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex); - var extractISOYmdTimeOffsetAndIANAZone = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone); - var extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone); - function parseSQL(s) { - return parse(s, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeOffsetAndIANAZone], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]); - } - - var INVALID = "Invalid Duration"; // unit conversion constants - - var lowOrderMatrix = { - weeks: { - days: 7, - hours: 7 * 24, - minutes: 7 * 24 * 60, - seconds: 7 * 24 * 60 * 60, - milliseconds: 7 * 24 * 60 * 60 * 1000 - }, - days: { - hours: 24, - minutes: 24 * 60, - seconds: 24 * 60 * 60, - milliseconds: 24 * 60 * 60 * 1000 - }, - hours: { - minutes: 60, - seconds: 60 * 60, - milliseconds: 60 * 60 * 1000 - }, - minutes: { - seconds: 60, - milliseconds: 60 * 1000 - }, - seconds: { - milliseconds: 1000 - } - }, - casualMatrix = Object.assign({ - years: { - quarters: 4, - months: 12, - weeks: 52, - days: 365, - hours: 365 * 24, - minutes: 365 * 24 * 60, - seconds: 365 * 24 * 60 * 60, - milliseconds: 365 * 24 * 60 * 60 * 1000 - }, - quarters: { - months: 3, - weeks: 13, - days: 91, - hours: 91 * 24, - minutes: 91 * 24 * 60, - seconds: 91 * 24 * 60 * 60, - milliseconds: 91 * 24 * 60 * 60 * 1000 - }, - months: { - weeks: 4, - days: 30, - hours: 30 * 24, - minutes: 30 * 24 * 60, - seconds: 30 * 24 * 60 * 60, - milliseconds: 30 * 24 * 60 * 60 * 1000 - } - }, lowOrderMatrix), - daysInYearAccurate = 146097.0 / 400, - daysInMonthAccurate = 146097.0 / 4800, - accurateMatrix = Object.assign({ - years: { - quarters: 4, - months: 12, - weeks: daysInYearAccurate / 7, - days: daysInYearAccurate, - hours: daysInYearAccurate * 24, - minutes: daysInYearAccurate * 24 * 60, - seconds: daysInYearAccurate * 24 * 60 * 60, - milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 - }, - quarters: { - months: 3, - weeks: daysInYearAccurate / 28, - days: daysInYearAccurate / 4, - hours: daysInYearAccurate * 24 / 4, - minutes: daysInYearAccurate * 24 * 60 / 4, - seconds: daysInYearAccurate * 24 * 60 * 60 / 4, - milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 / 4 - }, - months: { - weeks: daysInMonthAccurate / 7, - days: daysInMonthAccurate, - hours: daysInMonthAccurate * 24, - minutes: daysInMonthAccurate * 24 * 60, - seconds: daysInMonthAccurate * 24 * 60 * 60, - milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000 - } - }, lowOrderMatrix); // units ordered by size - - var orderedUnits = ["years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"]; - var reverseUnits = orderedUnits.slice(0).reverse(); // clone really means "create another instance just like this one, but with these changes" - - function clone(dur, alts, clear) { - if (clear === void 0) { - clear = false; - } - - // deep merge for vals - var conf = { - values: clear ? alts.values : Object.assign({}, dur.values, alts.values || {}), - loc: dur.loc.clone(alts.loc), - conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy - }; - return new Duration(conf); - } - - function antiTrunc(n) { - return n < 0 ? Math.floor(n) : Math.ceil(n); - } // NB: mutates parameters - - - function convert(matrix, fromMap, fromUnit, toMap, toUnit) { - var conv = matrix[toUnit][fromUnit], - raw = fromMap[fromUnit] / conv, - sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]), - // ok, so this is wild, but see the matrix in the tests - added = !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw); - toMap[toUnit] += added; - fromMap[fromUnit] -= added * conv; - } // NB: mutates parameters - - - function normalizeValues(matrix, vals) { - reverseUnits.reduce(function (previous, current) { - if (!isUndefined(vals[current])) { - if (previous) { - convert(matrix, vals, previous, vals, current); - } - - return current; - } else { - return previous; - } - }, null); - } - /** - * A Duration object represents a period of time, like "2 months" or "1 day, 1 hour". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime.plus} to add a Duration object to a DateTime, producing another DateTime. - * - * Here is a brief overview of commonly used methods and getters in Duration: - * - * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}. - * * **Unit values** See the {@link Duration.years}, {@link Duration.months}, {@link Duration.weeks}, {@link Duration.days}, {@link Duration.hours}, {@link Duration.minutes}, {@link Duration.seconds}, {@link Duration.milliseconds} accessors. - * * **Configuration** See {@link Duration.locale} and {@link Duration.numberingSystem} accessors. - * * **Transformation** To create new Durations out of old ones use {@link Duration.plus}, {@link Duration.minus}, {@link Duration.normalize}, {@link Duration.set}, {@link Duration.reconfigure}, {@link Duration.shiftTo}, and {@link Duration.negate}. - * * **Output** To convert the Duration into other representations, see {@link Duration.as}, {@link Duration.toISO}, {@link Duration.toFormat}, and {@link Duration.toJSON} - * - * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation. - */ - - - var Duration = /*#__PURE__*/function () { - /** - * @private - */ - function Duration(config) { - var accurate = config.conversionAccuracy === "longterm" || false; - /** - * @access private - */ - - this.values = config.values; - /** - * @access private - */ - - this.loc = config.loc || Locale.create(); - /** - * @access private - */ - - this.conversionAccuracy = accurate ? "longterm" : "casual"; - /** - * @access private - */ - - this.invalid = config.invalid || null; - /** - * @access private - */ - - this.matrix = accurate ? accurateMatrix : casualMatrix; - /** - * @access private - */ - - this.isLuxonDuration = true; - } - /** - * Create Duration from a number of milliseconds. - * @param {number} count of milliseconds - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - - - Duration.fromMillis = function fromMillis(count, opts) { - return Duration.fromObject(Object.assign({ - milliseconds: count - }, opts)); - } - /** - * Create a Duration from a Javascript object with keys like 'years' and 'hours. - * If this object is empty then a zero milliseconds duration is returned. - * @param {Object} obj - the object to create the DateTime from - * @param {number} obj.years - * @param {number} obj.quarters - * @param {number} obj.months - * @param {number} obj.weeks - * @param {number} obj.days - * @param {number} obj.hours - * @param {number} obj.minutes - * @param {number} obj.seconds - * @param {number} obj.milliseconds - * @param {string} [obj.locale='en-US'] - the locale to use - * @param {string} obj.numberingSystem - the numbering system to use - * @param {string} [obj.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - ; - - Duration.fromObject = function fromObject(obj) { - if (obj == null || typeof obj !== "object") { - throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got " + (obj === null ? "null" : typeof obj)); - } - - return new Duration({ - values: normalizeObject(obj, Duration.normalizeUnit, ["locale", "numberingSystem", "conversionAccuracy", "zone" // a bit of debt; it's super inconvenient internally not to be able to blindly pass this - ]), - loc: Locale.fromObject(obj), - conversionAccuracy: obj.conversionAccuracy - }); - } - /** - * Create a Duration from an ISO 8601 duration string. - * @param {string} text - text to parse - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @see https://en.wikipedia.org/wiki/ISO_8601#Durations - * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 } - * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 } - * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 } - * @return {Duration} - */ - ; - - Duration.fromISO = function fromISO(text, opts) { - var _parseISODuration = parseISODuration(text), - parsed = _parseISODuration[0]; - - if (parsed) { - var obj = Object.assign(parsed, opts); - return Duration.fromObject(obj); - } else { - return Duration.invalid("unparsable", "the input \"" + text + "\" can't be parsed as ISO 8601"); - } - } - /** - * Create an invalid Duration. - * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {Duration} - */ - ; - - Duration.invalid = function invalid(reason, explanation) { - if (explanation === void 0) { - explanation = null; - } - - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the Duration is invalid"); - } - - var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidDurationError(invalid); - } else { - return new Duration({ - invalid: invalid - }); - } - } - /** - * @private - */ - ; - - Duration.normalizeUnit = function normalizeUnit(unit) { - var normalized = { - year: "years", - years: "years", - quarter: "quarters", - quarters: "quarters", - month: "months", - months: "months", - week: "weeks", - weeks: "weeks", - day: "days", - days: "days", - hour: "hours", - hours: "hours", - minute: "minutes", - minutes: "minutes", - second: "seconds", - seconds: "seconds", - millisecond: "milliseconds", - milliseconds: "milliseconds" - }[unit ? unit.toLowerCase() : unit]; - if (!normalized) throw new InvalidUnitError(unit); - return normalized; - } - /** - * Check if an object is a Duration. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - ; - - Duration.isDuration = function isDuration(o) { - return o && o.isLuxonDuration || false; - } - /** - * Get the locale of a Duration, such 'en-GB' - * @type {string} - */ - ; - - var _proto = Duration.prototype; - - /** - * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens: - * * `S` for milliseconds - * * `s` for seconds - * * `m` for minutes - * * `h` for hours - * * `d` for days - * * `M` for months - * * `y` for years - * Notes: - * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits - * * The duration will be converted to the set of units in the format string using {@link Duration.shiftTo} and the Durations's conversion accuracy setting. - * @param {string} fmt - the format string - * @param {Object} opts - options - * @param {boolean} [opts.floor=true] - floor numerical values - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2" - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002" - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000" - * @return {string} - */ - _proto.toFormat = function toFormat(fmt, opts) { - if (opts === void 0) { - opts = {}; - } - - // reverse-compat since 1.2; we always round down now, never up, and we do it by default - var fmtOpts = Object.assign({}, opts, { - floor: opts.round !== false && opts.floor !== false - }); - return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID; - } - /** - * Returns a Javascript object with this Duration's values. - * @param opts - options for generating the object - * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 } - * @return {Object} - */ - ; - - _proto.toObject = function toObject(opts) { - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid) return {}; - var base = Object.assign({}, this.values); - - if (opts.includeConfig) { - base.conversionAccuracy = this.conversionAccuracy; - base.numberingSystem = this.loc.numberingSystem; - base.locale = this.loc.locale; - } - - return base; - } - /** - * Returns an ISO 8601-compliant string representation of this Duration. - * @see https://en.wikipedia.org/wiki/ISO_8601#Durations - * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S' - * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S' - * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M' - * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M' - * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S' - * @return {string} - */ - ; - - _proto.toISO = function toISO() { - // we could use the formatter, but this is an easier way to get the minimum string - if (!this.isValid) return null; - var s = "P"; - if (this.years !== 0) s += this.years + "Y"; - if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + "M"; - if (this.weeks !== 0) s += this.weeks + "W"; - if (this.days !== 0) s += this.days + "D"; - if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) s += "T"; - if (this.hours !== 0) s += this.hours + "H"; - if (this.minutes !== 0) s += this.minutes + "M"; - if (this.seconds !== 0 || this.milliseconds !== 0) // this will handle "floating point madness" by removing extra decimal places - // https://stackoverflow.com/questions/588004/is-floating-point-math-broken - s += roundTo(this.seconds + this.milliseconds / 1000, 3) + "S"; - if (s === "P") s += "T0S"; - return s; - } - /** - * Returns an ISO 8601 representation of this Duration appropriate for use in JSON. - * @return {string} - */ - ; - - _proto.toJSON = function toJSON() { - return this.toISO(); - } - /** - * Returns an ISO 8601 representation of this Duration appropriate for use in debugging. - * @return {string} - */ - ; - - _proto.toString = function toString() { - return this.toISO(); - } - /** - * Returns an milliseconds value of this Duration. - * @return {number} - */ - ; - - _proto.valueOf = function valueOf() { - return this.as("milliseconds"); - } - /** - * Make this Duration longer by the specified amount. Return a newly-constructed Duration. - * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @return {Duration} - */ - ; - - _proto.plus = function plus(duration) { - if (!this.isValid) return this; - var dur = friendlyDuration(duration), - result = {}; - - for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits), _step; !(_step = _iterator()).done;) { - var k = _step.value; - - if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) { - result[k] = dur.get(k) + this.get(k); - } - } - - return clone(this, { - values: result - }, true); - } - /** - * Make this Duration shorter by the specified amount. Return a newly-constructed Duration. - * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @return {Duration} - */ - ; - - _proto.minus = function minus(duration) { - if (!this.isValid) return this; - var dur = friendlyDuration(duration); - return this.plus(dur.negate()); - } - /** - * Scale this Duration by the specified amount. Return a newly-constructed Duration. - * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number. - * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit(x => x * 2) //=> { hours: 2, minutes: 60 } - * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit((x, u) => u === "hour" ? x * 2 : x) //=> { hours: 2, minutes: 30 } - * @return {Duration} - */ - ; - - _proto.mapUnits = function mapUnits(fn) { - if (!this.isValid) return this; - var result = {}; - - for (var _i = 0, _Object$keys = Object.keys(this.values); _i < _Object$keys.length; _i++) { - var k = _Object$keys[_i]; - result[k] = asNumber(fn(this.values[k], k)); - } - - return clone(this, { - values: result - }, true); - } - /** - * Get the value of unit. - * @param {string} unit - a unit such as 'minute' or 'day' - * @example Duration.fromObject({years: 2, days: 3}).years //=> 2 - * @example Duration.fromObject({years: 2, days: 3}).months //=> 0 - * @example Duration.fromObject({years: 2, days: 3}).days //=> 3 - * @return {number} - */ - ; - - _proto.get = function get(unit) { - return this[Duration.normalizeUnit(unit)]; - } - /** - * "Set" the values of specified units. Return a newly-constructed Duration. - * @param {Object} values - a mapping of units to numbers - * @example dur.set({ years: 2017 }) - * @example dur.set({ hours: 8, minutes: 30 }) - * @return {Duration} - */ - ; - - _proto.set = function set(values) { - if (!this.isValid) return this; - var mixed = Object.assign(this.values, normalizeObject(values, Duration.normalizeUnit, [])); - return clone(this, { - values: mixed - }); - } - /** - * "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration. - * @example dur.reconfigure({ locale: 'en-GB' }) - * @return {Duration} - */ - ; - - _proto.reconfigure = function reconfigure(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - locale = _ref.locale, - numberingSystem = _ref.numberingSystem, - conversionAccuracy = _ref.conversionAccuracy; - - var loc = this.loc.clone({ - locale: locale, - numberingSystem: numberingSystem - }), - opts = { - loc: loc - }; - - if (conversionAccuracy) { - opts.conversionAccuracy = conversionAccuracy; - } - - return clone(this, opts); - } - /** - * Return the length of the duration in the specified unit. - * @param {string} unit - a unit such as 'minutes' or 'days' - * @example Duration.fromObject({years: 1}).as('days') //=> 365 - * @example Duration.fromObject({years: 1}).as('months') //=> 12 - * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5 - * @return {number} - */ - ; - - _proto.as = function as(unit) { - return this.isValid ? this.shiftTo(unit).get(unit) : NaN; - } - /** - * Reduce this Duration to its canonical representation in its current units. - * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 } - * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 } - * @return {Duration} - */ - ; - - _proto.normalize = function normalize() { - if (!this.isValid) return this; - var vals = this.toObject(); - normalizeValues(this.matrix, vals); - return clone(this, { - values: vals - }, true); - } - /** - * Convert this Duration into its representation in a different set of units. - * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 } - * @return {Duration} - */ - ; - - _proto.shiftTo = function shiftTo() { - for (var _len = arguments.length, units = new Array(_len), _key = 0; _key < _len; _key++) { - units[_key] = arguments[_key]; - } - - if (!this.isValid) return this; - - if (units.length === 0) { - return this; - } - - units = units.map(function (u) { - return Duration.normalizeUnit(u); - }); - var built = {}, - accumulated = {}, - vals = this.toObject(); - var lastUnit; - - for (var _iterator2 = _createForOfIteratorHelperLoose(orderedUnits), _step2; !(_step2 = _iterator2()).done;) { - var k = _step2.value; - - if (units.indexOf(k) >= 0) { - lastUnit = k; - var own = 0; // anything we haven't boiled down yet should get boiled to this unit - - for (var ak in accumulated) { - own += this.matrix[ak][k] * accumulated[ak]; - accumulated[ak] = 0; - } // plus anything that's already in this unit - - - if (isNumber(vals[k])) { - own += vals[k]; - } - - var i = Math.trunc(own); - built[k] = i; - accumulated[k] = own - i; // we'd like to absorb these fractions in another unit - // plus anything further down the chain that should be rolled up in to this - - for (var down in vals) { - if (orderedUnits.indexOf(down) > orderedUnits.indexOf(k)) { - convert(this.matrix, vals, down, built, k); - } - } // otherwise, keep it in the wings to boil it later - - } else if (isNumber(vals[k])) { - accumulated[k] = vals[k]; - } - } // anything leftover becomes the decimal for the last unit - // lastUnit must be defined since units is not empty - - - for (var key in accumulated) { - if (accumulated[key] !== 0) { - built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key]; - } - } - - return clone(this, { - values: built - }, true).normalize(); - } - /** - * Return the negative of this Duration. - * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 } - * @return {Duration} - */ - ; - - _proto.negate = function negate() { - if (!this.isValid) return this; - var negated = {}; - - for (var _i2 = 0, _Object$keys2 = Object.keys(this.values); _i2 < _Object$keys2.length; _i2++) { - var k = _Object$keys2[_i2]; - negated[k] = -this.values[k]; - } - - return clone(this, { - values: negated - }, true); - } - /** - * Get the years. - * @type {number} - */ - ; - - /** - * Equality check - * Two Durations are equal iff they have the same units and the same values for each unit. - * @param {Duration} other - * @return {boolean} - */ - _proto.equals = function equals(other) { - if (!this.isValid || !other.isValid) { - return false; - } - - if (!this.loc.equals(other.loc)) { - return false; - } - - for (var _iterator3 = _createForOfIteratorHelperLoose(orderedUnits), _step3; !(_step3 = _iterator3()).done;) { - var u = _step3.value; - - if (this.values[u] !== other.values[u]) { - return false; - } - } - - return true; - }; - - _createClass(Duration, [{ - key: "locale", - get: function get() { - return this.isValid ? this.loc.locale : null; - } - /** - * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration - * - * @type {string} - */ - - }, { - key: "numberingSystem", - get: function get() { - return this.isValid ? this.loc.numberingSystem : null; - } - }, { - key: "years", - get: function get() { - return this.isValid ? this.values.years || 0 : NaN; - } - /** - * Get the quarters. - * @type {number} - */ - - }, { - key: "quarters", - get: function get() { - return this.isValid ? this.values.quarters || 0 : NaN; - } - /** - * Get the months. - * @type {number} - */ - - }, { - key: "months", - get: function get() { - return this.isValid ? this.values.months || 0 : NaN; - } - /** - * Get the weeks - * @type {number} - */ - - }, { - key: "weeks", - get: function get() { - return this.isValid ? this.values.weeks || 0 : NaN; - } - /** - * Get the days. - * @type {number} - */ - - }, { - key: "days", - get: function get() { - return this.isValid ? this.values.days || 0 : NaN; - } - /** - * Get the hours. - * @type {number} - */ - - }, { - key: "hours", - get: function get() { - return this.isValid ? this.values.hours || 0 : NaN; - } - /** - * Get the minutes. - * @type {number} - */ - - }, { - key: "minutes", - get: function get() { - return this.isValid ? this.values.minutes || 0 : NaN; - } - /** - * Get the seconds. - * @return {number} - */ - - }, { - key: "seconds", - get: function get() { - return this.isValid ? this.values.seconds || 0 : NaN; - } - /** - * Get the milliseconds. - * @return {number} - */ - - }, { - key: "milliseconds", - get: function get() { - return this.isValid ? this.values.milliseconds || 0 : NaN; - } - /** - * Returns whether the Duration is invalid. Invalid durations are returned by diff operations - * on invalid DateTimes or Intervals. - * @return {boolean} - */ - - }, { - key: "isValid", - get: function get() { - return this.invalid === null; - } - /** - * Returns an error code if this Duration became invalid, or null if the Duration is valid - * @return {string} - */ - - }, { - key: "invalidReason", - get: function get() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this Duration became invalid, or null if the Duration is valid - * @type {string} - */ - - }, { - key: "invalidExplanation", - get: function get() { - return this.invalid ? this.invalid.explanation : null; - } - }]); - - return Duration; - }(); - function friendlyDuration(durationish) { - if (isNumber(durationish)) { - return Duration.fromMillis(durationish); - } else if (Duration.isDuration(durationish)) { - return durationish; - } else if (typeof durationish === "object") { - return Duration.fromObject(durationish); - } else { - throw new InvalidArgumentError("Unknown duration argument " + durationish + " of type " + typeof durationish); - } - } - - var INVALID$1 = "Invalid Interval"; // checks if the start is equal to or before the end - - function validateStartEnd(start, end) { - if (!start || !start.isValid) { - return Interval.invalid("missing or invalid start"); - } else if (!end || !end.isValid) { - return Interval.invalid("missing or invalid end"); - } else if (end < start) { - return Interval.invalid("end before start", "The end of an interval must be after its start, but you had start=" + start.toISO() + " and end=" + end.toISO()); - } else { - return null; - } - } - /** - * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them. - * - * Here is a brief overview of the most commonly used methods and getters in Interval: - * - * * **Creation** To create an Interval, use {@link fromDateTimes}, {@link after}, {@link before}, or {@link fromISO}. - * * **Accessors** Use {@link start} and {@link end} to get the start and end. - * * **Interrogation** To analyze the Interval, use {@link count}, {@link length}, {@link hasSame}, {@link contains}, {@link isAfter}, or {@link isBefore}. - * * **Transformation** To create other Intervals out of this one, use {@link set}, {@link splitAt}, {@link splitBy}, {@link divideEqually}, {@link merge}, {@link xor}, {@link union}, {@link intersection}, or {@link difference}. - * * **Comparison** To compare this Interval to another one, use {@link equals}, {@link overlaps}, {@link abutsStart}, {@link abutsEnd}, {@link engulfs}. - * * **Output** To convert the Interval into other representations, see {@link toString}, {@link toISO}, {@link toISODate}, {@link toISOTime}, {@link toFormat}, and {@link toDuration}. - */ - - - var Interval = /*#__PURE__*/function () { - /** - * @private - */ - function Interval(config) { - /** - * @access private - */ - this.s = config.start; - /** - * @access private - */ - - this.e = config.end; - /** - * @access private - */ - - this.invalid = config.invalid || null; - /** - * @access private - */ - - this.isLuxonInterval = true; - } - /** - * Create an invalid Interval. - * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {Interval} - */ - - - Interval.invalid = function invalid(reason, explanation) { - if (explanation === void 0) { - explanation = null; - } - - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the Interval is invalid"); - } - - var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidIntervalError(invalid); - } else { - return new Interval({ - invalid: invalid - }); - } - } - /** - * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end. - * @param {DateTime|Date|Object} start - * @param {DateTime|Date|Object} end - * @return {Interval} - */ - ; - - Interval.fromDateTimes = function fromDateTimes(start, end) { - var builtStart = friendlyDateTime(start), - builtEnd = friendlyDateTime(end); - var validateError = validateStartEnd(builtStart, builtEnd); - - if (validateError == null) { - return new Interval({ - start: builtStart, - end: builtEnd - }); - } else { - return validateError; - } - } - /** - * Create an Interval from a start DateTime and a Duration to extend to. - * @param {DateTime|Date|Object} start - * @param {Duration|Object|number} duration - the length of the Interval. - * @return {Interval} - */ - ; - - Interval.after = function after(start, duration) { - var dur = friendlyDuration(duration), - dt = friendlyDateTime(start); - return Interval.fromDateTimes(dt, dt.plus(dur)); - } - /** - * Create an Interval from an end DateTime and a Duration to extend backwards to. - * @param {DateTime|Date|Object} end - * @param {Duration|Object|number} duration - the length of the Interval. - * @return {Interval} - */ - ; - - Interval.before = function before(end, duration) { - var dur = friendlyDuration(duration), - dt = friendlyDateTime(end); - return Interval.fromDateTimes(dt.minus(dur), dt); - } - /** - * Create an Interval from an ISO 8601 string. - * Accepts `/`, `/`, and `/` formats. - * @param {string} text - the ISO string to parse - * @param {Object} [opts] - options to pass {@link DateTime.fromISO} and optionally {@link Duration.fromISO} - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @return {Interval} - */ - ; - - Interval.fromISO = function fromISO(text, opts) { - var _split = (text || "").split("/", 2), - s = _split[0], - e = _split[1]; - - if (s && e) { - var start, startIsValid; - - try { - start = DateTime.fromISO(s, opts); - startIsValid = start.isValid; - } catch (e) { - startIsValid = false; - } - - var end, endIsValid; - - try { - end = DateTime.fromISO(e, opts); - endIsValid = end.isValid; - } catch (e) { - endIsValid = false; - } - - if (startIsValid && endIsValid) { - return Interval.fromDateTimes(start, end); - } - - if (startIsValid) { - var dur = Duration.fromISO(e, opts); - - if (dur.isValid) { - return Interval.after(start, dur); - } - } else if (endIsValid) { - var _dur = Duration.fromISO(s, opts); - - if (_dur.isValid) { - return Interval.before(end, _dur); - } - } - } - - return Interval.invalid("unparsable", "the input \"" + text + "\" can't be parsed as ISO 8601"); - } - /** - * Check if an object is an Interval. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - ; - - Interval.isInterval = function isInterval(o) { - return o && o.isLuxonInterval || false; - } - /** - * Returns the start of the Interval - * @type {DateTime} - */ - ; - - var _proto = Interval.prototype; - - /** - * Returns the length of the Interval in the specified unit. - * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in. - * @return {number} - */ - _proto.length = function length(unit) { - if (unit === void 0) { - unit = "milliseconds"; - } - - return this.isValid ? this.toDuration.apply(this, [unit]).get(unit) : NaN; - } - /** - * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part. - * Unlike {@link length} this counts sections of the calendar, not periods of time, e.g. specifying 'day' - * asks 'what dates are included in this interval?', not 'how many days long is this interval?' - * @param {string} [unit='milliseconds'] - the unit of time to count. - * @return {number} - */ - ; - - _proto.count = function count(unit) { - if (unit === void 0) { - unit = "milliseconds"; - } - - if (!this.isValid) return NaN; - var start = this.start.startOf(unit), - end = this.end.startOf(unit); - return Math.floor(end.diff(start, unit).get(unit)) + 1; - } - /** - * Returns whether this Interval's start and end are both in the same unit of time - * @param {string} unit - the unit of time to check sameness on - * @return {boolean} - */ - ; - - _proto.hasSame = function hasSame(unit) { - return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false; - } - /** - * Return whether this Interval has the same start and end DateTimes. - * @return {boolean} - */ - ; - - _proto.isEmpty = function isEmpty() { - return this.s.valueOf() === this.e.valueOf(); - } - /** - * Return whether this Interval's start is after the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - ; - - _proto.isAfter = function isAfter(dateTime) { - if (!this.isValid) return false; - return this.s > dateTime; - } - /** - * Return whether this Interval's end is before the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - ; - - _proto.isBefore = function isBefore(dateTime) { - if (!this.isValid) return false; - return this.e <= dateTime; - } - /** - * Return whether this Interval contains the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - ; - - _proto.contains = function contains(dateTime) { - if (!this.isValid) return false; - return this.s <= dateTime && this.e > dateTime; - } - /** - * "Sets" the start and/or end dates. Returns a newly-constructed Interval. - * @param {Object} values - the values to set - * @param {DateTime} values.start - the starting DateTime - * @param {DateTime} values.end - the ending DateTime - * @return {Interval} - */ - ; - - _proto.set = function set(_temp) { - var _ref = _temp === void 0 ? {} : _temp, - start = _ref.start, - end = _ref.end; - - if (!this.isValid) return this; - return Interval.fromDateTimes(start || this.s, end || this.e); - } - /** - * Split this Interval at each of the specified DateTimes - * @param {...[DateTime]} dateTimes - the unit of time to count. - * @return {[Interval]} - */ - ; - - _proto.splitAt = function splitAt() { - var _this = this; - - if (!this.isValid) return []; - - for (var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++) { - dateTimes[_key] = arguments[_key]; - } - - var sorted = dateTimes.map(friendlyDateTime).filter(function (d) { - return _this.contains(d); - }).sort(), - results = []; - var s = this.s, - i = 0; - - while (s < this.e) { - var added = sorted[i] || this.e, - next = +added > +this.e ? this.e : added; - results.push(Interval.fromDateTimes(s, next)); - s = next; - i += 1; - } - - return results; - } - /** - * Split this Interval into smaller Intervals, each of the specified length. - * Left over time is grouped into a smaller interval - * @param {Duration|Object|number} duration - The length of each resulting interval. - * @return {[Interval]} - */ - ; - - _proto.splitBy = function splitBy(duration) { - var dur = friendlyDuration(duration); - - if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) { - return []; - } - - var s = this.s, - added, - next; - var results = []; - - while (s < this.e) { - added = s.plus(dur); - next = +added > +this.e ? this.e : added; - results.push(Interval.fromDateTimes(s, next)); - s = next; - } - - return results; - } - /** - * Split this Interval into the specified number of smaller intervals. - * @param {number} numberOfParts - The number of Intervals to divide the Interval into. - * @return {[Interval]} - */ - ; - - _proto.divideEqually = function divideEqually(numberOfParts) { - if (!this.isValid) return []; - return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts); - } - /** - * Return whether this Interval overlaps with the specified Interval - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.overlaps = function overlaps(other) { - return this.e > other.s && this.s < other.e; - } - /** - * Return whether this Interval's end is adjacent to the specified Interval's start. - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.abutsStart = function abutsStart(other) { - if (!this.isValid) return false; - return +this.e === +other.s; - } - /** - * Return whether this Interval's start is adjacent to the specified Interval's end. - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.abutsEnd = function abutsEnd(other) { - if (!this.isValid) return false; - return +other.e === +this.s; - } - /** - * Return whether this Interval engulfs the start and end of the specified Interval. - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.engulfs = function engulfs(other) { - if (!this.isValid) return false; - return this.s <= other.s && this.e >= other.e; - } - /** - * Return whether this Interval has the same start and end as the specified Interval. - * @param {Interval} other - * @return {boolean} - */ - ; - - _proto.equals = function equals(other) { - if (!this.isValid || !other.isValid) { - return false; - } - - return this.s.equals(other.s) && this.e.equals(other.e); - } - /** - * Return an Interval representing the intersection of this Interval and the specified Interval. - * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals. - * Returns null if the intersection is empty, meaning, the intervals don't intersect. - * @param {Interval} other - * @return {Interval} - */ - ; - - _proto.intersection = function intersection(other) { - if (!this.isValid) return this; - var s = this.s > other.s ? this.s : other.s, - e = this.e < other.e ? this.e : other.e; - - if (s > e) { - return null; - } else { - return Interval.fromDateTimes(s, e); - } - } - /** - * Return an Interval representing the union of this Interval and the specified Interval. - * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals. - * @param {Interval} other - * @return {Interval} - */ - ; - - _proto.union = function union(other) { - if (!this.isValid) return this; - var s = this.s < other.s ? this.s : other.s, - e = this.e > other.e ? this.e : other.e; - return Interval.fromDateTimes(s, e); - } - /** - * Merge an array of Intervals into a equivalent minimal set of Intervals. - * Combines overlapping and adjacent Intervals. - * @param {[Interval]} intervals - * @return {[Interval]} - */ - ; - - Interval.merge = function merge(intervals) { - var _intervals$sort$reduc = intervals.sort(function (a, b) { - return a.s - b.s; - }).reduce(function (_ref2, item) { - var sofar = _ref2[0], - current = _ref2[1]; - - if (!current) { - return [sofar, item]; - } else if (current.overlaps(item) || current.abutsStart(item)) { - return [sofar, current.union(item)]; - } else { - return [sofar.concat([current]), item]; - } - }, [[], null]), - found = _intervals$sort$reduc[0], - final = _intervals$sort$reduc[1]; - - if (final) { - found.push(final); - } - - return found; - } - /** - * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals. - * @param {[Interval]} intervals - * @return {[Interval]} - */ - ; - - Interval.xor = function xor(intervals) { - var _Array$prototype; - - var start = null, - currentCount = 0; - - var results = [], - ends = intervals.map(function (i) { - return [{ - time: i.s, - type: "s" - }, { - time: i.e, - type: "e" - }]; - }), - flattened = (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, ends), - arr = flattened.sort(function (a, b) { - return a.time - b.time; - }); - - for (var _iterator = _createForOfIteratorHelperLoose(arr), _step; !(_step = _iterator()).done;) { - var i = _step.value; - currentCount += i.type === "s" ? 1 : -1; - - if (currentCount === 1) { - start = i.time; - } else { - if (start && +start !== +i.time) { - results.push(Interval.fromDateTimes(start, i.time)); - } - - start = null; - } - } - - return Interval.merge(results); - } - /** - * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals. - * @param {...Interval} intervals - * @return {[Interval]} - */ - ; - - _proto.difference = function difference() { - var _this2 = this; - - for (var _len2 = arguments.length, intervals = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - intervals[_key2] = arguments[_key2]; - } - - return Interval.xor([this].concat(intervals)).map(function (i) { - return _this2.intersection(i); - }).filter(function (i) { - return i && !i.isEmpty(); - }); - } - /** - * Returns a string representation of this Interval appropriate for debugging. - * @return {string} - */ - ; - - _proto.toString = function toString() { - if (!this.isValid) return INVALID$1; - return "[" + this.s.toISO() + " \u2013 " + this.e.toISO() + ")"; - } - /** - * Returns an ISO 8601-compliant string representation of this Interval. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @param {Object} opts - The same options as {@link DateTime.toISO} - * @return {string} - */ - ; - - _proto.toISO = function toISO(opts) { - if (!this.isValid) return INVALID$1; - return this.s.toISO(opts) + "/" + this.e.toISO(opts); - } - /** - * Returns an ISO 8601-compliant string representation of date of this Interval. - * The time components are ignored. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @return {string} - */ - ; - - _proto.toISODate = function toISODate() { - if (!this.isValid) return INVALID$1; - return this.s.toISODate() + "/" + this.e.toISODate(); - } - /** - * Returns an ISO 8601-compliant string representation of time of this Interval. - * The date components are ignored. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @param {Object} opts - The same options as {@link DateTime.toISO} - * @return {string} - */ - ; - - _proto.toISOTime = function toISOTime(opts) { - if (!this.isValid) return INVALID$1; - return this.s.toISOTime(opts) + "/" + this.e.toISOTime(opts); - } - /** - * Returns a string representation of this Interval formatted according to the specified format string. - * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime.toFormat} for details. - * @param {Object} opts - options - * @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations - * @return {string} - */ - ; - - _proto.toFormat = function toFormat(dateFormat, _temp2) { - var _ref3 = _temp2 === void 0 ? {} : _temp2, - _ref3$separator = _ref3.separator, - separator = _ref3$separator === void 0 ? " – " : _ref3$separator; - - if (!this.isValid) return INVALID$1; - return "" + this.s.toFormat(dateFormat) + separator + this.e.toFormat(dateFormat); - } - /** - * Return a Duration representing the time spanned by this interval. - * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration. - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 } - * @return {Duration} - */ - ; - - _proto.toDuration = function toDuration(unit, opts) { - if (!this.isValid) { - return Duration.invalid(this.invalidReason); - } - - return this.e.diff(this.s, unit, opts); - } - /** - * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes - * @param {function} mapFn - * @return {Interval} - * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC()) - * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 })) - */ - ; - - _proto.mapEndpoints = function mapEndpoints(mapFn) { - return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e)); - }; - - _createClass(Interval, [{ - key: "start", - get: function get() { - return this.isValid ? this.s : null; - } - /** - * Returns the end of the Interval - * @type {DateTime} - */ - - }, { - key: "end", - get: function get() { - return this.isValid ? this.e : null; - } - /** - * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'. - * @type {boolean} - */ - - }, { - key: "isValid", - get: function get() { - return this.invalidReason === null; - } - /** - * Returns an error code if this Interval is invalid, or null if the Interval is valid - * @type {string} - */ - - }, { - key: "invalidReason", - get: function get() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this Interval became invalid, or null if the Interval is valid - * @type {string} - */ - - }, { - key: "invalidExplanation", - get: function get() { - return this.invalid ? this.invalid.explanation : null; - } - }]); - - return Interval; - }(); - - /** - * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment. - */ - - var Info = /*#__PURE__*/function () { - function Info() {} - - /** - * Return whether the specified zone contains a DST. - * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone. - * @return {boolean} - */ - Info.hasDST = function hasDST(zone) { - if (zone === void 0) { - zone = Settings.defaultZone; - } - - var proto = DateTime.local().setZone(zone).set({ - month: 12 - }); - return !zone.universal && proto.offset !== proto.set({ - month: 6 - }).offset; - } - /** - * Return whether the specified zone is a valid IANA specifier. - * @param {string} zone - Zone to check - * @return {boolean} - */ - ; - - Info.isValidIANAZone = function isValidIANAZone(zone) { - return IANAZone.isValidSpecifier(zone) && IANAZone.isValidZone(zone); - } - /** - * Converts the input into a {@link Zone} instance. - * - * * If `input` is already a Zone instance, it is returned unchanged. - * * If `input` is a string containing a valid time zone name, a Zone instance - * with that name is returned. - * * If `input` is a string that doesn't refer to a known time zone, a Zone - * instance with {@link Zone.isValid} == false is returned. - * * If `input is a number, a Zone instance with the specified fixed offset - * in minutes is returned. - * * If `input` is `null` or `undefined`, the default zone is returned. - * @param {string|Zone|number} [input] - the value to be converted - * @return {Zone} - */ - ; - - Info.normalizeZone = function normalizeZone$1(input) { - return normalizeZone(input, Settings.defaultZone); - } - /** - * Return an array of standalone month names. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.outputCalendar='gregory'] - the calendar - * @example Info.months()[0] //=> 'January' - * @example Info.months('short')[0] //=> 'Jan' - * @example Info.months('numeric')[0] //=> '1' - * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.' - * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١' - * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I' - * @return {[string]} - */ - ; - - Info.months = function months(length, _temp) { - if (length === void 0) { - length = "long"; - } - - var _ref = _temp === void 0 ? {} : _temp, - _ref$locale = _ref.locale, - locale = _ref$locale === void 0 ? null : _ref$locale, - _ref$numberingSystem = _ref.numberingSystem, - numberingSystem = _ref$numberingSystem === void 0 ? null : _ref$numberingSystem, - _ref$outputCalendar = _ref.outputCalendar, - outputCalendar = _ref$outputCalendar === void 0 ? "gregory" : _ref$outputCalendar; - - return Locale.create(locale, numberingSystem, outputCalendar).months(length); - } - /** - * Return an array of format month names. - * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that - * changes the string. - * See {@link months} - * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.outputCalendar='gregory'] - the calendar - * @return {[string]} - */ - ; - - Info.monthsFormat = function monthsFormat(length, _temp2) { - if (length === void 0) { - length = "long"; - } - - var _ref2 = _temp2 === void 0 ? {} : _temp2, - _ref2$locale = _ref2.locale, - locale = _ref2$locale === void 0 ? null : _ref2$locale, - _ref2$numberingSystem = _ref2.numberingSystem, - numberingSystem = _ref2$numberingSystem === void 0 ? null : _ref2$numberingSystem, - _ref2$outputCalendar = _ref2.outputCalendar, - outputCalendar = _ref2$outputCalendar === void 0 ? "gregory" : _ref2$outputCalendar; - - return Locale.create(locale, numberingSystem, outputCalendar).months(length, true); - } - /** - * Return an array of standalone week names. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @example Info.weekdays()[0] //=> 'Monday' - * @example Info.weekdays('short')[0] //=> 'Mon' - * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.' - * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين' - * @return {[string]} - */ - ; - - Info.weekdays = function weekdays(length, _temp3) { - if (length === void 0) { - length = "long"; - } - - var _ref3 = _temp3 === void 0 ? {} : _temp3, - _ref3$locale = _ref3.locale, - locale = _ref3$locale === void 0 ? null : _ref3$locale, - _ref3$numberingSystem = _ref3.numberingSystem, - numberingSystem = _ref3$numberingSystem === void 0 ? null : _ref3$numberingSystem; - - return Locale.create(locale, numberingSystem, null).weekdays(length); - } - /** - * Return an array of format week names. - * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that - * changes the string. - * See {@link weekdays} - * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". - * @param {Object} opts - options - * @param {string} [opts.locale=null] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @return {[string]} - */ - ; - - Info.weekdaysFormat = function weekdaysFormat(length, _temp4) { - if (length === void 0) { - length = "long"; - } - - var _ref4 = _temp4 === void 0 ? {} : _temp4, - _ref4$locale = _ref4.locale, - locale = _ref4$locale === void 0 ? null : _ref4$locale, - _ref4$numberingSystem = _ref4.numberingSystem, - numberingSystem = _ref4$numberingSystem === void 0 ? null : _ref4$numberingSystem; - - return Locale.create(locale, numberingSystem, null).weekdays(length, true); - } - /** - * Return an array of meridiems. - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @example Info.meridiems() //=> [ 'AM', 'PM' ] - * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ] - * @return {[string]} - */ - ; - - Info.meridiems = function meridiems(_temp5) { - var _ref5 = _temp5 === void 0 ? {} : _temp5, - _ref5$locale = _ref5.locale, - locale = _ref5$locale === void 0 ? null : _ref5$locale; - - return Locale.create(locale).meridiems(); - } - /** - * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian. - * @param {string} [length='short'] - the length of the era representation, such as "short" or "long". - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @example Info.eras() //=> [ 'BC', 'AD' ] - * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ] - * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ] - * @return {[string]} - */ - ; - - Info.eras = function eras(length, _temp6) { - if (length === void 0) { - length = "short"; - } - - var _ref6 = _temp6 === void 0 ? {} : _temp6, - _ref6$locale = _ref6.locale, - locale = _ref6$locale === void 0 ? null : _ref6$locale; - - return Locale.create(locale, null, "gregory").eras(length); - } - /** - * Return the set of available features in this environment. - * Some features of Luxon are not available in all environments. For example, on older browsers, timezone support is not available. Use this function to figure out if that's the case. - * Keys: - * * `zones`: whether this environment supports IANA timezones - * * `intlTokens`: whether this environment supports internationalized token-based formatting/parsing - * * `intl`: whether this environment supports general internationalization - * * `relative`: whether this environment supports relative time formatting - * @example Info.features() //=> { intl: true, intlTokens: false, zones: true, relative: false } - * @return {Object} - */ - ; - - Info.features = function features() { - var intl = false, - intlTokens = false, - zones = false, - relative = false; - - if (hasIntl()) { - intl = true; - intlTokens = hasFormatToParts(); - relative = hasRelative(); - - try { - zones = new Intl.DateTimeFormat("en", { - timeZone: "America/New_York" - }).resolvedOptions().timeZone === "America/New_York"; - } catch (e) { - zones = false; - } - } - - return { - intl: intl, - intlTokens: intlTokens, - zones: zones, - relative: relative - }; - }; - - return Info; - }(); - - function dayDiff(earlier, later) { - var utcDayStart = function utcDayStart(dt) { - return dt.toUTC(0, { - keepLocalTime: true - }).startOf("day").valueOf(); - }, - ms = utcDayStart(later) - utcDayStart(earlier); - - return Math.floor(Duration.fromMillis(ms).as("days")); - } - - function highOrderDiffs(cursor, later, units) { - var differs = [["years", function (a, b) { - return b.year - a.year; - }], ["months", function (a, b) { - return b.month - a.month + (b.year - a.year) * 12; - }], ["weeks", function (a, b) { - var days = dayDiff(a, b); - return (days - days % 7) / 7; - }], ["days", dayDiff]]; - var results = {}; - var lowestOrder, highWater; - - for (var _i = 0, _differs = differs; _i < _differs.length; _i++) { - var _differs$_i = _differs[_i], - unit = _differs$_i[0], - differ = _differs$_i[1]; - - if (units.indexOf(unit) >= 0) { - var _cursor$plus; - - lowestOrder = unit; - var delta = differ(cursor, later); - highWater = cursor.plus((_cursor$plus = {}, _cursor$plus[unit] = delta, _cursor$plus)); - - if (highWater > later) { - var _cursor$plus2; - - cursor = cursor.plus((_cursor$plus2 = {}, _cursor$plus2[unit] = delta - 1, _cursor$plus2)); - delta -= 1; - } else { - cursor = highWater; - } - - results[unit] = delta; - } - } - - return [cursor, results, highWater, lowestOrder]; - } - - function _diff (earlier, later, units, opts) { - var _highOrderDiffs = highOrderDiffs(earlier, later, units), - cursor = _highOrderDiffs[0], - results = _highOrderDiffs[1], - highWater = _highOrderDiffs[2], - lowestOrder = _highOrderDiffs[3]; - - var remainingMillis = later - cursor; - var lowerOrderUnits = units.filter(function (u) { - return ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0; - }); - - if (lowerOrderUnits.length === 0) { - if (highWater < later) { - var _cursor$plus3; - - highWater = cursor.plus((_cursor$plus3 = {}, _cursor$plus3[lowestOrder] = 1, _cursor$plus3)); - } - - if (highWater !== cursor) { - results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor); - } - } - - var duration = Duration.fromObject(Object.assign(results, opts)); - - if (lowerOrderUnits.length > 0) { - var _Duration$fromMillis; - - return (_Duration$fromMillis = Duration.fromMillis(remainingMillis, opts)).shiftTo.apply(_Duration$fromMillis, lowerOrderUnits).plus(duration); - } else { - return duration; - } - } - - var numberingSystems = { - arab: "[\u0660-\u0669]", - arabext: "[\u06F0-\u06F9]", - bali: "[\u1B50-\u1B59]", - beng: "[\u09E6-\u09EF]", - deva: "[\u0966-\u096F]", - fullwide: "[\uFF10-\uFF19]", - gujr: "[\u0AE6-\u0AEF]", - hanidec: "[〇|一|二|三|四|五|六|七|八|九]", - khmr: "[\u17E0-\u17E9]", - knda: "[\u0CE6-\u0CEF]", - laoo: "[\u0ED0-\u0ED9]", - limb: "[\u1946-\u194F]", - mlym: "[\u0D66-\u0D6F]", - mong: "[\u1810-\u1819]", - mymr: "[\u1040-\u1049]", - orya: "[\u0B66-\u0B6F]", - tamldec: "[\u0BE6-\u0BEF]", - telu: "[\u0C66-\u0C6F]", - thai: "[\u0E50-\u0E59]", - tibt: "[\u0F20-\u0F29]", - latn: "\\d" - }; - var numberingSystemsUTF16 = { - arab: [1632, 1641], - arabext: [1776, 1785], - bali: [6992, 7001], - beng: [2534, 2543], - deva: [2406, 2415], - fullwide: [65296, 65303], - gujr: [2790, 2799], - khmr: [6112, 6121], - knda: [3302, 3311], - laoo: [3792, 3801], - limb: [6470, 6479], - mlym: [3430, 3439], - mong: [6160, 6169], - mymr: [4160, 4169], - orya: [2918, 2927], - tamldec: [3046, 3055], - telu: [3174, 3183], - thai: [3664, 3673], - tibt: [3872, 3881] - }; // eslint-disable-next-line - - var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split(""); - function parseDigits(str) { - var value = parseInt(str, 10); - - if (isNaN(value)) { - value = ""; - - for (var i = 0; i < str.length; i++) { - var code = str.charCodeAt(i); - - if (str[i].search(numberingSystems.hanidec) !== -1) { - value += hanidecChars.indexOf(str[i]); - } else { - for (var key in numberingSystemsUTF16) { - var _numberingSystemsUTF = numberingSystemsUTF16[key], - min = _numberingSystemsUTF[0], - max = _numberingSystemsUTF[1]; - - if (code >= min && code <= max) { - value += code - min; - } - } - } - } - - return parseInt(value, 10); - } else { - return value; - } - } - function digitRegex(_ref, append) { - var numberingSystem = _ref.numberingSystem; - - if (append === void 0) { - append = ""; - } - - return new RegExp("" + numberingSystems[numberingSystem || "latn"] + append); - } - - var MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support"; - - function intUnit(regex, post) { - if (post === void 0) { - post = function post(i) { - return i; - }; - } - - return { - regex: regex, - deser: function deser(_ref) { - var s = _ref[0]; - return post(parseDigits(s)); - } - }; - } - - var NBSP = String.fromCharCode(160); - var spaceOrNBSP = "( |" + NBSP + ")"; - var spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g"); - - function fixListRegex(s) { - // make dots optional and also make them literal - // make space and non breakable space characters interchangeable - return s.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP); - } - - function stripInsensitivities(s) { - return s.replace(/\./g, "") // ignore dots that were made optional - .replace(spaceOrNBSPRegExp, " ") // interchange space and nbsp - .toLowerCase(); - } - - function oneOf(strings, startIndex) { - if (strings === null) { - return null; - } else { - return { - regex: RegExp(strings.map(fixListRegex).join("|")), - deser: function deser(_ref2) { - var s = _ref2[0]; - return strings.findIndex(function (i) { - return stripInsensitivities(s) === stripInsensitivities(i); - }) + startIndex; - } - }; - } - } - - function offset(regex, groups) { - return { - regex: regex, - deser: function deser(_ref3) { - var h = _ref3[1], - m = _ref3[2]; - return signedOffset(h, m); - }, - groups: groups - }; - } - - function simple(regex) { - return { - regex: regex, - deser: function deser(_ref4) { - var s = _ref4[0]; - return s; - } - }; - } - - function escapeToken(value) { - // eslint-disable-next-line no-useless-escape - return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); - } - - function unitForToken(token, loc) { - var one = digitRegex(loc), - two = digitRegex(loc, "{2}"), - three = digitRegex(loc, "{3}"), - four = digitRegex(loc, "{4}"), - six = digitRegex(loc, "{6}"), - oneOrTwo = digitRegex(loc, "{1,2}"), - oneToThree = digitRegex(loc, "{1,3}"), - oneToSix = digitRegex(loc, "{1,6}"), - oneToNine = digitRegex(loc, "{1,9}"), - twoToFour = digitRegex(loc, "{2,4}"), - fourToSix = digitRegex(loc, "{4,6}"), - literal = function literal(t) { - return { - regex: RegExp(escapeToken(t.val)), - deser: function deser(_ref5) { - var s = _ref5[0]; - return s; - }, - literal: true - }; - }, - unitate = function unitate(t) { - if (token.literal) { - return literal(t); - } - - switch (t.val) { - // era - case "G": - return oneOf(loc.eras("short", false), 0); - - case "GG": - return oneOf(loc.eras("long", false), 0); - // years - - case "y": - return intUnit(oneToSix); - - case "yy": - return intUnit(twoToFour, untruncateYear); - - case "yyyy": - return intUnit(four); - - case "yyyyy": - return intUnit(fourToSix); - - case "yyyyyy": - return intUnit(six); - // months - - case "M": - return intUnit(oneOrTwo); - - case "MM": - return intUnit(two); - - case "MMM": - return oneOf(loc.months("short", true, false), 1); - - case "MMMM": - return oneOf(loc.months("long", true, false), 1); - - case "L": - return intUnit(oneOrTwo); - - case "LL": - return intUnit(two); - - case "LLL": - return oneOf(loc.months("short", false, false), 1); - - case "LLLL": - return oneOf(loc.months("long", false, false), 1); - // dates - - case "d": - return intUnit(oneOrTwo); - - case "dd": - return intUnit(two); - // ordinals - - case "o": - return intUnit(oneToThree); - - case "ooo": - return intUnit(three); - // time - - case "HH": - return intUnit(two); - - case "H": - return intUnit(oneOrTwo); - - case "hh": - return intUnit(two); - - case "h": - return intUnit(oneOrTwo); - - case "mm": - return intUnit(two); - - case "m": - return intUnit(oneOrTwo); - - case "q": - return intUnit(oneOrTwo); - - case "qq": - return intUnit(two); - - case "s": - return intUnit(oneOrTwo); - - case "ss": - return intUnit(two); - - case "S": - return intUnit(oneToThree); - - case "SSS": - return intUnit(three); - - case "u": - return simple(oneToNine); - // meridiem - - case "a": - return oneOf(loc.meridiems(), 0); - // weekYear (k) - - case "kkkk": - return intUnit(four); - - case "kk": - return intUnit(twoToFour, untruncateYear); - // weekNumber (W) - - case "W": - return intUnit(oneOrTwo); - - case "WW": - return intUnit(two); - // weekdays - - case "E": - case "c": - return intUnit(one); - - case "EEE": - return oneOf(loc.weekdays("short", false, false), 1); - - case "EEEE": - return oneOf(loc.weekdays("long", false, false), 1); - - case "ccc": - return oneOf(loc.weekdays("short", true, false), 1); - - case "cccc": - return oneOf(loc.weekdays("long", true, false), 1); - // offset/zone - - case "Z": - case "ZZ": - return offset(new RegExp("([+-]" + oneOrTwo.source + ")(?::(" + two.source + "))?"), 2); - - case "ZZZ": - return offset(new RegExp("([+-]" + oneOrTwo.source + ")(" + two.source + ")?"), 2); - // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing - // because we don't have any way to figure out what they are - - case "z": - return simple(/[a-z_+-/]{1,256}?/i); - - default: - return literal(t); - } - }; - - var unit = unitate(token) || { - invalidReason: MISSING_FTP - }; - unit.token = token; - return unit; - } - - var partTypeStyleToTokenVal = { - year: { - "2-digit": "yy", - numeric: "yyyyy" - }, - month: { - numeric: "M", - "2-digit": "MM", - short: "MMM", - long: "MMMM" - }, - day: { - numeric: "d", - "2-digit": "dd" - }, - weekday: { - short: "EEE", - long: "EEEE" - }, - dayperiod: "a", - dayPeriod: "a", - hour: { - numeric: "h", - "2-digit": "hh" - }, - minute: { - numeric: "m", - "2-digit": "mm" - }, - second: { - numeric: "s", - "2-digit": "ss" - } - }; - - function tokenForPart(part, locale, formatOpts) { - var type = part.type, - value = part.value; - - if (type === "literal") { - return { - literal: true, - val: value - }; - } - - var style = formatOpts[type]; - var val = partTypeStyleToTokenVal[type]; - - if (typeof val === "object") { - val = val[style]; - } - - if (val) { - return { - literal: false, - val: val - }; - } - - return undefined; - } - - function buildRegex(units) { - var re = units.map(function (u) { - return u.regex; - }).reduce(function (f, r) { - return f + "(" + r.source + ")"; - }, ""); - return ["^" + re + "$", units]; - } - - function match(input, regex, handlers) { - var matches = input.match(regex); - - if (matches) { - var all = {}; - var matchIndex = 1; - - for (var i in handlers) { - if (hasOwnProperty(handlers, i)) { - var h = handlers[i], - groups = h.groups ? h.groups + 1 : 1; - - if (!h.literal && h.token) { - all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups)); - } - - matchIndex += groups; - } - } - - return [matches, all]; - } else { - return [matches, {}]; - } - } - - function dateTimeFromMatches(matches) { - var toField = function toField(token) { - switch (token) { - case "S": - return "millisecond"; - - case "s": - return "second"; - - case "m": - return "minute"; - - case "h": - case "H": - return "hour"; - - case "d": - return "day"; - - case "o": - return "ordinal"; - - case "L": - case "M": - return "month"; - - case "y": - return "year"; - - case "E": - case "c": - return "weekday"; - - case "W": - return "weekNumber"; - - case "k": - return "weekYear"; - - case "q": - return "quarter"; - - default: - return null; - } - }; - - var zone; - - if (!isUndefined(matches.Z)) { - zone = new FixedOffsetZone(matches.Z); - } else if (!isUndefined(matches.z)) { - zone = IANAZone.create(matches.z); - } else { - zone = null; - } - - if (!isUndefined(matches.q)) { - matches.M = (matches.q - 1) * 3 + 1; - } - - if (!isUndefined(matches.h)) { - if (matches.h < 12 && matches.a === 1) { - matches.h += 12; - } else if (matches.h === 12 && matches.a === 0) { - matches.h = 0; - } - } - - if (matches.G === 0 && matches.y) { - matches.y = -matches.y; - } - - if (!isUndefined(matches.u)) { - matches.S = parseMillis(matches.u); - } - - var vals = Object.keys(matches).reduce(function (r, k) { - var f = toField(k); - - if (f) { - r[f] = matches[k]; - } - - return r; - }, {}); - return [vals, zone]; - } - - var dummyDateTimeCache = null; - - function getDummyDateTime() { - if (!dummyDateTimeCache) { - dummyDateTimeCache = DateTime.fromMillis(1555555555555); - } - - return dummyDateTimeCache; - } - - function maybeExpandMacroToken(token, locale) { - if (token.literal) { - return token; - } - - var formatOpts = Formatter.macroTokenToFormatOpts(token.val); - - if (!formatOpts) { - return token; - } - - var formatter = Formatter.create(locale, formatOpts); - var parts = formatter.formatDateTimeParts(getDummyDateTime()); - var tokens = parts.map(function (p) { - return tokenForPart(p, locale, formatOpts); - }); - - if (tokens.includes(undefined)) { - return token; - } - - return tokens; - } - - function expandMacroTokens(tokens, locale) { - var _Array$prototype; - - return (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, tokens.map(function (t) { - return maybeExpandMacroToken(t, locale); - })); - } - /** - * @private - */ - - - function explainFromTokens(locale, input, format) { - var tokens = expandMacroTokens(Formatter.parseFormat(format), locale), - units = tokens.map(function (t) { - return unitForToken(t, locale); - }), - disqualifyingUnit = units.find(function (t) { - return t.invalidReason; - }); - - if (disqualifyingUnit) { - return { - input: input, - tokens: tokens, - invalidReason: disqualifyingUnit.invalidReason - }; - } else { - var _buildRegex = buildRegex(units), - regexString = _buildRegex[0], - handlers = _buildRegex[1], - regex = RegExp(regexString, "i"), - _match = match(input, regex, handlers), - rawMatches = _match[0], - matches = _match[1], - _ref6 = matches ? dateTimeFromMatches(matches) : [null, null], - result = _ref6[0], - zone = _ref6[1]; - - if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) { - throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format"); - } - - return { - input: input, - tokens: tokens, - regex: regex, - rawMatches: rawMatches, - matches: matches, - result: result, - zone: zone - }; - } - } - function parseFromTokens(locale, input, format) { - var _explainFromTokens = explainFromTokens(locale, input, format), - result = _explainFromTokens.result, - zone = _explainFromTokens.zone, - invalidReason = _explainFromTokens.invalidReason; - - return [result, zone, invalidReason]; - } - - var nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], - leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; - - function unitOutOfRange(unit, value) { - return new Invalid("unit out of range", "you specified " + value + " (of type " + typeof value + ") as a " + unit + ", which is invalid"); - } - - function dayOfWeek(year, month, day) { - var js = new Date(Date.UTC(year, month - 1, day)).getUTCDay(); - return js === 0 ? 7 : js; - } - - function computeOrdinal(year, month, day) { - return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1]; - } - - function uncomputeOrdinal(year, ordinal) { - var table = isLeapYear(year) ? leapLadder : nonLeapLadder, - month0 = table.findIndex(function (i) { - return i < ordinal; - }), - day = ordinal - table[month0]; - return { - month: month0 + 1, - day: day - }; - } - /** - * @private - */ - - - function gregorianToWeek(gregObj) { - var year = gregObj.year, - month = gregObj.month, - day = gregObj.day, - ordinal = computeOrdinal(year, month, day), - weekday = dayOfWeek(year, month, day); - var weekNumber = Math.floor((ordinal - weekday + 10) / 7), - weekYear; - - if (weekNumber < 1) { - weekYear = year - 1; - weekNumber = weeksInWeekYear(weekYear); - } else if (weekNumber > weeksInWeekYear(year)) { - weekYear = year + 1; - weekNumber = 1; - } else { - weekYear = year; - } - - return Object.assign({ - weekYear: weekYear, - weekNumber: weekNumber, - weekday: weekday - }, timeObject(gregObj)); - } - function weekToGregorian(weekData) { - var weekYear = weekData.weekYear, - weekNumber = weekData.weekNumber, - weekday = weekData.weekday, - weekdayOfJan4 = dayOfWeek(weekYear, 1, 4), - yearInDays = daysInYear(weekYear); - var ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3, - year; - - if (ordinal < 1) { - year = weekYear - 1; - ordinal += daysInYear(year); - } else if (ordinal > yearInDays) { - year = weekYear + 1; - ordinal -= daysInYear(weekYear); - } else { - year = weekYear; - } - - var _uncomputeOrdinal = uncomputeOrdinal(year, ordinal), - month = _uncomputeOrdinal.month, - day = _uncomputeOrdinal.day; - - return Object.assign({ - year: year, - month: month, - day: day - }, timeObject(weekData)); - } - function gregorianToOrdinal(gregData) { - var year = gregData.year, - month = gregData.month, - day = gregData.day, - ordinal = computeOrdinal(year, month, day); - return Object.assign({ - year: year, - ordinal: ordinal - }, timeObject(gregData)); - } - function ordinalToGregorian(ordinalData) { - var year = ordinalData.year, - ordinal = ordinalData.ordinal, - _uncomputeOrdinal2 = uncomputeOrdinal(year, ordinal), - month = _uncomputeOrdinal2.month, - day = _uncomputeOrdinal2.day; - - return Object.assign({ - year: year, - month: month, - day: day - }, timeObject(ordinalData)); - } - function hasInvalidWeekData(obj) { - var validYear = isInteger(obj.weekYear), - validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear)), - validWeekday = integerBetween(obj.weekday, 1, 7); - - if (!validYear) { - return unitOutOfRange("weekYear", obj.weekYear); - } else if (!validWeek) { - return unitOutOfRange("week", obj.week); - } else if (!validWeekday) { - return unitOutOfRange("weekday", obj.weekday); - } else return false; - } - function hasInvalidOrdinalData(obj) { - var validYear = isInteger(obj.year), - validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year)); - - if (!validYear) { - return unitOutOfRange("year", obj.year); - } else if (!validOrdinal) { - return unitOutOfRange("ordinal", obj.ordinal); - } else return false; - } - function hasInvalidGregorianData(obj) { - var validYear = isInteger(obj.year), - validMonth = integerBetween(obj.month, 1, 12), - validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month)); - - if (!validYear) { - return unitOutOfRange("year", obj.year); - } else if (!validMonth) { - return unitOutOfRange("month", obj.month); - } else if (!validDay) { - return unitOutOfRange("day", obj.day); - } else return false; - } - function hasInvalidTimeData(obj) { - var hour = obj.hour, - minute = obj.minute, - second = obj.second, - millisecond = obj.millisecond; - var validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, - validMinute = integerBetween(minute, 0, 59), - validSecond = integerBetween(second, 0, 59), - validMillisecond = integerBetween(millisecond, 0, 999); - - if (!validHour) { - return unitOutOfRange("hour", hour); - } else if (!validMinute) { - return unitOutOfRange("minute", minute); - } else if (!validSecond) { - return unitOutOfRange("second", second); - } else if (!validMillisecond) { - return unitOutOfRange("millisecond", millisecond); - } else return false; - } - - var INVALID$2 = "Invalid DateTime"; - var MAX_DATE = 8.64e15; - - function unsupportedZone(zone) { - return new Invalid("unsupported zone", "the zone \"" + zone.name + "\" is not supported"); - } // we cache week data on the DT object and this intermediates the cache - - - function possiblyCachedWeekData(dt) { - if (dt.weekData === null) { - dt.weekData = gregorianToWeek(dt.c); - } - - return dt.weekData; - } // clone really means, "make a new object with these modifications". all "setters" really use this - // to create a new object while only changing some of the properties - - - function clone$1(inst, alts) { - var current = { - ts: inst.ts, - zone: inst.zone, - c: inst.c, - o: inst.o, - loc: inst.loc, - invalid: inst.invalid - }; - return new DateTime(Object.assign({}, current, alts, { - old: current - })); - } // find the right offset a given local time. The o input is our guess, which determines which - // offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST) - - - function fixOffset(localTS, o, tz) { - // Our UTC time is just a guess because our offset is just a guess - var utcGuess = localTS - o * 60 * 1000; // Test whether the zone matches the offset for this ts - - var o2 = tz.offset(utcGuess); // If so, offset didn't change and we're done - - if (o === o2) { - return [utcGuess, o]; - } // If not, change the ts by the difference in the offset - - - utcGuess -= (o2 - o) * 60 * 1000; // If that gives us the local time we want, we're done - - var o3 = tz.offset(utcGuess); - - if (o2 === o3) { - return [utcGuess, o2]; - } // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time - - - return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)]; - } // convert an epoch timestamp into a calendar object with the given offset - - - function tsToObj(ts, offset) { - ts += offset * 60 * 1000; - var d = new Date(ts); - return { - year: d.getUTCFullYear(), - month: d.getUTCMonth() + 1, - day: d.getUTCDate(), - hour: d.getUTCHours(), - minute: d.getUTCMinutes(), - second: d.getUTCSeconds(), - millisecond: d.getUTCMilliseconds() - }; - } // convert a calendar object to a epoch timestamp - - - function objToTS(obj, offset, zone) { - return fixOffset(objToLocalTS(obj), offset, zone); - } // create a new DT instance by adding a duration, adjusting for DSTs - - - function adjustTime(inst, dur) { - var oPre = inst.o, - year = inst.c.year + Math.trunc(dur.years), - month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, - c = Object.assign({}, inst.c, { - year: year, - month: month, - day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7 - }), - millisToAdd = Duration.fromObject({ - years: dur.years - Math.trunc(dur.years), - quarters: dur.quarters - Math.trunc(dur.quarters), - months: dur.months - Math.trunc(dur.months), - weeks: dur.weeks - Math.trunc(dur.weeks), - days: dur.days - Math.trunc(dur.days), - hours: dur.hours, - minutes: dur.minutes, - seconds: dur.seconds, - milliseconds: dur.milliseconds - }).as("milliseconds"), - localTS = objToLocalTS(c); - - var _fixOffset = fixOffset(localTS, oPre, inst.zone), - ts = _fixOffset[0], - o = _fixOffset[1]; - - if (millisToAdd !== 0) { - ts += millisToAdd; // that could have changed the offset by going over a DST, but we want to keep the ts the same - - o = inst.zone.offset(ts); - } - - return { - ts: ts, - o: o - }; - } // helper useful in turning the results of parsing into real dates - // by handling the zone options - - - function parseDataToDateTime(parsed, parsedZone, opts, format, text) { - var setZone = opts.setZone, - zone = opts.zone; - - if (parsed && Object.keys(parsed).length !== 0) { - var interpretationZone = parsedZone || zone, - inst = DateTime.fromObject(Object.assign(parsed, opts, { - zone: interpretationZone, - // setZone is a valid option in the calling methods, but not in fromObject - setZone: undefined - })); - return setZone ? inst : inst.setZone(zone); - } else { - return DateTime.invalid(new Invalid("unparsable", "the input \"" + text + "\" can't be parsed as " + format)); - } - } // if you want to output a technical format (e.g. RFC 2822), this helper - // helps handle the details - - - function toTechFormat(dt, format, allowZ) { - if (allowZ === void 0) { - allowZ = true; - } - - return dt.isValid ? Formatter.create(Locale.create("en-US"), { - allowZ: allowZ, - forceSimple: true - }).formatDateTimeFromString(dt, format) : null; - } // technical time formats (e.g. the time part of ISO 8601), take some options - // and this commonizes their handling - - - function toTechTimeFormat(dt, _ref) { - var _ref$suppressSeconds = _ref.suppressSeconds, - suppressSeconds = _ref$suppressSeconds === void 0 ? false : _ref$suppressSeconds, - _ref$suppressMillisec = _ref.suppressMilliseconds, - suppressMilliseconds = _ref$suppressMillisec === void 0 ? false : _ref$suppressMillisec, - includeOffset = _ref.includeOffset, - _ref$includeZone = _ref.includeZone, - includeZone = _ref$includeZone === void 0 ? false : _ref$includeZone, - _ref$spaceZone = _ref.spaceZone, - spaceZone = _ref$spaceZone === void 0 ? false : _ref$spaceZone, - _ref$format = _ref.format, - format = _ref$format === void 0 ? "extended" : _ref$format; - var fmt = format === "basic" ? "HHmm" : "HH:mm"; - - if (!suppressSeconds || dt.second !== 0 || dt.millisecond !== 0) { - fmt += format === "basic" ? "ss" : ":ss"; - - if (!suppressMilliseconds || dt.millisecond !== 0) { - fmt += ".SSS"; - } - } - - if ((includeZone || includeOffset) && spaceZone) { - fmt += " "; - } - - if (includeZone) { - fmt += "z"; - } else if (includeOffset) { - fmt += format === "basic" ? "ZZZ" : "ZZ"; - } - - return toTechFormat(dt, fmt); - } // defaults for unspecified units in the supported calendars - - - var defaultUnitValues = { - month: 1, - day: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 - }, - defaultWeekUnitValues = { - weekNumber: 1, - weekday: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 - }, - defaultOrdinalUnitValues = { - ordinal: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 - }; // Units in the supported calendars, sorted by bigness - - var orderedUnits$1 = ["year", "month", "day", "hour", "minute", "second", "millisecond"], - orderedWeekUnits = ["weekYear", "weekNumber", "weekday", "hour", "minute", "second", "millisecond"], - orderedOrdinalUnits = ["year", "ordinal", "hour", "minute", "second", "millisecond"]; // standardize case and plurality in units - - function normalizeUnit(unit) { - var normalized = { - year: "year", - years: "year", - month: "month", - months: "month", - day: "day", - days: "day", - hour: "hour", - hours: "hour", - minute: "minute", - minutes: "minute", - quarter: "quarter", - quarters: "quarter", - second: "second", - seconds: "second", - millisecond: "millisecond", - milliseconds: "millisecond", - weekday: "weekday", - weekdays: "weekday", - weeknumber: "weekNumber", - weeksnumber: "weekNumber", - weeknumbers: "weekNumber", - weekyear: "weekYear", - weekyears: "weekYear", - ordinal: "ordinal" - }[unit.toLowerCase()]; - if (!normalized) throw new InvalidUnitError(unit); - return normalized; - } // this is a dumbed down version of fromObject() that runs about 60% faster - // but doesn't do any validation, makes a bunch of assumptions about what units - // are present, and so on. - - - function quickDT(obj, zone) { - // assume we have the higher-order units - for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits$1), _step; !(_step = _iterator()).done;) { - var u = _step.value; - - if (isUndefined(obj[u])) { - obj[u] = defaultUnitValues[u]; - } - } - - var invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj); - - if (invalid) { - return DateTime.invalid(invalid); - } - - var tsNow = Settings.now(), - offsetProvis = zone.offset(tsNow), - _objToTS = objToTS(obj, offsetProvis, zone), - ts = _objToTS[0], - o = _objToTS[1]; - - return new DateTime({ - ts: ts, - zone: zone, - o: o - }); - } - - function diffRelative(start, end, opts) { - var round = isUndefined(opts.round) ? true : opts.round, - format = function format(c, unit) { - c = roundTo(c, round || opts.calendary ? 0 : 2, true); - var formatter = end.loc.clone(opts).relFormatter(opts); - return formatter.format(c, unit); - }, - differ = function differ(unit) { - if (opts.calendary) { - if (!end.hasSame(start, unit)) { - return end.startOf(unit).diff(start.startOf(unit), unit).get(unit); - } else return 0; - } else { - return end.diff(start, unit).get(unit); - } - }; - - if (opts.unit) { - return format(differ(opts.unit), opts.unit); - } - - for (var _iterator2 = _createForOfIteratorHelperLoose(opts.units), _step2; !(_step2 = _iterator2()).done;) { - var unit = _step2.value; - var count = differ(unit); - - if (Math.abs(count) >= 1) { - return format(count, unit); - } - } - - return format(0, opts.units[opts.units.length - 1]); - } - /** - * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them. - * - * A DateTime comprises of: - * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch. - * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone). - * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`. - * - * Here is a brief overview of the most commonly used functionality it provides: - * - * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link local}, {@link utc}, and (most flexibly) {@link fromObject}. To create one from a standard string format, use {@link fromISO}, {@link fromHTTP}, and {@link fromRFC2822}. To create one from a custom string format, use {@link fromFormat}. To create one from a native JS date, use {@link fromJSDate}. - * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link toObject}), use the {@link year}, {@link month}, - * {@link day}, {@link hour}, {@link minute}, {@link second}, {@link millisecond} accessors. - * * **Week calendar**: For ISO week calendar attributes, see the {@link weekYear}, {@link weekNumber}, and {@link weekday} accessors. - * * **Configuration** See the {@link locale} and {@link numberingSystem} accessors. - * * **Transformation**: To transform the DateTime into other DateTimes, use {@link set}, {@link reconfigure}, {@link setZone}, {@link setLocale}, {@link plus}, {@link minus}, {@link endOf}, {@link startOf}, {@link toUTC}, and {@link toLocal}. - * * **Output**: To convert the DateTime to other representations, use the {@link toRelative}, {@link toRelativeCalendar}, {@link toJSON}, {@link toISO}, {@link toHTTP}, {@link toObject}, {@link toRFC2822}, {@link toString}, {@link toLocaleString}, {@link toFormat}, {@link toMillis} and {@link toJSDate}. - * - * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation. - */ - - - var DateTime = /*#__PURE__*/function () { - /** - * @access private - */ - function DateTime(config) { - var zone = config.zone || Settings.defaultZone; - var invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null); - /** - * @access private - */ - - this.ts = isUndefined(config.ts) ? Settings.now() : config.ts; - var c = null, - o = null; - - if (!invalid) { - var unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone); - - if (unchanged) { - var _ref2 = [config.old.c, config.old.o]; - c = _ref2[0]; - o = _ref2[1]; - } else { - var ot = zone.offset(this.ts); - c = tsToObj(this.ts, ot); - invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null; - c = invalid ? null : c; - o = invalid ? null : ot; - } - } - /** - * @access private - */ - - - this._zone = zone; - /** - * @access private - */ - - this.loc = config.loc || Locale.create(); - /** - * @access private - */ - - this.invalid = invalid; - /** - * @access private - */ - - this.weekData = null; - /** - * @access private - */ - - this.c = c; - /** - * @access private - */ - - this.o = o; - /** - * @access private - */ - - this.isLuxonDateTime = true; - } // CONSTRUCT - - /** - * Create a local DateTime - * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used - * @param {number} [month=1] - The month, 1-indexed - * @param {number} [day=1] - The day of the month - * @param {number} [hour=0] - The hour of the day, in 24-hour time - * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 - * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 - * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 - * @example DateTime.local() //~> now - * @example DateTime.local(2017) //~> 2017-01-01T00:00:00 - * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00 - * @example DateTime.local(2017, 3, 12) //~> 2017-03-12T00:00:00 - * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00 - * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00 - * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10 - * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765 - * @return {DateTime} - */ - - - DateTime.local = function local(year, month, day, hour, minute, second, millisecond) { - if (isUndefined(year)) { - return new DateTime({ - ts: Settings.now() - }); - } else { - return quickDT({ - year: year, - month: month, - day: day, - hour: hour, - minute: minute, - second: second, - millisecond: millisecond - }, Settings.defaultZone); - } - } - /** - * Create a DateTime in UTC - * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used - * @param {number} [month=1] - The month, 1-indexed - * @param {number} [day=1] - The day of the month - * @param {number} [hour=0] - The hour of the day, in 24-hour time - * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 - * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 - * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 - * @example DateTime.utc() //~> now - * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z - * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z - * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z - * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z - * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z - * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z - * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765Z - * @return {DateTime} - */ - ; - - DateTime.utc = function utc(year, month, day, hour, minute, second, millisecond) { - if (isUndefined(year)) { - return new DateTime({ - ts: Settings.now(), - zone: FixedOffsetZone.utcInstance - }); - } else { - return quickDT({ - year: year, - month: month, - day: day, - hour: hour, - minute: minute, - second: second, - millisecond: millisecond - }, FixedOffsetZone.utcInstance); - } - } - /** - * Create a DateTime from a Javascript Date object. Uses the default zone. - * @param {Date} date - a Javascript Date object - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @return {DateTime} - */ - ; - - DateTime.fromJSDate = function fromJSDate(date, options) { - if (options === void 0) { - options = {}; - } - - var ts = isDate(date) ? date.valueOf() : NaN; - - if (Number.isNaN(ts)) { - return DateTime.invalid("invalid input"); - } - - var zoneToUse = normalizeZone(options.zone, Settings.defaultZone); - - if (!zoneToUse.isValid) { - return DateTime.invalid(unsupportedZone(zoneToUse)); - } - - return new DateTime({ - ts: ts, - zone: zoneToUse, - loc: Locale.fromObject(options) - }); - } - /** - * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. - * @param {number} milliseconds - a number of milliseconds since 1970 UTC - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance - * @return {DateTime} - */ - ; - - DateTime.fromMillis = function fromMillis(milliseconds, options) { - if (options === void 0) { - options = {}; - } - - if (!isNumber(milliseconds)) { - throw new InvalidArgumentError("fromMillis requires a numerical input, but received a " + typeof milliseconds + " with value " + milliseconds); - } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) { - // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start - return DateTime.invalid("Timestamp out of range"); - } else { - return new DateTime({ - ts: milliseconds, - zone: normalizeZone(options.zone, Settings.defaultZone), - loc: Locale.fromObject(options) - }); - } - } - /** - * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. - * @param {number} seconds - a number of seconds since 1970 UTC - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance - * @return {DateTime} - */ - ; - - DateTime.fromSeconds = function fromSeconds(seconds, options) { - if (options === void 0) { - options = {}; - } - - if (!isNumber(seconds)) { - throw new InvalidArgumentError("fromSeconds requires a numerical input"); - } else { - return new DateTime({ - ts: seconds * 1000, - zone: normalizeZone(options.zone, Settings.defaultZone), - loc: Locale.fromObject(options) - }); - } - } - /** - * Create a DateTime from a Javascript object with keys like 'year' and 'hour' with reasonable defaults. - * @param {Object} obj - the object to create the DateTime from - * @param {number} obj.year - a year, such as 1987 - * @param {number} obj.month - a month, 1-12 - * @param {number} obj.day - a day of the month, 1-31, depending on the month - * @param {number} obj.ordinal - day of the year, 1-365 or 366 - * @param {number} obj.weekYear - an ISO week year - * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year - * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday - * @param {number} obj.hour - hour of the day, 0-23 - * @param {number} obj.minute - minute of the hour, 0-59 - * @param {number} obj.second - second of the minute, 0-59 - * @param {number} obj.millisecond - millisecond of the second, 0-999 - * @param {string|Zone} [obj.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone() - * @param {string} [obj.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} obj.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} obj.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25' - * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01' - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06 - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'utc' }), - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'local' }) - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'America/New_York' }) - * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13' - * @return {DateTime} - */ - ; - - DateTime.fromObject = function fromObject(obj) { - var zoneToUse = normalizeZone(obj.zone, Settings.defaultZone); - - if (!zoneToUse.isValid) { - return DateTime.invalid(unsupportedZone(zoneToUse)); - } - - var tsNow = Settings.now(), - offsetProvis = zoneToUse.offset(tsNow), - normalized = normalizeObject(obj, normalizeUnit, ["zone", "locale", "outputCalendar", "numberingSystem"]), - containsOrdinal = !isUndefined(normalized.ordinal), - containsGregorYear = !isUndefined(normalized.year), - containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), - containsGregor = containsGregorYear || containsGregorMD, - definiteWeekDef = normalized.weekYear || normalized.weekNumber, - loc = Locale.fromObject(obj); // cases: - // just a weekday -> this week's instance of that weekday, no worries - // (gregorian data or ordinal) + (weekYear or weekNumber) -> error - // (gregorian month or day) + ordinal -> error - // otherwise just use weeks or ordinals or gregorian, depending on what's specified - - if ((containsGregor || containsOrdinal) && definiteWeekDef) { - throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); - } - - if (containsGregorMD && containsOrdinal) { - throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); - } - - var useWeekData = definiteWeekDef || normalized.weekday && !containsGregor; // configure ourselves to deal with gregorian dates or week stuff - - var units, - defaultValues, - objNow = tsToObj(tsNow, offsetProvis); - - if (useWeekData) { - units = orderedWeekUnits; - defaultValues = defaultWeekUnitValues; - objNow = gregorianToWeek(objNow); - } else if (containsOrdinal) { - units = orderedOrdinalUnits; - defaultValues = defaultOrdinalUnitValues; - objNow = gregorianToOrdinal(objNow); - } else { - units = orderedUnits$1; - defaultValues = defaultUnitValues; - } // set default values for missing stuff - - - var foundFirst = false; - - for (var _iterator3 = _createForOfIteratorHelperLoose(units), _step3; !(_step3 = _iterator3()).done;) { - var u = _step3.value; - var v = normalized[u]; - - if (!isUndefined(v)) { - foundFirst = true; - } else if (foundFirst) { - normalized[u] = defaultValues[u]; - } else { - normalized[u] = objNow[u]; - } - } // make sure the values we have are in range - - - var higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), - invalid = higherOrderInvalid || hasInvalidTimeData(normalized); - - if (invalid) { - return DateTime.invalid(invalid); - } // compute the actual time - - - var gregorian = useWeekData ? weekToGregorian(normalized) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, - _objToTS2 = objToTS(gregorian, offsetProvis, zoneToUse), - tsFinal = _objToTS2[0], - offsetFinal = _objToTS2[1], - inst = new DateTime({ - ts: tsFinal, - zone: zoneToUse, - o: offsetFinal, - loc: loc - }); // gregorian data + weekday serves only to validate - - - if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) { - return DateTime.invalid("mismatched weekday", "you can't specify both a weekday of " + normalized.weekday + " and a date of " + inst.toISO()); - } - - return inst; - } - /** - * Create a DateTime from an ISO 8601 string - * @param {string} text - the ISO string - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromISO('2016-05-25T09:08:34.123') - * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00') - * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true}) - * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'}) - * @example DateTime.fromISO('2016-W05-4') - * @return {DateTime} - */ - ; - - DateTime.fromISO = function fromISO(text, opts) { - if (opts === void 0) { - opts = {}; - } - - var _parseISODate = parseISODate(text), - vals = _parseISODate[0], - parsedZone = _parseISODate[1]; - - return parseDataToDateTime(vals, parsedZone, opts, "ISO 8601", text); - } - /** - * Create a DateTime from an RFC 2822 string - * @param {string} text - the RFC 2822 string - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. - * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT') - * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600') - * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z') - * @return {DateTime} - */ - ; - - DateTime.fromRFC2822 = function fromRFC2822(text, opts) { - if (opts === void 0) { - opts = {}; - } - - var _parseRFC2822Date = parseRFC2822Date(text), - vals = _parseRFC2822Date[0], - parsedZone = _parseRFC2822Date[1]; - - return parseDataToDateTime(vals, parsedZone, opts, "RFC 2822", text); - } - /** - * Create a DateTime from an HTTP header date - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 - * @param {string} text - the HTTP header date - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. - * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods. - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT') - * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT') - * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994') - * @return {DateTime} - */ - ; - - DateTime.fromHTTP = function fromHTTP(text, opts) { - if (opts === void 0) { - opts = {}; - } - - var _parseHTTPDate = parseHTTPDate(text), - vals = _parseHTTPDate[0], - parsedZone = _parseHTTPDate[1]; - - return parseDataToDateTime(vals, parsedZone, opts, "HTTP", opts); - } - /** - * Create a DateTime from an input string and format string. - * Defaults to en-US if no locale has been specified, regardless of the system's locale. - * @see https://moment.github.io/luxon/docs/manual/parsing.html#table-of-tokens - * @param {string} text - the string to parse - * @param {string} fmt - the format the string is expected to be in (see the link below for the formats) - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale - * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @return {DateTime} - */ - ; - - DateTime.fromFormat = function fromFormat(text, fmt, opts) { - if (opts === void 0) { - opts = {}; - } - - if (isUndefined(text) || isUndefined(fmt)) { - throw new InvalidArgumentError("fromFormat requires an input string and a format"); - } - - var _opts = opts, - _opts$locale = _opts.locale, - locale = _opts$locale === void 0 ? null : _opts$locale, - _opts$numberingSystem = _opts.numberingSystem, - numberingSystem = _opts$numberingSystem === void 0 ? null : _opts$numberingSystem, - localeToUse = Locale.fromOpts({ - locale: locale, - numberingSystem: numberingSystem, - defaultToEN: true - }), - _parseFromTokens = parseFromTokens(localeToUse, text, fmt), - vals = _parseFromTokens[0], - parsedZone = _parseFromTokens[1], - invalid = _parseFromTokens[2]; - - if (invalid) { - return DateTime.invalid(invalid); - } else { - return parseDataToDateTime(vals, parsedZone, opts, "format " + fmt, text); - } - } - /** - * @deprecated use fromFormat instead - */ - ; - - DateTime.fromString = function fromString(text, fmt, opts) { - if (opts === void 0) { - opts = {}; - } - - return DateTime.fromFormat(text, fmt, opts); - } - /** - * Create a DateTime from a SQL date, time, or datetime - * Defaults to en-US if no locale has been specified, regardless of the system's locale - * @param {string} text - the string to parse - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale - * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @example DateTime.fromSQL('2017-05-15') - * @example DateTime.fromSQL('2017-05-15 09:12:34') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true }) - * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' }) - * @example DateTime.fromSQL('09:12:34.342') - * @return {DateTime} - */ - ; - - DateTime.fromSQL = function fromSQL(text, opts) { - if (opts === void 0) { - opts = {}; - } - - var _parseSQL = parseSQL(text), - vals = _parseSQL[0], - parsedZone = _parseSQL[1]; - - return parseDataToDateTime(vals, parsedZone, opts, "SQL", text); - } - /** - * Create an invalid DateTime. - * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {DateTime} - */ - ; - - DateTime.invalid = function invalid(reason, explanation) { - if (explanation === void 0) { - explanation = null; - } - - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the DateTime is invalid"); - } - - var invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidDateTimeError(invalid); - } else { - return new DateTime({ - invalid: invalid - }); - } - } - /** - * Check if an object is a DateTime. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - ; - - DateTime.isDateTime = function isDateTime(o) { - return o && o.isLuxonDateTime || false; - } // INFO - - /** - * Get the value of unit. - * @param {string} unit - a unit such as 'minute' or 'day' - * @example DateTime.local(2017, 7, 4).get('month'); //=> 7 - * @example DateTime.local(2017, 7, 4).get('day'); //=> 4 - * @return {number} - */ - ; - - var _proto = DateTime.prototype; - - _proto.get = function get(unit) { - return this[unit]; - } - /** - * Returns whether the DateTime is valid. Invalid DateTimes occur when: - * * The DateTime was created from invalid calendar information, such as the 13th month or February 30 - * * The DateTime was created by an operation on another invalid date - * @type {boolean} - */ - ; - - /** - * Returns the resolved Intl options for this DateTime. - * This is useful in understanding the behavior of formatting methods - * @param {Object} opts - the same options as toLocaleString - * @return {Object} - */ - _proto.resolvedLocaleOpts = function resolvedLocaleOpts(opts) { - if (opts === void 0) { - opts = {}; - } - - var _Formatter$create$res = Formatter.create(this.loc.clone(opts), opts).resolvedOptions(this), - locale = _Formatter$create$res.locale, - numberingSystem = _Formatter$create$res.numberingSystem, - calendar = _Formatter$create$res.calendar; - - return { - locale: locale, - numberingSystem: numberingSystem, - outputCalendar: calendar - }; - } // TRANSFORM - - /** - * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime. - * - * Equivalent to {@link setZone}('utc') - * @param {number} [offset=0] - optionally, an offset from UTC in minutes - * @param {Object} [opts={}] - options to pass to `setZone()` - * @return {DateTime} - */ - ; - - _proto.toUTC = function toUTC(offset, opts) { - if (offset === void 0) { - offset = 0; - } - - if (opts === void 0) { - opts = {}; - } - - return this.setZone(FixedOffsetZone.instance(offset), opts); - } - /** - * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime. - * - * Equivalent to `setZone('local')` - * @return {DateTime} - */ - ; - - _proto.toLocal = function toLocal() { - return this.setZone(Settings.defaultZone); - } - /** - * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime. - * - * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link plus}. You may wish to use {@link toLocal} and {@link toUTC} which provide simple convenience wrappers for commonly used zones. - * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link Zone} class. - * @param {Object} opts - options - * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this. - * @return {DateTime} - */ - ; - - _proto.setZone = function setZone(zone, _temp) { - var _ref3 = _temp === void 0 ? {} : _temp, - _ref3$keepLocalTime = _ref3.keepLocalTime, - keepLocalTime = _ref3$keepLocalTime === void 0 ? false : _ref3$keepLocalTime, - _ref3$keepCalendarTim = _ref3.keepCalendarTime, - keepCalendarTime = _ref3$keepCalendarTim === void 0 ? false : _ref3$keepCalendarTim; - - zone = normalizeZone(zone, Settings.defaultZone); - - if (zone.equals(this.zone)) { - return this; - } else if (!zone.isValid) { - return DateTime.invalid(unsupportedZone(zone)); - } else { - var newTS = this.ts; - - if (keepLocalTime || keepCalendarTime) { - var offsetGuess = zone.offset(this.ts); - var asObj = this.toObject(); - - var _objToTS3 = objToTS(asObj, offsetGuess, zone); - - newTS = _objToTS3[0]; - } - - return clone$1(this, { - ts: newTS, - zone: zone - }); - } - } - /** - * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime. - * @param {Object} properties - the properties to set - * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' }) - * @return {DateTime} - */ - ; - - _proto.reconfigure = function reconfigure(_temp2) { - var _ref4 = _temp2 === void 0 ? {} : _temp2, - locale = _ref4.locale, - numberingSystem = _ref4.numberingSystem, - outputCalendar = _ref4.outputCalendar; - - var loc = this.loc.clone({ - locale: locale, - numberingSystem: numberingSystem, - outputCalendar: outputCalendar - }); - return clone$1(this, { - loc: loc - }); - } - /** - * "Set" the locale. Returns a newly-constructed DateTime. - * Just a convenient alias for reconfigure({ locale }) - * @example DateTime.local(2017, 5, 25).setLocale('en-GB') - * @return {DateTime} - */ - ; - - _proto.setLocale = function setLocale(locale) { - return this.reconfigure({ - locale: locale - }); - } - /** - * "Set" the values of specified units. Returns a newly-constructed DateTime. - * You can only set units with this method; for "setting" metadata, see {@link reconfigure} and {@link setZone}. - * @param {Object} values - a mapping of units to numbers - * @example dt.set({ year: 2017 }) - * @example dt.set({ hour: 8, minute: 30 }) - * @example dt.set({ weekday: 5 }) - * @example dt.set({ year: 2005, ordinal: 234 }) - * @return {DateTime} - */ - ; - - _proto.set = function set(values) { - if (!this.isValid) return this; - var normalized = normalizeObject(values, normalizeUnit, []), - settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday); - var mixed; - - if (settingWeekStuff) { - mixed = weekToGregorian(Object.assign(gregorianToWeek(this.c), normalized)); - } else if (!isUndefined(normalized.ordinal)) { - mixed = ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c), normalized)); - } else { - mixed = Object.assign(this.toObject(), normalized); // if we didn't set the day but we ended up on an overflow date, - // use the last day of the right month - - if (isUndefined(normalized.day)) { - mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day); - } - } - - var _objToTS4 = objToTS(mixed, this.o, this.zone), - ts = _objToTS4[0], - o = _objToTS4[1]; - - return clone$1(this, { - ts: ts, - o: o - }); - } - /** - * Add a period of time to this DateTime and return the resulting DateTime - * - * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between. - * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @example DateTime.local().plus(123) //~> in 123 milliseconds - * @example DateTime.local().plus({ minutes: 15 }) //~> in 15 minutes - * @example DateTime.local().plus({ days: 1 }) //~> this time tomorrow - * @example DateTime.local().plus({ days: -1 }) //~> this time yesterday - * @example DateTime.local().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min - * @example DateTime.local().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min - * @return {DateTime} - */ - ; - - _proto.plus = function plus(duration) { - if (!this.isValid) return this; - var dur = friendlyDuration(duration); - return clone$1(this, adjustTime(this, dur)); - } - /** - * Subtract a period of time to this DateTime and return the resulting DateTime - * See {@link plus} - * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - @return {DateTime} - */ - ; - - _proto.minus = function minus(duration) { - if (!this.isValid) return this; - var dur = friendlyDuration(duration).negate(); - return clone$1(this, adjustTime(this, dur)); - } - /** - * "Set" this DateTime to the beginning of a unit of time. - * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. - * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01' - * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01' - * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00' - * @return {DateTime} - */ - ; - - _proto.startOf = function startOf(unit) { - if (!this.isValid) return this; - var o = {}, - normalizedUnit = Duration.normalizeUnit(unit); - - switch (normalizedUnit) { - case "years": - o.month = 1; - // falls through - - case "quarters": - case "months": - o.day = 1; - // falls through - - case "weeks": - case "days": - o.hour = 0; - // falls through - - case "hours": - o.minute = 0; - // falls through - - case "minutes": - o.second = 0; - // falls through - - case "seconds": - o.millisecond = 0; - break; - // no default, invalid units throw in normalizeUnit() - } - - if (normalizedUnit === "weeks") { - o.weekday = 1; - } - - if (normalizedUnit === "quarters") { - var q = Math.ceil(this.month / 3); - o.month = (q - 1) * 3 + 1; - } - - return this.set(o); - } - /** - * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time - * @param {string} unit - The unit to go to the end of. Can be 'year', 'month', 'day', 'hour', 'minute', 'second', or 'millisecond'. - * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00' - * @return {DateTime} - */ - ; - - _proto.endOf = function endOf(unit) { - var _this$plus; - - return this.isValid ? this.plus((_this$plus = {}, _this$plus[unit] = 1, _this$plus)).startOf(unit).minus(1) : this; - } // OUTPUT - - /** - * Returns a string representation of this DateTime formatted according to the specified format string. - * **You may not want this.** See {@link toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens). - * Defaults to en-US if no locale has been specified, regardless of the system's locale. - * @see https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens - * @param {string} fmt - the format string - * @param {Object} opts - opts to override the configuration options - * @example DateTime.local().toFormat('yyyy LLL dd') //=> '2017 Apr 22' - * @example DateTime.local().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22' - * @example DateTime.local().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22' - * @example DateTime.local().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes' - * @return {string} - */ - ; - - _proto.toFormat = function toFormat(fmt, opts) { - if (opts === void 0) { - opts = {}; - } - - return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID$2; - } - /** - * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`. - * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation - * of the DateTime in the assigned locale. - * Defaults to the system's locale if no locale has been specified - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param opts {Object} - Intl.DateTimeFormat constructor options and configuration options - * @example DateTime.local().toLocaleString(); //=> 4/20/2017 - * @example DateTime.local().setLocale('en-gb').toLocaleString(); //=> '20/04/2017' - * @example DateTime.local().toLocaleString({ locale: 'en-gb' }); //=> '20/04/2017' - * @example DateTime.local().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017' - * @example DateTime.local().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM' - * @example DateTime.local().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM' - * @example DateTime.local().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20' - * @example DateTime.local().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM' - * @example DateTime.local().toLocaleString({ hour: '2-digit', minute: '2-digit', hour12: false }); //=> '11:32' - * @return {string} - */ - ; - - _proto.toLocaleString = function toLocaleString(opts) { - if (opts === void 0) { - opts = DATE_SHORT; - } - - return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTime(this) : INVALID$2; - } - /** - * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output. - * Defaults to the system's locale if no locale has been specified - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts - * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`. - * @example DateTime.local().toLocaleParts(); //=> [ - * //=> { type: 'day', value: '25' }, - * //=> { type: 'literal', value: '/' }, - * //=> { type: 'month', value: '05' }, - * //=> { type: 'literal', value: '/' }, - * //=> { type: 'year', value: '1982' } - * //=> ] - */ - ; - - _proto.toLocaleParts = function toLocaleParts(opts) { - if (opts === void 0) { - opts = {}; - } - - return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : []; - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc(1982, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z' - * @example DateTime.local().toISO() //=> '2017-04-22T20:47:05.335-04:00' - * @example DateTime.local().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335' - * @example DateTime.local().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400' - * @return {string} - */ - ; - - _proto.toISO = function toISO(opts) { - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid) { - return null; - } - - return this.toISODate(opts) + "T" + this.toISOTime(opts); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's date component - * @param {Object} opts - options - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25' - * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525' - * @return {string} - */ - ; - - _proto.toISODate = function toISODate(_temp3) { - var _ref5 = _temp3 === void 0 ? {} : _temp3, - _ref5$format = _ref5.format, - format = _ref5$format === void 0 ? "extended" : _ref5$format; - - var fmt = format === "basic" ? "yyyyMMdd" : "yyyy-MM-dd"; - - if (this.year > 9999) { - fmt = "+" + fmt; - } - - return toTechFormat(this, fmt); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's week date - * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2' - * @return {string} - */ - ; - - _proto.toISOWeekDate = function toISOWeekDate() { - return toTechFormat(this, "kkkk-'W'WW-c"); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's time component - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z' - * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z' - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z' - * @return {string} - */ - ; - - _proto.toISOTime = function toISOTime(_temp4) { - var _ref6 = _temp4 === void 0 ? {} : _temp4, - _ref6$suppressMillise = _ref6.suppressMilliseconds, - suppressMilliseconds = _ref6$suppressMillise === void 0 ? false : _ref6$suppressMillise, - _ref6$suppressSeconds = _ref6.suppressSeconds, - suppressSeconds = _ref6$suppressSeconds === void 0 ? false : _ref6$suppressSeconds, - _ref6$includeOffset = _ref6.includeOffset, - includeOffset = _ref6$includeOffset === void 0 ? true : _ref6$includeOffset, - _ref6$format = _ref6.format, - format = _ref6$format === void 0 ? "extended" : _ref6$format; - - return toTechTimeFormat(this, { - suppressSeconds: suppressSeconds, - suppressMilliseconds: suppressMilliseconds, - includeOffset: includeOffset, - format: format - }); - } - /** - * Returns an RFC 2822-compatible string representation of this DateTime, always in UTC - * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000' - * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400' - * @return {string} - */ - ; - - _proto.toRFC2822 = function toRFC2822() { - return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false); - } - /** - * Returns a string representation of this DateTime appropriate for use in HTTP headers. - * Specifically, the string conforms to RFC 1123. - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 - * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT' - * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT' - * @return {string} - */ - ; - - _proto.toHTTP = function toHTTP() { - return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL Date - * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13' - * @return {string} - */ - ; - - _proto.toSQLDate = function toSQLDate() { - return toTechFormat(this, "yyyy-MM-dd"); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL Time - * @param {Object} opts - options - * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @example DateTime.utc().toSQL() //=> '05:15:16.345' - * @example DateTime.local().toSQL() //=> '05:15:16.345 -04:00' - * @example DateTime.local().toSQL({ includeOffset: false }) //=> '05:15:16.345' - * @example DateTime.local().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York' - * @return {string} - */ - ; - - _proto.toSQLTime = function toSQLTime(_temp5) { - var _ref7 = _temp5 === void 0 ? {} : _temp5, - _ref7$includeOffset = _ref7.includeOffset, - includeOffset = _ref7$includeOffset === void 0 ? true : _ref7$includeOffset, - _ref7$includeZone = _ref7.includeZone, - includeZone = _ref7$includeZone === void 0 ? false : _ref7$includeZone; - - return toTechTimeFormat(this, { - includeOffset: includeOffset, - includeZone: includeZone, - spaceZone: true - }); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL DateTime - * @param {Object} opts - options - * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z' - * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00' - * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000' - * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York' - * @return {string} - */ - ; - - _proto.toSQL = function toSQL(opts) { - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid) { - return null; - } - - return this.toSQLDate() + " " + this.toSQLTime(opts); - } - /** - * Returns a string representation of this DateTime appropriate for debugging - * @return {string} - */ - ; - - _proto.toString = function toString() { - return this.isValid ? this.toISO() : INVALID$2; - } - /** - * Returns the epoch milliseconds of this DateTime. Alias of {@link toMillis} - * @return {number} - */ - ; - - _proto.valueOf = function valueOf() { - return this.toMillis(); - } - /** - * Returns the epoch milliseconds of this DateTime. - * @return {number} - */ - ; - - _proto.toMillis = function toMillis() { - return this.isValid ? this.ts : NaN; - } - /** - * Returns the epoch seconds of this DateTime. - * @return {number} - */ - ; - - _proto.toSeconds = function toSeconds() { - return this.isValid ? this.ts / 1000 : NaN; - } - /** - * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON. - * @return {string} - */ - ; - - _proto.toJSON = function toJSON() { - return this.toISO(); - } - /** - * Returns a BSON serializable equivalent to this DateTime. - * @return {Date} - */ - ; - - _proto.toBSON = function toBSON() { - return this.toJSDate(); - } - /** - * Returns a Javascript object with this DateTime's year, month, day, and so on. - * @param opts - options for generating the object - * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output - * @example DateTime.local().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 } - * @return {Object} - */ - ; - - _proto.toObject = function toObject(opts) { - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid) return {}; - var base = Object.assign({}, this.c); - - if (opts.includeConfig) { - base.outputCalendar = this.outputCalendar; - base.numberingSystem = this.loc.numberingSystem; - base.locale = this.loc.locale; - } - - return base; - } - /** - * Returns a Javascript Date equivalent to this DateTime. - * @return {Date} - */ - ; - - _proto.toJSDate = function toJSDate() { - return new Date(this.isValid ? this.ts : NaN); - } // COMPARE - - /** - * Return the difference between two DateTimes as a Duration. - * @param {DateTime} otherDateTime - the DateTime to compare this one to - * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration. - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @example - * var i1 = DateTime.fromISO('1982-05-25T09:45'), - * i2 = DateTime.fromISO('1983-10-14T10:30'); - * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 } - * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 } - * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 } - * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 } - * @return {Duration} - */ - ; - - _proto.diff = function diff(otherDateTime, unit, opts) { - if (unit === void 0) { - unit = "milliseconds"; - } - - if (opts === void 0) { - opts = {}; - } - - if (!this.isValid || !otherDateTime.isValid) { - return Duration.invalid(this.invalid || otherDateTime.invalid, "created by diffing an invalid DateTime"); - } - - var durOpts = Object.assign({ - locale: this.locale, - numberingSystem: this.numberingSystem - }, opts); - - var units = maybeArray(unit).map(Duration.normalizeUnit), - otherIsLater = otherDateTime.valueOf() > this.valueOf(), - earlier = otherIsLater ? this : otherDateTime, - later = otherIsLater ? otherDateTime : this, - diffed = _diff(earlier, later, units, durOpts); - - return otherIsLater ? diffed.negate() : diffed; - } - /** - * Return the difference between this DateTime and right now. - * See {@link diff} - * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - ; - - _proto.diffNow = function diffNow(unit, opts) { - if (unit === void 0) { - unit = "milliseconds"; - } - - if (opts === void 0) { - opts = {}; - } - - return this.diff(DateTime.local(), unit, opts); - } - /** - * Return an Interval spanning between this DateTime and another DateTime - * @param {DateTime} otherDateTime - the other end point of the Interval - * @return {Interval} - */ - ; - - _proto.until = function until(otherDateTime) { - return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this; - } - /** - * Return whether this DateTime is in the same unit of time as another DateTime - * @param {DateTime} otherDateTime - the other DateTime - * @param {string} unit - the unit of time to check sameness on - * @example DateTime.local().hasSame(otherDT, 'day'); //~> true if both the same calendar day - * @return {boolean} - */ - ; - - _proto.hasSame = function hasSame(otherDateTime, unit) { - if (!this.isValid) return false; - - if (unit === "millisecond") { - return this.valueOf() === otherDateTime.valueOf(); - } else { - var inputMs = otherDateTime.valueOf(); - return this.startOf(unit) <= inputMs && inputMs <= this.endOf(unit); - } - } - /** - * Equality check - * Two DateTimes are equal iff they represent the same millisecond, have the same zone and location, and are both valid. - * To compare just the millisecond values, use `+dt1 === +dt2`. - * @param {DateTime} other - the other DateTime - * @return {boolean} - */ - ; - - _proto.equals = function equals(other) { - return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc); - } - /** - * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your - * platform supports Intl.RelativeTimeFormat. Rounds down by default. - * @param {Object} options - options that affect the output - * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now. - * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow" - * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds" - * @param {boolean} [options.round=true] - whether to round the numbers in the output. - * @param {boolean} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding. - * @param {string} options.locale - override the locale of this DateTime - * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this - * @example DateTime.local().plus({ days: 1 }).toRelative() //=> "in 1 day" - * @example DateTime.local().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día" - * @example DateTime.local().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures" - * @example DateTime.local().minus({ days: 2 }).toRelative() //=> "2 days ago" - * @example DateTime.local().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago" - * @example DateTime.local().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago" - */ - ; - - _proto.toRelative = function toRelative(options) { - if (options === void 0) { - options = {}; - } - - if (!this.isValid) return null; - var base = options.base || DateTime.fromObject({ - zone: this.zone - }), - padding = options.padding ? this < base ? -options.padding : options.padding : 0; - return diffRelative(base, this.plus(padding), Object.assign(options, { - numeric: "always", - units: ["years", "months", "days", "hours", "minutes", "seconds"] - })); - } - /** - * Returns a string representation of this date relative to today, such as "yesterday" or "next month". - * Only internationalizes on platforms that supports Intl.RelativeTimeFormat. - * @param {Object} options - options that affect the output - * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now. - * @param {string} options.locale - override the locale of this DateTime - * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days" - * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this - * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow" - * @example DateTime.local().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana" - * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain" - * @example DateTime.local().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago" - */ - ; - - _proto.toRelativeCalendar = function toRelativeCalendar(options) { - if (options === void 0) { - options = {}; - } - - if (!this.isValid) return null; - return diffRelative(options.base || DateTime.fromObject({ - zone: this.zone - }), this, Object.assign(options, { - numeric: "auto", - units: ["years", "months", "days"], - calendary: true - })); - } - /** - * Return the min of several date times - * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum - * @return {DateTime} the min DateTime, or undefined if called with no argument - */ - ; - - DateTime.min = function min() { - for (var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++) { - dateTimes[_key] = arguments[_key]; - } - - if (!dateTimes.every(DateTime.isDateTime)) { - throw new InvalidArgumentError("min requires all arguments be DateTimes"); - } - - return bestBy(dateTimes, function (i) { - return i.valueOf(); - }, Math.min); - } - /** - * Return the max of several date times - * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum - * @return {DateTime} the max DateTime, or undefined if called with no argument - */ - ; - - DateTime.max = function max() { - for (var _len2 = arguments.length, dateTimes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - dateTimes[_key2] = arguments[_key2]; - } - - if (!dateTimes.every(DateTime.isDateTime)) { - throw new InvalidArgumentError("max requires all arguments be DateTimes"); - } - - return bestBy(dateTimes, function (i) { - return i.valueOf(); - }, Math.max); - } // MISC - - /** - * Explain how a string would be parsed by fromFormat() - * @param {string} text - the string to parse - * @param {string} fmt - the format the string is expected to be in (see description) - * @param {Object} options - options taken by fromFormat() - * @return {Object} - */ - ; - - DateTime.fromFormatExplain = function fromFormatExplain(text, fmt, options) { - if (options === void 0) { - options = {}; - } - - var _options = options, - _options$locale = _options.locale, - locale = _options$locale === void 0 ? null : _options$locale, - _options$numberingSys = _options.numberingSystem, - numberingSystem = _options$numberingSys === void 0 ? null : _options$numberingSys, - localeToUse = Locale.fromOpts({ - locale: locale, - numberingSystem: numberingSystem, - defaultToEN: true - }); - return explainFromTokens(localeToUse, text, fmt); - } - /** - * @deprecated use fromFormatExplain instead - */ - ; - - DateTime.fromStringExplain = function fromStringExplain(text, fmt, options) { - if (options === void 0) { - options = {}; - } - - return DateTime.fromFormatExplain(text, fmt, options); - } // FORMAT PRESETS - - /** - * {@link toLocaleString} format like 10/14/1983 - * @type {Object} - */ - ; - - _createClass(DateTime, [{ - key: "isValid", - get: function get() { - return this.invalid === null; - } - /** - * Returns an error code if this DateTime is invalid, or null if the DateTime is valid - * @type {string} - */ - - }, { - key: "invalidReason", - get: function get() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid - * @type {string} - */ - - }, { - key: "invalidExplanation", - get: function get() { - return this.invalid ? this.invalid.explanation : null; - } - /** - * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime - * - * @type {string} - */ - - }, { - key: "locale", - get: function get() { - return this.isValid ? this.loc.locale : null; - } - /** - * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime - * - * @type {string} - */ - - }, { - key: "numberingSystem", - get: function get() { - return this.isValid ? this.loc.numberingSystem : null; - } - /** - * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime - * - * @type {string} - */ - - }, { - key: "outputCalendar", - get: function get() { - return this.isValid ? this.loc.outputCalendar : null; - } - /** - * Get the time zone associated with this DateTime. - * @type {Zone} - */ - - }, { - key: "zone", - get: function get() { - return this._zone; - } - /** - * Get the name of the time zone. - * @type {string} - */ - - }, { - key: "zoneName", - get: function get() { - return this.isValid ? this.zone.name : null; - } - /** - * Get the year - * @example DateTime.local(2017, 5, 25).year //=> 2017 - * @type {number} - */ - - }, { - key: "year", - get: function get() { - return this.isValid ? this.c.year : NaN; - } - /** - * Get the quarter - * @example DateTime.local(2017, 5, 25).quarter //=> 2 - * @type {number} - */ - - }, { - key: "quarter", - get: function get() { - return this.isValid ? Math.ceil(this.c.month / 3) : NaN; - } - /** - * Get the month (1-12). - * @example DateTime.local(2017, 5, 25).month //=> 5 - * @type {number} - */ - - }, { - key: "month", - get: function get() { - return this.isValid ? this.c.month : NaN; - } - /** - * Get the day of the month (1-30ish). - * @example DateTime.local(2017, 5, 25).day //=> 25 - * @type {number} - */ - - }, { - key: "day", - get: function get() { - return this.isValid ? this.c.day : NaN; - } - /** - * Get the hour of the day (0-23). - * @example DateTime.local(2017, 5, 25, 9).hour //=> 9 - * @type {number} - */ - - }, { - key: "hour", - get: function get() { - return this.isValid ? this.c.hour : NaN; - } - /** - * Get the minute of the hour (0-59). - * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30 - * @type {number} - */ - - }, { - key: "minute", - get: function get() { - return this.isValid ? this.c.minute : NaN; - } - /** - * Get the second of the minute (0-59). - * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52 - * @type {number} - */ - - }, { - key: "second", - get: function get() { - return this.isValid ? this.c.second : NaN; - } - /** - * Get the millisecond of the second (0-999). - * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654 - * @type {number} - */ - - }, { - key: "millisecond", - get: function get() { - return this.isValid ? this.c.millisecond : NaN; - } - /** - * Get the week year - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2014, 11, 31).weekYear //=> 2015 - * @type {number} - */ - - }, { - key: "weekYear", - get: function get() { - return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN; - } - /** - * Get the week number of the week year (1-52ish). - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2017, 5, 25).weekNumber //=> 21 - * @type {number} - */ - - }, { - key: "weekNumber", - get: function get() { - return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN; - } - /** - * Get the day of the week. - * 1 is Monday and 7 is Sunday - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2014, 11, 31).weekday //=> 4 - * @type {number} - */ - - }, { - key: "weekday", - get: function get() { - return this.isValid ? possiblyCachedWeekData(this).weekday : NaN; - } - /** - * Get the ordinal (meaning the day of the year) - * @example DateTime.local(2017, 5, 25).ordinal //=> 145 - * @type {number|DateTime} - */ - - }, { - key: "ordinal", - get: function get() { - return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN; - } - /** - * Get the human readable short month name, such as 'Oct'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).monthShort //=> Oct - * @type {string} - */ - - }, { - key: "monthShort", - get: function get() { - return this.isValid ? Info.months("short", { - locale: this.locale - })[this.month - 1] : null; - } - /** - * Get the human readable long month name, such as 'October'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).monthLong //=> October - * @type {string} - */ - - }, { - key: "monthLong", - get: function get() { - return this.isValid ? Info.months("long", { - locale: this.locale - })[this.month - 1] : null; - } - /** - * Get the human readable short weekday, such as 'Mon'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon - * @type {string} - */ - - }, { - key: "weekdayShort", - get: function get() { - return this.isValid ? Info.weekdays("short", { - locale: this.locale - })[this.weekday - 1] : null; - } - /** - * Get the human readable long weekday, such as 'Monday'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday - * @type {string} - */ - - }, { - key: "weekdayLong", - get: function get() { - return this.isValid ? Info.weekdays("long", { - locale: this.locale - })[this.weekday - 1] : null; - } - /** - * Get the UTC offset of this DateTime in minutes - * @example DateTime.local().offset //=> -240 - * @example DateTime.utc().offset //=> 0 - * @type {number} - */ - - }, { - key: "offset", - get: function get() { - return this.isValid ? +this.o : NaN; - } - /** - * Get the short human name for the zone's current offset, for example "EST" or "EDT". - * Defaults to the system's locale if no locale has been specified - * @type {string} - */ - - }, { - key: "offsetNameShort", - get: function get() { - if (this.isValid) { - return this.zone.offsetName(this.ts, { - format: "short", - locale: this.locale - }); - } else { - return null; - } - } - /** - * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time". - * Defaults to the system's locale if no locale has been specified - * @type {string} - */ - - }, { - key: "offsetNameLong", - get: function get() { - if (this.isValid) { - return this.zone.offsetName(this.ts, { - format: "long", - locale: this.locale - }); - } else { - return null; - } - } - /** - * Get whether this zone's offset ever changes, as in a DST. - * @type {boolean} - */ - - }, { - key: "isOffsetFixed", - get: function get() { - return this.isValid ? this.zone.universal : null; - } - /** - * Get whether the DateTime is in a DST. - * @type {boolean} - */ - - }, { - key: "isInDST", - get: function get() { - if (this.isOffsetFixed) { - return false; - } else { - return this.offset > this.set({ - month: 1 - }).offset || this.offset > this.set({ - month: 5 - }).offset; - } - } - /** - * Returns true if this DateTime is in a leap year, false otherwise - * @example DateTime.local(2016).isInLeapYear //=> true - * @example DateTime.local(2013).isInLeapYear //=> false - * @type {boolean} - */ - - }, { - key: "isInLeapYear", - get: function get() { - return isLeapYear(this.year); - } - /** - * Returns the number of days in this DateTime's month - * @example DateTime.local(2016, 2).daysInMonth //=> 29 - * @example DateTime.local(2016, 3).daysInMonth //=> 31 - * @type {number} - */ - - }, { - key: "daysInMonth", - get: function get() { - return daysInMonth(this.year, this.month); - } - /** - * Returns the number of days in this DateTime's year - * @example DateTime.local(2016).daysInYear //=> 366 - * @example DateTime.local(2013).daysInYear //=> 365 - * @type {number} - */ - - }, { - key: "daysInYear", - get: function get() { - return this.isValid ? daysInYear(this.year) : NaN; - } - /** - * Returns the number of weeks in this DateTime's year - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2004).weeksInWeekYear //=> 53 - * @example DateTime.local(2013).weeksInWeekYear //=> 52 - * @type {number} - */ - - }, { - key: "weeksInWeekYear", - get: function get() { - return this.isValid ? weeksInWeekYear(this.weekYear) : NaN; - } - }], [{ - key: "DATE_SHORT", - get: function get() { - return DATE_SHORT; - } - /** - * {@link toLocaleString} format like 'Oct 14, 1983' - * @type {Object} - */ - - }, { - key: "DATE_MED", - get: function get() { - return DATE_MED; - } - /** - * {@link toLocaleString} format like 'Fri, Oct 14, 1983' - * @type {Object} - */ - - }, { - key: "DATE_MED_WITH_WEEKDAY", - get: function get() { - return DATE_MED_WITH_WEEKDAY; - } - /** - * {@link toLocaleString} format like 'October 14, 1983' - * @type {Object} - */ - - }, { - key: "DATE_FULL", - get: function get() { - return DATE_FULL; - } - /** - * {@link toLocaleString} format like 'Tuesday, October 14, 1983' - * @type {Object} - */ - - }, { - key: "DATE_HUGE", - get: function get() { - return DATE_HUGE; - } - /** - * {@link toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "TIME_SIMPLE", - get: function get() { - return TIME_SIMPLE; - } - /** - * {@link toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "TIME_WITH_SECONDS", - get: function get() { - return TIME_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "TIME_WITH_SHORT_OFFSET", - get: function get() { - return TIME_WITH_SHORT_OFFSET; - } - /** - * {@link toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "TIME_WITH_LONG_OFFSET", - get: function get() { - return TIME_WITH_LONG_OFFSET; - } - /** - * {@link toLocaleString} format like '09:30', always 24-hour. - * @type {Object} - */ - - }, { - key: "TIME_24_SIMPLE", - get: function get() { - return TIME_24_SIMPLE; - } - /** - * {@link toLocaleString} format like '09:30:23', always 24-hour. - * @type {Object} - */ - - }, { - key: "TIME_24_WITH_SECONDS", - get: function get() { - return TIME_24_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like '09:30:23 EDT', always 24-hour. - * @type {Object} - */ - - }, { - key: "TIME_24_WITH_SHORT_OFFSET", - get: function get() { - return TIME_24_WITH_SHORT_OFFSET; - } - /** - * {@link toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour. - * @type {Object} - */ - - }, { - key: "TIME_24_WITH_LONG_OFFSET", - get: function get() { - return TIME_24_WITH_LONG_OFFSET; - } - /** - * {@link toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_SHORT", - get: function get() { - return DATETIME_SHORT; - } - /** - * {@link toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_SHORT_WITH_SECONDS", - get: function get() { - return DATETIME_SHORT_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_MED", - get: function get() { - return DATETIME_MED; - } - /** - * {@link toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_MED_WITH_SECONDS", - get: function get() { - return DATETIME_MED_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_MED_WITH_WEEKDAY", - get: function get() { - return DATETIME_MED_WITH_WEEKDAY; - } - /** - * {@link toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_FULL", - get: function get() { - return DATETIME_FULL; - } - /** - * {@link toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_FULL_WITH_SECONDS", - get: function get() { - return DATETIME_FULL_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_HUGE", - get: function get() { - return DATETIME_HUGE; - } - /** - * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - - }, { - key: "DATETIME_HUGE_WITH_SECONDS", - get: function get() { - return DATETIME_HUGE_WITH_SECONDS; - } - }]); - - return DateTime; - }(); - function friendlyDateTime(dateTimeish) { - if (DateTime.isDateTime(dateTimeish)) { - return dateTimeish; - } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) { - return DateTime.fromJSDate(dateTimeish); - } else if (dateTimeish && typeof dateTimeish === "object") { - return DateTime.fromObject(dateTimeish); - } else { - throw new InvalidArgumentError("Unknown datetime argument: " + dateTimeish + ", of type " + typeof dateTimeish); - } - } - - exports.DateTime = DateTime; - exports.Duration = Duration; - exports.FixedOffsetZone = FixedOffsetZone; - exports.IANAZone = IANAZone; - exports.Info = Info; - exports.Interval = Interval; - exports.InvalidZone = InvalidZone; - exports.LocalZone = LocalZone; - exports.Settings = Settings; - exports.Zone = Zone; - - return exports; - -}({})); -//# sourceMappingURL=luxon.js.map diff --git a/node_modules/luxon/build/global/luxon.js.map b/node_modules/luxon/build/global/luxon.js.map deleted file mode 100644 index 0f8ea09..0000000 --- a/node_modules/luxon/build/global/luxon.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"luxon.js","sources":["../../src/errors.js","../../src/impl/formats.js","../../src/impl/util.js","../../src/impl/english.js","../../src/impl/formatter.js","../../src/impl/invalid.js","../../src/zone.js","../../src/zones/localZone.js","../../src/zones/IANAZone.js","../../src/zones/fixedOffsetZone.js","../../src/zones/invalidZone.js","../../src/impl/zoneUtil.js","../../src/settings.js","../../src/impl/locale.js","../../src/impl/regexParser.js","../../src/duration.js","../../src/interval.js","../../src/info.js","../../src/impl/diff.js","../../src/impl/digits.js","../../src/impl/tokenParser.js","../../src/impl/conversions.js","../../src/datetime.js"],"sourcesContent":["// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nexport class InvalidDateTimeError extends LuxonError {\n constructor(reason) {\n super(`Invalid DateTime: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidIntervalError extends LuxonError {\n constructor(reason) {\n super(`Invalid Interval: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidDurationError extends LuxonError {\n constructor(reason) {\n super(`Invalid Duration: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nexport class InvalidUnitError extends LuxonError {\n constructor(unit) {\n super(`Invalid unit ${unit}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nexport class ZoneIsAbstractError extends LuxonError {\n constructor() {\n super(\"Zone is an abstract class\");\n }\n}\n","/**\n * @private\n */\n\nconst n = \"numeric\",\n s = \"short\",\n l = \"long\";\n\nexport const DATE_SHORT = {\n year: n,\n month: n,\n day: n\n};\n\nexport const DATE_MED = {\n year: n,\n month: s,\n day: n\n};\n\nexport const DATE_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s\n};\n\nexport const DATE_FULL = {\n year: n,\n month: l,\n day: n\n};\n\nexport const DATE_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l\n};\n\nexport const TIME_SIMPLE = {\n hour: n,\n minute: n\n};\n\nexport const TIME_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n\n};\n\nexport const TIME_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s\n};\n\nexport const TIME_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l\n};\n\nexport const TIME_24_SIMPLE = {\n hour: n,\n minute: n,\n hour12: false\n};\n\n/**\n * {@link toLocaleString}; format like '09:30:23', always 24-hour.\n */\nexport const TIME_24_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n hour12: false\n};\n\n/**\n * {@link toLocaleString}; format like '09:30:23 EDT', always 24-hour.\n */\nexport const TIME_24_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hour12: false,\n timeZoneName: s\n};\n\n/**\n * {@link toLocaleString}; format like '09:30:23 Eastern Daylight Time', always 24-hour.\n */\nexport const TIME_24_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hour12: false,\n timeZoneName: l\n};\n\n/**\n * {@link toLocaleString}; format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n */\nexport const DATETIME_SHORT = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n\n};\n\n/**\n * {@link toLocaleString}; format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n */\nexport const DATETIME_SHORT_WITH_SECONDS = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n second: n\n};\n\nexport const DATETIME_MED = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n\n};\n\nexport const DATETIME_MED_WITH_SECONDS = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n second: n\n};\n\nexport const DATETIME_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n hour: n,\n minute: n\n};\n\nexport const DATETIME_FULL = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n timeZoneName: s\n};\n\nexport const DATETIME_FULL_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s\n};\n\nexport const DATETIME_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n timeZoneName: l\n};\n\nexport const DATETIME_HUGE_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l\n};\n","/*\n This is just a junk drawer, containing anything used across multiple classes.\n Because Luxon is small(ish), this should stay small and we won't worry about splitting\n it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\nimport { InvalidArgumentError } from \"../errors.js\";\n\n/**\n * @private\n */\n\n// TYPES\n\nexport function isUndefined(o) {\n return typeof o === \"undefined\";\n}\n\nexport function isNumber(o) {\n return typeof o === \"number\";\n}\n\nexport function isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\n\nexport function isString(o) {\n return typeof o === \"string\";\n}\n\nexport function isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nexport function hasIntl() {\n try {\n return typeof Intl !== \"undefined\" && Intl.DateTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\nexport function hasFormatToParts() {\n return !isUndefined(Intl.DateTimeFormat.prototype.formatToParts);\n}\n\nexport function hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\n// OBJECTS AND ARRAYS\n\nexport function maybeArray(thing) {\n return Array.isArray(thing) ? thing : [thing];\n}\n\nexport function bestBy(arr, by, compare) {\n if (arr.length === 0) {\n return undefined;\n }\n return arr.reduce((best, next) => {\n const pair = [by(next), next];\n if (!best) {\n return pair;\n } else if (compare(best[0], pair[0]) === best[0]) {\n return best;\n } else {\n return pair;\n }\n }, null)[1];\n}\n\nexport function pick(obj, keys) {\n return keys.reduce((a, k) => {\n a[k] = obj[k];\n return a;\n }, {});\n}\n\nexport function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n// NUMBERS AND STRINGS\n\nexport function integerBetween(thing, bottom, top) {\n return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nexport function floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\n\nexport function padStart(input, n = 2) {\n if (input.toString().length < n) {\n return (\"0\".repeat(n) + input).slice(-n);\n } else {\n return input.toString();\n }\n}\n\nexport function parseInteger(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseInt(string, 10);\n }\n}\n\nexport function parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n return undefined;\n } else {\n const f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\n\nexport function roundTo(number, digits, towardZero = false) {\n const factor = 10 ** digits,\n rounder = towardZero ? Math.trunc : Math.round;\n return rounder(number * factor) / factor;\n}\n\n// DATE BASICS\n\nexport function isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\nexport function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nexport function daysInMonth(year, month) {\n const modMonth = floorMod(month - 1, 12) + 1,\n modYear = year + (month - modMonth) / 12;\n\n if (modMonth === 2) {\n return isLeapYear(modYear) ? 29 : 28;\n } else {\n return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n }\n}\n\n// covert a calendar object to a local timestamp (epoch, but with the offset baked in)\nexport function objToLocalTS(obj) {\n let d = Date.UTC(\n obj.year,\n obj.month - 1,\n obj.day,\n obj.hour,\n obj.minute,\n obj.second,\n obj.millisecond\n );\n\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n return +d;\n}\n\nexport function weeksInWeekYear(weekYear) {\n const p1 =\n (weekYear +\n Math.floor(weekYear / 4) -\n Math.floor(weekYear / 100) +\n Math.floor(weekYear / 400)) %\n 7,\n last = weekYear - 1,\n p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7;\n return p1 === 4 || p2 === 3 ? 53 : 52;\n}\n\nexport function untruncateYear(year) {\n if (year > 99) {\n return year;\n } else return year > 60 ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nexport function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n const date = new Date(ts),\n intlOpts = {\n hour12: false,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\"\n };\n\n if (timeZone) {\n intlOpts.timeZone = timeZone;\n }\n\n const modified = Object.assign({ timeZoneName: offsetFormat }, intlOpts),\n intl = hasIntl();\n\n if (intl && hasFormatToParts()) {\n const parsed = new Intl.DateTimeFormat(locale, modified)\n .formatToParts(date)\n .find(m => m.type.toLowerCase() === \"timezonename\");\n return parsed ? parsed.value : null;\n } else if (intl) {\n // this probably doesn't work for all locales\n const without = new Intl.DateTimeFormat(locale, intlOpts).format(date),\n included = new Intl.DateTimeFormat(locale, modified).format(date),\n diffed = included.substring(without.length),\n trimmed = diffed.replace(/^[, \\u200e]+/, \"\");\n return trimmed;\n } else {\n return null;\n }\n}\n\n// signedOffset('-5', '30') -> -330\nexport function signedOffset(offHourStr, offMinuteStr) {\n let offHour = parseInt(offHourStr, 10);\n\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) {\n offHour = 0;\n }\n\n const offMin = parseInt(offMinuteStr, 10) || 0,\n offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nexport function asNumber(value) {\n const numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || Number.isNaN(numericValue))\n throw new InvalidArgumentError(`Invalid unit value ${value}`);\n return numericValue;\n}\n\nexport function normalizeObject(obj, normalizer, nonUnitKeys) {\n const normalized = {};\n for (const u in obj) {\n if (hasOwnProperty(obj, u)) {\n if (nonUnitKeys.indexOf(u) >= 0) continue;\n const v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = asNumber(v);\n }\n }\n return normalized;\n}\n\nexport function formatOffset(offset, format) {\n const hours = Math.trunc(Math.abs(offset / 60)),\n minutes = Math.trunc(Math.abs(offset % 60)),\n sign = offset >= 0 ? \"+\" : \"-\";\n\n switch (format) {\n case \"short\":\n return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n case \"narrow\":\n return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n case \"techie\":\n return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n default:\n throw new RangeError(`Value format ${format} is out of range for property format`);\n }\n}\n\nexport function timeObject(obj) {\n return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n\nexport const ianaRegex = /[A-Za-z_+-]{1,256}(:?\\/[A-Za-z_+-]{1,256}(\\/[A-Za-z_+-]{1,256})?)?/;\n","import * as Formats from \"./formats.js\";\nimport { pick } from \"./util.js\";\n\nfunction stringify(obj) {\n return JSON.stringify(obj, Object.keys(obj).sort());\n}\n\n/**\n * @private\n */\n\nexport const monthsLong = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n];\n\nexport const monthsShort = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\"\n];\n\nexport const monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\n\nexport function months(length) {\n switch (length) {\n case \"narrow\":\n return monthsNarrow;\n case \"short\":\n return monthsShort;\n case \"long\":\n return monthsLong;\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n case \"2-digit\":\n return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n default:\n return null;\n }\n}\n\nexport const weekdaysLong = [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\"\n];\n\nexport const weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nexport const weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\n\nexport function weekdays(length) {\n switch (length) {\n case \"narrow\":\n return weekdaysNarrow;\n case \"short\":\n return weekdaysShort;\n case \"long\":\n return weekdaysLong;\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n default:\n return null;\n }\n}\n\nexport const meridiems = [\"AM\", \"PM\"];\n\nexport const erasLong = [\"Before Christ\", \"Anno Domini\"];\n\nexport const erasShort = [\"BC\", \"AD\"];\n\nexport const erasNarrow = [\"B\", \"A\"];\n\nexport function eras(length) {\n switch (length) {\n case \"narrow\":\n return erasNarrow;\n case \"short\":\n return erasShort;\n case \"long\":\n return erasLong;\n default:\n return null;\n }\n}\n\nexport function meridiemForDateTime(dt) {\n return meridiems[dt.hour < 12 ? 0 : 1];\n}\n\nexport function weekdayForDateTime(dt, length) {\n return weekdays(length)[dt.weekday - 1];\n}\n\nexport function monthForDateTime(dt, length) {\n return months(length)[dt.month - 1];\n}\n\nexport function eraForDateTime(dt, length) {\n return eras(length)[dt.year < 0 ? 0 : 1];\n}\n\nexport function formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n const units = {\n years: [\"year\", \"yr.\"],\n quarters: [\"quarter\", \"qtr.\"],\n months: [\"month\", \"mo.\"],\n weeks: [\"week\", \"wk.\"],\n days: [\"day\", \"day\", \"days\"],\n hours: [\"hour\", \"hr.\"],\n minutes: [\"minute\", \"min.\"],\n seconds: [\"second\", \"sec.\"]\n };\n\n const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n\n if (numeric === \"auto\" && lastable) {\n const isDay = unit === \"days\";\n switch (count) {\n case 1:\n return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n case -1:\n return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n case 0:\n return isDay ? \"today\" : `this ${units[unit][0]}`;\n default: // fall through\n }\n }\n\n const isInPast = Object.is(count, -0) || count < 0,\n fmtValue = Math.abs(count),\n singular = fmtValue === 1,\n lilUnits = units[unit],\n fmtUnit = narrow\n ? singular\n ? lilUnits[1]\n : lilUnits[2] || lilUnits[1]\n : singular\n ? units[unit][0]\n : unit;\n return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nexport function formatString(knownFormat) {\n // these all have the offsets removed because we don't have access to them\n // without all the intl stuff this is backfilling\n const filtered = pick(knownFormat, [\n \"weekday\",\n \"era\",\n \"year\",\n \"month\",\n \"day\",\n \"hour\",\n \"minute\",\n \"second\",\n \"timeZoneName\",\n \"hour12\"\n ]),\n key = stringify(filtered),\n dateTimeHuge = \"EEEE, LLLL d, yyyy, h:mm a\";\n switch (key) {\n case stringify(Formats.DATE_SHORT):\n return \"M/d/yyyy\";\n case stringify(Formats.DATE_MED):\n return \"LLL d, yyyy\";\n case stringify(Formats.DATE_MED_WITH_WEEKDAY):\n return \"EEE, LLL d, yyyy\";\n case stringify(Formats.DATE_FULL):\n return \"LLLL d, yyyy\";\n case stringify(Formats.DATE_HUGE):\n return \"EEEE, LLLL d, yyyy\";\n case stringify(Formats.TIME_SIMPLE):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_SECONDS):\n return \"h:mm:ss a\";\n case stringify(Formats.TIME_WITH_SHORT_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_LONG_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_24_SIMPLE):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_SECONDS):\n return \"HH:mm:ss\";\n case stringify(Formats.TIME_24_WITH_SHORT_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_LONG_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.DATETIME_SHORT):\n return \"M/d/yyyy, h:mm a\";\n case stringify(Formats.DATETIME_MED):\n return \"LLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL):\n return \"LLLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_HUGE):\n return dateTimeHuge;\n case stringify(Formats.DATETIME_SHORT_WITH_SECONDS):\n return \"M/d/yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_SECONDS):\n return \"LLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):\n return \"EEE, d LLL yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL_WITH_SECONDS):\n return \"LLLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_HUGE_WITH_SECONDS):\n return \"EEEE, LLLL d, yyyy, h:mm:ss a\";\n default:\n return dateTimeHuge;\n }\n}\n","import * as English from \"./english.js\";\nimport * as Formats from \"./formats.js\";\nimport { hasFormatToParts, padStart } from \"./util.js\";\n\nfunction stringifyTokens(splits, tokenToString) {\n let s = \"\";\n for (const token of splits) {\n if (token.literal) {\n s += token.val;\n } else {\n s += tokenToString(token.val);\n }\n }\n return s;\n}\n\nconst macroTokenToFormatOpts = {\n D: Formats.DATE_SHORT,\n DD: Formats.DATE_MED,\n DDD: Formats.DATE_FULL,\n DDDD: Formats.DATE_HUGE,\n t: Formats.TIME_SIMPLE,\n tt: Formats.TIME_WITH_SECONDS,\n ttt: Formats.TIME_WITH_SHORT_OFFSET,\n tttt: Formats.TIME_WITH_LONG_OFFSET,\n T: Formats.TIME_24_SIMPLE,\n TT: Formats.TIME_24_WITH_SECONDS,\n TTT: Formats.TIME_24_WITH_SHORT_OFFSET,\n TTTT: Formats.TIME_24_WITH_LONG_OFFSET,\n f: Formats.DATETIME_SHORT,\n ff: Formats.DATETIME_MED,\n fff: Formats.DATETIME_FULL,\n ffff: Formats.DATETIME_HUGE,\n F: Formats.DATETIME_SHORT_WITH_SECONDS,\n FF: Formats.DATETIME_MED_WITH_SECONDS,\n FFF: Formats.DATETIME_FULL_WITH_SECONDS,\n FFFF: Formats.DATETIME_HUGE_WITH_SECONDS\n};\n\n/**\n * @private\n */\n\nexport default class Formatter {\n static create(locale, opts = {}) {\n return new Formatter(locale, opts);\n }\n\n static parseFormat(fmt) {\n let current = null,\n currentFull = \"\",\n bracketed = false;\n const splits = [];\n for (let i = 0; i < fmt.length; i++) {\n const c = fmt.charAt(i);\n if (c === \"'\") {\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed, val: currentFull });\n }\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) {\n currentFull += c;\n } else if (c === current) {\n currentFull += c;\n } else {\n if (currentFull.length > 0) {\n splits.push({ literal: false, val: currentFull });\n }\n currentFull = c;\n current = c;\n }\n }\n\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed, val: currentFull });\n }\n\n return splits;\n }\n\n static macroTokenToFormatOpts(token) {\n return macroTokenToFormatOpts[token];\n }\n\n constructor(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n\n formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) {\n this.systemLoc = this.loc.redefaultToSystem();\n }\n const df = this.systemLoc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.format();\n }\n\n formatDateTime(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.format();\n }\n\n formatDateTimeParts(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.formatToParts();\n }\n\n resolvedOptions(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.resolvedOptions();\n }\n\n num(n, p = 0) {\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) {\n return padStart(n, p);\n }\n\n const opts = Object.assign({}, this.opts);\n\n if (p > 0) {\n opts.padTo = p;\n }\n\n return this.loc.numberFormatter(opts).format(n);\n }\n\n formatDateTimeFromString(dt, fmt) {\n const knownEnglish = this.loc.listingMode() === \"en\",\n useDateTimeFormatter =\n this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\" && hasFormatToParts(),\n string = (opts, extract) => this.loc.extract(dt, opts, extract),\n formatOffset = opts => {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n return \"Z\";\n }\n\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n },\n meridiem = () =>\n knownEnglish\n ? English.meridiemForDateTime(dt)\n : string({ hour: \"numeric\", hour12: true }, \"dayperiod\"),\n month = (length, standalone) =>\n knownEnglish\n ? English.monthForDateTime(dt, length)\n : string(standalone ? { month: length } : { month: length, day: \"numeric\" }, \"month\"),\n weekday = (length, standalone) =>\n knownEnglish\n ? English.weekdayForDateTime(dt, length)\n : string(\n standalone ? { weekday: length } : { weekday: length, month: \"long\", day: \"numeric\" },\n \"weekday\"\n ),\n maybeMacro = token => {\n const formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) {\n return this.formatWithSystemDefault(dt, formatOpts);\n } else {\n return token;\n }\n },\n era = length =>\n knownEnglish ? English.eraForDateTime(dt, length) : string({ era: length }, \"era\"),\n tokenToString = token => {\n // Where possible: http://cldr.unicode.org/translation/date-time#TOC-Stand-Alone-vs.-Format-Styles\n switch (token) {\n // ms\n case \"S\":\n return this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return this.num(dt.second);\n case \"ss\":\n return this.num(dt.second, 2);\n // minutes\n case \"m\":\n return this.num(dt.minute);\n case \"mm\":\n return this.num(dt.minute, 2);\n // hours\n case \"h\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return this.num(dt.hour);\n case \"HH\":\n return this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({ format: \"narrow\", allowZ: this.opts.allowZ });\n case \"ZZ\":\n // like +06:00\n return formatOffset({ format: \"short\", allowZ: this.opts.allowZ });\n case \"ZZZ\":\n // like +0600\n return formatOffset({ format: \"techie\", allowZ: this.opts.allowZ });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, { format: \"short\", locale: this.loc.locale });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, { format: \"long\", locale: this.loc.locale });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({ day: \"numeric\" }, \"day\") : this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({ day: \"2-digit\" }, \"day\") : this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\", day: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter\n ? string({ month: \"2-digit\", day: \"numeric\" }, \"month\")\n : this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter\n ? string({ month: \"2-digit\" }, \"month\")\n : this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({ year: \"numeric\" }, \"year\") : this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter\n ? string({ year: \"2-digit\" }, \"year\")\n : this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return this.num(dt.weekYear, 4);\n case \"W\":\n return this.num(dt.weekNumber);\n case \"WW\":\n return this.num(dt.weekNumber, 2);\n case \"o\":\n return this.num(dt.ordinal);\n case \"ooo\":\n return this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return this.num(dt.quarter);\n case \"qq\":\n // like 01\n return this.num(dt.quarter, 2);\n case \"X\":\n return this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n\n return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n }\n\n formatDurationFromString(dur, fmt) {\n const tokenToField = token => {\n switch (token[0]) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n default:\n return null;\n }\n },\n tokenToString = lildur => token => {\n const mapped = tokenToField(token);\n if (mapped) {\n return this.num(lildur.get(mapped), token.length);\n } else {\n return token;\n }\n },\n tokens = Formatter.parseFormat(fmt),\n realTokens = tokens.reduce(\n (found, { literal, val }) => (literal ? found : found.concat(val)),\n []\n ),\n collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter(t => t));\n return stringifyTokens(tokens, tokenToString(collapsed));\n }\n}\n","export default class Invalid {\n constructor(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n\n toMessage() {\n if (this.explanation) {\n return `${this.reason}: ${this.explanation}`;\n } else {\n return this.reason;\n }\n }\n}\n","/* eslint no-unused-vars: \"off\" */\nimport { ZoneIsAbstractError } from \"./errors.js\";\n\n/**\n * @interface\n */\nexport default class Zone {\n /**\n * The type of zone\n * @abstract\n * @type {string}\n */\n get type() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The name of this zone.\n * @abstract\n * @type {string}\n */\n get name() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year.\n * @abstract\n * @type {boolean}\n */\n get universal() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, opts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */\n get isValid() {\n throw new ZoneIsAbstractError();\n }\n}\n","import { formatOffset, parseZoneInfo, hasIntl } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * Represents the local zone for this Javascript environment.\n * @implements {Zone}\n */\nexport default class LocalZone extends Zone {\n /**\n * Get a singleton instance of the local zone\n * @return {LocalZone}\n */\n static get instance() {\n if (singleton === null) {\n singleton = new LocalZone();\n }\n return singleton;\n }\n\n /** @override **/\n get type() {\n return \"local\";\n }\n\n /** @override **/\n get name() {\n if (hasIntl()) {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n } else return \"local\";\n }\n\n /** @override **/\n get universal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"local\";\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import { formatOffset, parseZoneInfo, isUndefined, ianaRegex, objToLocalTS } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nconst matchingRegex = RegExp(`^${ianaRegex.source}$`);\n\nlet dtfCache = {};\nfunction makeDTF(zone) {\n if (!dtfCache[zone]) {\n dtfCache[zone] = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\"\n });\n }\n return dtfCache[zone];\n}\n\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n hour: 3,\n minute: 4,\n second: 5\n};\n\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n parsed = /(\\d+)\\/(\\d+)\\/(\\d+),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed;\n return [fYear, fMonth, fDay, fHour, fMinute, fSecond];\n}\n\nfunction partsOffset(dtf, date) {\n const formatted = dtf.formatToParts(date),\n filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const { type, value } = formatted[i],\n pos = typeToPos[type];\n\n if (!isUndefined(pos)) {\n filled[pos] = parseInt(value, 10);\n }\n }\n return filled;\n}\n\nlet ianaZoneCache = {};\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nexport default class IANAZone extends Zone {\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */\n static create(name) {\n if (!ianaZoneCache[name]) {\n ianaZoneCache[name] = new IANAZone(name);\n }\n return ianaZoneCache[name];\n }\n\n /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCache() {\n ianaZoneCache = {};\n dtfCache = {};\n }\n\n /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Fantasia/Castle\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidSpecifier(s) {\n return !!(s && s.match(matchingRegex));\n }\n\n /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidZone(zone) {\n try {\n new Intl.DateTimeFormat(\"en-US\", { timeZone: zone }).format();\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Etc/GMT+8 -> -480\n /** @ignore */\n static parseGMTOffset(specifier) {\n if (specifier) {\n const match = specifier.match(/^Etc\\/GMT([+-]\\d{1,2})$/i);\n if (match) {\n return -60 * parseInt(match[1]);\n }\n }\n return null;\n }\n\n constructor(name) {\n super();\n /** @private **/\n this.zoneName = name;\n /** @private **/\n this.valid = IANAZone.isValidZone(name);\n }\n\n /** @override **/\n get type() {\n return \"iana\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get universal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale, this.name);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n const date = new Date(ts),\n dtf = makeDTF(this.name),\n [year, month, day, hour, minute, second] = dtf.formatToParts\n ? partsOffset(dtf, date)\n : hackyOffset(dtf, date),\n // work around https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n adjustedHour = hour === 24 ? 0 : hour;\n\n const asUTC = objToLocalTS({\n year,\n month,\n day,\n hour: adjustedHour,\n minute,\n second,\n millisecond: 0\n });\n\n let asTS = +date;\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / (60 * 1000);\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n }\n\n /** @override **/\n get isValid() {\n return this.valid;\n }\n}\n","import { formatOffset, signedOffset } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nexport default class FixedOffsetZone extends Zone {\n /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */\n static get utcInstance() {\n if (singleton === null) {\n singleton = new FixedOffsetZone(0);\n }\n return singleton;\n }\n\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */\n static instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n }\n\n /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */\n static parseSpecifier(s) {\n if (s) {\n const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) {\n return new FixedOffsetZone(signedOffset(r[1], r[2]));\n }\n }\n return null;\n }\n\n constructor(offset) {\n super();\n /** @private **/\n this.fixed = offset;\n }\n\n /** @override **/\n get type() {\n return \"fixed\";\n }\n\n /** @override **/\n get name() {\n return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n }\n\n /** @override **/\n offsetName() {\n return this.name;\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.fixed, format);\n }\n\n /** @override **/\n get universal() {\n return true;\n }\n\n /** @override **/\n offset() {\n return this.fixed;\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import Zone from \"../zone.js\";\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nexport default class InvalidZone extends Zone {\n constructor(zoneName) {\n super();\n /** @private */\n this.zoneName = zoneName;\n }\n\n /** @override **/\n get type() {\n return \"invalid\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get universal() {\n return false;\n }\n\n /** @override **/\n offsetName() {\n return null;\n }\n\n /** @override **/\n formatOffset() {\n return \"\";\n }\n\n /** @override **/\n offset() {\n return NaN;\n }\n\n /** @override **/\n equals() {\n return false;\n }\n\n /** @override **/\n get isValid() {\n return false;\n }\n}\n","/**\n * @private\n */\n\nimport Zone from \"../zone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport InvalidZone from \"../zones/invalidZone.js\";\n\nimport { isUndefined, isString, isNumber } from \"./util.js\";\n\nexport function normalizeZone(input, defaultZone) {\n let offset;\n if (isUndefined(input) || input === null) {\n return defaultZone;\n } else if (input instanceof Zone) {\n return input;\n } else if (isString(input)) {\n const lowered = input.toLowerCase();\n if (lowered === \"local\") return defaultZone;\n else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;\n else if ((offset = IANAZone.parseGMTOffset(input)) != null) {\n // handle Etc/GMT-4, which V8 chokes on\n return FixedOffsetZone.instance(offset);\n } else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input);\n else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input);\n } else if (isNumber(input)) {\n return FixedOffsetZone.instance(input);\n } else if (typeof input === \"object\" && input.offset && typeof input.offset === \"number\") {\n // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n } else {\n return new InvalidZone(input);\n }\n}\n","import LocalZone from \"./zones/localZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport Locale from \"./impl/locale.js\";\n\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nlet now = () => Date.now(),\n defaultZone = null, // not setting this directly to LocalZone.instance bc loading order issues\n defaultLocale = null,\n defaultNumberingSystem = null,\n defaultOutputCalendar = null,\n throwOnInvalid = false;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nexport default class Settings {\n /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */\n static get now() {\n return now;\n }\n\n /**\n * Set the callback for returning the current timestamp.\n * The function should return a number, which will be interpreted as an Epoch millisecond count\n * @type {function}\n * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n */\n static set now(n) {\n now = n;\n }\n\n /**\n * Get the default time zone to create DateTimes in.\n * @type {string}\n */\n static get defaultZoneName() {\n return Settings.defaultZone.name;\n }\n\n /**\n * Set the default time zone to create DateTimes in. Does not affect existing instances.\n * @type {string}\n */\n static set defaultZoneName(z) {\n if (!z) {\n defaultZone = null;\n } else {\n defaultZone = normalizeZone(z);\n }\n }\n\n /**\n * Get the default time zone object to create DateTimes in. Does not affect existing instances.\n * @type {Zone}\n */\n static get defaultZone() {\n return defaultZone || LocalZone.instance;\n }\n\n /**\n * Get the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultLocale() {\n return defaultLocale;\n }\n\n /**\n * Set the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultLocale(locale) {\n defaultLocale = locale;\n }\n\n /**\n * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultNumberingSystem() {\n return defaultNumberingSystem;\n }\n\n /**\n * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultNumberingSystem(numberingSystem) {\n defaultNumberingSystem = numberingSystem;\n }\n\n /**\n * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultOutputCalendar() {\n return defaultOutputCalendar;\n }\n\n /**\n * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultOutputCalendar(outputCalendar) {\n defaultOutputCalendar = outputCalendar;\n }\n\n /**\n * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static get throwOnInvalid() {\n return throwOnInvalid;\n }\n\n /**\n * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static set throwOnInvalid(t) {\n throwOnInvalid = t;\n }\n\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCaches() {\n Locale.resetCache();\n IANAZone.resetCache();\n }\n}\n","import { hasFormatToParts, hasIntl, padStart, roundTo, hasRelative } from \"./util.js\";\nimport * as English from \"./english.js\";\nimport Settings from \"../settings.js\";\nimport DateTime from \"../datetime.js\";\nimport Formatter from \"./formatter.js\";\n\nlet intlDTCache = {};\nfunction getCachedDTF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlDTCache[key];\n if (!dtf) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n intlDTCache[key] = dtf;\n }\n return dtf;\n}\n\nlet intlNumCache = {};\nfunction getCachedINF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let inf = intlNumCache[key];\n if (!inf) {\n inf = new Intl.NumberFormat(locString, opts);\n intlNumCache[key] = inf;\n }\n return inf;\n}\n\nlet intlRelCache = {};\nfunction getCachedRTF(locString, opts = {}) {\n const { base, ...cacheKeyOpts } = opts; // exclude `base` from the options\n const key = JSON.stringify([locString, cacheKeyOpts]);\n let inf = intlRelCache[key];\n if (!inf) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n intlRelCache[key] = inf;\n }\n return inf;\n}\n\nlet sysLocaleCache = null;\nfunction systemLocale() {\n if (sysLocaleCache) {\n return sysLocaleCache;\n } else if (hasIntl()) {\n const computedSys = new Intl.DateTimeFormat().resolvedOptions().locale;\n // node sometimes defaults to \"und\". Override that because that is dumb\n sysLocaleCache = !computedSys || computedSys === \"und\" ? \"en-US\" : computedSys;\n return sysLocaleCache;\n } else {\n sysLocaleCache = \"en-US\";\n return sysLocaleCache;\n }\n}\n\nfunction parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n\n const uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) {\n return [localeStr];\n } else {\n let options;\n const smaller = localeStr.substring(0, uIndex);\n try {\n options = getCachedDTF(localeStr).resolvedOptions();\n } catch (e) {\n options = getCachedDTF(smaller).resolvedOptions();\n }\n\n const { numberingSystem, calendar } = options;\n // return the smaller one so that we can append the calendar and numbering overrides to it\n return [smaller, numberingSystem, calendar];\n }\n}\n\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (hasIntl()) {\n if (outputCalendar || numberingSystem) {\n localeStr += \"-u\";\n\n if (outputCalendar) {\n localeStr += `-ca-${outputCalendar}`;\n }\n\n if (numberingSystem) {\n localeStr += `-nu-${numberingSystem}`;\n }\n return localeStr;\n } else {\n return localeStr;\n }\n } else {\n return [];\n }\n}\n\nfunction mapMonths(f) {\n const ms = [];\n for (let i = 1; i <= 12; i++) {\n const dt = DateTime.utc(2016, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction mapWeekdays(f) {\n const ms = [];\n for (let i = 1; i <= 7; i++) {\n const dt = DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction listStuff(loc, length, defaultOK, englishFn, intlFn) {\n const mode = loc.listingMode(defaultOK);\n\n if (mode === \"error\") {\n return null;\n } else if (mode === \"en\") {\n return englishFn(length);\n } else {\n return intlFn(length);\n }\n}\n\nfunction supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n return false;\n } else {\n return (\n loc.numberingSystem === \"latn\" ||\n !loc.locale ||\n loc.locale.startsWith(\"en\") ||\n (hasIntl() && new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === \"latn\")\n );\n }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n constructor(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n\n if (!forceSimple && hasIntl()) {\n const intlOpts = { useGrouping: false };\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = getCachedINF(intl, intlOpts);\n }\n }\n\n format(i) {\n if (this.inf) {\n const fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n return padStart(fixed, this.padTo);\n }\n }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n constructor(dt, intl, opts) {\n this.opts = opts;\n this.hasIntl = hasIntl();\n\n let z;\n if (dt.zone.universal && this.hasIntl) {\n // Chromium doesn't support fixed-offset zones like Etc/GMT+8 in its formatter,\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=364374.\n // So we have to make do. Two cases:\n // 1. The format options tell us to show the zone. We can't do that, so the best\n // we can do is format the date in UTC.\n // 2. The format options don't tell us to show the zone. Then we can adjust them\n // the time and tell the formatter to show it to us in UTC, so that the time is right\n // and the bad zone doesn't show up.\n // We can clean all this up when Chrome fixes this.\n z = \"UTC\";\n if (opts.timeZoneName) {\n this.dt = dt;\n } else {\n this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1000);\n }\n } else if (dt.zone.type === \"local\") {\n this.dt = dt;\n } else {\n this.dt = dt;\n z = dt.zone.name;\n }\n\n if (this.hasIntl) {\n const intlOpts = Object.assign({}, this.opts);\n if (z) {\n intlOpts.timeZone = z;\n }\n this.dtf = getCachedDTF(intl, intlOpts);\n }\n }\n\n format() {\n if (this.hasIntl) {\n return this.dtf.format(this.dt.toJSDate());\n } else {\n const tokenFormat = English.formatString(this.opts),\n loc = Locale.create(\"en-US\");\n return Formatter.create(loc).formatDateTimeFromString(this.dt, tokenFormat);\n }\n }\n\n formatToParts() {\n if (this.hasIntl && hasFormatToParts()) {\n return this.dtf.formatToParts(this.dt.toJSDate());\n } else {\n // This is kind of a cop out. We actually could do this for English. However, we couldn't do it for intl strings\n // and IMO it's too weird to have an uncanny valley like that\n return [];\n }\n }\n\n resolvedOptions() {\n if (this.hasIntl) {\n return this.dtf.resolvedOptions();\n } else {\n return {\n locale: \"en-US\",\n numberingSystem: \"latn\",\n outputCalendar: \"gregory\"\n };\n }\n }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n constructor(intl, isEnglish, opts) {\n this.opts = Object.assign({ style: \"long\" }, opts);\n if (!isEnglish && hasRelative()) {\n this.rtf = getCachedRTF(intl, opts);\n }\n }\n\n format(count, unit) {\n if (this.rtf) {\n return this.rtf.format(count, unit);\n } else {\n return English.formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n }\n }\n\n formatToParts(count, unit) {\n if (this.rtf) {\n return this.rtf.formatToParts(count, unit);\n } else {\n return [];\n }\n }\n}\n\n/**\n * @private\n */\n\nexport default class Locale {\n static fromOpts(opts) {\n return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN);\n }\n\n static create(locale, numberingSystem, outputCalendar, defaultToEN = false) {\n const specifiedLocale = locale || Settings.defaultLocale,\n // the system locale is useful for human readable strings but annoying for parsing/formatting known formats\n localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale()),\n numberingSystemR = numberingSystem || Settings.defaultNumberingSystem,\n outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale);\n }\n\n static resetCache() {\n sysLocaleCache = null;\n intlDTCache = {};\n intlNumCache = {};\n intlRelCache = {};\n }\n\n static fromObject({ locale, numberingSystem, outputCalendar } = {}) {\n return Locale.create(locale, numberingSystem, outputCalendar);\n }\n\n constructor(locale, numbering, outputCalendar, specifiedLocale) {\n const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n\n this.weekdaysCache = { format: {}, standalone: {} };\n this.monthsCache = { format: {}, standalone: {} };\n this.meridiemCache = null;\n this.eraCache = {};\n\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n\n get fastNumbers() {\n if (this.fastNumbersCached == null) {\n this.fastNumbersCached = supportsFastNumbers(this);\n }\n\n return this.fastNumbersCached;\n }\n\n listingMode(defaultOK = true) {\n const intl = hasIntl(),\n hasFTP = intl && hasFormatToParts(),\n isActuallyEn = this.isEnglish(),\n hasNoWeirdness =\n (this.numberingSystem === null || this.numberingSystem === \"latn\") &&\n (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n\n if (!hasFTP && !(isActuallyEn && hasNoWeirdness) && !defaultOK) {\n return \"error\";\n } else if (!hasFTP || (isActuallyEn && hasNoWeirdness)) {\n return \"en\";\n } else {\n return \"intl\";\n }\n }\n\n clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n return this;\n } else {\n return Locale.create(\n alts.locale || this.specifiedLocale,\n alts.numberingSystem || this.numberingSystem,\n alts.outputCalendar || this.outputCalendar,\n alts.defaultToEN || false\n );\n }\n }\n\n redefaultToEN(alts = {}) {\n return this.clone(Object.assign({}, alts, { defaultToEN: true }));\n }\n\n redefaultToSystem(alts = {}) {\n return this.clone(Object.assign({}, alts, { defaultToEN: false }));\n }\n\n months(length, format = false, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.months, () => {\n const intl = format ? { month: length, day: \"numeric\" } : { month: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.monthsCache[formatStr][length]) {\n this.monthsCache[formatStr][length] = mapMonths(dt => this.extract(dt, intl, \"month\"));\n }\n return this.monthsCache[formatStr][length];\n });\n }\n\n weekdays(length, format = false, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.weekdays, () => {\n const intl = format\n ? { weekday: length, year: \"numeric\", month: \"long\", day: \"numeric\" }\n : { weekday: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.weekdaysCache[formatStr][length]) {\n this.weekdaysCache[formatStr][length] = mapWeekdays(dt =>\n this.extract(dt, intl, \"weekday\")\n );\n }\n return this.weekdaysCache[formatStr][length];\n });\n }\n\n meridiems(defaultOK = true) {\n return listStuff(\n this,\n undefined,\n defaultOK,\n () => English.meridiems,\n () => {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!this.meridiemCache) {\n const intl = { hour: \"numeric\", hour12: true };\n this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(\n dt => this.extract(dt, intl, \"dayperiod\")\n );\n }\n\n return this.meridiemCache;\n }\n );\n }\n\n eras(length, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.eras, () => {\n const intl = { era: length };\n\n // This is utter bullshit. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!this.eraCache[length]) {\n this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(dt =>\n this.extract(dt, intl, \"era\")\n );\n }\n\n return this.eraCache[length];\n });\n }\n\n extract(dt, intlOpts, field) {\n const df = this.dtFormatter(dt, intlOpts),\n results = df.formatToParts(),\n matching = results.find(m => m.type.toLowerCase() === field);\n return matching ? matching.value : null;\n }\n\n numberFormatter(opts = {}) {\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n }\n\n dtFormatter(dt, intlOpts = {}) {\n return new PolyDateFormatter(dt, this.intl, intlOpts);\n }\n\n relFormatter(opts = {}) {\n return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n }\n\n isEnglish() {\n return (\n this.locale === \"en\" ||\n this.locale.toLowerCase() === \"en-us\" ||\n (hasIntl() && new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith(\"en-us\"))\n );\n }\n\n equals(other) {\n return (\n this.locale === other.locale &&\n this.numberingSystem === other.numberingSystem &&\n this.outputCalendar === other.outputCalendar\n );\n }\n}\n","import {\n untruncateYear,\n signedOffset,\n parseInteger,\n parseMillis,\n ianaRegex,\n isUndefined\n} from \"./util.js\";\nimport * as English from \"./english.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nfunction combineRegexes(...regexes) {\n const full = regexes.reduce((f, r) => f + r.source, \"\");\n return RegExp(`^${full}$`);\n}\n\nfunction combineExtractors(...extractors) {\n return m =>\n extractors\n .reduce(\n ([mergedVals, mergedZone, cursor], ex) => {\n const [val, zone, next] = ex(m, cursor);\n return [Object.assign(mergedVals, val), mergedZone || zone, next];\n },\n [{}, null, 1]\n )\n .slice(0, 2);\n}\n\nfunction parse(s, ...patterns) {\n if (s == null) {\n return [null, null];\n }\n\n for (const [regex, extractor] of patterns) {\n const m = regex.exec(s);\n if (m) {\n return extractor(m);\n }\n }\n return [null, null];\n}\n\nfunction simpleParse(...keys) {\n return (match, cursor) => {\n const ret = {};\n let i;\n\n for (i = 0; i < keys.length; i++) {\n ret[keys[i]] = parseInteger(match[cursor + i]);\n }\n return [ret, null, cursor + i];\n };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:(Z)|([+-]\\d\\d)(?::?(\\d\\d))?)/,\n isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/,\n isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${offsetRegex.source}?`),\n isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`),\n isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/,\n isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/,\n isoOrdinalRegex = /(\\d{4})-?(\\d{3})/,\n extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\"),\n extractISOOrdinalData = simpleParse(\"year\", \"ordinal\"),\n sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/, // dumbed-down version of the ISO one\n sqlTimeRegex = RegExp(\n `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`\n ),\n sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\n\nfunction int(match, pos, fallback) {\n const m = match[pos];\n return isUndefined(m) ? fallback : parseInteger(m);\n}\n\nfunction extractISOYmd(match, cursor) {\n const item = {\n year: int(match, cursor),\n month: int(match, cursor + 1, 1),\n day: int(match, cursor + 2, 1)\n };\n\n return [item, null, cursor + 3];\n}\n\nfunction extractISOTime(match, cursor) {\n const item = {\n hour: int(match, cursor, 0),\n minute: int(match, cursor + 1, 0),\n second: int(match, cursor + 2, 0),\n millisecond: parseMillis(match[cursor + 3])\n };\n\n return [item, null, cursor + 4];\n}\n\nfunction extractISOOffset(match, cursor) {\n const local = !match[cursor] && !match[cursor + 1],\n fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n zone = local ? null : FixedOffsetZone.instance(fullOffset);\n return [{}, zone, cursor + 3];\n}\n\nfunction extractIANAZone(match, cursor) {\n const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n return [{}, zone, cursor + 1];\n}\n\n// ISO duration parsing\n\nconst isoDuration = /^-?P(?:(?:(-?\\d{1,9})Y)?(?:(-?\\d{1,9})M)?(?:(-?\\d{1,9})W)?(?:(-?\\d{1,9})D)?(?:T(?:(-?\\d{1,9})H)?(?:(-?\\d{1,9})M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,9}))?S)?)?)$/;\n\nfunction extractISODuration(match) {\n const [\n s,\n yearStr,\n monthStr,\n weekStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr,\n millisecondsStr\n ] = match;\n\n const hasNegativePrefix = s[0] === \"-\";\n\n const maybeNegate = num => (num && hasNegativePrefix ? -num : num);\n\n return [\n {\n years: maybeNegate(parseInteger(yearStr)),\n months: maybeNegate(parseInteger(monthStr)),\n weeks: maybeNegate(parseInteger(weekStr)),\n days: maybeNegate(parseInteger(dayStr)),\n hours: maybeNegate(parseInteger(hourStr)),\n minutes: maybeNegate(parseInteger(minuteStr)),\n seconds: maybeNegate(parseInteger(secondStr)),\n milliseconds: maybeNegate(parseMillis(millisecondsStr))\n }\n ];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n};\n\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n const result = {\n year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n month: English.monthsShort.indexOf(monthStr) + 1,\n day: parseInteger(dayStr),\n hour: parseInteger(hourStr),\n minute: parseInteger(minuteStr)\n };\n\n if (secondStr) result.second = parseInteger(secondStr);\n if (weekdayStr) {\n result.weekday =\n weekdayStr.length > 3\n ? English.weekdaysLong.indexOf(weekdayStr) + 1\n : English.weekdaysShort.indexOf(weekdayStr) + 1;\n }\n\n return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\n\nfunction extractRFC2822(match) {\n const [\n ,\n weekdayStr,\n dayStr,\n monthStr,\n yearStr,\n hourStr,\n minuteStr,\n secondStr,\n obsOffset,\n milOffset,\n offHourStr,\n offMinuteStr\n ] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n\n let offset;\n if (obsOffset) {\n offset = obsOffsets[obsOffset];\n } else if (milOffset) {\n offset = 0;\n } else {\n offset = signedOffset(offHourStr, offMinuteStr);\n }\n\n return [result, new FixedOffsetZone(offset)];\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^)]*\\)|[\\n\\t]/g, \" \")\n .replace(/(\\s\\s+)/g, \" \")\n .trim();\n}\n\n// http date\n\nconst rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n rfc850 = /^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\n\nfunction extractRFC1123Or850(match) {\n const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nfunction extractASCII(match) {\n const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\n\nconst extractISOYmdTimeAndOffset = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset\n);\nconst extractISOWeekTimeAndOffset = combineExtractors(\n extractISOWeekData,\n extractISOTime,\n extractISOOffset\n);\nconst extractISOOrdinalDataAndTime = combineExtractors(extractISOOrdinalData, extractISOTime);\nconst extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset);\n\n/**\n * @private\n */\n\nexport function parseISODate(s) {\n return parse(\n s,\n [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],\n [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDataAndTime],\n [isoTimeCombinedRegex, extractISOTimeAndOffset]\n );\n}\n\nexport function parseRFC2822Date(s) {\n return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\n\nexport function parseHTTPDate(s) {\n return parse(\n s,\n [rfc1123, extractRFC1123Or850],\n [rfc850, extractRFC1123Or850],\n [ascii, extractASCII]\n );\n}\n\nexport function parseISODuration(s) {\n return parse(s, [isoDuration, extractISODuration]);\n}\n\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\n\nconst extractISOYmdTimeOffsetAndIANAZone = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\nexport function parseSQL(s) {\n return parse(\n s,\n [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeOffsetAndIANAZone],\n [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]\n );\n}\n","import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from \"./errors.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Locale from \"./impl/locale.js\";\nimport { parseISODuration } from \"./impl/regexParser.js\";\nimport {\n asNumber,\n hasOwnProperty,\n isNumber,\n isUndefined,\n normalizeObject,\n roundTo\n} from \"./impl/util.js\";\nimport Settings from \"./settings.js\";\n\nconst INVALID = \"Invalid Duration\";\n\n// unit conversion constants\nconst lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 7 * 24,\n minutes: 7 * 24 * 60,\n seconds: 7 * 24 * 60 * 60,\n milliseconds: 7 * 24 * 60 * 60 * 1000\n },\n days: {\n hours: 24,\n minutes: 24 * 60,\n seconds: 24 * 60 * 60,\n milliseconds: 24 * 60 * 60 * 1000\n },\n hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1000 },\n minutes: { seconds: 60, milliseconds: 60 * 1000 },\n seconds: { milliseconds: 1000 }\n },\n casualMatrix = Object.assign(\n {\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 365 * 24,\n minutes: 365 * 24 * 60,\n seconds: 365 * 24 * 60 * 60,\n milliseconds: 365 * 24 * 60 * 60 * 1000\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 91 * 24,\n minutes: 91 * 24 * 60,\n seconds: 91 * 24 * 60 * 60,\n milliseconds: 91 * 24 * 60 * 60 * 1000\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 30 * 24,\n minutes: 30 * 24 * 60,\n seconds: 30 * 24 * 60 * 60,\n milliseconds: 30 * 24 * 60 * 60 * 1000\n }\n },\n lowOrderMatrix\n ),\n daysInYearAccurate = 146097.0 / 400,\n daysInMonthAccurate = 146097.0 / 4800,\n accurateMatrix = Object.assign(\n {\n years: {\n quarters: 4,\n months: 12,\n weeks: daysInYearAccurate / 7,\n days: daysInYearAccurate,\n hours: daysInYearAccurate * 24,\n minutes: daysInYearAccurate * 24 * 60,\n seconds: daysInYearAccurate * 24 * 60 * 60,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000\n },\n quarters: {\n months: 3,\n weeks: daysInYearAccurate / 28,\n days: daysInYearAccurate / 4,\n hours: (daysInYearAccurate * 24) / 4,\n minutes: (daysInYearAccurate * 24 * 60) / 4,\n seconds: (daysInYearAccurate * 24 * 60 * 60) / 4,\n milliseconds: (daysInYearAccurate * 24 * 60 * 60 * 1000) / 4\n },\n months: {\n weeks: daysInMonthAccurate / 7,\n days: daysInMonthAccurate,\n hours: daysInMonthAccurate * 24,\n minutes: daysInMonthAccurate * 24 * 60,\n seconds: daysInMonthAccurate * 24 * 60 * 60,\n milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000\n }\n },\n lowOrderMatrix\n );\n\n// units ordered by size\nconst orderedUnits = [\n \"years\",\n \"quarters\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\"\n];\n\nconst reverseUnits = orderedUnits.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone(dur, alts, clear = false) {\n // deep merge for vals\n const conf = {\n values: clear ? alts.values : Object.assign({}, dur.values, alts.values || {}),\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy\n };\n return new Duration(conf);\n}\n\nfunction antiTrunc(n) {\n return n < 0 ? Math.floor(n) : Math.ceil(n);\n}\n\n// NB: mutates parameters\nfunction convert(matrix, fromMap, fromUnit, toMap, toUnit) {\n const conv = matrix[toUnit][fromUnit],\n raw = fromMap[fromUnit] / conv,\n sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]),\n // ok, so this is wild, but see the matrix in the tests\n added =\n !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw);\n toMap[toUnit] += added;\n fromMap[fromUnit] -= added * conv;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n reverseUnits.reduce((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n convert(matrix, vals, previous, vals, current);\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime.plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration.years}, {@link Duration.months}, {@link Duration.weeks}, {@link Duration.days}, {@link Duration.hours}, {@link Duration.minutes}, {@link Duration.seconds}, {@link Duration.milliseconds} accessors.\n * * **Configuration** See {@link Duration.locale} and {@link Duration.numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration.plus}, {@link Duration.minus}, {@link Duration.normalize}, {@link Duration.set}, {@link Duration.reconfigure}, {@link Duration.shiftTo}, and {@link Duration.negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration.as}, {@link Duration.toISO}, {@link Duration.toFormat}, and {@link Duration.toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nexport default class Duration {\n /**\n * @private\n */\n constructor(config) {\n const accurate = config.conversionAccuracy === \"longterm\" || false;\n /**\n * @access private\n */\n this.values = config.values;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.matrix = accurate ? accurateMatrix : casualMatrix;\n /**\n * @access private\n */\n this.isLuxonDuration = true;\n }\n\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromMillis(count, opts) {\n return Duration.fromObject(Object.assign({ milliseconds: count }, opts));\n }\n\n /**\n * Create a Duration from a Javascript object with keys like 'years' and 'hours.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {string} [obj.locale='en-US'] - the locale to use\n * @param {string} obj.numberingSystem - the numbering system to use\n * @param {string} [obj.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromObject(obj) {\n if (obj == null || typeof obj !== \"object\") {\n throw new InvalidArgumentError(\n `Duration.fromObject: argument expected to be an object, got ${\n obj === null ? \"null\" : typeof obj\n }`\n );\n }\n return new Duration({\n values: normalizeObject(obj, Duration.normalizeUnit, [\n \"locale\",\n \"numberingSystem\",\n \"conversionAccuracy\",\n \"zone\" // a bit of debt; it's super inconvenient internally not to be able to blindly pass this\n ]),\n loc: Locale.fromObject(obj),\n conversionAccuracy: obj.conversionAccuracy\n });\n }\n\n /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */\n static fromISO(text, opts) {\n const [parsed] = parseISODuration(text);\n if (parsed) {\n const obj = Object.assign(parsed, opts);\n return Duration.fromObject(obj);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDurationError(invalid);\n } else {\n return new Duration({ invalid });\n }\n }\n\n /**\n * @private\n */\n static normalizeUnit(unit) {\n const normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\"\n }[unit ? unit.toLowerCase() : unit];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n }\n\n /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDuration(o) {\n return (o && o.isLuxonDuration) || false;\n }\n\n /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * The duration will be converted to the set of units in the format string using {@link Duration.shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n const fmtOpts = Object.assign({}, opts, {\n floor: opts.round !== false && opts.floor !== false\n });\n return this.isValid\n ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a Javascript object with this Duration's values.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = Object.assign({}, this.values);\n\n if (opts.includeConfig) {\n base.conversionAccuracy = this.conversionAccuracy;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */\n toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n\n let s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)\n s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0)\n // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */\n toString() {\n return this.toISO();\n }\n\n /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */\n valueOf() {\n return this.as(\"milliseconds\");\n }\n\n /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n plus(duration) {\n if (!this.isValid) return this;\n\n const dur = friendlyDuration(duration),\n result = {};\n\n for (const k of orderedUnits) {\n if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n result[k] = dur.get(k) + this.get(k);\n }\n }\n\n return clone(this, { values: result }, true);\n }\n\n /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n minus(duration) {\n if (!this.isValid) return this;\n\n const dur = friendlyDuration(duration);\n return this.plus(dur.negate());\n }\n\n /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit((x, u) => u === \"hour\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */\n mapUnits(fn) {\n if (!this.isValid) return this;\n const result = {};\n for (const k of Object.keys(this.values)) {\n result[k] = asNumber(fn(this.values[k], k));\n }\n return clone(this, { values: result }, true);\n }\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).years //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).months //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).days //=> 3\n * @return {number}\n */\n get(unit) {\n return this[Duration.normalizeUnit(unit)];\n }\n\n /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const mixed = Object.assign(this.values, normalizeObject(values, Duration.normalizeUnit, []));\n return clone(this, { values: mixed });\n }\n\n /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */\n reconfigure({ locale, numberingSystem, conversionAccuracy } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem }),\n opts = { loc };\n\n if (conversionAccuracy) {\n opts.conversionAccuracy = conversionAccuracy;\n }\n\n return clone(this, opts);\n }\n\n /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */\n as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n }\n\n /**\n * Reduce this Duration to its canonical representation in its current units.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @return {Duration}\n */\n normalize() {\n if (!this.isValid) return this;\n const vals = this.toObject();\n normalizeValues(this.matrix, vals);\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */\n shiftTo(...units) {\n if (!this.isValid) return this;\n\n if (units.length === 0) {\n return this;\n }\n\n units = units.map(u => Duration.normalizeUnit(u));\n\n const built = {},\n accumulated = {},\n vals = this.toObject();\n let lastUnit;\n\n for (const k of orderedUnits) {\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n\n let own = 0;\n\n // anything we haven't boiled down yet should get boiled to this unit\n for (const ak in accumulated) {\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n\n // plus anything that's already in this unit\n if (isNumber(vals[k])) {\n own += vals[k];\n }\n\n const i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = own - i; // we'd like to absorb these fractions in another unit\n\n // plus anything further down the chain that should be rolled up in to this\n for (const down in vals) {\n if (orderedUnits.indexOf(down) > orderedUnits.indexOf(k)) {\n convert(this.matrix, vals, down, built, k);\n }\n }\n // otherwise, keep it in the wings to boil it later\n } else if (isNumber(vals[k])) {\n accumulated[k] = vals[k];\n }\n }\n\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for (const key in accumulated) {\n if (accumulated[key] !== 0) {\n built[lastUnit] +=\n key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n }\n }\n\n return clone(this, { values: built }, true).normalize();\n }\n\n /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */\n negate() {\n if (!this.isValid) return this;\n const negated = {};\n for (const k of Object.keys(this.values)) {\n negated[k] = -this.values[k];\n }\n return clone(this, { values: negated }, true);\n }\n\n /**\n * Get the years.\n * @type {number}\n */\n get years() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n\n /**\n * Get the quarters.\n * @type {number}\n */\n get quarters() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n\n /**\n * Get the months.\n * @type {number}\n */\n get months() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n\n /**\n * Get the weeks\n * @type {number}\n */\n get weeks() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n\n /**\n * Get the days.\n * @type {number}\n */\n get days() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n\n /**\n * Get the hours.\n * @type {number}\n */\n get hours() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n\n /**\n * Get the minutes.\n * @type {number}\n */\n get minutes() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n\n /**\n * Get the seconds.\n * @return {number}\n */\n get seconds() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n\n /**\n * Get the milliseconds.\n * @return {number}\n */\n get milliseconds() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n\n /**\n * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n * on invalid DateTimes or Intervals.\n * @return {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this Duration became invalid, or null if the Duration is valid\n * @return {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n if (!this.loc.equals(other.loc)) {\n return false;\n }\n\n for (const u of orderedUnits) {\n if (this.values[u] !== other.values[u]) {\n return false;\n }\n }\n return true;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDuration(durationish) {\n if (isNumber(durationish)) {\n return Duration.fromMillis(durationish);\n } else if (Duration.isDuration(durationish)) {\n return durationish;\n } else if (typeof durationish === \"object\") {\n return Duration.fromObject(durationish);\n } else {\n throw new InvalidArgumentError(\n `Unknown duration argument ${durationish} of type ${typeof durationish}`\n );\n }\n}\n","import DateTime, { friendlyDateTime } from \"./datetime.js\";\nimport Duration, { friendlyDuration } from \"./duration.js\";\nimport Settings from \"./settings.js\";\nimport { InvalidArgumentError, InvalidIntervalError } from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\n \"end before start\",\n `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`\n );\n } else {\n return null;\n }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link fromDateTimes}, {@link after}, {@link before}, or {@link fromISO}.\n * * **Accessors** Use {@link start} and {@link end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link count}, {@link length}, {@link hasSame}, {@link contains}, {@link isAfter}, or {@link isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link set}, {@link splitAt}, {@link splitBy}, {@link divideEqually}, {@link merge}, {@link xor}, {@link union}, {@link intersection}, or {@link difference}.\n * * **Comparison** To compare this Interval to another one, use {@link equals}, {@link overlaps}, {@link abutsStart}, {@link abutsEnd}, {@link engulfs}.\n * * **Output** To convert the Interval into other representations, see {@link toString}, {@link toISO}, {@link toISODate}, {@link toISOTime}, {@link toFormat}, and {@link toDuration}.\n */\nexport default class Interval {\n /**\n * @private\n */\n constructor(config) {\n /**\n * @access private\n */\n this.s = config.start;\n /**\n * @access private\n */\n this.e = config.end;\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.isLuxonInterval = true;\n }\n\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidIntervalError(invalid);\n } else {\n return new Interval({ invalid });\n }\n }\n\n /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */\n static fromDateTimes(start, end) {\n const builtStart = friendlyDateTime(start),\n builtEnd = friendlyDateTime(end);\n\n const validateError = validateStartEnd(builtStart, builtEnd);\n\n if (validateError == null) {\n return new Interval({\n start: builtStart,\n end: builtEnd\n });\n } else {\n return validateError;\n }\n }\n\n /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static after(start, duration) {\n const dur = friendlyDuration(duration),\n dt = friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n }\n\n /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static before(end, duration) {\n const dur = friendlyDuration(duration),\n dt = friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n }\n\n /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `/`, `/`, and `/` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime.fromISO} and optionally {@link Duration.fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */\n static fromISO(text, opts) {\n const [s, e] = (text || \"\").split(\"/\", 2);\n if (s && e) {\n let start, startIsValid;\n try {\n start = DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n\n let end, endIsValid;\n try {\n end = DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n\n if (startIsValid && endIsValid) {\n return Interval.fromDateTimes(start, end);\n }\n\n if (startIsValid) {\n const dur = Duration.fromISO(e, opts);\n if (dur.isValid) {\n return Interval.after(start, dur);\n }\n } else if (endIsValid) {\n const dur = Duration.fromISO(s, opts);\n if (dur.isValid) {\n return Interval.before(end, dur);\n }\n }\n }\n return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n\n /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isInterval(o) {\n return (o && o.isLuxonInterval) || false;\n }\n\n /**\n * Returns the start of the Interval\n * @type {DateTime}\n */\n get start() {\n return this.isValid ? this.s : null;\n }\n\n /**\n * Returns the end of the Interval\n * @type {DateTime}\n */\n get end() {\n return this.isValid ? this.e : null;\n }\n\n /**\n * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n * @type {boolean}\n */\n get isValid() {\n return this.invalidReason === null;\n }\n\n /**\n * Returns an error code if this Interval is invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */\n length(unit = \"milliseconds\") {\n return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n }\n\n /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @return {number}\n */\n count(unit = \"milliseconds\") {\n if (!this.isValid) return NaN;\n const start = this.start.startOf(unit),\n end = this.end.startOf(unit);\n return Math.floor(end.diff(start, unit).get(unit)) + 1;\n }\n\n /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */\n hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n }\n\n /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */\n isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n }\n\n /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n }\n\n /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n }\n\n /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n }\n\n /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */\n set({ start, end } = {}) {\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n }\n\n /**\n * Split this Interval at each of the specified DateTimes\n * @param {...[DateTime]} dateTimes - the unit of time to count.\n * @return {[Interval]}\n */\n splitAt(...dateTimes) {\n if (!this.isValid) return [];\n const sorted = dateTimes\n .map(friendlyDateTime)\n .filter(d => this.contains(d))\n .sort(),\n results = [];\n let { s } = this,\n i = 0;\n\n while (s < this.e) {\n const added = sorted[i] || this.e,\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {[Interval]}\n */\n splitBy(duration) {\n const dur = friendlyDuration(duration);\n\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n return [];\n }\n\n let { s } = this,\n added,\n next;\n\n const results = [];\n while (s < this.e) {\n added = s.plus(dur);\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {[Interval]}\n */\n divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n }\n\n /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */\n overlaps(other) {\n return this.e > other.s && this.s < other.e;\n }\n\n /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n }\n\n /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n }\n\n /**\n * Return whether this Interval engulfs the start and end of the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n }\n\n /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n return this.s.equals(other.s) && this.e.equals(other.e);\n }\n\n /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */\n intersection(other) {\n if (!this.isValid) return this;\n const s = this.s > other.s ? this.s : other.s,\n e = this.e < other.e ? this.e : other.e;\n\n if (s > e) {\n return null;\n } else {\n return Interval.fromDateTimes(s, e);\n }\n }\n\n /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */\n union(other) {\n if (!this.isValid) return this;\n const s = this.s < other.s ? this.s : other.s,\n e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n }\n\n /**\n * Merge an array of Intervals into a equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * @param {[Interval]} intervals\n * @return {[Interval]}\n */\n static merge(intervals) {\n const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(\n ([sofar, current], item) => {\n if (!current) {\n return [sofar, item];\n } else if (current.overlaps(item) || current.abutsStart(item)) {\n return [sofar, current.union(item)];\n } else {\n return [sofar.concat([current]), item];\n }\n },\n [[], null]\n );\n if (final) {\n found.push(final);\n }\n return found;\n }\n\n /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {[Interval]} intervals\n * @return {[Interval]}\n */\n static xor(intervals) {\n let start = null,\n currentCount = 0;\n const results = [],\n ends = intervals.map(i => [{ time: i.s, type: \"s\" }, { time: i.e, type: \"e\" }]),\n flattened = Array.prototype.concat(...ends),\n arr = flattened.sort((a, b) => a.time - b.time);\n\n for (const i of arr) {\n currentCount += i.type === \"s\" ? 1 : -1;\n\n if (currentCount === 1) {\n start = i.time;\n } else {\n if (start && +start !== +i.time) {\n results.push(Interval.fromDateTimes(start, i.time));\n }\n\n start = null;\n }\n }\n\n return Interval.merge(results);\n }\n\n /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {[Interval]}\n */\n difference(...intervals) {\n return Interval.xor([this].concat(intervals))\n .map(i => this.intersection(i))\n .filter(i => i && !i.isEmpty());\n }\n\n /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */\n toString() {\n if (!this.isValid) return INVALID;\n return `[${this.s.toISO()} – ${this.e.toISO()})`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime.toISO}\n * @return {string}\n */\n toISO(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */\n toISODate() {\n if (!this.isValid) return INVALID;\n return `${this.s.toISODate()}/${this.e.toISODate()}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime.toISO}\n * @return {string}\n */\n toISOTime(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this Interval formatted according to the specified format string.\n * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime.toFormat} for details.\n * @param {Object} opts - options\n * @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations\n * @return {string}\n */\n toFormat(dateFormat, { separator = \" – \" } = {}) {\n if (!this.isValid) return INVALID;\n return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n }\n\n /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */\n toDuration(unit, opts) {\n if (!this.isValid) {\n return Duration.invalid(this.invalidReason);\n }\n return this.e.diff(this.s, unit, opts);\n }\n\n /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */\n mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n }\n}\n","import DateTime from \"./datetime.js\";\nimport Settings from \"./settings.js\";\nimport Locale from \"./impl/locale.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nimport { hasFormatToParts, hasIntl, hasRelative } from \"./impl/util.js\";\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nexport default class Info {\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */\n static hasDST(zone = Settings.defaultZone) {\n const proto = DateTime.local()\n .setZone(zone)\n .set({ month: 12 });\n\n return !zone.universal && proto.offset !== proto.set({ month: 6 }).offset;\n }\n\n /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */\n static isValidIANAZone(zone) {\n return IANAZone.isValidSpecifier(zone) && IANAZone.isValidZone(zone);\n }\n\n /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone.isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */\n static normalizeZone(input) {\n return normalizeZone(input, Settings.defaultZone);\n }\n\n /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {[string]}\n */\n static months(\n length = \"long\",\n { locale = null, numberingSystem = null, outputCalendar = \"gregory\" } = {}\n ) {\n return Locale.create(locale, numberingSystem, outputCalendar).months(length);\n }\n\n /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {[string]}\n */\n static monthsFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, outputCalendar = \"gregory\" } = {}\n ) {\n return Locale.create(locale, numberingSystem, outputCalendar).months(length, true);\n }\n\n /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {[string]}\n */\n static weekdays(length = \"long\", { locale = null, numberingSystem = null } = {}) {\n return Locale.create(locale, numberingSystem, null).weekdays(length);\n }\n\n /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link weekdays}\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @return {[string]}\n */\n static weekdaysFormat(length = \"long\", { locale = null, numberingSystem = null } = {}) {\n return Locale.create(locale, numberingSystem, null).weekdays(length, true);\n }\n\n /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {[string]}\n */\n static meridiems({ locale = null } = {}) {\n return Locale.create(locale).meridiems();\n }\n\n /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {[string]}\n */\n static eras(length = \"short\", { locale = null } = {}) {\n return Locale.create(locale, null, \"gregory\").eras(length);\n }\n\n /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, timezone support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `zones`: whether this environment supports IANA timezones\n * * `intlTokens`: whether this environment supports internationalized token-based formatting/parsing\n * * `intl`: whether this environment supports general internationalization\n * * `relative`: whether this environment supports relative time formatting\n * @example Info.features() //=> { intl: true, intlTokens: false, zones: true, relative: false }\n * @return {Object}\n */\n static features() {\n let intl = false,\n intlTokens = false,\n zones = false,\n relative = false;\n\n if (hasIntl()) {\n intl = true;\n intlTokens = hasFormatToParts();\n relative = hasRelative();\n\n try {\n zones =\n new Intl.DateTimeFormat(\"en\", { timeZone: \"America/New_York\" }).resolvedOptions()\n .timeZone === \"America/New_York\";\n } catch (e) {\n zones = false;\n }\n }\n\n return { intl, intlTokens, zones, relative };\n }\n}\n","import Duration from \"../duration.js\";\n\nfunction dayDiff(earlier, later) {\n const utcDayStart = dt =>\n dt\n .toUTC(0, { keepLocalTime: true })\n .startOf(\"day\")\n .valueOf(),\n ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\n\nfunction highOrderDiffs(cursor, later, units) {\n const differs = [\n [\"years\", (a, b) => b.year - a.year],\n [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12],\n [\n \"weeks\",\n (a, b) => {\n const days = dayDiff(a, b);\n return (days - (days % 7)) / 7;\n }\n ],\n [\"days\", dayDiff]\n ];\n\n const results = {};\n let lowestOrder, highWater;\n\n for (const [unit, differ] of differs) {\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n\n let delta = differ(cursor, later);\n highWater = cursor.plus({ [unit]: delta });\n\n if (highWater > later) {\n cursor = cursor.plus({ [unit]: delta - 1 });\n delta -= 1;\n } else {\n cursor = highWater;\n }\n\n results[unit] = delta;\n }\n }\n\n return [cursor, results, highWater, lowestOrder];\n}\n\nexport default function(earlier, later, units, opts) {\n let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n\n const remainingMillis = later - cursor;\n\n const lowerOrderUnits = units.filter(\n u => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0\n );\n\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n highWater = cursor.plus({ [lowestOrder]: 1 });\n }\n\n if (highWater !== cursor) {\n results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n }\n\n const duration = Duration.fromObject(Object.assign(results, opts));\n\n if (lowerOrderUnits.length > 0) {\n return Duration.fromMillis(remainingMillis, opts)\n .shiftTo(...lowerOrderUnits)\n .plus(duration);\n } else {\n return duration;\n }\n}\n","const numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\"\n};\n\nconst numberingSystemsUTF16 = {\n arab: [1632, 1641],\n arabext: [1776, 1785],\n bali: [6992, 7001],\n beng: [2534, 2543],\n deva: [2406, 2415],\n fullwide: [65296, 65303],\n gujr: [2790, 2799],\n khmr: [6112, 6121],\n knda: [3302, 3311],\n laoo: [3792, 3801],\n limb: [6470, 6479],\n mlym: [3430, 3439],\n mong: [6160, 6169],\n mymr: [4160, 4169],\n orya: [2918, 2927],\n tamldec: [3046, 3055],\n telu: [3174, 3183],\n thai: [3664, 3673],\n tibt: [3872, 3881]\n};\n\n// eslint-disable-next-line\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\n\nexport function parseDigits(str) {\n let value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (str[i].search(numberingSystems.hanidec) !== -1) {\n value += hanidecChars.indexOf(str[i]);\n } else {\n for (const key in numberingSystemsUTF16) {\n const [min, max] = numberingSystemsUTF16[key];\n if (code >= min && code <= max) {\n value += code - min;\n }\n }\n }\n }\n return parseInt(value, 10);\n } else {\n return value;\n }\n}\n\nexport function digitRegex({ numberingSystem }, append = \"\") {\n return new RegExp(`${numberingSystems[numberingSystem || \"latn\"]}${append}`);\n}\n","import { parseMillis, isUndefined, untruncateYear, signedOffset, hasOwnProperty } from \"./util.js\";\nimport Formatter from \"./formatter.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport DateTime from \"../datetime.js\";\nimport { digitRegex, parseDigits } from \"./digits.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\n\nfunction intUnit(regex, post = i => i) {\n return { regex, deser: ([s]) => post(parseDigits(s)) };\n}\n\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `( |${NBSP})`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\n\nfunction fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\n\nfunction stripInsensitivities(s) {\n return s\n .replace(/\\./g, \"\") // ignore dots that were made optional\n .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\n\nfunction oneOf(strings, startIndex) {\n if (strings === null) {\n return null;\n } else {\n return {\n regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n deser: ([s]) =>\n strings.findIndex(i => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex\n };\n }\n}\n\nfunction offset(regex, groups) {\n return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };\n}\n\nfunction simple(regex) {\n return { regex, deser: ([s]) => s };\n}\n\nfunction escapeToken(value) {\n // eslint-disable-next-line no-useless-escape\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\nfunction unitForToken(token, loc) {\n const one = digitRegex(loc),\n two = digitRegex(loc, \"{2}\"),\n three = digitRegex(loc, \"{3}\"),\n four = digitRegex(loc, \"{4}\"),\n six = digitRegex(loc, \"{6}\"),\n oneOrTwo = digitRegex(loc, \"{1,2}\"),\n oneToThree = digitRegex(loc, \"{1,3}\"),\n oneToSix = digitRegex(loc, \"{1,6}\"),\n oneToNine = digitRegex(loc, \"{1,9}\"),\n twoToFour = digitRegex(loc, \"{2,4}\"),\n fourToSix = digitRegex(loc, \"{4,6}\"),\n literal = t => ({ regex: RegExp(escapeToken(t.val)), deser: ([s]) => s, literal: true }),\n unitate = t => {\n if (token.literal) {\n return literal(t);\n }\n switch (t.val) {\n // era\n case \"G\":\n return oneOf(loc.eras(\"short\", false), 0);\n case \"GG\":\n return oneOf(loc.eras(\"long\", false), 0);\n // years\n case \"y\":\n return intUnit(oneToSix);\n case \"yy\":\n return intUnit(twoToFour, untruncateYear);\n case \"yyyy\":\n return intUnit(four);\n case \"yyyyy\":\n return intUnit(fourToSix);\n case \"yyyyyy\":\n return intUnit(six);\n // months\n case \"M\":\n return intUnit(oneOrTwo);\n case \"MM\":\n return intUnit(two);\n case \"MMM\":\n return oneOf(loc.months(\"short\", true, false), 1);\n case \"MMMM\":\n return oneOf(loc.months(\"long\", true, false), 1);\n case \"L\":\n return intUnit(oneOrTwo);\n case \"LL\":\n return intUnit(two);\n case \"LLL\":\n return oneOf(loc.months(\"short\", false, false), 1);\n case \"LLLL\":\n return oneOf(loc.months(\"long\", false, false), 1);\n // dates\n case \"d\":\n return intUnit(oneOrTwo);\n case \"dd\":\n return intUnit(two);\n // ordinals\n case \"o\":\n return intUnit(oneToThree);\n case \"ooo\":\n return intUnit(three);\n // time\n case \"HH\":\n return intUnit(two);\n case \"H\":\n return intUnit(oneOrTwo);\n case \"hh\":\n return intUnit(two);\n case \"h\":\n return intUnit(oneOrTwo);\n case \"mm\":\n return intUnit(two);\n case \"m\":\n return intUnit(oneOrTwo);\n case \"q\":\n return intUnit(oneOrTwo);\n case \"qq\":\n return intUnit(two);\n case \"s\":\n return intUnit(oneOrTwo);\n case \"ss\":\n return intUnit(two);\n case \"S\":\n return intUnit(oneToThree);\n case \"SSS\":\n return intUnit(three);\n case \"u\":\n return simple(oneToNine);\n // meridiem\n case \"a\":\n return oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return intUnit(four);\n case \"kk\":\n return intUnit(twoToFour, untruncateYear);\n // weekNumber (W)\n case \"W\":\n return intUnit(oneOrTwo);\n case \"WW\":\n return intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return intUnit(one);\n case \"EEE\":\n return oneOf(loc.weekdays(\"short\", false, false), 1);\n case \"EEEE\":\n return oneOf(loc.weekdays(\"long\", false, false), 1);\n case \"ccc\":\n return oneOf(loc.weekdays(\"short\", true, false), 1);\n case \"cccc\":\n return oneOf(loc.weekdays(\"long\", true, false), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n case \"ZZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return simple(/[a-z_+-/]{1,256}?/i);\n default:\n return literal(t);\n }\n };\n\n const unit = unitate(token) || {\n invalidReason: MISSING_FTP\n };\n\n unit.token = token;\n\n return unit;\n}\n\nconst partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\"\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\"\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\"\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\"\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour: {\n numeric: \"h\",\n \"2-digit\": \"hh\"\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\"\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\"\n }\n};\n\nfunction tokenForPart(part, locale, formatOpts) {\n const { type, value } = part;\n\n if (type === \"literal\") {\n return {\n literal: true,\n val: value\n };\n }\n\n const style = formatOpts[type];\n\n let val = partTypeStyleToTokenVal[type];\n if (typeof val === \"object\") {\n val = val[style];\n }\n\n if (val) {\n return {\n literal: false,\n val\n };\n }\n\n return undefined;\n}\n\nfunction buildRegex(units) {\n const re = units.map(u => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n return [`^${re}$`, units];\n}\n\nfunction match(input, regex, handlers) {\n const matches = input.match(regex);\n\n if (matches) {\n const all = {};\n let matchIndex = 1;\n for (const i in handlers) {\n if (hasOwnProperty(handlers, i)) {\n const h = handlers[i],\n groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) {\n all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n }\n matchIndex += groups;\n }\n }\n return [matches, all];\n } else {\n return [matches, {}];\n }\n}\n\nfunction dateTimeFromMatches(matches) {\n const toField = token => {\n switch (token) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n\n let zone;\n if (!isUndefined(matches.Z)) {\n zone = new FixedOffsetZone(matches.Z);\n } else if (!isUndefined(matches.z)) {\n zone = IANAZone.create(matches.z);\n } else {\n zone = null;\n }\n\n if (!isUndefined(matches.q)) {\n matches.M = (matches.q - 1) * 3 + 1;\n }\n\n if (!isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) {\n matches.h += 12;\n } else if (matches.h === 12 && matches.a === 0) {\n matches.h = 0;\n }\n }\n\n if (matches.G === 0 && matches.y) {\n matches.y = -matches.y;\n }\n\n if (!isUndefined(matches.u)) {\n matches.S = parseMillis(matches.u);\n }\n\n const vals = Object.keys(matches).reduce((r, k) => {\n const f = toField(k);\n if (f) {\n r[f] = matches[k];\n }\n\n return r;\n }, {});\n\n return [vals, zone];\n}\n\nlet dummyDateTimeCache = null;\n\nfunction getDummyDateTime() {\n if (!dummyDateTimeCache) {\n dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n }\n\n return dummyDateTimeCache;\n}\n\nfunction maybeExpandMacroToken(token, locale) {\n if (token.literal) {\n return token;\n }\n\n const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n\n if (!formatOpts) {\n return token;\n }\n\n const formatter = Formatter.create(locale, formatOpts);\n const parts = formatter.formatDateTimeParts(getDummyDateTime());\n\n const tokens = parts.map(p => tokenForPart(p, locale, formatOpts));\n\n if (tokens.includes(undefined)) {\n return token;\n }\n\n return tokens;\n}\n\nfunction expandMacroTokens(tokens, locale) {\n return Array.prototype.concat(...tokens.map(t => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nexport function explainFromTokens(locale, input, format) {\n const tokens = expandMacroTokens(Formatter.parseFormat(format), locale),\n units = tokens.map(t => unitForToken(t, locale)),\n disqualifyingUnit = units.find(t => t.invalidReason);\n\n if (disqualifyingUnit) {\n return { input, tokens, invalidReason: disqualifyingUnit.invalidReason };\n } else {\n const [regexString, handlers] = buildRegex(units),\n regex = RegExp(regexString, \"i\"),\n [rawMatches, matches] = match(input, regex, handlers),\n [result, zone] = matches ? dateTimeFromMatches(matches) : [null, null];\n if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n throw new ConflictingSpecificationError(\n \"Can't include meridiem when specifying 24-hour format\"\n );\n }\n return { input, tokens, regex, rawMatches, matches, result, zone };\n }\n}\n\nexport function parseFromTokens(locale, input, format) {\n const { result, zone, invalidReason } = explainFromTokens(locale, input, format);\n return [result, zone, invalidReason];\n}\n","import {\n integerBetween,\n isLeapYear,\n timeObject,\n daysInYear,\n daysInMonth,\n weeksInWeekYear,\n isInteger\n} from \"./util.js\";\nimport Invalid from \"./invalid.js\";\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\nfunction unitOutOfRange(unit, value) {\n return new Invalid(\n \"unit out of range\",\n `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`\n );\n}\n\nfunction dayOfWeek(year, month, day) {\n const js = new Date(Date.UTC(year, month - 1, day)).getUTCDay();\n return js === 0 ? 7 : js;\n}\n\nfunction computeOrdinal(year, month, day) {\n return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\n\nfunction uncomputeOrdinal(year, ordinal) {\n const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n month0 = table.findIndex(i => i < ordinal),\n day = ordinal - table[month0];\n return { month: month0 + 1, day };\n}\n\n/**\n * @private\n */\n\nexport function gregorianToWeek(gregObj) {\n const { year, month, day } = gregObj,\n ordinal = computeOrdinal(year, month, day),\n weekday = dayOfWeek(year, month, day);\n\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7),\n weekYear;\n\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = weeksInWeekYear(weekYear);\n } else if (weekNumber > weeksInWeekYear(year)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else {\n weekYear = year;\n }\n\n return Object.assign({ weekYear, weekNumber, weekday }, timeObject(gregObj));\n}\n\nexport function weekToGregorian(weekData) {\n const { weekYear, weekNumber, weekday } = weekData,\n weekdayOfJan4 = dayOfWeek(weekYear, 1, 4),\n yearInDays = daysInYear(weekYear);\n\n let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3,\n year;\n\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= daysInYear(weekYear);\n } else {\n year = weekYear;\n }\n\n const { month, day } = uncomputeOrdinal(year, ordinal);\n\n return Object.assign({ year, month, day }, timeObject(weekData));\n}\n\nexport function gregorianToOrdinal(gregData) {\n const { year, month, day } = gregData,\n ordinal = computeOrdinal(year, month, day);\n\n return Object.assign({ year, ordinal }, timeObject(gregData));\n}\n\nexport function ordinalToGregorian(ordinalData) {\n const { year, ordinal } = ordinalData,\n { month, day } = uncomputeOrdinal(year, ordinal);\n\n return Object.assign({ year, month, day }, timeObject(ordinalData));\n}\n\nexport function hasInvalidWeekData(obj) {\n const validYear = isInteger(obj.weekYear),\n validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear)),\n validWeekday = integerBetween(obj.weekday, 1, 7);\n\n if (!validYear) {\n return unitOutOfRange(\"weekYear\", obj.weekYear);\n } else if (!validWeek) {\n return unitOutOfRange(\"week\", obj.week);\n } else if (!validWeekday) {\n return unitOutOfRange(\"weekday\", obj.weekday);\n } else return false;\n}\n\nexport function hasInvalidOrdinalData(obj) {\n const validYear = isInteger(obj.year),\n validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validOrdinal) {\n return unitOutOfRange(\"ordinal\", obj.ordinal);\n } else return false;\n}\n\nexport function hasInvalidGregorianData(obj) {\n const validYear = isInteger(obj.year),\n validMonth = integerBetween(obj.month, 1, 12),\n validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validMonth) {\n return unitOutOfRange(\"month\", obj.month);\n } else if (!validDay) {\n return unitOutOfRange(\"day\", obj.day);\n } else return false;\n}\n\nexport function hasInvalidTimeData(obj) {\n const { hour, minute, second, millisecond } = obj;\n const validHour =\n integerBetween(hour, 0, 23) ||\n (hour === 24 && minute === 0 && second === 0 && millisecond === 0),\n validMinute = integerBetween(minute, 0, 59),\n validSecond = integerBetween(second, 0, 59),\n validMillisecond = integerBetween(millisecond, 0, 999);\n\n if (!validHour) {\n return unitOutOfRange(\"hour\", hour);\n } else if (!validMinute) {\n return unitOutOfRange(\"minute\", minute);\n } else if (!validSecond) {\n return unitOutOfRange(\"second\", second);\n } else if (!validMillisecond) {\n return unitOutOfRange(\"millisecond\", millisecond);\n } else return false;\n}\n","import Duration, { friendlyDuration } from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Settings from \"./settings.js\";\nimport Info from \"./info.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport {\n isUndefined,\n maybeArray,\n isDate,\n isNumber,\n bestBy,\n daysInMonth,\n daysInYear,\n isLeapYear,\n weeksInWeekYear,\n normalizeObject,\n roundTo,\n objToLocalTS\n} from \"./impl/util.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport diff from \"./impl/diff.js\";\nimport { parseRFC2822Date, parseISODate, parseHTTPDate, parseSQL } from \"./impl/regexParser.js\";\nimport { parseFromTokens, explainFromTokens } from \"./impl/tokenParser.js\";\nimport {\n gregorianToWeek,\n weekToGregorian,\n gregorianToOrdinal,\n ordinalToGregorian,\n hasInvalidGregorianData,\n hasInvalidWeekData,\n hasInvalidOrdinalData,\n hasInvalidTimeData\n} from \"./impl/conversions.js\";\nimport * as Formats from \"./impl/formats.js\";\nimport {\n InvalidArgumentError,\n ConflictingSpecificationError,\n InvalidUnitError,\n InvalidDateTimeError\n} from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\n\nfunction unsupportedZone(zone) {\n return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\nfunction possiblyCachedWeekData(dt) {\n if (dt.weekData === null) {\n dt.weekData = gregorianToWeek(dt.c);\n }\n return dt.weekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n const current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid\n };\n return new DateTime(Object.assign({}, current, alts, { old: current }));\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n const o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n const o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n ts += offset * 60 * 1000;\n\n const d = new Date(ts);\n\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds()\n };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n const oPre = inst.o,\n year = inst.c.year + Math.trunc(dur.years),\n month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n c = Object.assign({}, inst.c, {\n year,\n month,\n day:\n Math.min(inst.c.day, daysInMonth(year, month)) +\n Math.trunc(dur.days) +\n Math.trunc(dur.weeks) * 7\n }),\n millisToAdd = Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds\n }).as(\"milliseconds\"),\n localTS = objToLocalTS(c);\n\n let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n\n return { ts, o };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text) {\n const { setZone, zone } = opts;\n if (parsed && Object.keys(parsed).length !== 0) {\n const interpretationZone = parsedZone || zone,\n inst = DateTime.fromObject(\n Object.assign(parsed, opts, {\n zone: interpretationZone,\n // setZone is a valid option in the calling methods, but not in fromObject\n setZone: undefined\n })\n );\n return setZone ? inst : inst.setZone(zone);\n } else {\n return DateTime.invalid(\n new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`)\n );\n }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n return dt.isValid\n ? Formatter.create(Locale.create(\"en-US\"), {\n allowZ,\n forceSimple: true\n }).formatDateTimeFromString(dt, format)\n : null;\n}\n\n// technical time formats (e.g. the time part of ISO 8601), take some options\n// and this commonizes their handling\nfunction toTechTimeFormat(\n dt,\n {\n suppressSeconds = false,\n suppressMilliseconds = false,\n includeOffset,\n includeZone = false,\n spaceZone = false,\n format = \"extended\"\n }\n) {\n let fmt = format === \"basic\" ? \"HHmm\" : \"HH:mm\";\n\n if (!suppressSeconds || dt.second !== 0 || dt.millisecond !== 0) {\n fmt += format === \"basic\" ? \"ss\" : \":ss\";\n if (!suppressMilliseconds || dt.millisecond !== 0) {\n fmt += \".SSS\";\n }\n }\n\n if ((includeZone || includeOffset) && spaceZone) {\n fmt += \" \";\n }\n\n if (includeZone) {\n fmt += \"z\";\n } else if (includeOffset) {\n fmt += format === \"basic\" ? \"ZZZ\" : \"ZZ\";\n }\n\n return toTechFormat(dt, fmt);\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n },\n defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n },\n defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedWeekUnits = [\n \"weekYear\",\n \"weekNumber\",\n \"weekday\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\"\n ],\n orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, zone) {\n // assume we have the higher-order units\n for (const u of orderedUnits) {\n if (isUndefined(obj[u])) {\n obj[u] = defaultUnitValues[u];\n }\n }\n\n const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n const tsNow = Settings.now(),\n offsetProvis = zone.offset(tsNow),\n [ts, o] = objToTS(obj, offsetProvis, zone);\n\n return new DateTime({\n ts,\n zone,\n o\n });\n}\n\nfunction diffRelative(start, end, opts) {\n const round = isUndefined(opts.round) ? true : opts.round,\n format = (c, unit) => {\n c = roundTo(c, round || opts.calendary ? 0 : 2, true);\n const formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n },\n differ = unit => {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) {\n return end\n .startOf(unit)\n .diff(start.startOf(unit), unit)\n .get(unit);\n } else return 0;\n } else {\n return end.diff(start, unit).get(unit);\n }\n };\n\n if (opts.unit) {\n return format(differ(opts.unit), opts.unit);\n }\n\n for (const unit of opts.units) {\n const count = differ(unit);\n if (Math.abs(count) >= 1) {\n return format(count, unit);\n }\n }\n return format(0, opts.units[opts.units.length - 1]);\n}\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link local}, {@link utc}, and (most flexibly) {@link fromObject}. To create one from a standard string format, use {@link fromISO}, {@link fromHTTP}, and {@link fromRFC2822}. To create one from a custom string format, use {@link fromFormat}. To create one from a native JS date, use {@link fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link toObject}), use the {@link year}, {@link month},\n * {@link day}, {@link hour}, {@link minute}, {@link second}, {@link millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link weekYear}, {@link weekNumber}, and {@link weekday} accessors.\n * * **Configuration** See the {@link locale} and {@link numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link set}, {@link reconfigure}, {@link setZone}, {@link setLocale}, {@link plus}, {@link minus}, {@link endOf}, {@link startOf}, {@link toUTC}, and {@link toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link toRelative}, {@link toRelativeCalendar}, {@link toJSON}, {@link toISO}, {@link toHTTP}, {@link toObject}, {@link toRFC2822}, {@link toString}, {@link toLocaleString}, {@link toFormat}, {@link toMillis} and {@link toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nexport default class DateTime {\n /**\n * @access private\n */\n constructor(config) {\n const zone = config.zone || Settings.defaultZone;\n\n let invalid =\n config.invalid ||\n (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) ||\n (!zone.isValid ? unsupportedZone(zone) : null);\n /**\n * @access private\n */\n this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n\n let c = null,\n o = null;\n if (!invalid) {\n const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n\n if (unchanged) {\n [c, o] = [config.old.c, config.old.o];\n } else {\n const ot = zone.offset(this.ts);\n c = tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n\n /**\n * @access private\n */\n this._zone = zone;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.invalid = invalid;\n /**\n * @access private\n */\n this.weekData = null;\n /**\n * @access private\n */\n this.c = c;\n /**\n * @access private\n */\n this.o = o;\n /**\n * @access private\n */\n this.isLuxonDateTime = true;\n }\n\n // CONSTRUCT\n\n /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12) //~> 2017-03-12T00:00:00\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */\n static local(year, month, day, hour, minute, second, millisecond) {\n if (isUndefined(year)) {\n return new DateTime({ ts: Settings.now() });\n } else {\n return quickDT(\n {\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond\n },\n Settings.defaultZone\n );\n }\n }\n\n /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765Z\n * @return {DateTime}\n */\n static utc(year, month, day, hour, minute, second, millisecond) {\n if (isUndefined(year)) {\n return new DateTime({\n ts: Settings.now(),\n zone: FixedOffsetZone.utcInstance\n });\n } else {\n return quickDT(\n {\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond\n },\n FixedOffsetZone.utcInstance\n );\n }\n }\n\n /**\n * Create a DateTime from a Javascript Date object. Uses the default zone.\n * @param {Date} date - a Javascript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */\n static fromJSDate(date, options = {}) {\n const ts = isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) {\n return DateTime.invalid(\"invalid input\");\n }\n\n const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: Locale.fromObject(options)\n });\n }\n\n /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromMillis(milliseconds, options = {}) {\n if (!isNumber(milliseconds)) {\n throw new InvalidArgumentError(\n `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`\n );\n } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n } else {\n return new DateTime({\n ts: milliseconds,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options)\n });\n }\n }\n\n /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromSeconds(seconds, options = {}) {\n if (!isNumber(seconds)) {\n throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n } else {\n return new DateTime({\n ts: seconds * 1000,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options)\n });\n }\n }\n\n /**\n * Create a DateTime from a Javascript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {string|Zone} [obj.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [obj.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} obj.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} obj.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @return {DateTime}\n */\n static fromObject(obj) {\n const zoneToUse = normalizeZone(obj.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n const tsNow = Settings.now(),\n offsetProvis = zoneToUse.offset(tsNow),\n normalized = normalizeObject(obj, normalizeUnit, [\n \"zone\",\n \"locale\",\n \"outputCalendar\",\n \"numberingSystem\"\n ]),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber,\n loc = Locale.fromObject(obj);\n\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n const useWeekData = definiteWeekDef || (normalized.weekday && !containsGregor);\n\n // configure ourselves to deal with gregorian dates or week stuff\n let units,\n defaultValues,\n objNow = tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = orderedWeekUnits;\n defaultValues = defaultWeekUnitValues;\n objNow = gregorianToWeek(objNow);\n } else if (containsOrdinal) {\n units = orderedOrdinalUnits;\n defaultValues = defaultOrdinalUnitValues;\n objNow = gregorianToOrdinal(objNow);\n } else {\n units = orderedUnits;\n defaultValues = defaultUnitValues;\n }\n\n // set default values for missing stuff\n let foundFirst = false;\n for (const u of units) {\n const v = normalized[u];\n if (!isUndefined(v)) {\n foundFirst = true;\n } else if (foundFirst) {\n normalized[u] = defaultValues[u];\n } else {\n normalized[u] = objNow[u];\n }\n }\n\n // make sure the values we have are in range\n const higherOrderInvalid = useWeekData\n ? hasInvalidWeekData(normalized)\n : containsOrdinal\n ? hasInvalidOrdinalData(normalized)\n : hasInvalidGregorianData(normalized),\n invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n // compute the actual time\n const gregorian = useWeekData\n ? weekToGregorian(normalized)\n : containsOrdinal\n ? ordinalToGregorian(normalized)\n : normalized,\n [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc\n });\n\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n return DateTime.invalid(\n \"mismatched weekday\",\n `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`\n );\n }\n\n return inst;\n }\n\n /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */\n static fromISO(text, opts = {}) {\n const [vals, parsedZone] = parseISODate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n }\n\n /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */\n static fromRFC2822(text, opts = {}) {\n const [vals, parsedZone] = parseRFC2822Date(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n }\n\n /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */\n static fromHTTP(text, opts = {}) {\n const [vals, parsedZone] = parseHTTPDate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n }\n\n /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @see https://moment.github.io/luxon/docs/manual/parsing.html#table-of-tokens\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromFormat(text, fmt, opts = {}) {\n if (isUndefined(text) || isUndefined(fmt)) {\n throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n }\n\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true\n }),\n [vals, parsedZone, invalid] = parseFromTokens(localeToUse, text, fmt);\n if (invalid) {\n return DateTime.invalid(invalid);\n } else {\n return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text);\n }\n }\n\n /**\n * @deprecated use fromFormat instead\n */\n static fromString(text, fmt, opts = {}) {\n return DateTime.fromFormat(text, fmt, opts);\n }\n\n /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */\n static fromSQL(text, opts = {}) {\n const [vals, parsedZone] = parseSQL(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n }\n\n /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDateTimeError(invalid);\n } else {\n return new DateTime({ invalid });\n }\n }\n\n /**\n * Check if an object is a DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDateTime(o) {\n return (o && o.isLuxonDateTime) || false;\n }\n\n // INFO\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */\n get(unit) {\n return this[unit];\n }\n\n /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n *\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n *\n * @type {string}\n */\n get outputCalendar() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n\n /**\n * Get the time zone associated with this DateTime.\n * @type {Zone}\n */\n get zone() {\n return this._zone;\n }\n\n /**\n * Get the name of the time zone.\n * @type {string}\n */\n get zoneName() {\n return this.isValid ? this.zone.name : null;\n }\n\n /**\n * Get the year\n * @example DateTime.local(2017, 5, 25).year //=> 2017\n * @type {number}\n */\n get year() {\n return this.isValid ? this.c.year : NaN;\n }\n\n /**\n * Get the quarter\n * @example DateTime.local(2017, 5, 25).quarter //=> 2\n * @type {number}\n */\n get quarter() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n\n /**\n * Get the month (1-12).\n * @example DateTime.local(2017, 5, 25).month //=> 5\n * @type {number}\n */\n get month() {\n return this.isValid ? this.c.month : NaN;\n }\n\n /**\n * Get the day of the month (1-30ish).\n * @example DateTime.local(2017, 5, 25).day //=> 25\n * @type {number}\n */\n get day() {\n return this.isValid ? this.c.day : NaN;\n }\n\n /**\n * Get the hour of the day (0-23).\n * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n * @type {number}\n */\n get hour() {\n return this.isValid ? this.c.hour : NaN;\n }\n\n /**\n * Get the minute of the hour (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n * @type {number}\n */\n get minute() {\n return this.isValid ? this.c.minute : NaN;\n }\n\n /**\n * Get the second of the minute (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n * @type {number}\n */\n get second() {\n return this.isValid ? this.c.second : NaN;\n }\n\n /**\n * Get the millisecond of the second (0-999).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n * @type {number}\n */\n get millisecond() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n\n /**\n * Get the week year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekYear //=> 2015\n * @type {number}\n */\n get weekYear() {\n return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the week number of the week year (1-52ish).\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n * @type {number}\n */\n get weekNumber() {\n return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the day of the week.\n * 1 is Monday and 7 is Sunday\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekday //=> 4\n * @type {number}\n */\n get weekday() {\n return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n }\n\n /**\n * Get the ordinal (meaning the day of the year)\n * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n * @type {number|DateTime}\n */\n get ordinal() {\n return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n }\n\n /**\n * Get the human readable short month name, such as 'Oct'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n * @type {string}\n */\n get monthShort() {\n return this.isValid ? Info.months(\"short\", { locale: this.locale })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable long month name, such as 'October'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthLong //=> October\n * @type {string}\n */\n get monthLong() {\n return this.isValid ? Info.months(\"long\", { locale: this.locale })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable short weekday, such as 'Mon'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n * @type {string}\n */\n get weekdayShort() {\n return this.isValid ? Info.weekdays(\"short\", { locale: this.locale })[this.weekday - 1] : null;\n }\n\n /**\n * Get the human readable long weekday, such as 'Monday'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n * @type {string}\n */\n get weekdayLong() {\n return this.isValid ? Info.weekdays(\"long\", { locale: this.locale })[this.weekday - 1] : null;\n }\n\n /**\n * Get the UTC offset of this DateTime in minutes\n * @example DateTime.local().offset //=> -240\n * @example DateTime.utc().offset //=> 0\n * @type {number}\n */\n get offset() {\n return this.isValid ? +this.o : NaN;\n }\n\n /**\n * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameShort() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameLong() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get whether this zone's offset ever changes, as in a DST.\n * @type {boolean}\n */\n get isOffsetFixed() {\n return this.isValid ? this.zone.universal : null;\n }\n\n /**\n * Get whether the DateTime is in a DST.\n * @type {boolean}\n */\n get isInDST() {\n if (this.isOffsetFixed) {\n return false;\n } else {\n return (\n this.offset > this.set({ month: 1 }).offset || this.offset > this.set({ month: 5 }).offset\n );\n }\n }\n\n /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */\n get isInLeapYear() {\n return isLeapYear(this.year);\n }\n\n /**\n * Returns the number of days in this DateTime's month\n * @example DateTime.local(2016, 2).daysInMonth //=> 29\n * @example DateTime.local(2016, 3).daysInMonth //=> 31\n * @type {number}\n */\n get daysInMonth() {\n return daysInMonth(this.year, this.month);\n }\n\n /**\n * Returns the number of days in this DateTime's year\n * @example DateTime.local(2016).daysInYear //=> 366\n * @example DateTime.local(2013).daysInYear //=> 365\n * @type {number}\n */\n get daysInYear() {\n return this.isValid ? daysInYear(this.year) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2004).weeksInWeekYear //=> 53\n * @example DateTime.local(2013).weeksInWeekYear //=> 52\n * @type {number}\n */\n get weeksInWeekYear() {\n return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n }\n\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */\n resolvedLocaleOpts(opts = {}) {\n const { locale, numberingSystem, calendar } = Formatter.create(\n this.loc.clone(opts),\n opts\n ).resolvedOptions(this);\n return { locale, numberingSystem, outputCalendar: calendar };\n }\n\n // TRANSFORM\n\n /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */\n toUTC(offset = 0, opts = {}) {\n return this.setZone(FixedOffsetZone.instance(offset), opts);\n }\n\n /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */\n toLocal() {\n return this.setZone(Settings.defaultZone);\n }\n\n /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link plus}. You may wish to use {@link toLocal} and {@link toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */\n setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {\n zone = normalizeZone(zone, Settings.defaultZone);\n if (zone.equals(this.zone)) {\n return this;\n } else if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n } else {\n let newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n const offsetGuess = zone.offset(this.ts);\n const asObj = this.toObject();\n [newTS] = objToTS(asObj, offsetGuess, zone);\n }\n return clone(this, { ts: newTS, zone });\n }\n }\n\n /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */\n reconfigure({ locale, numberingSystem, outputCalendar } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });\n return clone(this, { loc });\n }\n\n /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */\n setLocale(locale) {\n return this.reconfigure({ locale });\n }\n\n /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link reconfigure} and {@link setZone}.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const normalized = normalizeObject(values, normalizeUnit, []),\n settingWeekStuff =\n !isUndefined(normalized.weekYear) ||\n !isUndefined(normalized.weekNumber) ||\n !isUndefined(normalized.weekday);\n\n let mixed;\n if (settingWeekStuff) {\n mixed = weekToGregorian(Object.assign(gregorianToWeek(this.c), normalized));\n } else if (!isUndefined(normalized.ordinal)) {\n mixed = ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c), normalized));\n } else {\n mixed = Object.assign(this.toObject(), normalized);\n\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if (isUndefined(normalized.day)) {\n mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n }\n\n const [ts, o] = objToTS(mixed, this.o, this.zone);\n return clone(this, { ts, o });\n }\n\n /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.local().plus(123) //~> in 123 milliseconds\n * @example DateTime.local().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.local().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.local().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.local().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.local().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */\n plus(duration) {\n if (!this.isValid) return this;\n const dur = friendlyDuration(duration);\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */\n minus(duration) {\n if (!this.isValid) return this;\n const dur = friendlyDuration(duration).negate();\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */\n startOf(unit) {\n if (!this.isValid) return this;\n const o = {},\n normalizedUnit = Duration.normalizeUnit(unit);\n switch (normalizedUnit) {\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n case \"milliseconds\":\n break;\n // no default, invalid units throw in normalizeUnit()\n }\n\n if (normalizedUnit === \"weeks\") {\n o.weekday = 1;\n }\n\n if (normalizedUnit === \"quarters\") {\n const q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n\n return this.set(o);\n }\n\n /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'month', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */\n endOf(unit) {\n return this.isValid\n ? this.plus({ [unit]: 1 })\n .startOf(unit)\n .minus(1)\n : this;\n }\n\n // OUTPUT\n\n /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @see https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options\n * @example DateTime.local().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.local().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.local().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.local().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param opts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @example DateTime.local().toLocaleString(); //=> 4/20/2017\n * @example DateTime.local().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.local().toLocaleString({ locale: 'en-gb' }); //=> '20/04/2017'\n * @example DateTime.local().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.local().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.local().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.local().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.local().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.local().toLocaleString({ hour: '2-digit', minute: '2-digit', hour12: false }); //=> '11:32'\n * @return {string}\n */\n toLocaleString(opts = Formats.DATE_SHORT) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTime(this)\n : INVALID;\n }\n\n /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.local().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */\n toLocaleParts(opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this)\n : [];\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.local().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.local().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.local().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @return {string}\n */\n toISO(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toISODate(opts)}T${this.toISOTime(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @return {string}\n */\n toISODate({ format = \"extended\" } = {}) {\n let fmt = format === \"basic\" ? \"yyyyMMdd\" : \"yyyy-MM-dd\";\n if (this.year > 9999) {\n fmt = \"+\" + fmt;\n }\n\n return toTechFormat(this, fmt);\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */\n toISOWeekDate() {\n return toTechFormat(this, \"kkkk-'W'WW-c\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @return {string}\n */\n toISOTime({\n suppressMilliseconds = false,\n suppressSeconds = false,\n includeOffset = true,\n format = \"extended\"\n } = {}) {\n return toTechTimeFormat(this, {\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n format\n });\n }\n\n /**\n * Returns an RFC 2822-compatible string representation of this DateTime, always in UTC\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */\n toRFC2822() {\n return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */\n toHTTP() {\n return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string}\n */\n toSQLDate() {\n return toTechFormat(this, \"yyyy-MM-dd\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.local().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.local().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.local().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */\n toSQLTime({ includeOffset = true, includeZone = false } = {}) {\n return toTechTimeFormat(this, {\n includeOffset,\n includeZone,\n spaceZone: true\n });\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */\n toSQL(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */\n toString() {\n return this.isValid ? this.toISO() : INVALID;\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */\n toMillis() {\n return this.isValid ? this.ts : NaN;\n }\n\n /**\n * Returns the epoch seconds of this DateTime.\n * @return {number}\n */\n toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n }\n\n /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */\n toBSON() {\n return this.toJSDate();\n }\n\n /**\n * Returns a Javascript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.local().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = Object.assign({}, this.c);\n\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns a Javascript Date equivalent to this DateTime.\n * @return {Date}\n */\n toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n }\n\n // COMPARE\n\n /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */\n diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n if (!this.isValid || !otherDateTime.isValid) {\n return Duration.invalid(\n this.invalid || otherDateTime.invalid,\n \"created by diffing an invalid DateTime\"\n );\n }\n\n const durOpts = Object.assign(\n { locale: this.locale, numberingSystem: this.numberingSystem },\n opts\n );\n\n const units = maybeArray(unit).map(Duration.normalizeUnit),\n otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n earlier = otherIsLater ? this : otherDateTime,\n later = otherIsLater ? otherDateTime : this,\n diffed = diff(earlier, later, units, durOpts);\n\n return otherIsLater ? diffed.negate() : diffed;\n }\n\n /**\n * Return the difference between this DateTime and right now.\n * See {@link diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n diffNow(unit = \"milliseconds\", opts = {}) {\n return this.diff(DateTime.local(), unit, opts);\n }\n\n /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval}\n */\n until(otherDateTime) {\n return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n }\n\n /**\n * Return whether this DateTime is in the same unit of time as another DateTime\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @example DateTime.local().hasSame(otherDT, 'day'); //~> true if both the same calendar day\n * @return {boolean}\n */\n hasSame(otherDateTime, unit) {\n if (!this.isValid) return false;\n if (unit === \"millisecond\") {\n return this.valueOf() === otherDateTime.valueOf();\n } else {\n const inputMs = otherDateTime.valueOf();\n return this.startOf(unit) <= inputMs && inputMs <= this.endOf(unit);\n }\n }\n\n /**\n * Equality check\n * Two DateTimes are equal iff they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */\n equals(other) {\n return (\n this.isValid &&\n other.isValid &&\n this.valueOf() === other.valueOf() &&\n this.zone.equals(other.zone) &&\n this.loc.equals(other.loc)\n );\n }\n\n /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds down by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {boolean} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.local().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.local().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.local().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.local().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.local().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.local().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */\n toRelative(options = {}) {\n if (!this.isValid) return null;\n const base = options.base || DateTime.fromObject({ zone: this.zone }),\n padding = options.padding ? (this < base ? -options.padding : options.padding) : 0;\n return diffRelative(\n base,\n this.plus(padding),\n Object.assign(options, {\n numeric: \"always\",\n units: [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"]\n })\n );\n }\n\n /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.local().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.local().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */\n toRelativeCalendar(options = {}) {\n if (!this.isValid) return null;\n\n return diffRelative(\n options.base || DateTime.fromObject({ zone: this.zone }),\n this,\n Object.assign(options, {\n numeric: \"auto\",\n units: [\"years\", \"months\", \"days\"],\n calendary: true\n })\n );\n }\n\n /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */\n static min(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, i => i.valueOf(), Math.min);\n }\n\n /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */\n static max(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, i => i.valueOf(), Math.max);\n }\n\n // MISC\n\n /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */\n static fromFormatExplain(text, fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true\n });\n return explainFromTokens(localeToUse, text, fmt);\n }\n\n /**\n * @deprecated use fromFormatExplain instead\n */\n static fromStringExplain(text, fmt, options = {}) {\n return DateTime.fromFormatExplain(text, fmt, options);\n }\n\n // FORMAT PRESETS\n\n /**\n * {@link toLocaleString} format like 10/14/1983\n * @type {Object}\n */\n static get DATE_SHORT() {\n return Formats.DATE_SHORT;\n }\n\n /**\n * {@link toLocaleString} format like 'Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED() {\n return Formats.DATE_MED;\n }\n\n /**\n * {@link toLocaleString} format like 'Fri, Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED_WITH_WEEKDAY() {\n return Formats.DATE_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link toLocaleString} format like 'October 14, 1983'\n * @type {Object}\n */\n static get DATE_FULL() {\n return Formats.DATE_FULL;\n }\n\n /**\n * {@link toLocaleString} format like 'Tuesday, October 14, 1983'\n * @type {Object}\n */\n static get DATE_HUGE() {\n return Formats.DATE_HUGE;\n }\n\n /**\n * {@link toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_SIMPLE() {\n return Formats.TIME_SIMPLE;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SECONDS() {\n return Formats.TIME_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SHORT_OFFSET() {\n return Formats.TIME_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_LONG_OFFSET() {\n return Formats.TIME_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '09:30', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_SIMPLE() {\n return Formats.TIME_24_SIMPLE;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SECONDS() {\n return Formats.TIME_24_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 EDT', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SHORT_OFFSET() {\n return Formats.TIME_24_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_LONG_OFFSET() {\n return Formats.TIME_24_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT() {\n return Formats.DATETIME_SHORT;\n }\n\n /**\n * {@link toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT_WITH_SECONDS() {\n return Formats.DATETIME_SHORT_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED() {\n return Formats.DATETIME_MED;\n }\n\n /**\n * {@link toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_SECONDS() {\n return Formats.DATETIME_MED_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_WEEKDAY() {\n return Formats.DATETIME_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL() {\n return Formats.DATETIME_FULL;\n }\n\n /**\n * {@link toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL_WITH_SECONDS() {\n return Formats.DATETIME_FULL_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE() {\n return Formats.DATETIME_HUGE;\n }\n\n /**\n * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE_WITH_SECONDS() {\n return Formats.DATETIME_HUGE_WITH_SECONDS;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDateTime(dateTimeish) {\n if (DateTime.isDateTime(dateTimeish)) {\n return dateTimeish;\n } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n return DateTime.fromJSDate(dateTimeish);\n } else if (dateTimeish && typeof dateTimeish === \"object\") {\n return DateTime.fromObject(dateTimeish);\n } else {\n throw new InvalidArgumentError(\n `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`\n );\n }\n}\n"],"names":["LuxonError","Error","InvalidDateTimeError","reason","toMessage","InvalidIntervalError","InvalidDurationError","ConflictingSpecificationError","InvalidUnitError","unit","InvalidArgumentError","ZoneIsAbstractError","n","s","l","DATE_SHORT","year","month","day","DATE_MED","DATE_MED_WITH_WEEKDAY","weekday","DATE_FULL","DATE_HUGE","TIME_SIMPLE","hour","minute","TIME_WITH_SECONDS","second","TIME_WITH_SHORT_OFFSET","timeZoneName","TIME_WITH_LONG_OFFSET","TIME_24_SIMPLE","hour12","TIME_24_WITH_SECONDS","TIME_24_WITH_SHORT_OFFSET","TIME_24_WITH_LONG_OFFSET","DATETIME_SHORT","DATETIME_SHORT_WITH_SECONDS","DATETIME_MED","DATETIME_MED_WITH_SECONDS","DATETIME_MED_WITH_WEEKDAY","DATETIME_FULL","DATETIME_FULL_WITH_SECONDS","DATETIME_HUGE","DATETIME_HUGE_WITH_SECONDS","isUndefined","o","isNumber","isInteger","isString","isDate","Object","prototype","toString","call","hasIntl","Intl","DateTimeFormat","e","hasFormatToParts","formatToParts","hasRelative","RelativeTimeFormat","maybeArray","thing","Array","isArray","bestBy","arr","by","compare","length","undefined","reduce","best","next","pair","pick","obj","keys","a","k","hasOwnProperty","prop","integerBetween","bottom","top","floorMod","x","Math","floor","padStart","input","repeat","slice","parseInteger","string","parseInt","parseMillis","fraction","f","parseFloat","roundTo","number","digits","towardZero","factor","rounder","trunc","round","isLeapYear","daysInYear","daysInMonth","modMonth","modYear","objToLocalTS","d","Date","UTC","millisecond","setUTCFullYear","getUTCFullYear","weeksInWeekYear","weekYear","p1","last","p2","untruncateYear","parseZoneInfo","ts","offsetFormat","locale","timeZone","date","intlOpts","modified","assign","intl","parsed","find","m","type","toLowerCase","value","without","format","included","diffed","substring","trimmed","replace","signedOffset","offHourStr","offMinuteStr","offHour","Number","isNaN","offMin","offMinSigned","is","asNumber","numericValue","normalizeObject","normalizer","nonUnitKeys","normalized","u","indexOf","v","formatOffset","offset","hours","abs","minutes","sign","RangeError","timeObject","ianaRegex","stringify","JSON","sort","monthsLong","monthsShort","monthsNarrow","months","weekdaysLong","weekdaysShort","weekdaysNarrow","weekdays","meridiems","erasLong","erasShort","erasNarrow","eras","meridiemForDateTime","dt","weekdayForDateTime","monthForDateTime","eraForDateTime","formatRelativeTime","count","numeric","narrow","units","years","quarters","weeks","days","seconds","lastable","isDay","isInPast","fmtValue","singular","lilUnits","fmtUnit","formatString","knownFormat","filtered","key","dateTimeHuge","Formats","stringifyTokens","splits","tokenToString","token","literal","val","macroTokenToFormatOpts","D","DD","DDD","DDDD","t","tt","ttt","tttt","T","TT","TTT","TTTT","ff","fff","ffff","F","FF","FFF","FFFF","Formatter","create","opts","parseFormat","fmt","current","currentFull","bracketed","i","c","charAt","push","formatOpts","loc","systemLoc","formatWithSystemDefault","redefaultToSystem","df","dtFormatter","formatDateTime","formatDateTimeParts","resolvedOptions","num","p","forceSimple","padTo","numberFormatter","formatDateTimeFromString","knownEnglish","listingMode","useDateTimeFormatter","outputCalendar","extract","isOffsetFixed","allowZ","isValid","zone","meridiem","English","standalone","maybeMacro","era","offsetName","zoneName","weekNumber","ordinal","quarter","formatDurationFromString","dur","tokenToField","lildur","mapped","get","tokens","realTokens","found","concat","collapsed","shiftTo","map","filter","Invalid","explanation","Zone","equals","otherZone","singleton","LocalZone","getTimezoneOffset","matchingRegex","RegExp","source","dtfCache","makeDTF","typeToPos","hackyOffset","dtf","formatted","exec","fMonth","fDay","fYear","fHour","fMinute","fSecond","partsOffset","filled","pos","ianaZoneCache","IANAZone","name","resetCache","isValidSpecifier","match","isValidZone","parseGMTOffset","specifier","valid","adjustedHour","asUTC","asTS","over","FixedOffsetZone","instance","utcInstance","parseSpecifier","r","fixed","InvalidZone","NaN","normalizeZone","defaultZone","lowered","now","defaultLocale","defaultNumberingSystem","defaultOutputCalendar","throwOnInvalid","Settings","resetCaches","Locale","z","numberingSystem","intlDTCache","getCachedDTF","locString","intlNumCache","getCachedINF","inf","NumberFormat","intlRelCache","getCachedRTF","base","cacheKeyOpts","sysLocaleCache","systemLocale","computedSys","parseLocaleString","localeStr","uIndex","options","smaller","calendar","intlConfigString","mapMonths","ms","DateTime","utc","mapWeekdays","listStuff","defaultOK","englishFn","intlFn","mode","supportsFastNumbers","startsWith","PolyNumberFormatter","useGrouping","minimumIntegerDigits","PolyDateFormatter","universal","fromMillis","toJSDate","tokenFormat","PolyRelFormatter","isEnglish","style","rtf","fromOpts","defaultToEN","specifiedLocale","localeR","numberingSystemR","outputCalendarR","fromObject","numbering","parsedLocale","parsedNumberingSystem","parsedOutputCalendar","weekdaysCache","monthsCache","meridiemCache","eraCache","fastNumbersCached","hasFTP","isActuallyEn","hasNoWeirdness","clone","alts","getOwnPropertyNames","redefaultToEN","formatStr","field","results","matching","fastNumbers","relFormatter","other","combineRegexes","regexes","full","combineExtractors","extractors","ex","mergedVals","mergedZone","cursor","parse","patterns","regex","extractor","simpleParse","ret","offsetRegex","isoTimeBaseRegex","isoTimeRegex","isoTimeExtensionRegex","isoYmdRegex","isoWeekRegex","isoOrdinalRegex","extractISOWeekData","extractISOOrdinalData","sqlYmdRegex","sqlTimeRegex","sqlTimeExtensionRegex","int","fallback","extractISOYmd","item","extractISOTime","extractISOOffset","local","fullOffset","extractIANAZone","isoDuration","extractISODuration","yearStr","monthStr","weekStr","dayStr","hourStr","minuteStr","secondStr","millisecondsStr","hasNegativePrefix","maybeNegate","milliseconds","obsOffsets","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","fromStrings","weekdayStr","result","rfc2822","extractRFC2822","obsOffset","milOffset","preprocessRFC2822","trim","rfc1123","rfc850","ascii","extractRFC1123Or850","extractASCII","isoYmdWithTimeExtensionRegex","isoWeekWithTimeExtensionRegex","isoOrdinalWithTimeExtensionRegex","isoTimeCombinedRegex","extractISOYmdTimeAndOffset","extractISOWeekTimeAndOffset","extractISOOrdinalDataAndTime","extractISOTimeAndOffset","parseISODate","parseRFC2822Date","parseHTTPDate","parseISODuration","sqlYmdWithTimeExtensionRegex","sqlTimeCombinedRegex","extractISOYmdTimeOffsetAndIANAZone","extractISOTimeOffsetAndIANAZone","parseSQL","INVALID","lowOrderMatrix","casualMatrix","daysInYearAccurate","daysInMonthAccurate","accurateMatrix","orderedUnits","reverseUnits","reverse","clear","conf","values","conversionAccuracy","Duration","antiTrunc","ceil","convert","matrix","fromMap","fromUnit","toMap","toUnit","conv","raw","sameSign","added","normalizeValues","vals","previous","config","accurate","invalid","isLuxonDuration","normalizeUnit","fromISO","text","week","isDuration","toFormat","fmtOpts","toObject","includeConfig","toISO","toJSON","valueOf","as","plus","duration","friendlyDuration","minus","negate","mapUnits","fn","set","mixed","reconfigure","normalize","built","accumulated","lastUnit","own","ak","down","negated","durationish","validateStartEnd","start","end","Interval","isLuxonInterval","fromDateTimes","builtStart","friendlyDateTime","builtEnd","validateError","after","before","split","startIsValid","endIsValid","isInterval","toDuration","startOf","diff","hasSame","isEmpty","isAfter","dateTime","isBefore","contains","splitAt","dateTimes","sorted","splitBy","divideEqually","numberOfParts","overlaps","abutsStart","abutsEnd","engulfs","intersection","union","merge","intervals","b","sofar","final","xor","currentCount","ends","time","flattened","difference","toISODate","toISOTime","dateFormat","separator","invalidReason","mapEndpoints","mapFn","Info","hasDST","proto","setZone","isValidIANAZone","monthsFormat","weekdaysFormat","features","intlTokens","zones","relative","dayDiff","earlier","later","utcDayStart","toUTC","keepLocalTime","highOrderDiffs","differs","lowestOrder","highWater","differ","delta","remainingMillis","lowerOrderUnits","numberingSystems","arab","arabext","bali","beng","deva","fullwide","gujr","hanidec","khmr","knda","laoo","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt","latn","numberingSystemsUTF16","hanidecChars","parseDigits","str","code","charCodeAt","search","min","max","digitRegex","append","MISSING_FTP","intUnit","post","deser","NBSP","String","fromCharCode","spaceOrNBSP","spaceOrNBSPRegExp","fixListRegex","stripInsensitivities","oneOf","strings","startIndex","join","findIndex","groups","h","simple","escapeToken","unitForToken","one","two","three","four","six","oneOrTwo","oneToThree","oneToSix","oneToNine","twoToFour","fourToSix","unitate","partTypeStyleToTokenVal","short","long","dayperiod","dayPeriod","tokenForPart","part","buildRegex","re","handlers","matches","all","matchIndex","dateTimeFromMatches","toField","Z","q","M","G","y","S","dummyDateTimeCache","getDummyDateTime","maybeExpandMacroToken","formatter","parts","includes","expandMacroTokens","explainFromTokens","disqualifyingUnit","regexString","rawMatches","parseFromTokens","nonLeapLadder","leapLadder","unitOutOfRange","dayOfWeek","js","getUTCDay","computeOrdinal","uncomputeOrdinal","table","month0","gregorianToWeek","gregObj","weekToGregorian","weekData","weekdayOfJan4","yearInDays","gregorianToOrdinal","gregData","ordinalToGregorian","ordinalData","hasInvalidWeekData","validYear","validWeek","validWeekday","hasInvalidOrdinalData","validOrdinal","hasInvalidGregorianData","validMonth","validDay","hasInvalidTimeData","validHour","validMinute","validSecond","validMillisecond","MAX_DATE","unsupportedZone","possiblyCachedWeekData","inst","old","fixOffset","localTS","tz","utcGuess","o2","o3","tsToObj","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","objToTS","adjustTime","oPre","millisToAdd","parseDataToDateTime","parsedZone","interpretationZone","toTechFormat","toTechTimeFormat","suppressSeconds","suppressMilliseconds","includeOffset","includeZone","spaceZone","defaultUnitValues","defaultWeekUnitValues","defaultOrdinalUnitValues","orderedWeekUnits","orderedOrdinalUnits","weeknumber","weeksnumber","weeknumbers","weekyear","weekyears","quickDT","tsNow","offsetProvis","diffRelative","calendary","unchanged","ot","_zone","isLuxonDateTime","fromJSDate","zoneToUse","fromSeconds","containsOrdinal","containsGregorYear","containsGregorMD","containsGregor","definiteWeekDef","useWeekData","defaultValues","objNow","foundFirst","higherOrderInvalid","gregorian","tsFinal","offsetFinal","fromRFC2822","fromHTTP","fromFormat","localeToUse","fromString","fromSQL","isDateTime","resolvedLocaleOpts","toLocal","keepCalendarTime","newTS","offsetGuess","asObj","setLocale","settingWeekStuff","normalizedUnit","endOf","toLocaleString","toLocaleParts","toISOWeekDate","toRFC2822","toHTTP","toSQLDate","toSQLTime","toSQL","toMillis","toSeconds","toBSON","otherDateTime","durOpts","otherIsLater","diffNow","until","inputMs","toRelative","padding","toRelativeCalendar","every","fromFormatExplain","fromStringExplain","dateTimeish"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;;EAEA;;;MAGMA;;;;;;;;mCAAmBC;EAEzB;;;;;MAGaC,oBAAb;EAAA;;EACE,gCAAYC,MAAZ,EAAoB;EAAA,WAClB,8CAA2BA,MAAM,CAACC,SAAP,EAA3B,CADkB;EAEnB;;EAHH;EAA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BAAP;EACD;EAED;;;;;;;0BAI4B;EAC1B,aAAOA,cAAP;EACD;EAED;;;;;;;0BAIkC;EAChC,aAAOA,oBAAP;EACD;EAED;;;;;;;0BAIuC;EACrC,aAAOA,yBAAP;EACD;EAED;;;;;;;0BAIsC;EACpC,aAAOA,wBAAP;EACD;EAED;;;;;;;0BAI4B;EAC1B,aAAOA,cAAP;EACD;EAED;;;;;;;0BAIyC;EACvC,aAAOA,2BAAP;EACD;EAED;;;;;;;0BAI0B;EACxB,aAAOA,YAAP;EACD;EAED;;;;;;;0BAIuC;EACrC,aAAOA,yBAAP;EACD;EAED;;;;;;;0BAIuC;EACrC,aAAOA,yBAAP;EACD;EAED;;;;;;;0BAI2B;EACzB,aAAOA,aAAP;EACD;EAED;;;;;;;0BAIwC;EACtC,aAAOA,0BAAP;EACD;EAED;;;;;;;0BAI2B;EACzB,aAAOA,aAAP;EACD;EAED;;;;;;;0BAIwC;EACtC,aAAOA,0BAAP;EACD;;;;;AAGH,EAGO,SAASmY,gBAAT,CAA0ByT,WAA1B,EAAuC;EAC5C,MAAI/gB,QAAQ,CAAC6e,UAAT,CAAoBkC,WAApB,CAAJ,EAAsC;EACpC,WAAOA,WAAP;EACD,GAFD,MAEO,IAAIA,WAAW,IAAIA,WAAW,CAACrV,OAA3B,IAAsCrhB,QAAQ,CAAC02B,WAAW,CAACrV,OAAZ,EAAD,CAAlD,EAA2E;EAChF,WAAO1L,QAAQ,CAACud,UAAT,CAAoBwD,WAApB,CAAP;EACD,GAFM,MAEA,IAAIA,WAAW,IAAI,OAAOA,WAAP,KAAuB,QAA1C,EAAoD;EACzD,WAAO/gB,QAAQ,CAAC4B,UAAT,CAAoBmf,WAApB,CAAP;EACD,GAFM,MAEA;EACL,UAAM,IAAIh5B,oBAAJ,iCAC0Bg5B,WAD1B,kBACkD,OAAOA,WADzD,CAAN;EAGD;EACF;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/luxon/build/global/luxon.min.js b/node_modules/luxon/build/global/luxon.min.js deleted file mode 100644 index 59df19e..0000000 --- a/node_modules/luxon/build/global/luxon.min.js +++ /dev/null @@ -1 +0,0 @@ -var luxon=function(e){"use strict";function r(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n=function(e){function t(){return e.apply(this,arguments)||this}return a(t,e),t}(t(Error)),l=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return a(e,t),e}(n),d=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return a(e,t),e}(n),f=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return a(e,t),e}(n),L=function(e){function t(){return e.apply(this,arguments)||this}return a(t,e),t}(n),h=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return a(e,t),e}(n),m=function(e){function t(){return e.apply(this,arguments)||this}return a(t,e),t}(n),y=function(e){function t(){return e.call(this,"Zone is an abstract class")||this}return a(t,e),t}(n),v="numeric",g="short",p="long",w={year:v,month:v,day:v},k={year:v,month:g,day:v},b={year:v,month:g,day:v,weekday:g},O={year:v,month:p,day:v},S={year:v,month:p,day:v,weekday:p},T={hour:v,minute:v},M={hour:v,minute:v,second:v},N={hour:v,minute:v,second:v,timeZoneName:g},D={hour:v,minute:v,second:v,timeZoneName:p},E={hour:v,minute:v,hour12:!1},x={hour:v,minute:v,second:v,hour12:!1},C={hour:v,minute:v,second:v,hour12:!1,timeZoneName:g},F={hour:v,minute:v,second:v,hour12:!1,timeZoneName:p},Z={year:v,month:v,day:v,hour:v,minute:v},j={year:v,month:v,day:v,hour:v,minute:v,second:v},A={year:v,month:g,day:v,hour:v,minute:v},z={year:v,month:g,day:v,hour:v,minute:v,second:v},_={year:v,month:g,day:v,weekday:g,hour:v,minute:v},q={year:v,month:p,day:v,hour:v,minute:v,timeZoneName:g},H={year:v,month:p,day:v,hour:v,minute:v,second:v,timeZoneName:g},U={year:v,month:p,day:v,weekday:p,hour:v,minute:v,timeZoneName:p},R={year:v,month:p,day:v,weekday:p,hour:v,minute:v,second:v,timeZoneName:p};function W(e){return void 0===e}function P(e){return"number"==typeof e}function J(e){return"number"==typeof e&&e%1==0}function I(){try{return"undefined"!=typeof Intl&&Intl.DateTimeFormat}catch(e){return!1}}function Y(){return!W(Intl.DateTimeFormat.prototype.formatToParts)}function G(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function $(e,r,i){if(0!==e.length)return e.reduce(function(e,t){var n=[r(t),t];return e&&i(e[0],n[0])===e[0]?e:n},null)[1]}function B(n,e){return e.reduce(function(e,t){return e[t]=n[t],e},{})}function Q(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function K(e,t,n){return J(e)&&t<=e&&e<=n}function X(e,t){return void 0===t&&(t=2),e.toString().lengthtn.indexOf(c)&&an(this.matrix,u,h,a,c)}else P(u[c])&&(o[c]=u[c])}for(var m in o)0!==o[m]&&(a[r]+=m===r?o[m]:o[m]/this.matrix[r][m]);return rn(this,{values:a},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var e={},t=0,n=Object.keys(this.values);te},e.isBefore=function(e){return!!this.isValid&&this.e<=e},e.contains=function(e){return!!this.isValid&&(this.s<=e&&this.e>e)},e.set=function(e){var t=void 0===e?{}:e,n=t.start,r=t.end;return this.isValid?f.fromDateTimes(n||this.s,r||this.e):this},e.splitAt=function(){var t=this;if(!this.isValid)return[];for(var e=arguments.length,n=new Array(e),r=0;r+this.e?this.e:s;a.push(f.fromDateTimes(o,c)),o=c,u+=1}return a},e.splitBy=function(e){var t=un(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];for(var n,r,i=this.s,a=[];i+this.e?this.e:n,a.push(f.fromDateTimes(i,r)),i=r;return a},e.divideEqually=function(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]},e.overlaps=function(e){return this.e>e.s&&this.s=e.e)},e.equals=function(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))},e.intersection=function(e){if(!this.isValid)return this;var t=this.s>e.s?this.s:e.s,n=this.ee.e?this.e:e.e;return f.fromDateTimes(t,n)},f.merge=function(e){var t=e.sort(function(e,t){return e.s-t.s}).reduce(function(e,t){var n=e[0],r=e[1];return r?r.overlaps(t)||r.abutsStart(t)?[n,r.union(t)]:[n.concat([r]),t]:[n,t]},[[],null]),n=t[0],r=t[1];return r&&n.push(r),n},f.xor=function(e){for(var t,n,r=null,i=0,a=[],o=e.map(function(e){return[{time:e.s,type:"s"},{time:e.e,type:"e"}]}),u=V((t=Array.prototype).concat.apply(t,o).sort(function(e,t){return e.time-t.time}));!(n=u()).done;){var s=n.value;r=1===(i+="s"===s.type?1:-1)?s.time:(r&&+r!=+s.time&&a.push(f.fromDateTimes(r,s.time)),null)}return f.merge(a)},e.difference=function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;rue(n)?(t=n+1,u=1):t=n,Object.assign({weekYear:t,weekNumber:u,weekday:o},me(e))}function zn(e){var t,n=e.weekYear,r=e.weekNumber,i=e.weekday,a=Fn(n,1,4),o=ie(n),u=7*r+i-a-3;u<1?u+=ie(t=n-1):othis.valueOf(),u=dn(o?this:e,o?e:this,a,i);return o?u.negate():u},e.diffNow=function(e,t){return void 0===e&&(e="milliseconds"),void 0===t&&(t={}),this.diff(I.local(),e,t)},e.until=function(e){return this.isValid?cn.fromDateTimes(this,e):this},e.hasSame=function(e,t){if(!this.isValid)return!1;if("millisecond"===t)return this.valueOf()===e.valueOf();var n=e.valueOf();return this.startOf(t)<=n&&n<=this.endOf(t)},e.equals=function(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)},e.toRelative=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var t=e.base||I.fromObject({zone:this.zone}),n=e.padding?thisthis.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return re(this.year)}},{key:"daysInMonth",get:function(){return ae(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?ie(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?ue(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return w}},{key:"DATE_MED",get:function(){return k}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return b}},{key:"DATE_FULL",get:function(){return O}},{key:"DATE_HUGE",get:function(){return S}},{key:"TIME_SIMPLE",get:function(){return T}},{key:"TIME_WITH_SECONDS",get:function(){return M}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return N}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return D}},{key:"TIME_24_SIMPLE",get:function(){return E}},{key:"TIME_24_WITH_SECONDS",get:function(){return x}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return C}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return F}},{key:"DATETIME_SHORT",get:function(){return Z}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return j}},{key:"DATETIME_MED",get:function(){return A}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return z}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return _}},{key:"DATETIME_FULL",get:function(){return q}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return H}},{key:"DATETIME_HUGE",get:function(){return U}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return R}}]),I}();function lr(e){if(cr.isDateTime(e))return e;if(e&&e.valueOf&&P(e.valueOf()))return cr.fromJSDate(e);if(e&&"object"==typeof e)return cr.fromObject(e);throw new m("Unknown datetime argument: "+e+", of type "+typeof e)}return e.DateTime=cr,e.Duration=on,e.FixedOffsetZone=Re,e.IANAZone=He,e.Info=ln,e.Interval=cn,e.InvalidZone=We,e.LocalZone=je,e.Settings=Ke,e.Zone=Fe,e}({}); \ No newline at end of file diff --git a/node_modules/luxon/build/global/luxon.min.js.map b/node_modules/luxon/build/global/luxon.min.js.map deleted file mode 100644 index 44d5719..0000000 --- a/node_modules/luxon/build/global/luxon.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"build/global/luxon.js","sources":["0"],"names":["luxon","exports","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","Constructor","protoProps","staticProps","prototype","_inheritsLoose","subClass","superClass","create","constructor","__proto__","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","_setPrototypeOf","p","_construct","Parent","args","Class","Reflect","construct","sham","Proxy","Date","toString","call","e","_isNativeReflectConstruct","a","push","apply","instance","Function","bind","arguments","_wrapNativeSuper","_cache","Map","undefined","fn","indexOf","TypeError","has","get","set","Wrapper","this","value","_arrayLikeToArray","arr","len","arr2","Array","_createForOfIteratorHelperLoose","Symbol","iterator","next","isArray","minLen","n","slice","name","from","test","_unsupportedIterableToArray","done","LuxonError","_Error","Error","InvalidDateTimeError","_LuxonError","reason","toMessage","InvalidIntervalError","_LuxonError2","InvalidDurationError","_LuxonError3","ConflictingSpecificationError","_LuxonError4","InvalidUnitError","_LuxonError5","unit","InvalidArgumentError","_LuxonError6","ZoneIsAbstractError","_LuxonError7","s","l","DATE_SHORT","year","month","day","DATE_MED","DATE_MED_WITH_WEEKDAY","weekday","DATE_FULL","DATE_HUGE","TIME_SIMPLE","hour","minute","TIME_WITH_SECONDS","second","TIME_WITH_SHORT_OFFSET","timeZoneName","TIME_WITH_LONG_OFFSET","TIME_24_SIMPLE","hour12","TIME_24_WITH_SECONDS","TIME_24_WITH_SHORT_OFFSET","TIME_24_WITH_LONG_OFFSET","DATETIME_SHORT","DATETIME_SHORT_WITH_SECONDS","DATETIME_MED","DATETIME_MED_WITH_SECONDS","DATETIME_MED_WITH_WEEKDAY","DATETIME_FULL","DATETIME_FULL_WITH_SECONDS","DATETIME_HUGE","DATETIME_HUGE_WITH_SECONDS","isUndefined","isNumber","isInteger","hasIntl","Intl","DateTimeFormat","hasFormatToParts","formatToParts","hasRelative","RelativeTimeFormat","bestBy","by","compare","reduce","best","pair","pick","obj","keys","k","hasOwnProperty","prop","integerBetween","thing","bottom","top","padStart","input","repeat","parseInteger","string","parseInt","parseMillis","fraction","f","parseFloat","Math","floor","roundTo","number","digits","towardZero","factor","pow","trunc","round","isLeapYear","daysInYear","daysInMonth","x","modMonth","objToLocalTS","d","UTC","millisecond","setUTCFullYear","getUTCFullYear","weeksInWeekYear","weekYear","p1","last","p2","untruncateYear","parseZoneInfo","ts","offsetFormat","locale","timeZone","date","intlOpts","modified","assign","intl","parsed","find","m","type","toLowerCase","without","format","substring","replace","signedOffset","offHourStr","offMinuteStr","offHour","Number","isNaN","offMin","is","asNumber","numericValue","normalizeObject","normalizer","nonUnitKeys","normalized","u","v","formatOffset","offset","hours","abs","minutes","sign","RangeError","timeObject","ianaRegex","stringify","JSON","sort","monthsLong","monthsShort","monthsNarrow","months","weekdaysLong","weekdaysShort","weekdaysNarrow","weekdays","meridiems","erasLong","erasShort","erasNarrow","eras","stringifyTokens","splits","tokenToString","_step","_iterator","token","literal","val","_macroTokenToFormatOpts","D","DD","DDD","DDDD","t","tt","ttt","tttt","T","TT","TTT","TTTT","ff","fff","ffff","F","FF","FFF","FFFF","Formatter","formatOpts","opts","loc","systemLoc","parseFormat","fmt","current","currentFull","bracketed","c","charAt","macroTokenToFormatOpts","_proto","formatWithSystemDefault","dt","redefaultToSystem","dtFormatter","formatDateTime","formatDateTimeParts","resolvedOptions","num","forceSimple","padTo","numberFormatter","formatDateTimeFromString","extract","_this","isOffsetFixed","allowZ","isValid","zone","meridiem","knownEnglish","standalone","era","listingMode","useDateTimeFormatter","outputCalendar","offsetName","zoneName","weekNumber","ordinal","quarter","formatDurationFromString","dur","tokenToField","lildur","_this2","tokens","realTokens","found","_ref","concat","collapsed","shiftTo","map","filter","mapped","Invalid","explanation","Zone","equals","singleton","LocalZone","_Zone","getTimezoneOffset","otherZone","matchingRegex","RegExp","source","dtfCache","typeToPos","ianaZoneCache","IANAZone","valid","isValidZone","resetCache","isValidSpecifier","match","parseGMTOffset","specifier","formatted","fMonth","fDay","dtf","_ref2","filled","_formatted$i","pos","partsOffset","exec","asTS","over","singleton$1","FixedOffsetZone","fixed","utcInstance","parseSpecifier","r","InvalidZone","NaN","normalizeZone","defaultZone","lowered","now","defaultLocale","defaultNumberingSystem","defaultOutputCalendar","throwOnInvalid","Settings","resetCaches","Locale","z","numberingSystem","intlDTCache","getCachedDTF","locString","intlNumCache","intlRelCache","getCachedRTF","base","cacheKeyOpts","excluded","sourceKeys","_objectWithoutPropertiesLoose","inf","sysLocaleCache","listStuff","defaultOK","englishFn","intlFn","mode","PolyNumberFormatter","useGrouping","minimumIntegerDigits","NumberFormat","getCachedINF","PolyDateFormatter","universal","DateTime","fromMillis","_proto2","toJSDate","tokenFormat","knownFormat","dateTimeHuge","formatString","PolyRelFormatter","isEnglish","style","rtf","_proto3","count","numeric","narrow","units","years","quarters","weeks","days","seconds","lastable","isDay","isInPast","fmtValue","singular","lilUnits","fmtUnit","formatRelativeTime","numbering","specifiedLocale","localeStr","_parseLocaleString","uIndex","options","smaller","calendar","parseLocaleString","parsedLocale","parsedNumberingSystem","parsedOutputCalendar","weekdaysCache","monthsCache","meridiemCache","eraCache","fastNumbersCached","fromOpts","defaultToEN","computedSys","systemLocale","fromObject","_temp","_proto4","hasFTP","isActuallyEn","hasNoWeirdness","clone","alts","getOwnPropertyNames","redefaultToEN","formatStr","ms","utc","mapMonths","mapWeekdays","_this3","_this4","field","matching","fastNumbers","relFormatter","startsWith","other","combineRegexes","_len","regexes","_key","full","combineExtractors","_len2","extractors","_key2","ex","mergedVals","mergedZone","cursor","_ex","parse","_len3","patterns","_key3","_i","_patterns","_patterns$_i","regex","extractor","simpleParse","_len4","_key4","ret","offsetRegex","isoTimeBaseRegex","isoTimeRegex","isoTimeExtensionRegex","extractISOWeekData","extractISOOrdinalData","sqlTimeRegex","sqlTimeExtensionRegex","int","fallback","extractISOYmd","extractISOTime","extractISOOffset","local","fullOffset","extractIANAZone","isoDuration","extractISODuration","maybeNegate","hasNegativePrefix","yearStr","monthStr","weekStr","dayStr","hourStr","minuteStr","secondStr","millisecondsStr","milliseconds","obsOffsets","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","fromStrings","weekdayStr","result","rfc2822","extractRFC2822","obsOffset","milOffset","rfc1123","rfc850","ascii","extractRFC1123Or850","extractASCII","isoYmdWithTimeExtensionRegex","isoWeekWithTimeExtensionRegex","isoOrdinalWithTimeExtensionRegex","isoTimeCombinedRegex","extractISOYmdTimeAndOffset","extractISOWeekTimeAndOffset","extractISOOrdinalDataAndTime","extractISOTimeAndOffset","sqlYmdWithTimeExtensionRegex","sqlTimeCombinedRegex","extractISOYmdTimeOffsetAndIANAZone","extractISOTimeOffsetAndIANAZone","lowOrderMatrix","casualMatrix","daysInYearAccurate","daysInMonthAccurate","accurateMatrix","orderedUnits","reverseUnits","reverse","clear","conf","values","conversionAccuracy","Duration","convert","matrix","fromMap","fromUnit","toMap","toUnit","conv","raw","added","ceil","config","accurate","invalid","isLuxonDuration","normalizeUnit","fromISO","text","week","isDuration","toFormat","fmtOpts","toObject","includeConfig","toISO","toJSON","valueOf","as","plus","duration","friendlyDuration","minus","negate","mapUnits","_Object$keys","reconfigure","normalize","vals","previous","lastUnit","_step2","built","accumulated","_iterator2","own","ak","down","negated","_i2","_Object$keys2","_step3","_iterator3","durationish","INVALID$1","Interval","start","end","isLuxonInterval","fromDateTimes","builtStart","friendlyDateTime","builtEnd","validateError","after","before","_split","split","startIsValid","endIsValid","_dur","isInterval","toDuration","startOf","diff","hasSame","isEmpty","isAfter","dateTime","isBefore","contains","splitAt","dateTimes","sorted","results","splitBy","divideEqually","numberOfParts","overlaps","abutsStart","abutsEnd","engulfs","intersection","union","merge","intervals","_intervals$sort$reduc","b","item","sofar","final","xor","_Array$prototype","currentCount","ends","time","difference","toISODate","toISOTime","dateFormat","_temp2","_ref3$separator","separator","invalidReason","mapEndpoints","mapFn","Info","hasDST","proto","setZone","isValidIANAZone","_ref$locale","_ref$numberingSystem","_ref$outputCalendar","monthsFormat","_ref2$locale","_ref2$numberingSystem","_ref2$outputCalendar","_temp3","_ref3","_ref3$locale","_ref3$numberingSystem","weekdaysFormat","_temp4","_ref4","_ref4$locale","_ref4$numberingSystem","_temp5","_ref5$locale","_temp6","_ref6$locale","features","intlTokens","zones","relative","dayDiff","earlier","later","utcDayStart","toUTC","keepLocalTime","_diff","_highOrderDiffs","lowestOrder","highWater","_differs","_differs$_i","differ","_cursor$plus","_cursor$plus2","delta","highOrderDiffs","remainingMillis","lowerOrderUnits","_cursor$plus3","_Duration$fromMillis","numberingSystems","arab","arabext","bali","beng","deva","fullwide","gujr","hanidec","khmr","knda","laoo","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt","latn","numberingSystemsUTF16","hanidecChars","digitRegex","append","MISSING_FTP","intUnit","post","deser","str","code","charCodeAt","search","_numberingSystemsUTF","min","max","parseDigits","spaceOrNBSP","String","fromCharCode","spaceOrNBSPRegExp","fixListRegex","stripInsensitivities","oneOf","strings","startIndex","join","findIndex","groups","simple","unitForToken","_ref5","one","two","three","four","six","oneOrTwo","oneToThree","oneToSix","oneToNine","twoToFour","fourToSix","unitate","partTypeStyleToTokenVal","2-digit","short","long","dayperiod","dayPeriod","dummyDateTimeCache","maybeExpandMacroToken","part","tokenForPart","includes","explainFromTokens","disqualifyingUnit","matches","_buildRegex","handlers","_match","all","matchIndex","h","rawMatches","_ref6","Z","q","M","G","y","S","toField","nonLeapLadder","leapLadder","unitOutOfRange","dayOfWeek","js","getUTCDay","computeOrdinal","uncomputeOrdinal","table","month0","gregorianToWeek","gregObj","weekToGregorian","weekData","weekdayOfJan4","yearInDays","_uncomputeOrdinal","gregorianToOrdinal","gregData","ordinalToGregorian","ordinalData","_uncomputeOrdinal2","hasInvalidGregorianData","validYear","validMonth","validDay","hasInvalidTimeData","validHour","validMinute","validSecond","validMillisecond","INVALID$2","unsupportedZone","possiblyCachedWeekData","clone$1","inst","old","fixOffset","localTS","tz","utcGuess","o2","o3","tsToObj","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","objToTS","adjustTime","oPre","millisToAdd","_fixOffset","parseDataToDateTime","parsedZone","interpretationZone","toTechFormat","toTechTimeFormat","_ref$suppressSeconds","suppressSeconds","_ref$suppressMillisec","suppressMilliseconds","includeOffset","_ref$includeZone","includeZone","_ref$spaceZone","spaceZone","_ref$format","defaultUnitValues","defaultWeekUnitValues","defaultOrdinalUnitValues","orderedUnits$1","orderedWeekUnits","orderedOrdinalUnits","weeknumber","weeksnumber","weeknumbers","weekyear","weekyears","quickDT","tsNow","_objToTS","diffRelative","calendary","ot","_zone","isLuxonDateTime","fromJSDate","zoneToUse","fromSeconds","offsetProvis","containsOrdinal","containsGregorYear","containsGregorMD","containsGregor","definiteWeekDef","defaultValues","useWeekData","objNow","foundFirst","validOrdinal","validWeek","validWeekday","_objToTS2","_parseISODate","fromRFC2822","_parseRFC2822Date","trim","fromHTTP","_parseHTTPDate","fromFormat","_explainFromTokens","_opts$locale","_opts$numberingSystem","localeToUse","_parseFromTokens","fromString","fromSQL","_parseSQL","isDateTime","resolvedLocaleOpts","_Formatter$create$res","toLocal","_ref3$keepLocalTime","_ref3$keepCalendarTim","keepCalendarTime","newTS","offsetGuess","setLocale","mixed","_objToTS4","normalizedUnit","endOf","_this$plus","toLocaleString","toLocaleParts","_ref5$format","toISOWeekDate","_ref6$suppressMillise","_ref6$suppressSeconds","_ref6$includeOffset","_ref6$format","toRFC2822","toHTTP","toSQLDate","toSQLTime","_ref7","_ref7$includeOffset","_ref7$includeZone","toSQL","toMillis","toSeconds","toBSON","otherDateTime","durOpts","otherIsLater","diffed","diffNow","until","inputMs","toRelative","padding","toRelativeCalendar","every","fromFormatExplain","_options$locale","_options$numberingSys","fromStringExplain","dateTimeish"],"mappings":"AAAA,IAAIA,MAAS,SAAU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ACDjH,IAAK,8BACL8C,IAAK,WACH,OAAOoE,IAOR,CACDlH,IAAK,eACL8C,IAAK,WACH,OAAOqE,IAOR,CACDnH,IAAK,4BACL8C,IAAK,WACH,OAAOsE,IAOR,CACDpH,IAAK,4BACL8C,IAAK,WACH,OAAOuE,IAOR,CACDrH,IAAK,gBACL8C,IAAK,WACH,OAAOwE,IAOR,CACDtH,IAAK,6BACL8C,IAAK,WACH,OAAOyE,IAOR,CACDvH,IAAK,gBACL8C,IAAK,WACH,OAAO0E,IAOR,CACDxH,IAAK,6BACL8C,IAAK,WACH,OAAO2E,MAIJoS,EAthEmB,GAwhE5B,SAAS4O,GAAiBiX,GACxB,GAAI7lB,GAAS4iB,WAAWiD,GACtB,OAAOA,EACF,GAAIA,GAAeA,EAAYnZ,SAAW5e,EAAS+3B,EAAYnZ,WACpE,OAAO1M,GAAS4gB,WAAWiF,GACtB,GAAIA,GAAsC,iBAAhBA,EAC/B,OAAO7lB,GAASmD,WAAW0iB,GAE3B,MAAM,IAAIr6B,EAAqB,8BAAgCq6B,EAAc,oBAAsBA,GAevG,OAXAtgC,EAAQya,SAAWA,GACnBza,EAAQylB,SAAWA,GACnBzlB,EAAQ4X,gBAAkBA,GAC1B5X,EAAQuW,SAAWA,GACnBvW,EAAQ4sB,KAAOA,GACf5sB,EAAQ+oB,SAAWA,GACnB/oB,EAAQiY,YAAcA,GACtBjY,EAAQ6V,UAAYA,GACpB7V,EAAQ2Y,SAAWA,GACnB3Y,EAAQ0V,KAAOA,GAER1V,EApmQG,CAsmQV"} \ No newline at end of file diff --git a/node_modules/luxon/build/node/luxon.js b/node_modules/luxon/build/node/luxon.js deleted file mode 100644 index a505a1c..0000000 --- a/node_modules/luxon/build/node/luxon.js +++ /dev/null @@ -1,7348 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -// these aren't really private, but nor are they really useful to document - -/** - * @private - */ -class LuxonError extends Error {} -/** - * @private - */ - - -class InvalidDateTimeError extends LuxonError { - constructor(reason) { - super(`Invalid DateTime: ${reason.toMessage()}`); - } - -} -/** - * @private - */ - -class InvalidIntervalError extends LuxonError { - constructor(reason) { - super(`Invalid Interval: ${reason.toMessage()}`); - } - -} -/** - * @private - */ - -class InvalidDurationError extends LuxonError { - constructor(reason) { - super(`Invalid Duration: ${reason.toMessage()}`); - } - -} -/** - * @private - */ - -class ConflictingSpecificationError extends LuxonError {} -/** - * @private - */ - -class InvalidUnitError extends LuxonError { - constructor(unit) { - super(`Invalid unit ${unit}`); - } - -} -/** - * @private - */ - -class InvalidArgumentError extends LuxonError {} -/** - * @private - */ - -class ZoneIsAbstractError extends LuxonError { - constructor() { - super("Zone is an abstract class"); - } - -} - -/** - * @private - */ -const n = "numeric", - s = "short", - l = "long"; -const DATE_SHORT = { - year: n, - month: n, - day: n -}; -const DATE_MED = { - year: n, - month: s, - day: n -}; -const DATE_MED_WITH_WEEKDAY = { - year: n, - month: s, - day: n, - weekday: s -}; -const DATE_FULL = { - year: n, - month: l, - day: n -}; -const DATE_HUGE = { - year: n, - month: l, - day: n, - weekday: l -}; -const TIME_SIMPLE = { - hour: n, - minute: n -}; -const TIME_WITH_SECONDS = { - hour: n, - minute: n, - second: n -}; -const TIME_WITH_SHORT_OFFSET = { - hour: n, - minute: n, - second: n, - timeZoneName: s -}; -const TIME_WITH_LONG_OFFSET = { - hour: n, - minute: n, - second: n, - timeZoneName: l -}; -const TIME_24_SIMPLE = { - hour: n, - minute: n, - hour12: false -}; -/** - * {@link toLocaleString}; format like '09:30:23', always 24-hour. - */ - -const TIME_24_WITH_SECONDS = { - hour: n, - minute: n, - second: n, - hour12: false -}; -/** - * {@link toLocaleString}; format like '09:30:23 EDT', always 24-hour. - */ - -const TIME_24_WITH_SHORT_OFFSET = { - hour: n, - minute: n, - second: n, - hour12: false, - timeZoneName: s -}; -/** - * {@link toLocaleString}; format like '09:30:23 Eastern Daylight Time', always 24-hour. - */ - -const TIME_24_WITH_LONG_OFFSET = { - hour: n, - minute: n, - second: n, - hour12: false, - timeZoneName: l -}; -/** - * {@link toLocaleString}; format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. - */ - -const DATETIME_SHORT = { - year: n, - month: n, - day: n, - hour: n, - minute: n -}; -/** - * {@link toLocaleString}; format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. - */ - -const DATETIME_SHORT_WITH_SECONDS = { - year: n, - month: n, - day: n, - hour: n, - minute: n, - second: n -}; -const DATETIME_MED = { - year: n, - month: s, - day: n, - hour: n, - minute: n -}; -const DATETIME_MED_WITH_SECONDS = { - year: n, - month: s, - day: n, - hour: n, - minute: n, - second: n -}; -const DATETIME_MED_WITH_WEEKDAY = { - year: n, - month: s, - day: n, - weekday: s, - hour: n, - minute: n -}; -const DATETIME_FULL = { - year: n, - month: l, - day: n, - hour: n, - minute: n, - timeZoneName: s -}; -const DATETIME_FULL_WITH_SECONDS = { - year: n, - month: l, - day: n, - hour: n, - minute: n, - second: n, - timeZoneName: s -}; -const DATETIME_HUGE = { - year: n, - month: l, - day: n, - weekday: l, - hour: n, - minute: n, - timeZoneName: l -}; -const DATETIME_HUGE_WITH_SECONDS = { - year: n, - month: l, - day: n, - weekday: l, - hour: n, - minute: n, - second: n, - timeZoneName: l -}; - -/* - This is just a junk drawer, containing anything used across multiple classes. - Because Luxon is small(ish), this should stay small and we won't worry about splitting - it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area. -*/ -/** - * @private - */ -// TYPES - -function isUndefined(o) { - return typeof o === "undefined"; -} -function isNumber(o) { - return typeof o === "number"; -} -function isInteger(o) { - return typeof o === "number" && o % 1 === 0; -} -function isString(o) { - return typeof o === "string"; -} -function isDate(o) { - return Object.prototype.toString.call(o) === "[object Date]"; -} // CAPABILITIES - -function hasIntl() { - try { - return typeof Intl !== "undefined" && Intl.DateTimeFormat; - } catch (e) { - return false; - } -} -function hasFormatToParts() { - return !isUndefined(Intl.DateTimeFormat.prototype.formatToParts); -} -function hasRelative() { - try { - return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat; - } catch (e) { - return false; - } -} // OBJECTS AND ARRAYS - -function maybeArray(thing) { - return Array.isArray(thing) ? thing : [thing]; -} -function bestBy(arr, by, compare) { - if (arr.length === 0) { - return undefined; - } - - return arr.reduce((best, next) => { - const pair = [by(next), next]; - - if (!best) { - return pair; - } else if (compare(best[0], pair[0]) === best[0]) { - return best; - } else { - return pair; - } - }, null)[1]; -} -function pick(obj, keys) { - return keys.reduce((a, k) => { - a[k] = obj[k]; - return a; - }, {}); -} -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} // NUMBERS AND STRINGS - -function integerBetween(thing, bottom, top) { - return isInteger(thing) && thing >= bottom && thing <= top; -} // x % n but takes the sign of n instead of x - -function floorMod(x, n) { - return x - n * Math.floor(x / n); -} -function padStart(input, n = 2) { - if (input.toString().length < n) { - return ("0".repeat(n) + input).slice(-n); - } else { - return input.toString(); - } -} -function parseInteger(string) { - if (isUndefined(string) || string === null || string === "") { - return undefined; - } else { - return parseInt(string, 10); - } -} -function parseMillis(fraction) { - // Return undefined (instead of 0) in these cases, where fraction is not set - if (isUndefined(fraction) || fraction === null || fraction === "") { - return undefined; - } else { - const f = parseFloat("0." + fraction) * 1000; - return Math.floor(f); - } -} -function roundTo(number, digits, towardZero = false) { - const factor = Math.pow(10, digits), - rounder = towardZero ? Math.trunc : Math.round; - return rounder(number * factor) / factor; -} // DATE BASICS - -function isLeapYear(year) { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -} -function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; -} -function daysInMonth(year, month) { - const modMonth = floorMod(month - 1, 12) + 1, - modYear = year + (month - modMonth) / 12; - - if (modMonth === 2) { - return isLeapYear(modYear) ? 29 : 28; - } else { - return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1]; - } -} // covert a calendar object to a local timestamp (epoch, but with the offset baked in) - -function objToLocalTS(obj) { - let d = Date.UTC(obj.year, obj.month - 1, obj.day, obj.hour, obj.minute, obj.second, obj.millisecond); // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that - - if (obj.year < 100 && obj.year >= 0) { - d = new Date(d); - d.setUTCFullYear(d.getUTCFullYear() - 1900); - } - - return +d; -} -function weeksInWeekYear(weekYear) { - const p1 = (weekYear + Math.floor(weekYear / 4) - Math.floor(weekYear / 100) + Math.floor(weekYear / 400)) % 7, - last = weekYear - 1, - p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7; - return p1 === 4 || p2 === 3 ? 53 : 52; -} -function untruncateYear(year) { - if (year > 99) { - return year; - } else return year > 60 ? 1900 + year : 2000 + year; -} // PARSING - -function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) { - const date = new Date(ts), - intlOpts = { - hour12: false, - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit" - }; - - if (timeZone) { - intlOpts.timeZone = timeZone; - } - - const modified = Object.assign({ - timeZoneName: offsetFormat - }, intlOpts), - intl = hasIntl(); - - if (intl && hasFormatToParts()) { - const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(m => m.type.toLowerCase() === "timezonename"); - return parsed ? parsed.value : null; - } else if (intl) { - // this probably doesn't work for all locales - const without = new Intl.DateTimeFormat(locale, intlOpts).format(date), - included = new Intl.DateTimeFormat(locale, modified).format(date), - diffed = included.substring(without.length), - trimmed = diffed.replace(/^[, \u200e]+/, ""); - return trimmed; - } else { - return null; - } -} // signedOffset('-5', '30') -> -330 - -function signedOffset(offHourStr, offMinuteStr) { - let offHour = parseInt(offHourStr, 10); // don't || this because we want to preserve -0 - - if (Number.isNaN(offHour)) { - offHour = 0; - } - - const offMin = parseInt(offMinuteStr, 10) || 0, - offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin; - return offHour * 60 + offMinSigned; -} // COERCION - -function asNumber(value) { - const numericValue = Number(value); - if (typeof value === "boolean" || value === "" || Number.isNaN(numericValue)) throw new InvalidArgumentError(`Invalid unit value ${value}`); - return numericValue; -} -function normalizeObject(obj, normalizer, nonUnitKeys) { - const normalized = {}; - - for (const u in obj) { - if (hasOwnProperty(obj, u)) { - if (nonUnitKeys.indexOf(u) >= 0) continue; - const v = obj[u]; - if (v === undefined || v === null) continue; - normalized[normalizer(u)] = asNumber(v); - } - } - - return normalized; -} -function formatOffset(offset, format) { - const hours = Math.trunc(Math.abs(offset / 60)), - minutes = Math.trunc(Math.abs(offset % 60)), - sign = offset >= 0 ? "+" : "-"; - - switch (format) { - case "short": - return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`; - - case "narrow": - return `${sign}${hours}${minutes > 0 ? `:${minutes}` : ""}`; - - case "techie": - return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`; - - default: - throw new RangeError(`Value format ${format} is out of range for property format`); - } -} -function timeObject(obj) { - return pick(obj, ["hour", "minute", "second", "millisecond"]); -} -const ianaRegex = /[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/; - -function stringify(obj) { - return JSON.stringify(obj, Object.keys(obj).sort()); -} -/** - * @private - */ - - -const monthsLong = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; -const monthsShort = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; -const monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]; -function months(length) { - switch (length) { - case "narrow": - return monthsNarrow; - - case "short": - return monthsShort; - - case "long": - return monthsLong; - - case "numeric": - return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]; - - case "2-digit": - return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]; - - default: - return null; - } -} -const weekdaysLong = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]; -const weekdaysShort = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; -const weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"]; -function weekdays(length) { - switch (length) { - case "narrow": - return weekdaysNarrow; - - case "short": - return weekdaysShort; - - case "long": - return weekdaysLong; - - case "numeric": - return ["1", "2", "3", "4", "5", "6", "7"]; - - default: - return null; - } -} -const meridiems = ["AM", "PM"]; -const erasLong = ["Before Christ", "Anno Domini"]; -const erasShort = ["BC", "AD"]; -const erasNarrow = ["B", "A"]; -function eras(length) { - switch (length) { - case "narrow": - return erasNarrow; - - case "short": - return erasShort; - - case "long": - return erasLong; - - default: - return null; - } -} -function meridiemForDateTime(dt) { - return meridiems[dt.hour < 12 ? 0 : 1]; -} -function weekdayForDateTime(dt, length) { - return weekdays(length)[dt.weekday - 1]; -} -function monthForDateTime(dt, length) { - return months(length)[dt.month - 1]; -} -function eraForDateTime(dt, length) { - return eras(length)[dt.year < 0 ? 0 : 1]; -} -function formatRelativeTime(unit, count, numeric = "always", narrow = false) { - const units = { - years: ["year", "yr."], - quarters: ["quarter", "qtr."], - months: ["month", "mo."], - weeks: ["week", "wk."], - days: ["day", "day", "days"], - hours: ["hour", "hr."], - minutes: ["minute", "min."], - seconds: ["second", "sec."] - }; - const lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1; - - if (numeric === "auto" && lastable) { - const isDay = unit === "days"; - - switch (count) { - case 1: - return isDay ? "tomorrow" : `next ${units[unit][0]}`; - - case -1: - return isDay ? "yesterday" : `last ${units[unit][0]}`; - - case 0: - return isDay ? "today" : `this ${units[unit][0]}`; - - } - } - - const isInPast = Object.is(count, -0) || count < 0, - fmtValue = Math.abs(count), - singular = fmtValue === 1, - lilUnits = units[unit], - fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit; - return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`; -} -function formatString(knownFormat) { - // these all have the offsets removed because we don't have access to them - // without all the intl stuff this is backfilling - const filtered = pick(knownFormat, ["weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZoneName", "hour12"]), - key = stringify(filtered), - dateTimeHuge = "EEEE, LLLL d, yyyy, h:mm a"; - - switch (key) { - case stringify(DATE_SHORT): - return "M/d/yyyy"; - - case stringify(DATE_MED): - return "LLL d, yyyy"; - - case stringify(DATE_MED_WITH_WEEKDAY): - return "EEE, LLL d, yyyy"; - - case stringify(DATE_FULL): - return "LLLL d, yyyy"; - - case stringify(DATE_HUGE): - return "EEEE, LLLL d, yyyy"; - - case stringify(TIME_SIMPLE): - return "h:mm a"; - - case stringify(TIME_WITH_SECONDS): - return "h:mm:ss a"; - - case stringify(TIME_WITH_SHORT_OFFSET): - return "h:mm a"; - - case stringify(TIME_WITH_LONG_OFFSET): - return "h:mm a"; - - case stringify(TIME_24_SIMPLE): - return "HH:mm"; - - case stringify(TIME_24_WITH_SECONDS): - return "HH:mm:ss"; - - case stringify(TIME_24_WITH_SHORT_OFFSET): - return "HH:mm"; - - case stringify(TIME_24_WITH_LONG_OFFSET): - return "HH:mm"; - - case stringify(DATETIME_SHORT): - return "M/d/yyyy, h:mm a"; - - case stringify(DATETIME_MED): - return "LLL d, yyyy, h:mm a"; - - case stringify(DATETIME_FULL): - return "LLLL d, yyyy, h:mm a"; - - case stringify(DATETIME_HUGE): - return dateTimeHuge; - - case stringify(DATETIME_SHORT_WITH_SECONDS): - return "M/d/yyyy, h:mm:ss a"; - - case stringify(DATETIME_MED_WITH_SECONDS): - return "LLL d, yyyy, h:mm:ss a"; - - case stringify(DATETIME_MED_WITH_WEEKDAY): - return "EEE, d LLL yyyy, h:mm a"; - - case stringify(DATETIME_FULL_WITH_SECONDS): - return "LLLL d, yyyy, h:mm:ss a"; - - case stringify(DATETIME_HUGE_WITH_SECONDS): - return "EEEE, LLLL d, yyyy, h:mm:ss a"; - - default: - return dateTimeHuge; - } -} - -function stringifyTokens(splits, tokenToString) { - let s = ""; - - for (const token of splits) { - if (token.literal) { - s += token.val; - } else { - s += tokenToString(token.val); - } - } - - return s; -} - -const macroTokenToFormatOpts = { - D: DATE_SHORT, - DD: DATE_MED, - DDD: DATE_FULL, - DDDD: DATE_HUGE, - t: TIME_SIMPLE, - tt: TIME_WITH_SECONDS, - ttt: TIME_WITH_SHORT_OFFSET, - tttt: TIME_WITH_LONG_OFFSET, - T: TIME_24_SIMPLE, - TT: TIME_24_WITH_SECONDS, - TTT: TIME_24_WITH_SHORT_OFFSET, - TTTT: TIME_24_WITH_LONG_OFFSET, - f: DATETIME_SHORT, - ff: DATETIME_MED, - fff: DATETIME_FULL, - ffff: DATETIME_HUGE, - F: DATETIME_SHORT_WITH_SECONDS, - FF: DATETIME_MED_WITH_SECONDS, - FFF: DATETIME_FULL_WITH_SECONDS, - FFFF: DATETIME_HUGE_WITH_SECONDS -}; -/** - * @private - */ - -class Formatter { - static create(locale, opts = {}) { - return new Formatter(locale, opts); - } - - static parseFormat(fmt) { - let current = null, - currentFull = "", - bracketed = false; - const splits = []; - - for (let i = 0; i < fmt.length; i++) { - const c = fmt.charAt(i); - - if (c === "'") { - if (currentFull.length > 0) { - splits.push({ - literal: bracketed, - val: currentFull - }); - } - - current = null; - currentFull = ""; - bracketed = !bracketed; - } else if (bracketed) { - currentFull += c; - } else if (c === current) { - currentFull += c; - } else { - if (currentFull.length > 0) { - splits.push({ - literal: false, - val: currentFull - }); - } - - currentFull = c; - current = c; - } - } - - if (currentFull.length > 0) { - splits.push({ - literal: bracketed, - val: currentFull - }); - } - - return splits; - } - - static macroTokenToFormatOpts(token) { - return macroTokenToFormatOpts[token]; - } - - constructor(locale, formatOpts) { - this.opts = formatOpts; - this.loc = locale; - this.systemLoc = null; - } - - formatWithSystemDefault(dt, opts) { - if (this.systemLoc === null) { - this.systemLoc = this.loc.redefaultToSystem(); - } - - const df = this.systemLoc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.format(); - } - - formatDateTime(dt, opts = {}) { - const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.format(); - } - - formatDateTimeParts(dt, opts = {}) { - const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.formatToParts(); - } - - resolvedOptions(dt, opts = {}) { - const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.resolvedOptions(); - } - - num(n, p = 0) { - // we get some perf out of doing this here, annoyingly - if (this.opts.forceSimple) { - return padStart(n, p); - } - - const opts = Object.assign({}, this.opts); - - if (p > 0) { - opts.padTo = p; - } - - return this.loc.numberFormatter(opts).format(n); - } - - formatDateTimeFromString(dt, fmt) { - const knownEnglish = this.loc.listingMode() === "en", - useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory" && hasFormatToParts(), - string = (opts, extract) => this.loc.extract(dt, opts, extract), - formatOffset = opts => { - if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) { - return "Z"; - } - - return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : ""; - }, - meridiem = () => knownEnglish ? meridiemForDateTime(dt) : string({ - hour: "numeric", - hour12: true - }, "dayperiod"), - month = (length, standalone) => knownEnglish ? monthForDateTime(dt, length) : string(standalone ? { - month: length - } : { - month: length, - day: "numeric" - }, "month"), - weekday = (length, standalone) => knownEnglish ? weekdayForDateTime(dt, length) : string(standalone ? { - weekday: length - } : { - weekday: length, - month: "long", - day: "numeric" - }, "weekday"), - maybeMacro = token => { - const formatOpts = Formatter.macroTokenToFormatOpts(token); - - if (formatOpts) { - return this.formatWithSystemDefault(dt, formatOpts); - } else { - return token; - } - }, - era = length => knownEnglish ? eraForDateTime(dt, length) : string({ - era: length - }, "era"), - tokenToString = token => { - // Where possible: http://cldr.unicode.org/translation/date-time#TOC-Stand-Alone-vs.-Format-Styles - switch (token) { - // ms - case "S": - return this.num(dt.millisecond); - - case "u": // falls through - - case "SSS": - return this.num(dt.millisecond, 3); - // seconds - - case "s": - return this.num(dt.second); - - case "ss": - return this.num(dt.second, 2); - // minutes - - case "m": - return this.num(dt.minute); - - case "mm": - return this.num(dt.minute, 2); - // hours - - case "h": - return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12); - - case "hh": - return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2); - - case "H": - return this.num(dt.hour); - - case "HH": - return this.num(dt.hour, 2); - // offset - - case "Z": - // like +6 - return formatOffset({ - format: "narrow", - allowZ: this.opts.allowZ - }); - - case "ZZ": - // like +06:00 - return formatOffset({ - format: "short", - allowZ: this.opts.allowZ - }); - - case "ZZZ": - // like +0600 - return formatOffset({ - format: "techie", - allowZ: this.opts.allowZ - }); - - case "ZZZZ": - // like EST - return dt.zone.offsetName(dt.ts, { - format: "short", - locale: this.loc.locale - }); - - case "ZZZZZ": - // like Eastern Standard Time - return dt.zone.offsetName(dt.ts, { - format: "long", - locale: this.loc.locale - }); - // zone - - case "z": - // like America/New_York - return dt.zoneName; - // meridiems - - case "a": - return meridiem(); - // dates - - case "d": - return useDateTimeFormatter ? string({ - day: "numeric" - }, "day") : this.num(dt.day); - - case "dd": - return useDateTimeFormatter ? string({ - day: "2-digit" - }, "day") : this.num(dt.day, 2); - // weekdays - standalone - - case "c": - // like 1 - return this.num(dt.weekday); - - case "ccc": - // like 'Tues' - return weekday("short", true); - - case "cccc": - // like 'Tuesday' - return weekday("long", true); - - case "ccccc": - // like 'T' - return weekday("narrow", true); - // weekdays - format - - case "E": - // like 1 - return this.num(dt.weekday); - - case "EEE": - // like 'Tues' - return weekday("short", false); - - case "EEEE": - // like 'Tuesday' - return weekday("long", false); - - case "EEEEE": - // like 'T' - return weekday("narrow", false); - // months - standalone - - case "L": - // like 1 - return useDateTimeFormatter ? string({ - month: "numeric", - day: "numeric" - }, "month") : this.num(dt.month); - - case "LL": - // like 01, doesn't seem to work - return useDateTimeFormatter ? string({ - month: "2-digit", - day: "numeric" - }, "month") : this.num(dt.month, 2); - - case "LLL": - // like Jan - return month("short", true); - - case "LLLL": - // like January - return month("long", true); - - case "LLLLL": - // like J - return month("narrow", true); - // months - format - - case "M": - // like 1 - return useDateTimeFormatter ? string({ - month: "numeric" - }, "month") : this.num(dt.month); - - case "MM": - // like 01 - return useDateTimeFormatter ? string({ - month: "2-digit" - }, "month") : this.num(dt.month, 2); - - case "MMM": - // like Jan - return month("short", false); - - case "MMMM": - // like January - return month("long", false); - - case "MMMMM": - // like J - return month("narrow", false); - // years - - case "y": - // like 2014 - return useDateTimeFormatter ? string({ - year: "numeric" - }, "year") : this.num(dt.year); - - case "yy": - // like 14 - return useDateTimeFormatter ? string({ - year: "2-digit" - }, "year") : this.num(dt.year.toString().slice(-2), 2); - - case "yyyy": - // like 0012 - return useDateTimeFormatter ? string({ - year: "numeric" - }, "year") : this.num(dt.year, 4); - - case "yyyyyy": - // like 000012 - return useDateTimeFormatter ? string({ - year: "numeric" - }, "year") : this.num(dt.year, 6); - // eras - - case "G": - // like AD - return era("short"); - - case "GG": - // like Anno Domini - return era("long"); - - case "GGGGG": - return era("narrow"); - - case "kk": - return this.num(dt.weekYear.toString().slice(-2), 2); - - case "kkkk": - return this.num(dt.weekYear, 4); - - case "W": - return this.num(dt.weekNumber); - - case "WW": - return this.num(dt.weekNumber, 2); - - case "o": - return this.num(dt.ordinal); - - case "ooo": - return this.num(dt.ordinal, 3); - - case "q": - // like 1 - return this.num(dt.quarter); - - case "qq": - // like 01 - return this.num(dt.quarter, 2); - - case "X": - return this.num(Math.floor(dt.ts / 1000)); - - case "x": - return this.num(dt.ts); - - default: - return maybeMacro(token); - } - }; - - return stringifyTokens(Formatter.parseFormat(fmt), tokenToString); - } - - formatDurationFromString(dur, fmt) { - const tokenToField = token => { - switch (token[0]) { - case "S": - return "millisecond"; - - case "s": - return "second"; - - case "m": - return "minute"; - - case "h": - return "hour"; - - case "d": - return "day"; - - case "M": - return "month"; - - case "y": - return "year"; - - default: - return null; - } - }, - tokenToString = lildur => token => { - const mapped = tokenToField(token); - - if (mapped) { - return this.num(lildur.get(mapped), token.length); - } else { - return token; - } - }, - tokens = Formatter.parseFormat(fmt), - realTokens = tokens.reduce((found, { - literal, - val - }) => literal ? found : found.concat(val), []), - collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter(t => t)); - - return stringifyTokens(tokens, tokenToString(collapsed)); - } - -} - -class Invalid { - constructor(reason, explanation) { - this.reason = reason; - this.explanation = explanation; - } - - toMessage() { - if (this.explanation) { - return `${this.reason}: ${this.explanation}`; - } else { - return this.reason; - } - } - -} - -function _objectWithoutPropertiesLoose(source, excluded) { - if (source == null) return {}; - var target = {}; - var sourceKeys = Object.keys(source); - var key, i; - - for (i = 0; i < sourceKeys.length; i++) { - key = sourceKeys[i]; - if (excluded.indexOf(key) >= 0) continue; - target[key] = source[key]; - } - - return target; -} - -/* eslint no-unused-vars: "off" */ -/** - * @interface - */ - -class Zone { - /** - * The type of zone - * @abstract - * @type {string} - */ - get type() { - throw new ZoneIsAbstractError(); - } - /** - * The name of this zone. - * @abstract - * @type {string} - */ - - - get name() { - throw new ZoneIsAbstractError(); - } - /** - * Returns whether the offset is known to be fixed for the whole year. - * @abstract - * @type {boolean} - */ - - - get universal() { - throw new ZoneIsAbstractError(); - } - /** - * Returns the offset's common name (such as EST) at the specified timestamp - * @abstract - * @param {number} ts - Epoch milliseconds for which to get the name - * @param {Object} opts - Options to affect the format - * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. - * @param {string} opts.locale - What locale to return the offset name in. - * @return {string} - */ - - - offsetName(ts, opts) { - throw new ZoneIsAbstractError(); - } - /** - * Returns the offset's value as a string - * @abstract - * @param {number} ts - Epoch milliseconds for which to get the offset - * @param {string} format - What style of offset to return. - * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively - * @return {string} - */ - - - formatOffset(ts, format) { - throw new ZoneIsAbstractError(); - } - /** - * Return the offset in minutes for this zone at the specified timestamp. - * @abstract - * @param {number} ts - Epoch milliseconds for which to compute the offset - * @return {number} - */ - - - offset(ts) { - throw new ZoneIsAbstractError(); - } - /** - * Return whether this Zone is equal to another zone - * @abstract - * @param {Zone} otherZone - the zone to compare - * @return {boolean} - */ - - - equals(otherZone) { - throw new ZoneIsAbstractError(); - } - /** - * Return whether this Zone is valid. - * @abstract - * @type {boolean} - */ - - - get isValid() { - throw new ZoneIsAbstractError(); - } - -} - -let singleton = null; -/** - * Represents the local zone for this Javascript environment. - * @implements {Zone} - */ - -class LocalZone extends Zone { - /** - * Get a singleton instance of the local zone - * @return {LocalZone} - */ - static get instance() { - if (singleton === null) { - singleton = new LocalZone(); - } - - return singleton; - } - /** @override **/ - - - get type() { - return "local"; - } - /** @override **/ - - - get name() { - if (hasIntl()) { - return new Intl.DateTimeFormat().resolvedOptions().timeZone; - } else return "local"; - } - /** @override **/ - - - get universal() { - return false; - } - /** @override **/ - - - offsetName(ts, { - format, - locale - }) { - return parseZoneInfo(ts, format, locale); - } - /** @override **/ - - - formatOffset(ts, format) { - return formatOffset(this.offset(ts), format); - } - /** @override **/ - - - offset(ts) { - return -new Date(ts).getTimezoneOffset(); - } - /** @override **/ - - - equals(otherZone) { - return otherZone.type === "local"; - } - /** @override **/ - - - get isValid() { - return true; - } - -} - -const matchingRegex = RegExp(`^${ianaRegex.source}$`); -let dtfCache = {}; - -function makeDTF(zone) { - if (!dtfCache[zone]) { - dtfCache[zone] = new Intl.DateTimeFormat("en-US", { - hour12: false, - timeZone: zone, - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit", - second: "2-digit" - }); - } - - return dtfCache[zone]; -} - -const typeToPos = { - year: 0, - month: 1, - day: 2, - hour: 3, - minute: 4, - second: 5 -}; - -function hackyOffset(dtf, date) { - const formatted = dtf.format(date).replace(/\u200E/g, ""), - parsed = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(formatted), - [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed; - return [fYear, fMonth, fDay, fHour, fMinute, fSecond]; -} - -function partsOffset(dtf, date) { - const formatted = dtf.formatToParts(date), - filled = []; - - for (let i = 0; i < formatted.length; i++) { - const { - type, - value - } = formatted[i], - pos = typeToPos[type]; - - if (!isUndefined(pos)) { - filled[pos] = parseInt(value, 10); - } - } - - return filled; -} - -let ianaZoneCache = {}; -/** - * A zone identified by an IANA identifier, like America/New_York - * @implements {Zone} - */ - -class IANAZone extends Zone { - /** - * @param {string} name - Zone name - * @return {IANAZone} - */ - static create(name) { - if (!ianaZoneCache[name]) { - ianaZoneCache[name] = new IANAZone(name); - } - - return ianaZoneCache[name]; - } - /** - * Reset local caches. Should only be necessary in testing scenarios. - * @return {void} - */ - - - static resetCache() { - ianaZoneCache = {}; - dtfCache = {}; - } - /** - * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that. - * @param {string} s - The string to check validity on - * @example IANAZone.isValidSpecifier("America/New_York") //=> true - * @example IANAZone.isValidSpecifier("Fantasia/Castle") //=> true - * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false - * @return {boolean} - */ - - - static isValidSpecifier(s) { - return !!(s && s.match(matchingRegex)); - } - /** - * Returns whether the provided string identifies a real zone - * @param {string} zone - The string to check - * @example IANAZone.isValidZone("America/New_York") //=> true - * @example IANAZone.isValidZone("Fantasia/Castle") //=> false - * @example IANAZone.isValidZone("Sport~~blorp") //=> false - * @return {boolean} - */ - - - static isValidZone(zone) { - try { - new Intl.DateTimeFormat("en-US", { - timeZone: zone - }).format(); - return true; - } catch (e) { - return false; - } - } // Etc/GMT+8 -> -480 - - /** @ignore */ - - - static parseGMTOffset(specifier) { - if (specifier) { - const match = specifier.match(/^Etc\/GMT([+-]\d{1,2})$/i); - - if (match) { - return -60 * parseInt(match[1]); - } - } - - return null; - } - - constructor(name) { - super(); - /** @private **/ - - this.zoneName = name; - /** @private **/ - - this.valid = IANAZone.isValidZone(name); - } - /** @override **/ - - - get type() { - return "iana"; - } - /** @override **/ - - - get name() { - return this.zoneName; - } - /** @override **/ - - - get universal() { - return false; - } - /** @override **/ - - - offsetName(ts, { - format, - locale - }) { - return parseZoneInfo(ts, format, locale, this.name); - } - /** @override **/ - - - formatOffset(ts, format) { - return formatOffset(this.offset(ts), format); - } - /** @override **/ - - - offset(ts) { - const date = new Date(ts), - dtf = makeDTF(this.name), - [year, month, day, hour, minute, second] = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date), - // work around https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat - adjustedHour = hour === 24 ? 0 : hour; - const asUTC = objToLocalTS({ - year, - month, - day, - hour: adjustedHour, - minute, - second, - millisecond: 0 - }); - let asTS = +date; - const over = asTS % 1000; - asTS -= over >= 0 ? over : 1000 + over; - return (asUTC - asTS) / (60 * 1000); - } - /** @override **/ - - - equals(otherZone) { - return otherZone.type === "iana" && otherZone.name === this.name; - } - /** @override **/ - - - get isValid() { - return this.valid; - } - -} - -let singleton$1 = null; -/** - * A zone with a fixed offset (meaning no DST) - * @implements {Zone} - */ - -class FixedOffsetZone extends Zone { - /** - * Get a singleton instance of UTC - * @return {FixedOffsetZone} - */ - static get utcInstance() { - if (singleton$1 === null) { - singleton$1 = new FixedOffsetZone(0); - } - - return singleton$1; - } - /** - * Get an instance with a specified offset - * @param {number} offset - The offset in minutes - * @return {FixedOffsetZone} - */ - - - static instance(offset) { - return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset); - } - /** - * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6" - * @param {string} s - The offset string to parse - * @example FixedOffsetZone.parseSpecifier("UTC+6") - * @example FixedOffsetZone.parseSpecifier("UTC+06") - * @example FixedOffsetZone.parseSpecifier("UTC-6:00") - * @return {FixedOffsetZone} - */ - - - static parseSpecifier(s) { - if (s) { - const r = s.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); - - if (r) { - return new FixedOffsetZone(signedOffset(r[1], r[2])); - } - } - - return null; - } - - constructor(offset) { - super(); - /** @private **/ - - this.fixed = offset; - } - /** @override **/ - - - get type() { - return "fixed"; - } - /** @override **/ - - - get name() { - return this.fixed === 0 ? "UTC" : `UTC${formatOffset(this.fixed, "narrow")}`; - } - /** @override **/ - - - offsetName() { - return this.name; - } - /** @override **/ - - - formatOffset(ts, format) { - return formatOffset(this.fixed, format); - } - /** @override **/ - - - get universal() { - return true; - } - /** @override **/ - - - offset() { - return this.fixed; - } - /** @override **/ - - - equals(otherZone) { - return otherZone.type === "fixed" && otherZone.fixed === this.fixed; - } - /** @override **/ - - - get isValid() { - return true; - } - -} - -/** - * A zone that failed to parse. You should never need to instantiate this. - * @implements {Zone} - */ - -class InvalidZone extends Zone { - constructor(zoneName) { - super(); - /** @private */ - - this.zoneName = zoneName; - } - /** @override **/ - - - get type() { - return "invalid"; - } - /** @override **/ - - - get name() { - return this.zoneName; - } - /** @override **/ - - - get universal() { - return false; - } - /** @override **/ - - - offsetName() { - return null; - } - /** @override **/ - - - formatOffset() { - return ""; - } - /** @override **/ - - - offset() { - return NaN; - } - /** @override **/ - - - equals() { - return false; - } - /** @override **/ - - - get isValid() { - return false; - } - -} - -/** - * @private - */ -function normalizeZone(input, defaultZone) { - let offset; - - if (isUndefined(input) || input === null) { - return defaultZone; - } else if (input instanceof Zone) { - return input; - } else if (isString(input)) { - const lowered = input.toLowerCase(); - if (lowered === "local") return defaultZone;else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance;else if ((offset = IANAZone.parseGMTOffset(input)) != null) { - // handle Etc/GMT-4, which V8 chokes on - return FixedOffsetZone.instance(offset); - } else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input);else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input); - } else if (isNumber(input)) { - return FixedOffsetZone.instance(input); - } else if (typeof input === "object" && input.offset && typeof input.offset === "number") { - // This is dumb, but the instanceof check above doesn't seem to really work - // so we're duck checking it - return input; - } else { - return new InvalidZone(input); - } -} - -let now = () => Date.now(), - defaultZone = null, - // not setting this directly to LocalZone.instance bc loading order issues -defaultLocale = null, - defaultNumberingSystem = null, - defaultOutputCalendar = null, - throwOnInvalid = false; -/** - * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here. - */ - - -class Settings { - /** - * Get the callback for returning the current timestamp. - * @type {function} - */ - static get now() { - return now; - } - /** - * Set the callback for returning the current timestamp. - * The function should return a number, which will be interpreted as an Epoch millisecond count - * @type {function} - * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future - * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time - */ - - - static set now(n) { - now = n; - } - /** - * Get the default time zone to create DateTimes in. - * @type {string} - */ - - - static get defaultZoneName() { - return Settings.defaultZone.name; - } - /** - * Set the default time zone to create DateTimes in. Does not affect existing instances. - * @type {string} - */ - - - static set defaultZoneName(z) { - if (!z) { - defaultZone = null; - } else { - defaultZone = normalizeZone(z); - } - } - /** - * Get the default time zone object to create DateTimes in. Does not affect existing instances. - * @type {Zone} - */ - - - static get defaultZone() { - return defaultZone || LocalZone.instance; - } - /** - * Get the default locale to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - - static get defaultLocale() { - return defaultLocale; - } - /** - * Set the default locale to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - - static set defaultLocale(locale) { - defaultLocale = locale; - } - /** - * Get the default numbering system to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - - static get defaultNumberingSystem() { - return defaultNumberingSystem; - } - /** - * Set the default numbering system to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - - static set defaultNumberingSystem(numberingSystem) { - defaultNumberingSystem = numberingSystem; - } - /** - * Get the default output calendar to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - - static get defaultOutputCalendar() { - return defaultOutputCalendar; - } - /** - * Set the default output calendar to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - - - static set defaultOutputCalendar(outputCalendar) { - defaultOutputCalendar = outputCalendar; - } - /** - * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals - * @type {boolean} - */ - - - static get throwOnInvalid() { - return throwOnInvalid; - } - /** - * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals - * @type {boolean} - */ - - - static set throwOnInvalid(t) { - throwOnInvalid = t; - } - /** - * Reset Luxon's global caches. Should only be necessary in testing scenarios. - * @return {void} - */ - - - static resetCaches() { - Locale.resetCache(); - IANAZone.resetCache(); - } - -} - -let intlDTCache = {}; - -function getCachedDTF(locString, opts = {}) { - const key = JSON.stringify([locString, opts]); - let dtf = intlDTCache[key]; - - if (!dtf) { - dtf = new Intl.DateTimeFormat(locString, opts); - intlDTCache[key] = dtf; - } - - return dtf; -} - -let intlNumCache = {}; - -function getCachedINF(locString, opts = {}) { - const key = JSON.stringify([locString, opts]); - let inf = intlNumCache[key]; - - if (!inf) { - inf = new Intl.NumberFormat(locString, opts); - intlNumCache[key] = inf; - } - - return inf; -} - -let intlRelCache = {}; - -function getCachedRTF(locString, opts = {}) { - const cacheKeyOpts = _objectWithoutPropertiesLoose(opts, ["base"]); // exclude `base` from the options - - - const key = JSON.stringify([locString, cacheKeyOpts]); - let inf = intlRelCache[key]; - - if (!inf) { - inf = new Intl.RelativeTimeFormat(locString, opts); - intlRelCache[key] = inf; - } - - return inf; -} - -let sysLocaleCache = null; - -function systemLocale() { - if (sysLocaleCache) { - return sysLocaleCache; - } else if (hasIntl()) { - const computedSys = new Intl.DateTimeFormat().resolvedOptions().locale; // node sometimes defaults to "und". Override that because that is dumb - - sysLocaleCache = !computedSys || computedSys === "und" ? "en-US" : computedSys; - return sysLocaleCache; - } else { - sysLocaleCache = "en-US"; - return sysLocaleCache; - } -} - -function parseLocaleString(localeStr) { - // I really want to avoid writing a BCP 47 parser - // see, e.g. https://github.com/wooorm/bcp-47 - // Instead, we'll do this: - // a) if the string has no -u extensions, just leave it alone - // b) if it does, use Intl to resolve everything - // c) if Intl fails, try again without the -u - const uIndex = localeStr.indexOf("-u-"); - - if (uIndex === -1) { - return [localeStr]; - } else { - let options; - const smaller = localeStr.substring(0, uIndex); - - try { - options = getCachedDTF(localeStr).resolvedOptions(); - } catch (e) { - options = getCachedDTF(smaller).resolvedOptions(); - } - - const { - numberingSystem, - calendar - } = options; // return the smaller one so that we can append the calendar and numbering overrides to it - - return [smaller, numberingSystem, calendar]; - } -} - -function intlConfigString(localeStr, numberingSystem, outputCalendar) { - if (hasIntl()) { - if (outputCalendar || numberingSystem) { - localeStr += "-u"; - - if (outputCalendar) { - localeStr += `-ca-${outputCalendar}`; - } - - if (numberingSystem) { - localeStr += `-nu-${numberingSystem}`; - } - - return localeStr; - } else { - return localeStr; - } - } else { - return []; - } -} - -function mapMonths(f) { - const ms = []; - - for (let i = 1; i <= 12; i++) { - const dt = DateTime.utc(2016, i, 1); - ms.push(f(dt)); - } - - return ms; -} - -function mapWeekdays(f) { - const ms = []; - - for (let i = 1; i <= 7; i++) { - const dt = DateTime.utc(2016, 11, 13 + i); - ms.push(f(dt)); - } - - return ms; -} - -function listStuff(loc, length, defaultOK, englishFn, intlFn) { - const mode = loc.listingMode(defaultOK); - - if (mode === "error") { - return null; - } else if (mode === "en") { - return englishFn(length); - } else { - return intlFn(length); - } -} - -function supportsFastNumbers(loc) { - if (loc.numberingSystem && loc.numberingSystem !== "latn") { - return false; - } else { - return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || hasIntl() && new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === "latn"; - } -} -/** - * @private - */ - - -class PolyNumberFormatter { - constructor(intl, forceSimple, opts) { - this.padTo = opts.padTo || 0; - this.floor = opts.floor || false; - - if (!forceSimple && hasIntl()) { - const intlOpts = { - useGrouping: false - }; - if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo; - this.inf = getCachedINF(intl, intlOpts); - } - } - - format(i) { - if (this.inf) { - const fixed = this.floor ? Math.floor(i) : i; - return this.inf.format(fixed); - } else { - // to match the browser's numberformatter defaults - const fixed = this.floor ? Math.floor(i) : roundTo(i, 3); - return padStart(fixed, this.padTo); - } - } - -} -/** - * @private - */ - - -class PolyDateFormatter { - constructor(dt, intl, opts) { - this.opts = opts; - this.hasIntl = hasIntl(); - let z; - - if (dt.zone.universal && this.hasIntl) { - // Chromium doesn't support fixed-offset zones like Etc/GMT+8 in its formatter, - // See https://bugs.chromium.org/p/chromium/issues/detail?id=364374. - // So we have to make do. Two cases: - // 1. The format options tell us to show the zone. We can't do that, so the best - // we can do is format the date in UTC. - // 2. The format options don't tell us to show the zone. Then we can adjust them - // the time and tell the formatter to show it to us in UTC, so that the time is right - // and the bad zone doesn't show up. - // We can clean all this up when Chrome fixes this. - z = "UTC"; - - if (opts.timeZoneName) { - this.dt = dt; - } else { - this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1000); - } - } else if (dt.zone.type === "local") { - this.dt = dt; - } else { - this.dt = dt; - z = dt.zone.name; - } - - if (this.hasIntl) { - const intlOpts = Object.assign({}, this.opts); - - if (z) { - intlOpts.timeZone = z; - } - - this.dtf = getCachedDTF(intl, intlOpts); - } - } - - format() { - if (this.hasIntl) { - return this.dtf.format(this.dt.toJSDate()); - } else { - const tokenFormat = formatString(this.opts), - loc = Locale.create("en-US"); - return Formatter.create(loc).formatDateTimeFromString(this.dt, tokenFormat); - } - } - - formatToParts() { - if (this.hasIntl && hasFormatToParts()) { - return this.dtf.formatToParts(this.dt.toJSDate()); - } else { - // This is kind of a cop out. We actually could do this for English. However, we couldn't do it for intl strings - // and IMO it's too weird to have an uncanny valley like that - return []; - } - } - - resolvedOptions() { - if (this.hasIntl) { - return this.dtf.resolvedOptions(); - } else { - return { - locale: "en-US", - numberingSystem: "latn", - outputCalendar: "gregory" - }; - } - } - -} -/** - * @private - */ - - -class PolyRelFormatter { - constructor(intl, isEnglish, opts) { - this.opts = Object.assign({ - style: "long" - }, opts); - - if (!isEnglish && hasRelative()) { - this.rtf = getCachedRTF(intl, opts); - } - } - - format(count, unit) { - if (this.rtf) { - return this.rtf.format(count, unit); - } else { - return formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== "long"); - } - } - - formatToParts(count, unit) { - if (this.rtf) { - return this.rtf.formatToParts(count, unit); - } else { - return []; - } - } - -} -/** - * @private - */ - - -class Locale { - static fromOpts(opts) { - return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN); - } - - static create(locale, numberingSystem, outputCalendar, defaultToEN = false) { - const specifiedLocale = locale || Settings.defaultLocale, - // the system locale is useful for human readable strings but annoying for parsing/formatting known formats - localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale()), - numberingSystemR = numberingSystem || Settings.defaultNumberingSystem, - outputCalendarR = outputCalendar || Settings.defaultOutputCalendar; - return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale); - } - - static resetCache() { - sysLocaleCache = null; - intlDTCache = {}; - intlNumCache = {}; - intlRelCache = {}; - } - - static fromObject({ - locale, - numberingSystem, - outputCalendar - } = {}) { - return Locale.create(locale, numberingSystem, outputCalendar); - } - - constructor(locale, numbering, outputCalendar, specifiedLocale) { - const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale); - this.locale = parsedLocale; - this.numberingSystem = numbering || parsedNumberingSystem || null; - this.outputCalendar = outputCalendar || parsedOutputCalendar || null; - this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar); - this.weekdaysCache = { - format: {}, - standalone: {} - }; - this.monthsCache = { - format: {}, - standalone: {} - }; - this.meridiemCache = null; - this.eraCache = {}; - this.specifiedLocale = specifiedLocale; - this.fastNumbersCached = null; - } - - get fastNumbers() { - if (this.fastNumbersCached == null) { - this.fastNumbersCached = supportsFastNumbers(this); - } - - return this.fastNumbersCached; - } - - listingMode(defaultOK = true) { - const intl = hasIntl(), - hasFTP = intl && hasFormatToParts(), - isActuallyEn = this.isEnglish(), - hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory"); - - if (!hasFTP && !(isActuallyEn && hasNoWeirdness) && !defaultOK) { - return "error"; - } else if (!hasFTP || isActuallyEn && hasNoWeirdness) { - return "en"; - } else { - return "intl"; - } - } - - clone(alts) { - if (!alts || Object.getOwnPropertyNames(alts).length === 0) { - return this; - } else { - return Locale.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, alts.defaultToEN || false); - } - } - - redefaultToEN(alts = {}) { - return this.clone(Object.assign({}, alts, { - defaultToEN: true - })); - } - - redefaultToSystem(alts = {}) { - return this.clone(Object.assign({}, alts, { - defaultToEN: false - })); - } - - months(length, format = false, defaultOK = true) { - return listStuff(this, length, defaultOK, months, () => { - const intl = format ? { - month: length, - day: "numeric" - } : { - month: length - }, - formatStr = format ? "format" : "standalone"; - - if (!this.monthsCache[formatStr][length]) { - this.monthsCache[formatStr][length] = mapMonths(dt => this.extract(dt, intl, "month")); - } - - return this.monthsCache[formatStr][length]; - }); - } - - weekdays(length, format = false, defaultOK = true) { - return listStuff(this, length, defaultOK, weekdays, () => { - const intl = format ? { - weekday: length, - year: "numeric", - month: "long", - day: "numeric" - } : { - weekday: length - }, - formatStr = format ? "format" : "standalone"; - - if (!this.weekdaysCache[formatStr][length]) { - this.weekdaysCache[formatStr][length] = mapWeekdays(dt => this.extract(dt, intl, "weekday")); - } - - return this.weekdaysCache[formatStr][length]; - }); - } - - meridiems(defaultOK = true) { - return listStuff(this, undefined, defaultOK, () => meridiems, () => { - // In theory there could be aribitrary day periods. We're gonna assume there are exactly two - // for AM and PM. This is probably wrong, but it's makes parsing way easier. - if (!this.meridiemCache) { - const intl = { - hour: "numeric", - hour12: true - }; - this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(dt => this.extract(dt, intl, "dayperiod")); - } - - return this.meridiemCache; - }); - } - - eras(length, defaultOK = true) { - return listStuff(this, length, defaultOK, eras, () => { - const intl = { - era: length - }; // This is utter bullshit. Different calendars are going to define eras totally differently. What I need is the minimum set of dates - // to definitely enumerate them. - - if (!this.eraCache[length]) { - this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(dt => this.extract(dt, intl, "era")); - } - - return this.eraCache[length]; - }); - } - - extract(dt, intlOpts, field) { - const df = this.dtFormatter(dt, intlOpts), - results = df.formatToParts(), - matching = results.find(m => m.type.toLowerCase() === field); - return matching ? matching.value : null; - } - - numberFormatter(opts = {}) { - // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave) - // (in contrast, the rest of the condition is used heavily) - return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts); - } - - dtFormatter(dt, intlOpts = {}) { - return new PolyDateFormatter(dt, this.intl, intlOpts); - } - - relFormatter(opts = {}) { - return new PolyRelFormatter(this.intl, this.isEnglish(), opts); - } - - isEnglish() { - return this.locale === "en" || this.locale.toLowerCase() === "en-us" || hasIntl() && new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us"); - } - - equals(other) { - return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar; - } - -} - -/* - * This file handles parsing for well-specified formats. Here's how it works: - * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match. - * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object - * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence. - * Extractors can take a "cursor" representing the offset in the match to look at. This makes it easy to combine extractors. - * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions. - * Some extractions are super dumb and simpleParse and fromStrings help DRY them. - */ - -function combineRegexes(...regexes) { - const full = regexes.reduce((f, r) => f + r.source, ""); - return RegExp(`^${full}$`); -} - -function combineExtractors(...extractors) { - return m => extractors.reduce(([mergedVals, mergedZone, cursor], ex) => { - const [val, zone, next] = ex(m, cursor); - return [Object.assign(mergedVals, val), mergedZone || zone, next]; - }, [{}, null, 1]).slice(0, 2); -} - -function parse(s, ...patterns) { - if (s == null) { - return [null, null]; - } - - for (const [regex, extractor] of patterns) { - const m = regex.exec(s); - - if (m) { - return extractor(m); - } - } - - return [null, null]; -} - -function simpleParse(...keys) { - return (match, cursor) => { - const ret = {}; - let i; - - for (i = 0; i < keys.length; i++) { - ret[keys[i]] = parseInteger(match[cursor + i]); - } - - return [ret, null, cursor + i]; - }; -} // ISO and SQL parsing - - -const offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, - isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, - isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${offsetRegex.source}?`), - isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`), - isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, - isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/, - isoOrdinalRegex = /(\d{4})-?(\d{3})/, - extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay"), - extractISOOrdinalData = simpleParse("year", "ordinal"), - sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/, - // dumbed-down version of the ISO one -sqlTimeRegex = RegExp(`${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`), - sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`); - -function int(match, pos, fallback) { - const m = match[pos]; - return isUndefined(m) ? fallback : parseInteger(m); -} - -function extractISOYmd(match, cursor) { - const item = { - year: int(match, cursor), - month: int(match, cursor + 1, 1), - day: int(match, cursor + 2, 1) - }; - return [item, null, cursor + 3]; -} - -function extractISOTime(match, cursor) { - const item = { - hour: int(match, cursor, 0), - minute: int(match, cursor + 1, 0), - second: int(match, cursor + 2, 0), - millisecond: parseMillis(match[cursor + 3]) - }; - return [item, null, cursor + 4]; -} - -function extractISOOffset(match, cursor) { - const local = !match[cursor] && !match[cursor + 1], - fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]), - zone = local ? null : FixedOffsetZone.instance(fullOffset); - return [{}, zone, cursor + 3]; -} - -function extractIANAZone(match, cursor) { - const zone = match[cursor] ? IANAZone.create(match[cursor]) : null; - return [{}, zone, cursor + 1]; -} // ISO duration parsing - - -const isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/; - -function extractISODuration(match) { - const [s, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] = match; - const hasNegativePrefix = s[0] === "-"; - - const maybeNegate = num => num && hasNegativePrefix ? -num : num; - - return [{ - years: maybeNegate(parseInteger(yearStr)), - months: maybeNegate(parseInteger(monthStr)), - weeks: maybeNegate(parseInteger(weekStr)), - days: maybeNegate(parseInteger(dayStr)), - hours: maybeNegate(parseInteger(hourStr)), - minutes: maybeNegate(parseInteger(minuteStr)), - seconds: maybeNegate(parseInteger(secondStr)), - milliseconds: maybeNegate(parseMillis(millisecondsStr)) - }]; -} // These are a little braindead. EDT *should* tell us that we're in, say, America/New_York -// and not just that we're in -240 *right now*. But since I don't think these are used that often -// I'm just going to ignore that - - -const obsOffsets = { - GMT: 0, - EDT: -4 * 60, - EST: -5 * 60, - CDT: -5 * 60, - CST: -6 * 60, - MDT: -6 * 60, - MST: -7 * 60, - PDT: -7 * 60, - PST: -8 * 60 -}; - -function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { - const result = { - year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr), - month: monthsShort.indexOf(monthStr) + 1, - day: parseInteger(dayStr), - hour: parseInteger(hourStr), - minute: parseInteger(minuteStr) - }; - if (secondStr) result.second = parseInteger(secondStr); - - if (weekdayStr) { - result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1; - } - - return result; -} // RFC 2822/5322 - - -const rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/; - -function extractRFC2822(match) { - const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr, obsOffset, milOffset, offHourStr, offMinuteStr] = match, - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - let offset; - - if (obsOffset) { - offset = obsOffsets[obsOffset]; - } else if (milOffset) { - offset = 0; - } else { - offset = signedOffset(offHourStr, offMinuteStr); - } - - return [result, new FixedOffsetZone(offset)]; -} - -function preprocessRFC2822(s) { - // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s.replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim(); -} // http date - - -const rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, - rfc850 = /^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, - ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/; - -function extractRFC1123Or850(match) { - const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match, - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - return [result, FixedOffsetZone.utcInstance]; -} - -function extractASCII(match) { - const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match, - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - return [result, FixedOffsetZone.utcInstance]; -} - -const isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex); -const isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex); -const isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex); -const isoTimeCombinedRegex = combineRegexes(isoTimeRegex); -const extractISOYmdTimeAndOffset = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset); -const extractISOWeekTimeAndOffset = combineExtractors(extractISOWeekData, extractISOTime, extractISOOffset); -const extractISOOrdinalDataAndTime = combineExtractors(extractISOOrdinalData, extractISOTime); -const extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset); -/** - * @private - */ - -function parseISODate(s) { - return parse(s, [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDataAndTime], [isoTimeCombinedRegex, extractISOTimeAndOffset]); -} -function parseRFC2822Date(s) { - return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]); -} -function parseHTTPDate(s) { - return parse(s, [rfc1123, extractRFC1123Or850], [rfc850, extractRFC1123Or850], [ascii, extractASCII]); -} -function parseISODuration(s) { - return parse(s, [isoDuration, extractISODuration]); -} -const sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex); -const sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex); -const extractISOYmdTimeOffsetAndIANAZone = combineExtractors(extractISOYmd, extractISOTime, extractISOOffset, extractIANAZone); -const extractISOTimeOffsetAndIANAZone = combineExtractors(extractISOTime, extractISOOffset, extractIANAZone); -function parseSQL(s) { - return parse(s, [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeOffsetAndIANAZone], [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]); -} - -const INVALID = "Invalid Duration"; // unit conversion constants - -const lowOrderMatrix = { - weeks: { - days: 7, - hours: 7 * 24, - minutes: 7 * 24 * 60, - seconds: 7 * 24 * 60 * 60, - milliseconds: 7 * 24 * 60 * 60 * 1000 - }, - days: { - hours: 24, - minutes: 24 * 60, - seconds: 24 * 60 * 60, - milliseconds: 24 * 60 * 60 * 1000 - }, - hours: { - minutes: 60, - seconds: 60 * 60, - milliseconds: 60 * 60 * 1000 - }, - minutes: { - seconds: 60, - milliseconds: 60 * 1000 - }, - seconds: { - milliseconds: 1000 - } -}, - casualMatrix = Object.assign({ - years: { - quarters: 4, - months: 12, - weeks: 52, - days: 365, - hours: 365 * 24, - minutes: 365 * 24 * 60, - seconds: 365 * 24 * 60 * 60, - milliseconds: 365 * 24 * 60 * 60 * 1000 - }, - quarters: { - months: 3, - weeks: 13, - days: 91, - hours: 91 * 24, - minutes: 91 * 24 * 60, - seconds: 91 * 24 * 60 * 60, - milliseconds: 91 * 24 * 60 * 60 * 1000 - }, - months: { - weeks: 4, - days: 30, - hours: 30 * 24, - minutes: 30 * 24 * 60, - seconds: 30 * 24 * 60 * 60, - milliseconds: 30 * 24 * 60 * 60 * 1000 - } -}, lowOrderMatrix), - daysInYearAccurate = 146097.0 / 400, - daysInMonthAccurate = 146097.0 / 4800, - accurateMatrix = Object.assign({ - years: { - quarters: 4, - months: 12, - weeks: daysInYearAccurate / 7, - days: daysInYearAccurate, - hours: daysInYearAccurate * 24, - minutes: daysInYearAccurate * 24 * 60, - seconds: daysInYearAccurate * 24 * 60 * 60, - milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 - }, - quarters: { - months: 3, - weeks: daysInYearAccurate / 28, - days: daysInYearAccurate / 4, - hours: daysInYearAccurate * 24 / 4, - minutes: daysInYearAccurate * 24 * 60 / 4, - seconds: daysInYearAccurate * 24 * 60 * 60 / 4, - milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 / 4 - }, - months: { - weeks: daysInMonthAccurate / 7, - days: daysInMonthAccurate, - hours: daysInMonthAccurate * 24, - minutes: daysInMonthAccurate * 24 * 60, - seconds: daysInMonthAccurate * 24 * 60 * 60, - milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000 - } -}, lowOrderMatrix); // units ordered by size - -const orderedUnits = ["years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"]; -const reverseUnits = orderedUnits.slice(0).reverse(); // clone really means "create another instance just like this one, but with these changes" - -function clone(dur, alts, clear = false) { - // deep merge for vals - const conf = { - values: clear ? alts.values : Object.assign({}, dur.values, alts.values || {}), - loc: dur.loc.clone(alts.loc), - conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy - }; - return new Duration(conf); -} - -function antiTrunc(n) { - return n < 0 ? Math.floor(n) : Math.ceil(n); -} // NB: mutates parameters - - -function convert(matrix, fromMap, fromUnit, toMap, toUnit) { - const conv = matrix[toUnit][fromUnit], - raw = fromMap[fromUnit] / conv, - sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]), - // ok, so this is wild, but see the matrix in the tests - added = !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw); - toMap[toUnit] += added; - fromMap[fromUnit] -= added * conv; -} // NB: mutates parameters - - -function normalizeValues(matrix, vals) { - reverseUnits.reduce((previous, current) => { - if (!isUndefined(vals[current])) { - if (previous) { - convert(matrix, vals, previous, vals, current); - } - - return current; - } else { - return previous; - } - }, null); -} -/** - * A Duration object represents a period of time, like "2 months" or "1 day, 1 hour". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime.plus} to add a Duration object to a DateTime, producing another DateTime. - * - * Here is a brief overview of commonly used methods and getters in Duration: - * - * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}. - * * **Unit values** See the {@link Duration.years}, {@link Duration.months}, {@link Duration.weeks}, {@link Duration.days}, {@link Duration.hours}, {@link Duration.minutes}, {@link Duration.seconds}, {@link Duration.milliseconds} accessors. - * * **Configuration** See {@link Duration.locale} and {@link Duration.numberingSystem} accessors. - * * **Transformation** To create new Durations out of old ones use {@link Duration.plus}, {@link Duration.minus}, {@link Duration.normalize}, {@link Duration.set}, {@link Duration.reconfigure}, {@link Duration.shiftTo}, and {@link Duration.negate}. - * * **Output** To convert the Duration into other representations, see {@link Duration.as}, {@link Duration.toISO}, {@link Duration.toFormat}, and {@link Duration.toJSON} - * - * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation. - */ - - -class Duration { - /** - * @private - */ - constructor(config) { - const accurate = config.conversionAccuracy === "longterm" || false; - /** - * @access private - */ - - this.values = config.values; - /** - * @access private - */ - - this.loc = config.loc || Locale.create(); - /** - * @access private - */ - - this.conversionAccuracy = accurate ? "longterm" : "casual"; - /** - * @access private - */ - - this.invalid = config.invalid || null; - /** - * @access private - */ - - this.matrix = accurate ? accurateMatrix : casualMatrix; - /** - * @access private - */ - - this.isLuxonDuration = true; - } - /** - * Create Duration from a number of milliseconds. - * @param {number} count of milliseconds - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - - - static fromMillis(count, opts) { - return Duration.fromObject(Object.assign({ - milliseconds: count - }, opts)); - } - /** - * Create a Duration from a Javascript object with keys like 'years' and 'hours. - * If this object is empty then a zero milliseconds duration is returned. - * @param {Object} obj - the object to create the DateTime from - * @param {number} obj.years - * @param {number} obj.quarters - * @param {number} obj.months - * @param {number} obj.weeks - * @param {number} obj.days - * @param {number} obj.hours - * @param {number} obj.minutes - * @param {number} obj.seconds - * @param {number} obj.milliseconds - * @param {string} [obj.locale='en-US'] - the locale to use - * @param {string} obj.numberingSystem - the numbering system to use - * @param {string} [obj.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - - - static fromObject(obj) { - if (obj == null || typeof obj !== "object") { - throw new InvalidArgumentError(`Duration.fromObject: argument expected to be an object, got ${obj === null ? "null" : typeof obj}`); - } - - return new Duration({ - values: normalizeObject(obj, Duration.normalizeUnit, ["locale", "numberingSystem", "conversionAccuracy", "zone" // a bit of debt; it's super inconvenient internally not to be able to blindly pass this - ]), - loc: Locale.fromObject(obj), - conversionAccuracy: obj.conversionAccuracy - }); - } - /** - * Create a Duration from an ISO 8601 duration string. - * @param {string} text - text to parse - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @see https://en.wikipedia.org/wiki/ISO_8601#Durations - * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 } - * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 } - * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 } - * @return {Duration} - */ - - - static fromISO(text, opts) { - const [parsed] = parseISODuration(text); - - if (parsed) { - const obj = Object.assign(parsed, opts); - return Duration.fromObject(obj); - } else { - return Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); - } - } - /** - * Create an invalid Duration. - * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {Duration} - */ - - - static invalid(reason, explanation = null) { - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the Duration is invalid"); - } - - const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidDurationError(invalid); - } else { - return new Duration({ - invalid - }); - } - } - /** - * @private - */ - - - static normalizeUnit(unit) { - const normalized = { - year: "years", - years: "years", - quarter: "quarters", - quarters: "quarters", - month: "months", - months: "months", - week: "weeks", - weeks: "weeks", - day: "days", - days: "days", - hour: "hours", - hours: "hours", - minute: "minutes", - minutes: "minutes", - second: "seconds", - seconds: "seconds", - millisecond: "milliseconds", - milliseconds: "milliseconds" - }[unit ? unit.toLowerCase() : unit]; - if (!normalized) throw new InvalidUnitError(unit); - return normalized; - } - /** - * Check if an object is a Duration. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - - - static isDuration(o) { - return o && o.isLuxonDuration || false; - } - /** - * Get the locale of a Duration, such 'en-GB' - * @type {string} - */ - - - get locale() { - return this.isValid ? this.loc.locale : null; - } - /** - * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration - * - * @type {string} - */ - - - get numberingSystem() { - return this.isValid ? this.loc.numberingSystem : null; - } - /** - * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens: - * * `S` for milliseconds - * * `s` for seconds - * * `m` for minutes - * * `h` for hours - * * `d` for days - * * `M` for months - * * `y` for years - * Notes: - * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits - * * The duration will be converted to the set of units in the format string using {@link Duration.shiftTo} and the Durations's conversion accuracy setting. - * @param {string} fmt - the format string - * @param {Object} opts - options - * @param {boolean} [opts.floor=true] - floor numerical values - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2" - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002" - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000" - * @return {string} - */ - - - toFormat(fmt, opts = {}) { - // reverse-compat since 1.2; we always round down now, never up, and we do it by default - const fmtOpts = Object.assign({}, opts, { - floor: opts.round !== false && opts.floor !== false - }); - return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID; - } - /** - * Returns a Javascript object with this Duration's values. - * @param opts - options for generating the object - * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 } - * @return {Object} - */ - - - toObject(opts = {}) { - if (!this.isValid) return {}; - const base = Object.assign({}, this.values); - - if (opts.includeConfig) { - base.conversionAccuracy = this.conversionAccuracy; - base.numberingSystem = this.loc.numberingSystem; - base.locale = this.loc.locale; - } - - return base; - } - /** - * Returns an ISO 8601-compliant string representation of this Duration. - * @see https://en.wikipedia.org/wiki/ISO_8601#Durations - * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S' - * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S' - * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M' - * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M' - * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S' - * @return {string} - */ - - - toISO() { - // we could use the formatter, but this is an easier way to get the minimum string - if (!this.isValid) return null; - let s = "P"; - if (this.years !== 0) s += this.years + "Y"; - if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + "M"; - if (this.weeks !== 0) s += this.weeks + "W"; - if (this.days !== 0) s += this.days + "D"; - if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) s += "T"; - if (this.hours !== 0) s += this.hours + "H"; - if (this.minutes !== 0) s += this.minutes + "M"; - if (this.seconds !== 0 || this.milliseconds !== 0) // this will handle "floating point madness" by removing extra decimal places - // https://stackoverflow.com/questions/588004/is-floating-point-math-broken - s += roundTo(this.seconds + this.milliseconds / 1000, 3) + "S"; - if (s === "P") s += "T0S"; - return s; - } - /** - * Returns an ISO 8601 representation of this Duration appropriate for use in JSON. - * @return {string} - */ - - - toJSON() { - return this.toISO(); - } - /** - * Returns an ISO 8601 representation of this Duration appropriate for use in debugging. - * @return {string} - */ - - - toString() { - return this.toISO(); - } - /** - * Returns an milliseconds value of this Duration. - * @return {number} - */ - - - valueOf() { - return this.as("milliseconds"); - } - /** - * Make this Duration longer by the specified amount. Return a newly-constructed Duration. - * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @return {Duration} - */ - - - plus(duration) { - if (!this.isValid) return this; - const dur = friendlyDuration(duration), - result = {}; - - for (const k of orderedUnits) { - if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) { - result[k] = dur.get(k) + this.get(k); - } - } - - return clone(this, { - values: result - }, true); - } - /** - * Make this Duration shorter by the specified amount. Return a newly-constructed Duration. - * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @return {Duration} - */ - - - minus(duration) { - if (!this.isValid) return this; - const dur = friendlyDuration(duration); - return this.plus(dur.negate()); - } - /** - * Scale this Duration by the specified amount. Return a newly-constructed Duration. - * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number. - * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit(x => x * 2) //=> { hours: 2, minutes: 60 } - * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit((x, u) => u === "hour" ? x * 2 : x) //=> { hours: 2, minutes: 30 } - * @return {Duration} - */ - - - mapUnits(fn) { - if (!this.isValid) return this; - const result = {}; - - for (const k of Object.keys(this.values)) { - result[k] = asNumber(fn(this.values[k], k)); - } - - return clone(this, { - values: result - }, true); - } - /** - * Get the value of unit. - * @param {string} unit - a unit such as 'minute' or 'day' - * @example Duration.fromObject({years: 2, days: 3}).years //=> 2 - * @example Duration.fromObject({years: 2, days: 3}).months //=> 0 - * @example Duration.fromObject({years: 2, days: 3}).days //=> 3 - * @return {number} - */ - - - get(unit) { - return this[Duration.normalizeUnit(unit)]; - } - /** - * "Set" the values of specified units. Return a newly-constructed Duration. - * @param {Object} values - a mapping of units to numbers - * @example dur.set({ years: 2017 }) - * @example dur.set({ hours: 8, minutes: 30 }) - * @return {Duration} - */ - - - set(values) { - if (!this.isValid) return this; - const mixed = Object.assign(this.values, normalizeObject(values, Duration.normalizeUnit, [])); - return clone(this, { - values: mixed - }); - } - /** - * "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration. - * @example dur.reconfigure({ locale: 'en-GB' }) - * @return {Duration} - */ - - - reconfigure({ - locale, - numberingSystem, - conversionAccuracy - } = {}) { - const loc = this.loc.clone({ - locale, - numberingSystem - }), - opts = { - loc - }; - - if (conversionAccuracy) { - opts.conversionAccuracy = conversionAccuracy; - } - - return clone(this, opts); - } - /** - * Return the length of the duration in the specified unit. - * @param {string} unit - a unit such as 'minutes' or 'days' - * @example Duration.fromObject({years: 1}).as('days') //=> 365 - * @example Duration.fromObject({years: 1}).as('months') //=> 12 - * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5 - * @return {number} - */ - - - as(unit) { - return this.isValid ? this.shiftTo(unit).get(unit) : NaN; - } - /** - * Reduce this Duration to its canonical representation in its current units. - * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 } - * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 } - * @return {Duration} - */ - - - normalize() { - if (!this.isValid) return this; - const vals = this.toObject(); - normalizeValues(this.matrix, vals); - return clone(this, { - values: vals - }, true); - } - /** - * Convert this Duration into its representation in a different set of units. - * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 } - * @return {Duration} - */ - - - shiftTo(...units) { - if (!this.isValid) return this; - - if (units.length === 0) { - return this; - } - - units = units.map(u => Duration.normalizeUnit(u)); - const built = {}, - accumulated = {}, - vals = this.toObject(); - let lastUnit; - - for (const k of orderedUnits) { - if (units.indexOf(k) >= 0) { - lastUnit = k; - let own = 0; // anything we haven't boiled down yet should get boiled to this unit - - for (const ak in accumulated) { - own += this.matrix[ak][k] * accumulated[ak]; - accumulated[ak] = 0; - } // plus anything that's already in this unit - - - if (isNumber(vals[k])) { - own += vals[k]; - } - - const i = Math.trunc(own); - built[k] = i; - accumulated[k] = own - i; // we'd like to absorb these fractions in another unit - // plus anything further down the chain that should be rolled up in to this - - for (const down in vals) { - if (orderedUnits.indexOf(down) > orderedUnits.indexOf(k)) { - convert(this.matrix, vals, down, built, k); - } - } // otherwise, keep it in the wings to boil it later - - } else if (isNumber(vals[k])) { - accumulated[k] = vals[k]; - } - } // anything leftover becomes the decimal for the last unit - // lastUnit must be defined since units is not empty - - - for (const key in accumulated) { - if (accumulated[key] !== 0) { - built[lastUnit] += key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key]; - } - } - - return clone(this, { - values: built - }, true).normalize(); - } - /** - * Return the negative of this Duration. - * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 } - * @return {Duration} - */ - - - negate() { - if (!this.isValid) return this; - const negated = {}; - - for (const k of Object.keys(this.values)) { - negated[k] = -this.values[k]; - } - - return clone(this, { - values: negated - }, true); - } - /** - * Get the years. - * @type {number} - */ - - - get years() { - return this.isValid ? this.values.years || 0 : NaN; - } - /** - * Get the quarters. - * @type {number} - */ - - - get quarters() { - return this.isValid ? this.values.quarters || 0 : NaN; - } - /** - * Get the months. - * @type {number} - */ - - - get months() { - return this.isValid ? this.values.months || 0 : NaN; - } - /** - * Get the weeks - * @type {number} - */ - - - get weeks() { - return this.isValid ? this.values.weeks || 0 : NaN; - } - /** - * Get the days. - * @type {number} - */ - - - get days() { - return this.isValid ? this.values.days || 0 : NaN; - } - /** - * Get the hours. - * @type {number} - */ - - - get hours() { - return this.isValid ? this.values.hours || 0 : NaN; - } - /** - * Get the minutes. - * @type {number} - */ - - - get minutes() { - return this.isValid ? this.values.minutes || 0 : NaN; - } - /** - * Get the seconds. - * @return {number} - */ - - - get seconds() { - return this.isValid ? this.values.seconds || 0 : NaN; - } - /** - * Get the milliseconds. - * @return {number} - */ - - - get milliseconds() { - return this.isValid ? this.values.milliseconds || 0 : NaN; - } - /** - * Returns whether the Duration is invalid. Invalid durations are returned by diff operations - * on invalid DateTimes or Intervals. - * @return {boolean} - */ - - - get isValid() { - return this.invalid === null; - } - /** - * Returns an error code if this Duration became invalid, or null if the Duration is valid - * @return {string} - */ - - - get invalidReason() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this Duration became invalid, or null if the Duration is valid - * @type {string} - */ - - - get invalidExplanation() { - return this.invalid ? this.invalid.explanation : null; - } - /** - * Equality check - * Two Durations are equal iff they have the same units and the same values for each unit. - * @param {Duration} other - * @return {boolean} - */ - - - equals(other) { - if (!this.isValid || !other.isValid) { - return false; - } - - if (!this.loc.equals(other.loc)) { - return false; - } - - for (const u of orderedUnits) { - if (this.values[u] !== other.values[u]) { - return false; - } - } - - return true; - } - -} -/** - * @private - */ - -function friendlyDuration(durationish) { - if (isNumber(durationish)) { - return Duration.fromMillis(durationish); - } else if (Duration.isDuration(durationish)) { - return durationish; - } else if (typeof durationish === "object") { - return Duration.fromObject(durationish); - } else { - throw new InvalidArgumentError(`Unknown duration argument ${durationish} of type ${typeof durationish}`); - } -} - -const INVALID$1 = "Invalid Interval"; // checks if the start is equal to or before the end - -function validateStartEnd(start, end) { - if (!start || !start.isValid) { - return Interval.invalid("missing or invalid start"); - } else if (!end || !end.isValid) { - return Interval.invalid("missing or invalid end"); - } else if (end < start) { - return Interval.invalid("end before start", `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`); - } else { - return null; - } -} -/** - * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them. - * - * Here is a brief overview of the most commonly used methods and getters in Interval: - * - * * **Creation** To create an Interval, use {@link fromDateTimes}, {@link after}, {@link before}, or {@link fromISO}. - * * **Accessors** Use {@link start} and {@link end} to get the start and end. - * * **Interrogation** To analyze the Interval, use {@link count}, {@link length}, {@link hasSame}, {@link contains}, {@link isAfter}, or {@link isBefore}. - * * **Transformation** To create other Intervals out of this one, use {@link set}, {@link splitAt}, {@link splitBy}, {@link divideEqually}, {@link merge}, {@link xor}, {@link union}, {@link intersection}, or {@link difference}. - * * **Comparison** To compare this Interval to another one, use {@link equals}, {@link overlaps}, {@link abutsStart}, {@link abutsEnd}, {@link engulfs}. - * * **Output** To convert the Interval into other representations, see {@link toString}, {@link toISO}, {@link toISODate}, {@link toISOTime}, {@link toFormat}, and {@link toDuration}. - */ - - -class Interval { - /** - * @private - */ - constructor(config) { - /** - * @access private - */ - this.s = config.start; - /** - * @access private - */ - - this.e = config.end; - /** - * @access private - */ - - this.invalid = config.invalid || null; - /** - * @access private - */ - - this.isLuxonInterval = true; - } - /** - * Create an invalid Interval. - * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {Interval} - */ - - - static invalid(reason, explanation = null) { - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the Interval is invalid"); - } - - const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidIntervalError(invalid); - } else { - return new Interval({ - invalid - }); - } - } - /** - * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end. - * @param {DateTime|Date|Object} start - * @param {DateTime|Date|Object} end - * @return {Interval} - */ - - - static fromDateTimes(start, end) { - const builtStart = friendlyDateTime(start), - builtEnd = friendlyDateTime(end); - const validateError = validateStartEnd(builtStart, builtEnd); - - if (validateError == null) { - return new Interval({ - start: builtStart, - end: builtEnd - }); - } else { - return validateError; - } - } - /** - * Create an Interval from a start DateTime and a Duration to extend to. - * @param {DateTime|Date|Object} start - * @param {Duration|Object|number} duration - the length of the Interval. - * @return {Interval} - */ - - - static after(start, duration) { - const dur = friendlyDuration(duration), - dt = friendlyDateTime(start); - return Interval.fromDateTimes(dt, dt.plus(dur)); - } - /** - * Create an Interval from an end DateTime and a Duration to extend backwards to. - * @param {DateTime|Date|Object} end - * @param {Duration|Object|number} duration - the length of the Interval. - * @return {Interval} - */ - - - static before(end, duration) { - const dur = friendlyDuration(duration), - dt = friendlyDateTime(end); - return Interval.fromDateTimes(dt.minus(dur), dt); - } - /** - * Create an Interval from an ISO 8601 string. - * Accepts `/`, `/`, and `/` formats. - * @param {string} text - the ISO string to parse - * @param {Object} [opts] - options to pass {@link DateTime.fromISO} and optionally {@link Duration.fromISO} - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @return {Interval} - */ - - - static fromISO(text, opts) { - const [s, e] = (text || "").split("/", 2); - - if (s && e) { - let start, startIsValid; - - try { - start = DateTime.fromISO(s, opts); - startIsValid = start.isValid; - } catch (e) { - startIsValid = false; - } - - let end, endIsValid; - - try { - end = DateTime.fromISO(e, opts); - endIsValid = end.isValid; - } catch (e) { - endIsValid = false; - } - - if (startIsValid && endIsValid) { - return Interval.fromDateTimes(start, end); - } - - if (startIsValid) { - const dur = Duration.fromISO(e, opts); - - if (dur.isValid) { - return Interval.after(start, dur); - } - } else if (endIsValid) { - const dur = Duration.fromISO(s, opts); - - if (dur.isValid) { - return Interval.before(end, dur); - } - } - } - - return Interval.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); - } - /** - * Check if an object is an Interval. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - - - static isInterval(o) { - return o && o.isLuxonInterval || false; - } - /** - * Returns the start of the Interval - * @type {DateTime} - */ - - - get start() { - return this.isValid ? this.s : null; - } - /** - * Returns the end of the Interval - * @type {DateTime} - */ - - - get end() { - return this.isValid ? this.e : null; - } - /** - * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'. - * @type {boolean} - */ - - - get isValid() { - return this.invalidReason === null; - } - /** - * Returns an error code if this Interval is invalid, or null if the Interval is valid - * @type {string} - */ - - - get invalidReason() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this Interval became invalid, or null if the Interval is valid - * @type {string} - */ - - - get invalidExplanation() { - return this.invalid ? this.invalid.explanation : null; - } - /** - * Returns the length of the Interval in the specified unit. - * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in. - * @return {number} - */ - - - length(unit = "milliseconds") { - return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN; - } - /** - * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part. - * Unlike {@link length} this counts sections of the calendar, not periods of time, e.g. specifying 'day' - * asks 'what dates are included in this interval?', not 'how many days long is this interval?' - * @param {string} [unit='milliseconds'] - the unit of time to count. - * @return {number} - */ - - - count(unit = "milliseconds") { - if (!this.isValid) return NaN; - const start = this.start.startOf(unit), - end = this.end.startOf(unit); - return Math.floor(end.diff(start, unit).get(unit)) + 1; - } - /** - * Returns whether this Interval's start and end are both in the same unit of time - * @param {string} unit - the unit of time to check sameness on - * @return {boolean} - */ - - - hasSame(unit) { - return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false; - } - /** - * Return whether this Interval has the same start and end DateTimes. - * @return {boolean} - */ - - - isEmpty() { - return this.s.valueOf() === this.e.valueOf(); - } - /** - * Return whether this Interval's start is after the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - - - isAfter(dateTime) { - if (!this.isValid) return false; - return this.s > dateTime; - } - /** - * Return whether this Interval's end is before the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - - - isBefore(dateTime) { - if (!this.isValid) return false; - return this.e <= dateTime; - } - /** - * Return whether this Interval contains the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - - - contains(dateTime) { - if (!this.isValid) return false; - return this.s <= dateTime && this.e > dateTime; - } - /** - * "Sets" the start and/or end dates. Returns a newly-constructed Interval. - * @param {Object} values - the values to set - * @param {DateTime} values.start - the starting DateTime - * @param {DateTime} values.end - the ending DateTime - * @return {Interval} - */ - - - set({ - start, - end - } = {}) { - if (!this.isValid) return this; - return Interval.fromDateTimes(start || this.s, end || this.e); - } - /** - * Split this Interval at each of the specified DateTimes - * @param {...[DateTime]} dateTimes - the unit of time to count. - * @return {[Interval]} - */ - - - splitAt(...dateTimes) { - if (!this.isValid) return []; - const sorted = dateTimes.map(friendlyDateTime).filter(d => this.contains(d)).sort(), - results = []; - let { - s - } = this, - i = 0; - - while (s < this.e) { - const added = sorted[i] || this.e, - next = +added > +this.e ? this.e : added; - results.push(Interval.fromDateTimes(s, next)); - s = next; - i += 1; - } - - return results; - } - /** - * Split this Interval into smaller Intervals, each of the specified length. - * Left over time is grouped into a smaller interval - * @param {Duration|Object|number} duration - The length of each resulting interval. - * @return {[Interval]} - */ - - - splitBy(duration) { - const dur = friendlyDuration(duration); - - if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) { - return []; - } - - let { - s - } = this, - added, - next; - const results = []; - - while (s < this.e) { - added = s.plus(dur); - next = +added > +this.e ? this.e : added; - results.push(Interval.fromDateTimes(s, next)); - s = next; - } - - return results; - } - /** - * Split this Interval into the specified number of smaller intervals. - * @param {number} numberOfParts - The number of Intervals to divide the Interval into. - * @return {[Interval]} - */ - - - divideEqually(numberOfParts) { - if (!this.isValid) return []; - return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts); - } - /** - * Return whether this Interval overlaps with the specified Interval - * @param {Interval} other - * @return {boolean} - */ - - - overlaps(other) { - return this.e > other.s && this.s < other.e; - } - /** - * Return whether this Interval's end is adjacent to the specified Interval's start. - * @param {Interval} other - * @return {boolean} - */ - - - abutsStart(other) { - if (!this.isValid) return false; - return +this.e === +other.s; - } - /** - * Return whether this Interval's start is adjacent to the specified Interval's end. - * @param {Interval} other - * @return {boolean} - */ - - - abutsEnd(other) { - if (!this.isValid) return false; - return +other.e === +this.s; - } - /** - * Return whether this Interval engulfs the start and end of the specified Interval. - * @param {Interval} other - * @return {boolean} - */ - - - engulfs(other) { - if (!this.isValid) return false; - return this.s <= other.s && this.e >= other.e; - } - /** - * Return whether this Interval has the same start and end as the specified Interval. - * @param {Interval} other - * @return {boolean} - */ - - - equals(other) { - if (!this.isValid || !other.isValid) { - return false; - } - - return this.s.equals(other.s) && this.e.equals(other.e); - } - /** - * Return an Interval representing the intersection of this Interval and the specified Interval. - * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals. - * Returns null if the intersection is empty, meaning, the intervals don't intersect. - * @param {Interval} other - * @return {Interval} - */ - - - intersection(other) { - if (!this.isValid) return this; - const s = this.s > other.s ? this.s : other.s, - e = this.e < other.e ? this.e : other.e; - - if (s > e) { - return null; - } else { - return Interval.fromDateTimes(s, e); - } - } - /** - * Return an Interval representing the union of this Interval and the specified Interval. - * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals. - * @param {Interval} other - * @return {Interval} - */ - - - union(other) { - if (!this.isValid) return this; - const s = this.s < other.s ? this.s : other.s, - e = this.e > other.e ? this.e : other.e; - return Interval.fromDateTimes(s, e); - } - /** - * Merge an array of Intervals into a equivalent minimal set of Intervals. - * Combines overlapping and adjacent Intervals. - * @param {[Interval]} intervals - * @return {[Interval]} - */ - - - static merge(intervals) { - const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(([sofar, current], item) => { - if (!current) { - return [sofar, item]; - } else if (current.overlaps(item) || current.abutsStart(item)) { - return [sofar, current.union(item)]; - } else { - return [sofar.concat([current]), item]; - } - }, [[], null]); - - if (final) { - found.push(final); - } - - return found; - } - /** - * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals. - * @param {[Interval]} intervals - * @return {[Interval]} - */ - - - static xor(intervals) { - let start = null, - currentCount = 0; - const results = [], - ends = intervals.map(i => [{ - time: i.s, - type: "s" - }, { - time: i.e, - type: "e" - }]), - flattened = Array.prototype.concat(...ends), - arr = flattened.sort((a, b) => a.time - b.time); - - for (const i of arr) { - currentCount += i.type === "s" ? 1 : -1; - - if (currentCount === 1) { - start = i.time; - } else { - if (start && +start !== +i.time) { - results.push(Interval.fromDateTimes(start, i.time)); - } - - start = null; - } - } - - return Interval.merge(results); - } - /** - * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals. - * @param {...Interval} intervals - * @return {[Interval]} - */ - - - difference(...intervals) { - return Interval.xor([this].concat(intervals)).map(i => this.intersection(i)).filter(i => i && !i.isEmpty()); - } - /** - * Returns a string representation of this Interval appropriate for debugging. - * @return {string} - */ - - - toString() { - if (!this.isValid) return INVALID$1; - return `[${this.s.toISO()} – ${this.e.toISO()})`; - } - /** - * Returns an ISO 8601-compliant string representation of this Interval. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @param {Object} opts - The same options as {@link DateTime.toISO} - * @return {string} - */ - - - toISO(opts) { - if (!this.isValid) return INVALID$1; - return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`; - } - /** - * Returns an ISO 8601-compliant string representation of date of this Interval. - * The time components are ignored. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @return {string} - */ - - - toISODate() { - if (!this.isValid) return INVALID$1; - return `${this.s.toISODate()}/${this.e.toISODate()}`; - } - /** - * Returns an ISO 8601-compliant string representation of time of this Interval. - * The date components are ignored. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @param {Object} opts - The same options as {@link DateTime.toISO} - * @return {string} - */ - - - toISOTime(opts) { - if (!this.isValid) return INVALID$1; - return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`; - } - /** - * Returns a string representation of this Interval formatted according to the specified format string. - * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime.toFormat} for details. - * @param {Object} opts - options - * @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations - * @return {string} - */ - - - toFormat(dateFormat, { - separator = " – " - } = {}) { - if (!this.isValid) return INVALID$1; - return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`; - } - /** - * Return a Duration representing the time spanned by this interval. - * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration. - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 } - * @return {Duration} - */ - - - toDuration(unit, opts) { - if (!this.isValid) { - return Duration.invalid(this.invalidReason); - } - - return this.e.diff(this.s, unit, opts); - } - /** - * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes - * @param {function} mapFn - * @return {Interval} - * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC()) - * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 })) - */ - - - mapEndpoints(mapFn) { - return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e)); - } - -} - -/** - * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment. - */ - -class Info { - /** - * Return whether the specified zone contains a DST. - * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone. - * @return {boolean} - */ - static hasDST(zone = Settings.defaultZone) { - const proto = DateTime.local().setZone(zone).set({ - month: 12 - }); - return !zone.universal && proto.offset !== proto.set({ - month: 6 - }).offset; - } - /** - * Return whether the specified zone is a valid IANA specifier. - * @param {string} zone - Zone to check - * @return {boolean} - */ - - - static isValidIANAZone(zone) { - return IANAZone.isValidSpecifier(zone) && IANAZone.isValidZone(zone); - } - /** - * Converts the input into a {@link Zone} instance. - * - * * If `input` is already a Zone instance, it is returned unchanged. - * * If `input` is a string containing a valid time zone name, a Zone instance - * with that name is returned. - * * If `input` is a string that doesn't refer to a known time zone, a Zone - * instance with {@link Zone.isValid} == false is returned. - * * If `input is a number, a Zone instance with the specified fixed offset - * in minutes is returned. - * * If `input` is `null` or `undefined`, the default zone is returned. - * @param {string|Zone|number} [input] - the value to be converted - * @return {Zone} - */ - - - static normalizeZone(input) { - return normalizeZone(input, Settings.defaultZone); - } - /** - * Return an array of standalone month names. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.outputCalendar='gregory'] - the calendar - * @example Info.months()[0] //=> 'January' - * @example Info.months('short')[0] //=> 'Jan' - * @example Info.months('numeric')[0] //=> '1' - * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.' - * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١' - * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I' - * @return {[string]} - */ - - - static months(length = "long", { - locale = null, - numberingSystem = null, - outputCalendar = "gregory" - } = {}) { - return Locale.create(locale, numberingSystem, outputCalendar).months(length); - } - /** - * Return an array of format month names. - * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that - * changes the string. - * See {@link months} - * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.outputCalendar='gregory'] - the calendar - * @return {[string]} - */ - - - static monthsFormat(length = "long", { - locale = null, - numberingSystem = null, - outputCalendar = "gregory" - } = {}) { - return Locale.create(locale, numberingSystem, outputCalendar).months(length, true); - } - /** - * Return an array of standalone week names. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @example Info.weekdays()[0] //=> 'Monday' - * @example Info.weekdays('short')[0] //=> 'Mon' - * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.' - * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين' - * @return {[string]} - */ - - - static weekdays(length = "long", { - locale = null, - numberingSystem = null - } = {}) { - return Locale.create(locale, numberingSystem, null).weekdays(length); - } - /** - * Return an array of format week names. - * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that - * changes the string. - * See {@link weekdays} - * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". - * @param {Object} opts - options - * @param {string} [opts.locale=null] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @return {[string]} - */ - - - static weekdaysFormat(length = "long", { - locale = null, - numberingSystem = null - } = {}) { - return Locale.create(locale, numberingSystem, null).weekdays(length, true); - } - /** - * Return an array of meridiems. - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @example Info.meridiems() //=> [ 'AM', 'PM' ] - * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ] - * @return {[string]} - */ - - - static meridiems({ - locale = null - } = {}) { - return Locale.create(locale).meridiems(); - } - /** - * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian. - * @param {string} [length='short'] - the length of the era representation, such as "short" or "long". - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @example Info.eras() //=> [ 'BC', 'AD' ] - * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ] - * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ] - * @return {[string]} - */ - - - static eras(length = "short", { - locale = null - } = {}) { - return Locale.create(locale, null, "gregory").eras(length); - } - /** - * Return the set of available features in this environment. - * Some features of Luxon are not available in all environments. For example, on older browsers, timezone support is not available. Use this function to figure out if that's the case. - * Keys: - * * `zones`: whether this environment supports IANA timezones - * * `intlTokens`: whether this environment supports internationalized token-based formatting/parsing - * * `intl`: whether this environment supports general internationalization - * * `relative`: whether this environment supports relative time formatting - * @example Info.features() //=> { intl: true, intlTokens: false, zones: true, relative: false } - * @return {Object} - */ - - - static features() { - let intl = false, - intlTokens = false, - zones = false, - relative = false; - - if (hasIntl()) { - intl = true; - intlTokens = hasFormatToParts(); - relative = hasRelative(); - - try { - zones = new Intl.DateTimeFormat("en", { - timeZone: "America/New_York" - }).resolvedOptions().timeZone === "America/New_York"; - } catch (e) { - zones = false; - } - } - - return { - intl, - intlTokens, - zones, - relative - }; - } - -} - -function dayDiff(earlier, later) { - const utcDayStart = dt => dt.toUTC(0, { - keepLocalTime: true - }).startOf("day").valueOf(), - ms = utcDayStart(later) - utcDayStart(earlier); - - return Math.floor(Duration.fromMillis(ms).as("days")); -} - -function highOrderDiffs(cursor, later, units) { - const differs = [["years", (a, b) => b.year - a.year], ["months", (a, b) => b.month - a.month + (b.year - a.year) * 12], ["weeks", (a, b) => { - const days = dayDiff(a, b); - return (days - days % 7) / 7; - }], ["days", dayDiff]]; - const results = {}; - let lowestOrder, highWater; - - for (const [unit, differ] of differs) { - if (units.indexOf(unit) >= 0) { - lowestOrder = unit; - let delta = differ(cursor, later); - highWater = cursor.plus({ - [unit]: delta - }); - - if (highWater > later) { - cursor = cursor.plus({ - [unit]: delta - 1 - }); - delta -= 1; - } else { - cursor = highWater; - } - - results[unit] = delta; - } - } - - return [cursor, results, highWater, lowestOrder]; -} - -function diff (earlier, later, units, opts) { - let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units); - const remainingMillis = later - cursor; - const lowerOrderUnits = units.filter(u => ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0); - - if (lowerOrderUnits.length === 0) { - if (highWater < later) { - highWater = cursor.plus({ - [lowestOrder]: 1 - }); - } - - if (highWater !== cursor) { - results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor); - } - } - - const duration = Duration.fromObject(Object.assign(results, opts)); - - if (lowerOrderUnits.length > 0) { - return Duration.fromMillis(remainingMillis, opts).shiftTo(...lowerOrderUnits).plus(duration); - } else { - return duration; - } -} - -const numberingSystems = { - arab: "[\u0660-\u0669]", - arabext: "[\u06F0-\u06F9]", - bali: "[\u1B50-\u1B59]", - beng: "[\u09E6-\u09EF]", - deva: "[\u0966-\u096F]", - fullwide: "[\uFF10-\uFF19]", - gujr: "[\u0AE6-\u0AEF]", - hanidec: "[〇|一|二|三|四|五|六|七|八|九]", - khmr: "[\u17E0-\u17E9]", - knda: "[\u0CE6-\u0CEF]", - laoo: "[\u0ED0-\u0ED9]", - limb: "[\u1946-\u194F]", - mlym: "[\u0D66-\u0D6F]", - mong: "[\u1810-\u1819]", - mymr: "[\u1040-\u1049]", - orya: "[\u0B66-\u0B6F]", - tamldec: "[\u0BE6-\u0BEF]", - telu: "[\u0C66-\u0C6F]", - thai: "[\u0E50-\u0E59]", - tibt: "[\u0F20-\u0F29]", - latn: "\\d" -}; -const numberingSystemsUTF16 = { - arab: [1632, 1641], - arabext: [1776, 1785], - bali: [6992, 7001], - beng: [2534, 2543], - deva: [2406, 2415], - fullwide: [65296, 65303], - gujr: [2790, 2799], - khmr: [6112, 6121], - knda: [3302, 3311], - laoo: [3792, 3801], - limb: [6470, 6479], - mlym: [3430, 3439], - mong: [6160, 6169], - mymr: [4160, 4169], - orya: [2918, 2927], - tamldec: [3046, 3055], - telu: [3174, 3183], - thai: [3664, 3673], - tibt: [3872, 3881] -}; // eslint-disable-next-line - -const hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split(""); -function parseDigits(str) { - let value = parseInt(str, 10); - - if (isNaN(value)) { - value = ""; - - for (let i = 0; i < str.length; i++) { - const code = str.charCodeAt(i); - - if (str[i].search(numberingSystems.hanidec) !== -1) { - value += hanidecChars.indexOf(str[i]); - } else { - for (const key in numberingSystemsUTF16) { - const [min, max] = numberingSystemsUTF16[key]; - - if (code >= min && code <= max) { - value += code - min; - } - } - } - } - - return parseInt(value, 10); - } else { - return value; - } -} -function digitRegex({ - numberingSystem -}, append = "") { - return new RegExp(`${numberingSystems[numberingSystem || "latn"]}${append}`); -} - -const MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support"; - -function intUnit(regex, post = i => i) { - return { - regex, - deser: ([s]) => post(parseDigits(s)) - }; -} - -const NBSP = String.fromCharCode(160); -const spaceOrNBSP = `( |${NBSP})`; -const spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g"); - -function fixListRegex(s) { - // make dots optional and also make them literal - // make space and non breakable space characters interchangeable - return s.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP); -} - -function stripInsensitivities(s) { - return s.replace(/\./g, "") // ignore dots that were made optional - .replace(spaceOrNBSPRegExp, " ") // interchange space and nbsp - .toLowerCase(); -} - -function oneOf(strings, startIndex) { - if (strings === null) { - return null; - } else { - return { - regex: RegExp(strings.map(fixListRegex).join("|")), - deser: ([s]) => strings.findIndex(i => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex - }; - } -} - -function offset(regex, groups) { - return { - regex, - deser: ([, h, m]) => signedOffset(h, m), - groups - }; -} - -function simple(regex) { - return { - regex, - deser: ([s]) => s - }; -} - -function escapeToken(value) { - // eslint-disable-next-line no-useless-escape - return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); -} - -function unitForToken(token, loc) { - const one = digitRegex(loc), - two = digitRegex(loc, "{2}"), - three = digitRegex(loc, "{3}"), - four = digitRegex(loc, "{4}"), - six = digitRegex(loc, "{6}"), - oneOrTwo = digitRegex(loc, "{1,2}"), - oneToThree = digitRegex(loc, "{1,3}"), - oneToSix = digitRegex(loc, "{1,6}"), - oneToNine = digitRegex(loc, "{1,9}"), - twoToFour = digitRegex(loc, "{2,4}"), - fourToSix = digitRegex(loc, "{4,6}"), - literal = t => ({ - regex: RegExp(escapeToken(t.val)), - deser: ([s]) => s, - literal: true - }), - unitate = t => { - if (token.literal) { - return literal(t); - } - - switch (t.val) { - // era - case "G": - return oneOf(loc.eras("short", false), 0); - - case "GG": - return oneOf(loc.eras("long", false), 0); - // years - - case "y": - return intUnit(oneToSix); - - case "yy": - return intUnit(twoToFour, untruncateYear); - - case "yyyy": - return intUnit(four); - - case "yyyyy": - return intUnit(fourToSix); - - case "yyyyyy": - return intUnit(six); - // months - - case "M": - return intUnit(oneOrTwo); - - case "MM": - return intUnit(two); - - case "MMM": - return oneOf(loc.months("short", true, false), 1); - - case "MMMM": - return oneOf(loc.months("long", true, false), 1); - - case "L": - return intUnit(oneOrTwo); - - case "LL": - return intUnit(two); - - case "LLL": - return oneOf(loc.months("short", false, false), 1); - - case "LLLL": - return oneOf(loc.months("long", false, false), 1); - // dates - - case "d": - return intUnit(oneOrTwo); - - case "dd": - return intUnit(two); - // ordinals - - case "o": - return intUnit(oneToThree); - - case "ooo": - return intUnit(three); - // time - - case "HH": - return intUnit(two); - - case "H": - return intUnit(oneOrTwo); - - case "hh": - return intUnit(two); - - case "h": - return intUnit(oneOrTwo); - - case "mm": - return intUnit(two); - - case "m": - return intUnit(oneOrTwo); - - case "q": - return intUnit(oneOrTwo); - - case "qq": - return intUnit(two); - - case "s": - return intUnit(oneOrTwo); - - case "ss": - return intUnit(two); - - case "S": - return intUnit(oneToThree); - - case "SSS": - return intUnit(three); - - case "u": - return simple(oneToNine); - // meridiem - - case "a": - return oneOf(loc.meridiems(), 0); - // weekYear (k) - - case "kkkk": - return intUnit(four); - - case "kk": - return intUnit(twoToFour, untruncateYear); - // weekNumber (W) - - case "W": - return intUnit(oneOrTwo); - - case "WW": - return intUnit(two); - // weekdays - - case "E": - case "c": - return intUnit(one); - - case "EEE": - return oneOf(loc.weekdays("short", false, false), 1); - - case "EEEE": - return oneOf(loc.weekdays("long", false, false), 1); - - case "ccc": - return oneOf(loc.weekdays("short", true, false), 1); - - case "cccc": - return oneOf(loc.weekdays("long", true, false), 1); - // offset/zone - - case "Z": - case "ZZ": - return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2); - - case "ZZZ": - return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2); - // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing - // because we don't have any way to figure out what they are - - case "z": - return simple(/[a-z_+-/]{1,256}?/i); - - default: - return literal(t); - } - }; - - const unit = unitate(token) || { - invalidReason: MISSING_FTP - }; - unit.token = token; - return unit; -} - -const partTypeStyleToTokenVal = { - year: { - "2-digit": "yy", - numeric: "yyyyy" - }, - month: { - numeric: "M", - "2-digit": "MM", - short: "MMM", - long: "MMMM" - }, - day: { - numeric: "d", - "2-digit": "dd" - }, - weekday: { - short: "EEE", - long: "EEEE" - }, - dayperiod: "a", - dayPeriod: "a", - hour: { - numeric: "h", - "2-digit": "hh" - }, - minute: { - numeric: "m", - "2-digit": "mm" - }, - second: { - numeric: "s", - "2-digit": "ss" - } -}; - -function tokenForPart(part, locale, formatOpts) { - const { - type, - value - } = part; - - if (type === "literal") { - return { - literal: true, - val: value - }; - } - - const style = formatOpts[type]; - let val = partTypeStyleToTokenVal[type]; - - if (typeof val === "object") { - val = val[style]; - } - - if (val) { - return { - literal: false, - val - }; - } - - return undefined; -} - -function buildRegex(units) { - const re = units.map(u => u.regex).reduce((f, r) => `${f}(${r.source})`, ""); - return [`^${re}$`, units]; -} - -function match(input, regex, handlers) { - const matches = input.match(regex); - - if (matches) { - const all = {}; - let matchIndex = 1; - - for (const i in handlers) { - if (hasOwnProperty(handlers, i)) { - const h = handlers[i], - groups = h.groups ? h.groups + 1 : 1; - - if (!h.literal && h.token) { - all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups)); - } - - matchIndex += groups; - } - } - - return [matches, all]; - } else { - return [matches, {}]; - } -} - -function dateTimeFromMatches(matches) { - const toField = token => { - switch (token) { - case "S": - return "millisecond"; - - case "s": - return "second"; - - case "m": - return "minute"; - - case "h": - case "H": - return "hour"; - - case "d": - return "day"; - - case "o": - return "ordinal"; - - case "L": - case "M": - return "month"; - - case "y": - return "year"; - - case "E": - case "c": - return "weekday"; - - case "W": - return "weekNumber"; - - case "k": - return "weekYear"; - - case "q": - return "quarter"; - - default: - return null; - } - }; - - let zone; - - if (!isUndefined(matches.Z)) { - zone = new FixedOffsetZone(matches.Z); - } else if (!isUndefined(matches.z)) { - zone = IANAZone.create(matches.z); - } else { - zone = null; - } - - if (!isUndefined(matches.q)) { - matches.M = (matches.q - 1) * 3 + 1; - } - - if (!isUndefined(matches.h)) { - if (matches.h < 12 && matches.a === 1) { - matches.h += 12; - } else if (matches.h === 12 && matches.a === 0) { - matches.h = 0; - } - } - - if (matches.G === 0 && matches.y) { - matches.y = -matches.y; - } - - if (!isUndefined(matches.u)) { - matches.S = parseMillis(matches.u); - } - - const vals = Object.keys(matches).reduce((r, k) => { - const f = toField(k); - - if (f) { - r[f] = matches[k]; - } - - return r; - }, {}); - return [vals, zone]; -} - -let dummyDateTimeCache = null; - -function getDummyDateTime() { - if (!dummyDateTimeCache) { - dummyDateTimeCache = DateTime.fromMillis(1555555555555); - } - - return dummyDateTimeCache; -} - -function maybeExpandMacroToken(token, locale) { - if (token.literal) { - return token; - } - - const formatOpts = Formatter.macroTokenToFormatOpts(token.val); - - if (!formatOpts) { - return token; - } - - const formatter = Formatter.create(locale, formatOpts); - const parts = formatter.formatDateTimeParts(getDummyDateTime()); - const tokens = parts.map(p => tokenForPart(p, locale, formatOpts)); - - if (tokens.includes(undefined)) { - return token; - } - - return tokens; -} - -function expandMacroTokens(tokens, locale) { - return Array.prototype.concat(...tokens.map(t => maybeExpandMacroToken(t, locale))); -} -/** - * @private - */ - - -function explainFromTokens(locale, input, format) { - const tokens = expandMacroTokens(Formatter.parseFormat(format), locale), - units = tokens.map(t => unitForToken(t, locale)), - disqualifyingUnit = units.find(t => t.invalidReason); - - if (disqualifyingUnit) { - return { - input, - tokens, - invalidReason: disqualifyingUnit.invalidReason - }; - } else { - const [regexString, handlers] = buildRegex(units), - regex = RegExp(regexString, "i"), - [rawMatches, matches] = match(input, regex, handlers), - [result, zone] = matches ? dateTimeFromMatches(matches) : [null, null]; - - if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) { - throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format"); - } - - return { - input, - tokens, - regex, - rawMatches, - matches, - result, - zone - }; - } -} -function parseFromTokens(locale, input, format) { - const { - result, - zone, - invalidReason - } = explainFromTokens(locale, input, format); - return [result, zone, invalidReason]; -} - -const nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], - leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; - -function unitOutOfRange(unit, value) { - return new Invalid("unit out of range", `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`); -} - -function dayOfWeek(year, month, day) { - const js = new Date(Date.UTC(year, month - 1, day)).getUTCDay(); - return js === 0 ? 7 : js; -} - -function computeOrdinal(year, month, day) { - return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1]; -} - -function uncomputeOrdinal(year, ordinal) { - const table = isLeapYear(year) ? leapLadder : nonLeapLadder, - month0 = table.findIndex(i => i < ordinal), - day = ordinal - table[month0]; - return { - month: month0 + 1, - day - }; -} -/** - * @private - */ - - -function gregorianToWeek(gregObj) { - const { - year, - month, - day - } = gregObj, - ordinal = computeOrdinal(year, month, day), - weekday = dayOfWeek(year, month, day); - let weekNumber = Math.floor((ordinal - weekday + 10) / 7), - weekYear; - - if (weekNumber < 1) { - weekYear = year - 1; - weekNumber = weeksInWeekYear(weekYear); - } else if (weekNumber > weeksInWeekYear(year)) { - weekYear = year + 1; - weekNumber = 1; - } else { - weekYear = year; - } - - return Object.assign({ - weekYear, - weekNumber, - weekday - }, timeObject(gregObj)); -} -function weekToGregorian(weekData) { - const { - weekYear, - weekNumber, - weekday - } = weekData, - weekdayOfJan4 = dayOfWeek(weekYear, 1, 4), - yearInDays = daysInYear(weekYear); - let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3, - year; - - if (ordinal < 1) { - year = weekYear - 1; - ordinal += daysInYear(year); - } else if (ordinal > yearInDays) { - year = weekYear + 1; - ordinal -= daysInYear(weekYear); - } else { - year = weekYear; - } - - const { - month, - day - } = uncomputeOrdinal(year, ordinal); - return Object.assign({ - year, - month, - day - }, timeObject(weekData)); -} -function gregorianToOrdinal(gregData) { - const { - year, - month, - day - } = gregData, - ordinal = computeOrdinal(year, month, day); - return Object.assign({ - year, - ordinal - }, timeObject(gregData)); -} -function ordinalToGregorian(ordinalData) { - const { - year, - ordinal - } = ordinalData, - { - month, - day - } = uncomputeOrdinal(year, ordinal); - return Object.assign({ - year, - month, - day - }, timeObject(ordinalData)); -} -function hasInvalidWeekData(obj) { - const validYear = isInteger(obj.weekYear), - validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear)), - validWeekday = integerBetween(obj.weekday, 1, 7); - - if (!validYear) { - return unitOutOfRange("weekYear", obj.weekYear); - } else if (!validWeek) { - return unitOutOfRange("week", obj.week); - } else if (!validWeekday) { - return unitOutOfRange("weekday", obj.weekday); - } else return false; -} -function hasInvalidOrdinalData(obj) { - const validYear = isInteger(obj.year), - validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year)); - - if (!validYear) { - return unitOutOfRange("year", obj.year); - } else if (!validOrdinal) { - return unitOutOfRange("ordinal", obj.ordinal); - } else return false; -} -function hasInvalidGregorianData(obj) { - const validYear = isInteger(obj.year), - validMonth = integerBetween(obj.month, 1, 12), - validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month)); - - if (!validYear) { - return unitOutOfRange("year", obj.year); - } else if (!validMonth) { - return unitOutOfRange("month", obj.month); - } else if (!validDay) { - return unitOutOfRange("day", obj.day); - } else return false; -} -function hasInvalidTimeData(obj) { - const { - hour, - minute, - second, - millisecond - } = obj; - const validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, - validMinute = integerBetween(minute, 0, 59), - validSecond = integerBetween(second, 0, 59), - validMillisecond = integerBetween(millisecond, 0, 999); - - if (!validHour) { - return unitOutOfRange("hour", hour); - } else if (!validMinute) { - return unitOutOfRange("minute", minute); - } else if (!validSecond) { - return unitOutOfRange("second", second); - } else if (!validMillisecond) { - return unitOutOfRange("millisecond", millisecond); - } else return false; -} - -const INVALID$2 = "Invalid DateTime"; -const MAX_DATE = 8.64e15; - -function unsupportedZone(zone) { - return new Invalid("unsupported zone", `the zone "${zone.name}" is not supported`); -} // we cache week data on the DT object and this intermediates the cache - - -function possiblyCachedWeekData(dt) { - if (dt.weekData === null) { - dt.weekData = gregorianToWeek(dt.c); - } - - return dt.weekData; -} // clone really means, "make a new object with these modifications". all "setters" really use this -// to create a new object while only changing some of the properties - - -function clone$1(inst, alts) { - const current = { - ts: inst.ts, - zone: inst.zone, - c: inst.c, - o: inst.o, - loc: inst.loc, - invalid: inst.invalid - }; - return new DateTime(Object.assign({}, current, alts, { - old: current - })); -} // find the right offset a given local time. The o input is our guess, which determines which -// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST) - - -function fixOffset(localTS, o, tz) { - // Our UTC time is just a guess because our offset is just a guess - let utcGuess = localTS - o * 60 * 1000; // Test whether the zone matches the offset for this ts - - const o2 = tz.offset(utcGuess); // If so, offset didn't change and we're done - - if (o === o2) { - return [utcGuess, o]; - } // If not, change the ts by the difference in the offset - - - utcGuess -= (o2 - o) * 60 * 1000; // If that gives us the local time we want, we're done - - const o3 = tz.offset(utcGuess); - - if (o2 === o3) { - return [utcGuess, o2]; - } // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time - - - return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)]; -} // convert an epoch timestamp into a calendar object with the given offset - - -function tsToObj(ts, offset) { - ts += offset * 60 * 1000; - const d = new Date(ts); - return { - year: d.getUTCFullYear(), - month: d.getUTCMonth() + 1, - day: d.getUTCDate(), - hour: d.getUTCHours(), - minute: d.getUTCMinutes(), - second: d.getUTCSeconds(), - millisecond: d.getUTCMilliseconds() - }; -} // convert a calendar object to a epoch timestamp - - -function objToTS(obj, offset, zone) { - return fixOffset(objToLocalTS(obj), offset, zone); -} // create a new DT instance by adding a duration, adjusting for DSTs - - -function adjustTime(inst, dur) { - const oPre = inst.o, - year = inst.c.year + Math.trunc(dur.years), - month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, - c = Object.assign({}, inst.c, { - year, - month, - day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7 - }), - millisToAdd = Duration.fromObject({ - years: dur.years - Math.trunc(dur.years), - quarters: dur.quarters - Math.trunc(dur.quarters), - months: dur.months - Math.trunc(dur.months), - weeks: dur.weeks - Math.trunc(dur.weeks), - days: dur.days - Math.trunc(dur.days), - hours: dur.hours, - minutes: dur.minutes, - seconds: dur.seconds, - milliseconds: dur.milliseconds - }).as("milliseconds"), - localTS = objToLocalTS(c); - let [ts, o] = fixOffset(localTS, oPre, inst.zone); - - if (millisToAdd !== 0) { - ts += millisToAdd; // that could have changed the offset by going over a DST, but we want to keep the ts the same - - o = inst.zone.offset(ts); - } - - return { - ts, - o - }; -} // helper useful in turning the results of parsing into real dates -// by handling the zone options - - -function parseDataToDateTime(parsed, parsedZone, opts, format, text) { - const { - setZone, - zone - } = opts; - - if (parsed && Object.keys(parsed).length !== 0) { - const interpretationZone = parsedZone || zone, - inst = DateTime.fromObject(Object.assign(parsed, opts, { - zone: interpretationZone, - // setZone is a valid option in the calling methods, but not in fromObject - setZone: undefined - })); - return setZone ? inst : inst.setZone(zone); - } else { - return DateTime.invalid(new Invalid("unparsable", `the input "${text}" can't be parsed as ${format}`)); - } -} // if you want to output a technical format (e.g. RFC 2822), this helper -// helps handle the details - - -function toTechFormat(dt, format, allowZ = true) { - return dt.isValid ? Formatter.create(Locale.create("en-US"), { - allowZ, - forceSimple: true - }).formatDateTimeFromString(dt, format) : null; -} // technical time formats (e.g. the time part of ISO 8601), take some options -// and this commonizes their handling - - -function toTechTimeFormat(dt, { - suppressSeconds = false, - suppressMilliseconds = false, - includeOffset, - includeZone = false, - spaceZone = false, - format = "extended" -}) { - let fmt = format === "basic" ? "HHmm" : "HH:mm"; - - if (!suppressSeconds || dt.second !== 0 || dt.millisecond !== 0) { - fmt += format === "basic" ? "ss" : ":ss"; - - if (!suppressMilliseconds || dt.millisecond !== 0) { - fmt += ".SSS"; - } - } - - if ((includeZone || includeOffset) && spaceZone) { - fmt += " "; - } - - if (includeZone) { - fmt += "z"; - } else if (includeOffset) { - fmt += format === "basic" ? "ZZZ" : "ZZ"; - } - - return toTechFormat(dt, fmt); -} // defaults for unspecified units in the supported calendars - - -const defaultUnitValues = { - month: 1, - day: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 -}, - defaultWeekUnitValues = { - weekNumber: 1, - weekday: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 -}, - defaultOrdinalUnitValues = { - ordinal: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 -}; // Units in the supported calendars, sorted by bigness - -const orderedUnits$1 = ["year", "month", "day", "hour", "minute", "second", "millisecond"], - orderedWeekUnits = ["weekYear", "weekNumber", "weekday", "hour", "minute", "second", "millisecond"], - orderedOrdinalUnits = ["year", "ordinal", "hour", "minute", "second", "millisecond"]; // standardize case and plurality in units - -function normalizeUnit(unit) { - const normalized = { - year: "year", - years: "year", - month: "month", - months: "month", - day: "day", - days: "day", - hour: "hour", - hours: "hour", - minute: "minute", - minutes: "minute", - quarter: "quarter", - quarters: "quarter", - second: "second", - seconds: "second", - millisecond: "millisecond", - milliseconds: "millisecond", - weekday: "weekday", - weekdays: "weekday", - weeknumber: "weekNumber", - weeksnumber: "weekNumber", - weeknumbers: "weekNumber", - weekyear: "weekYear", - weekyears: "weekYear", - ordinal: "ordinal" - }[unit.toLowerCase()]; - if (!normalized) throw new InvalidUnitError(unit); - return normalized; -} // this is a dumbed down version of fromObject() that runs about 60% faster -// but doesn't do any validation, makes a bunch of assumptions about what units -// are present, and so on. - - -function quickDT(obj, zone) { - // assume we have the higher-order units - for (const u of orderedUnits$1) { - if (isUndefined(obj[u])) { - obj[u] = defaultUnitValues[u]; - } - } - - const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj); - - if (invalid) { - return DateTime.invalid(invalid); - } - - const tsNow = Settings.now(), - offsetProvis = zone.offset(tsNow), - [ts, o] = objToTS(obj, offsetProvis, zone); - return new DateTime({ - ts, - zone, - o - }); -} - -function diffRelative(start, end, opts) { - const round = isUndefined(opts.round) ? true : opts.round, - format = (c, unit) => { - c = roundTo(c, round || opts.calendary ? 0 : 2, true); - const formatter = end.loc.clone(opts).relFormatter(opts); - return formatter.format(c, unit); - }, - differ = unit => { - if (opts.calendary) { - if (!end.hasSame(start, unit)) { - return end.startOf(unit).diff(start.startOf(unit), unit).get(unit); - } else return 0; - } else { - return end.diff(start, unit).get(unit); - } - }; - - if (opts.unit) { - return format(differ(opts.unit), opts.unit); - } - - for (const unit of opts.units) { - const count = differ(unit); - - if (Math.abs(count) >= 1) { - return format(count, unit); - } - } - - return format(0, opts.units[opts.units.length - 1]); -} -/** - * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them. - * - * A DateTime comprises of: - * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch. - * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone). - * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`. - * - * Here is a brief overview of the most commonly used functionality it provides: - * - * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link local}, {@link utc}, and (most flexibly) {@link fromObject}. To create one from a standard string format, use {@link fromISO}, {@link fromHTTP}, and {@link fromRFC2822}. To create one from a custom string format, use {@link fromFormat}. To create one from a native JS date, use {@link fromJSDate}. - * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link toObject}), use the {@link year}, {@link month}, - * {@link day}, {@link hour}, {@link minute}, {@link second}, {@link millisecond} accessors. - * * **Week calendar**: For ISO week calendar attributes, see the {@link weekYear}, {@link weekNumber}, and {@link weekday} accessors. - * * **Configuration** See the {@link locale} and {@link numberingSystem} accessors. - * * **Transformation**: To transform the DateTime into other DateTimes, use {@link set}, {@link reconfigure}, {@link setZone}, {@link setLocale}, {@link plus}, {@link minus}, {@link endOf}, {@link startOf}, {@link toUTC}, and {@link toLocal}. - * * **Output**: To convert the DateTime to other representations, use the {@link toRelative}, {@link toRelativeCalendar}, {@link toJSON}, {@link toISO}, {@link toHTTP}, {@link toObject}, {@link toRFC2822}, {@link toString}, {@link toLocaleString}, {@link toFormat}, {@link toMillis} and {@link toJSDate}. - * - * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation. - */ - - -class DateTime { - /** - * @access private - */ - constructor(config) { - const zone = config.zone || Settings.defaultZone; - let invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null); - /** - * @access private - */ - - this.ts = isUndefined(config.ts) ? Settings.now() : config.ts; - let c = null, - o = null; - - if (!invalid) { - const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone); - - if (unchanged) { - [c, o] = [config.old.c, config.old.o]; - } else { - const ot = zone.offset(this.ts); - c = tsToObj(this.ts, ot); - invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null; - c = invalid ? null : c; - o = invalid ? null : ot; - } - } - /** - * @access private - */ - - - this._zone = zone; - /** - * @access private - */ - - this.loc = config.loc || Locale.create(); - /** - * @access private - */ - - this.invalid = invalid; - /** - * @access private - */ - - this.weekData = null; - /** - * @access private - */ - - this.c = c; - /** - * @access private - */ - - this.o = o; - /** - * @access private - */ - - this.isLuxonDateTime = true; - } // CONSTRUCT - - /** - * Create a local DateTime - * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used - * @param {number} [month=1] - The month, 1-indexed - * @param {number} [day=1] - The day of the month - * @param {number} [hour=0] - The hour of the day, in 24-hour time - * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 - * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 - * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 - * @example DateTime.local() //~> now - * @example DateTime.local(2017) //~> 2017-01-01T00:00:00 - * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00 - * @example DateTime.local(2017, 3, 12) //~> 2017-03-12T00:00:00 - * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00 - * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00 - * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10 - * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765 - * @return {DateTime} - */ - - - static local(year, month, day, hour, minute, second, millisecond) { - if (isUndefined(year)) { - return new DateTime({ - ts: Settings.now() - }); - } else { - return quickDT({ - year, - month, - day, - hour, - minute, - second, - millisecond - }, Settings.defaultZone); - } - } - /** - * Create a DateTime in UTC - * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used - * @param {number} [month=1] - The month, 1-indexed - * @param {number} [day=1] - The day of the month - * @param {number} [hour=0] - The hour of the day, in 24-hour time - * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 - * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 - * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 - * @example DateTime.utc() //~> now - * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z - * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z - * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z - * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z - * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z - * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z - * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765Z - * @return {DateTime} - */ - - - static utc(year, month, day, hour, minute, second, millisecond) { - if (isUndefined(year)) { - return new DateTime({ - ts: Settings.now(), - zone: FixedOffsetZone.utcInstance - }); - } else { - return quickDT({ - year, - month, - day, - hour, - minute, - second, - millisecond - }, FixedOffsetZone.utcInstance); - } - } - /** - * Create a DateTime from a Javascript Date object. Uses the default zone. - * @param {Date} date - a Javascript Date object - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @return {DateTime} - */ - - - static fromJSDate(date, options = {}) { - const ts = isDate(date) ? date.valueOf() : NaN; - - if (Number.isNaN(ts)) { - return DateTime.invalid("invalid input"); - } - - const zoneToUse = normalizeZone(options.zone, Settings.defaultZone); - - if (!zoneToUse.isValid) { - return DateTime.invalid(unsupportedZone(zoneToUse)); - } - - return new DateTime({ - ts: ts, - zone: zoneToUse, - loc: Locale.fromObject(options) - }); - } - /** - * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. - * @param {number} milliseconds - a number of milliseconds since 1970 UTC - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance - * @return {DateTime} - */ - - - static fromMillis(milliseconds, options = {}) { - if (!isNumber(milliseconds)) { - throw new InvalidArgumentError(`fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`); - } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) { - // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start - return DateTime.invalid("Timestamp out of range"); - } else { - return new DateTime({ - ts: milliseconds, - zone: normalizeZone(options.zone, Settings.defaultZone), - loc: Locale.fromObject(options) - }); - } - } - /** - * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. - * @param {number} seconds - a number of seconds since 1970 UTC - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance - * @return {DateTime} - */ - - - static fromSeconds(seconds, options = {}) { - if (!isNumber(seconds)) { - throw new InvalidArgumentError("fromSeconds requires a numerical input"); - } else { - return new DateTime({ - ts: seconds * 1000, - zone: normalizeZone(options.zone, Settings.defaultZone), - loc: Locale.fromObject(options) - }); - } - } - /** - * Create a DateTime from a Javascript object with keys like 'year' and 'hour' with reasonable defaults. - * @param {Object} obj - the object to create the DateTime from - * @param {number} obj.year - a year, such as 1987 - * @param {number} obj.month - a month, 1-12 - * @param {number} obj.day - a day of the month, 1-31, depending on the month - * @param {number} obj.ordinal - day of the year, 1-365 or 366 - * @param {number} obj.weekYear - an ISO week year - * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year - * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday - * @param {number} obj.hour - hour of the day, 0-23 - * @param {number} obj.minute - minute of the hour, 0-59 - * @param {number} obj.second - second of the minute, 0-59 - * @param {number} obj.millisecond - millisecond of the second, 0-999 - * @param {string|Zone} [obj.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone() - * @param {string} [obj.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} obj.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} obj.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25' - * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01' - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06 - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'utc' }), - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'local' }) - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'America/New_York' }) - * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13' - * @return {DateTime} - */ - - - static fromObject(obj) { - const zoneToUse = normalizeZone(obj.zone, Settings.defaultZone); - - if (!zoneToUse.isValid) { - return DateTime.invalid(unsupportedZone(zoneToUse)); - } - - const tsNow = Settings.now(), - offsetProvis = zoneToUse.offset(tsNow), - normalized = normalizeObject(obj, normalizeUnit, ["zone", "locale", "outputCalendar", "numberingSystem"]), - containsOrdinal = !isUndefined(normalized.ordinal), - containsGregorYear = !isUndefined(normalized.year), - containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), - containsGregor = containsGregorYear || containsGregorMD, - definiteWeekDef = normalized.weekYear || normalized.weekNumber, - loc = Locale.fromObject(obj); // cases: - // just a weekday -> this week's instance of that weekday, no worries - // (gregorian data or ordinal) + (weekYear or weekNumber) -> error - // (gregorian month or day) + ordinal -> error - // otherwise just use weeks or ordinals or gregorian, depending on what's specified - - if ((containsGregor || containsOrdinal) && definiteWeekDef) { - throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals"); - } - - if (containsGregorMD && containsOrdinal) { - throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); - } - - const useWeekData = definiteWeekDef || normalized.weekday && !containsGregor; // configure ourselves to deal with gregorian dates or week stuff - - let units, - defaultValues, - objNow = tsToObj(tsNow, offsetProvis); - - if (useWeekData) { - units = orderedWeekUnits; - defaultValues = defaultWeekUnitValues; - objNow = gregorianToWeek(objNow); - } else if (containsOrdinal) { - units = orderedOrdinalUnits; - defaultValues = defaultOrdinalUnitValues; - objNow = gregorianToOrdinal(objNow); - } else { - units = orderedUnits$1; - defaultValues = defaultUnitValues; - } // set default values for missing stuff - - - let foundFirst = false; - - for (const u of units) { - const v = normalized[u]; - - if (!isUndefined(v)) { - foundFirst = true; - } else if (foundFirst) { - normalized[u] = defaultValues[u]; - } else { - normalized[u] = objNow[u]; - } - } // make sure the values we have are in range - - - const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), - invalid = higherOrderInvalid || hasInvalidTimeData(normalized); - - if (invalid) { - return DateTime.invalid(invalid); - } // compute the actual time - - - const gregorian = useWeekData ? weekToGregorian(normalized) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, - [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse), - inst = new DateTime({ - ts: tsFinal, - zone: zoneToUse, - o: offsetFinal, - loc - }); // gregorian data + weekday serves only to validate - - if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) { - return DateTime.invalid("mismatched weekday", `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`); - } - - return inst; - } - /** - * Create a DateTime from an ISO 8601 string - * @param {string} text - the ISO string - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromISO('2016-05-25T09:08:34.123') - * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00') - * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true}) - * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'}) - * @example DateTime.fromISO('2016-W05-4') - * @return {DateTime} - */ - - - static fromISO(text, opts = {}) { - const [vals, parsedZone] = parseISODate(text); - return parseDataToDateTime(vals, parsedZone, opts, "ISO 8601", text); - } - /** - * Create a DateTime from an RFC 2822 string - * @param {string} text - the RFC 2822 string - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. - * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT') - * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600') - * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z') - * @return {DateTime} - */ - - - static fromRFC2822(text, opts = {}) { - const [vals, parsedZone] = parseRFC2822Date(text); - return parseDataToDateTime(vals, parsedZone, opts, "RFC 2822", text); - } - /** - * Create a DateTime from an HTTP header date - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 - * @param {string} text - the HTTP header date - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. - * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods. - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT') - * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT') - * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994') - * @return {DateTime} - */ - - - static fromHTTP(text, opts = {}) { - const [vals, parsedZone] = parseHTTPDate(text); - return parseDataToDateTime(vals, parsedZone, opts, "HTTP", opts); - } - /** - * Create a DateTime from an input string and format string. - * Defaults to en-US if no locale has been specified, regardless of the system's locale. - * @see https://moment.github.io/luxon/docs/manual/parsing.html#table-of-tokens - * @param {string} text - the string to parse - * @param {string} fmt - the format the string is expected to be in (see the link below for the formats) - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale - * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @return {DateTime} - */ - - - static fromFormat(text, fmt, opts = {}) { - if (isUndefined(text) || isUndefined(fmt)) { - throw new InvalidArgumentError("fromFormat requires an input string and a format"); - } - - const { - locale = null, - numberingSystem = null - } = opts, - localeToUse = Locale.fromOpts({ - locale, - numberingSystem, - defaultToEN: true - }), - [vals, parsedZone, invalid] = parseFromTokens(localeToUse, text, fmt); - - if (invalid) { - return DateTime.invalid(invalid); - } else { - return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text); - } - } - /** - * @deprecated use fromFormat instead - */ - - - static fromString(text, fmt, opts = {}) { - return DateTime.fromFormat(text, fmt, opts); - } - /** - * Create a DateTime from a SQL date, time, or datetime - * Defaults to en-US if no locale has been specified, regardless of the system's locale - * @param {string} text - the string to parse - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale - * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @example DateTime.fromSQL('2017-05-15') - * @example DateTime.fromSQL('2017-05-15 09:12:34') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true }) - * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' }) - * @example DateTime.fromSQL('09:12:34.342') - * @return {DateTime} - */ - - - static fromSQL(text, opts = {}) { - const [vals, parsedZone] = parseSQL(text); - return parseDataToDateTime(vals, parsedZone, opts, "SQL", text); - } - /** - * Create an invalid DateTime. - * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {DateTime} - */ - - - static invalid(reason, explanation = null) { - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the DateTime is invalid"); - } - - const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidDateTimeError(invalid); - } else { - return new DateTime({ - invalid - }); - } - } - /** - * Check if an object is a DateTime. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - - - static isDateTime(o) { - return o && o.isLuxonDateTime || false; - } // INFO - - /** - * Get the value of unit. - * @param {string} unit - a unit such as 'minute' or 'day' - * @example DateTime.local(2017, 7, 4).get('month'); //=> 7 - * @example DateTime.local(2017, 7, 4).get('day'); //=> 4 - * @return {number} - */ - - - get(unit) { - return this[unit]; - } - /** - * Returns whether the DateTime is valid. Invalid DateTimes occur when: - * * The DateTime was created from invalid calendar information, such as the 13th month or February 30 - * * The DateTime was created by an operation on another invalid date - * @type {boolean} - */ - - - get isValid() { - return this.invalid === null; - } - /** - * Returns an error code if this DateTime is invalid, or null if the DateTime is valid - * @type {string} - */ - - - get invalidReason() { - return this.invalid ? this.invalid.reason : null; - } - /** - * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid - * @type {string} - */ - - - get invalidExplanation() { - return this.invalid ? this.invalid.explanation : null; - } - /** - * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime - * - * @type {string} - */ - - - get locale() { - return this.isValid ? this.loc.locale : null; - } - /** - * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime - * - * @type {string} - */ - - - get numberingSystem() { - return this.isValid ? this.loc.numberingSystem : null; - } - /** - * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime - * - * @type {string} - */ - - - get outputCalendar() { - return this.isValid ? this.loc.outputCalendar : null; - } - /** - * Get the time zone associated with this DateTime. - * @type {Zone} - */ - - - get zone() { - return this._zone; - } - /** - * Get the name of the time zone. - * @type {string} - */ - - - get zoneName() { - return this.isValid ? this.zone.name : null; - } - /** - * Get the year - * @example DateTime.local(2017, 5, 25).year //=> 2017 - * @type {number} - */ - - - get year() { - return this.isValid ? this.c.year : NaN; - } - /** - * Get the quarter - * @example DateTime.local(2017, 5, 25).quarter //=> 2 - * @type {number} - */ - - - get quarter() { - return this.isValid ? Math.ceil(this.c.month / 3) : NaN; - } - /** - * Get the month (1-12). - * @example DateTime.local(2017, 5, 25).month //=> 5 - * @type {number} - */ - - - get month() { - return this.isValid ? this.c.month : NaN; - } - /** - * Get the day of the month (1-30ish). - * @example DateTime.local(2017, 5, 25).day //=> 25 - * @type {number} - */ - - - get day() { - return this.isValid ? this.c.day : NaN; - } - /** - * Get the hour of the day (0-23). - * @example DateTime.local(2017, 5, 25, 9).hour //=> 9 - * @type {number} - */ - - - get hour() { - return this.isValid ? this.c.hour : NaN; - } - /** - * Get the minute of the hour (0-59). - * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30 - * @type {number} - */ - - - get minute() { - return this.isValid ? this.c.minute : NaN; - } - /** - * Get the second of the minute (0-59). - * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52 - * @type {number} - */ - - - get second() { - return this.isValid ? this.c.second : NaN; - } - /** - * Get the millisecond of the second (0-999). - * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654 - * @type {number} - */ - - - get millisecond() { - return this.isValid ? this.c.millisecond : NaN; - } - /** - * Get the week year - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2014, 11, 31).weekYear //=> 2015 - * @type {number} - */ - - - get weekYear() { - return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN; - } - /** - * Get the week number of the week year (1-52ish). - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2017, 5, 25).weekNumber //=> 21 - * @type {number} - */ - - - get weekNumber() { - return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN; - } - /** - * Get the day of the week. - * 1 is Monday and 7 is Sunday - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2014, 11, 31).weekday //=> 4 - * @type {number} - */ - - - get weekday() { - return this.isValid ? possiblyCachedWeekData(this).weekday : NaN; - } - /** - * Get the ordinal (meaning the day of the year) - * @example DateTime.local(2017, 5, 25).ordinal //=> 145 - * @type {number|DateTime} - */ - - - get ordinal() { - return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN; - } - /** - * Get the human readable short month name, such as 'Oct'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).monthShort //=> Oct - * @type {string} - */ - - - get monthShort() { - return this.isValid ? Info.months("short", { - locale: this.locale - })[this.month - 1] : null; - } - /** - * Get the human readable long month name, such as 'October'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).monthLong //=> October - * @type {string} - */ - - - get monthLong() { - return this.isValid ? Info.months("long", { - locale: this.locale - })[this.month - 1] : null; - } - /** - * Get the human readable short weekday, such as 'Mon'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon - * @type {string} - */ - - - get weekdayShort() { - return this.isValid ? Info.weekdays("short", { - locale: this.locale - })[this.weekday - 1] : null; - } - /** - * Get the human readable long weekday, such as 'Monday'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday - * @type {string} - */ - - - get weekdayLong() { - return this.isValid ? Info.weekdays("long", { - locale: this.locale - })[this.weekday - 1] : null; - } - /** - * Get the UTC offset of this DateTime in minutes - * @example DateTime.local().offset //=> -240 - * @example DateTime.utc().offset //=> 0 - * @type {number} - */ - - - get offset() { - return this.isValid ? +this.o : NaN; - } - /** - * Get the short human name for the zone's current offset, for example "EST" or "EDT". - * Defaults to the system's locale if no locale has been specified - * @type {string} - */ - - - get offsetNameShort() { - if (this.isValid) { - return this.zone.offsetName(this.ts, { - format: "short", - locale: this.locale - }); - } else { - return null; - } - } - /** - * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time". - * Defaults to the system's locale if no locale has been specified - * @type {string} - */ - - - get offsetNameLong() { - if (this.isValid) { - return this.zone.offsetName(this.ts, { - format: "long", - locale: this.locale - }); - } else { - return null; - } - } - /** - * Get whether this zone's offset ever changes, as in a DST. - * @type {boolean} - */ - - - get isOffsetFixed() { - return this.isValid ? this.zone.universal : null; - } - /** - * Get whether the DateTime is in a DST. - * @type {boolean} - */ - - - get isInDST() { - if (this.isOffsetFixed) { - return false; - } else { - return this.offset > this.set({ - month: 1 - }).offset || this.offset > this.set({ - month: 5 - }).offset; - } - } - /** - * Returns true if this DateTime is in a leap year, false otherwise - * @example DateTime.local(2016).isInLeapYear //=> true - * @example DateTime.local(2013).isInLeapYear //=> false - * @type {boolean} - */ - - - get isInLeapYear() { - return isLeapYear(this.year); - } - /** - * Returns the number of days in this DateTime's month - * @example DateTime.local(2016, 2).daysInMonth //=> 29 - * @example DateTime.local(2016, 3).daysInMonth //=> 31 - * @type {number} - */ - - - get daysInMonth() { - return daysInMonth(this.year, this.month); - } - /** - * Returns the number of days in this DateTime's year - * @example DateTime.local(2016).daysInYear //=> 366 - * @example DateTime.local(2013).daysInYear //=> 365 - * @type {number} - */ - - - get daysInYear() { - return this.isValid ? daysInYear(this.year) : NaN; - } - /** - * Returns the number of weeks in this DateTime's year - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2004).weeksInWeekYear //=> 53 - * @example DateTime.local(2013).weeksInWeekYear //=> 52 - * @type {number} - */ - - - get weeksInWeekYear() { - return this.isValid ? weeksInWeekYear(this.weekYear) : NaN; - } - /** - * Returns the resolved Intl options for this DateTime. - * This is useful in understanding the behavior of formatting methods - * @param {Object} opts - the same options as toLocaleString - * @return {Object} - */ - - - resolvedLocaleOpts(opts = {}) { - const { - locale, - numberingSystem, - calendar - } = Formatter.create(this.loc.clone(opts), opts).resolvedOptions(this); - return { - locale, - numberingSystem, - outputCalendar: calendar - }; - } // TRANSFORM - - /** - * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime. - * - * Equivalent to {@link setZone}('utc') - * @param {number} [offset=0] - optionally, an offset from UTC in minutes - * @param {Object} [opts={}] - options to pass to `setZone()` - * @return {DateTime} - */ - - - toUTC(offset = 0, opts = {}) { - return this.setZone(FixedOffsetZone.instance(offset), opts); - } - /** - * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime. - * - * Equivalent to `setZone('local')` - * @return {DateTime} - */ - - - toLocal() { - return this.setZone(Settings.defaultZone); - } - /** - * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime. - * - * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link plus}. You may wish to use {@link toLocal} and {@link toUTC} which provide simple convenience wrappers for commonly used zones. - * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link Zone} class. - * @param {Object} opts - options - * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this. - * @return {DateTime} - */ - - - setZone(zone, { - keepLocalTime = false, - keepCalendarTime = false - } = {}) { - zone = normalizeZone(zone, Settings.defaultZone); - - if (zone.equals(this.zone)) { - return this; - } else if (!zone.isValid) { - return DateTime.invalid(unsupportedZone(zone)); - } else { - let newTS = this.ts; - - if (keepLocalTime || keepCalendarTime) { - const offsetGuess = zone.offset(this.ts); - const asObj = this.toObject(); - [newTS] = objToTS(asObj, offsetGuess, zone); - } - - return clone$1(this, { - ts: newTS, - zone - }); - } - } - /** - * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime. - * @param {Object} properties - the properties to set - * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' }) - * @return {DateTime} - */ - - - reconfigure({ - locale, - numberingSystem, - outputCalendar - } = {}) { - const loc = this.loc.clone({ - locale, - numberingSystem, - outputCalendar - }); - return clone$1(this, { - loc - }); - } - /** - * "Set" the locale. Returns a newly-constructed DateTime. - * Just a convenient alias for reconfigure({ locale }) - * @example DateTime.local(2017, 5, 25).setLocale('en-GB') - * @return {DateTime} - */ - - - setLocale(locale) { - return this.reconfigure({ - locale - }); - } - /** - * "Set" the values of specified units. Returns a newly-constructed DateTime. - * You can only set units with this method; for "setting" metadata, see {@link reconfigure} and {@link setZone}. - * @param {Object} values - a mapping of units to numbers - * @example dt.set({ year: 2017 }) - * @example dt.set({ hour: 8, minute: 30 }) - * @example dt.set({ weekday: 5 }) - * @example dt.set({ year: 2005, ordinal: 234 }) - * @return {DateTime} - */ - - - set(values) { - if (!this.isValid) return this; - const normalized = normalizeObject(values, normalizeUnit, []), - settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday); - let mixed; - - if (settingWeekStuff) { - mixed = weekToGregorian(Object.assign(gregorianToWeek(this.c), normalized)); - } else if (!isUndefined(normalized.ordinal)) { - mixed = ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c), normalized)); - } else { - mixed = Object.assign(this.toObject(), normalized); // if we didn't set the day but we ended up on an overflow date, - // use the last day of the right month - - if (isUndefined(normalized.day)) { - mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day); - } - } - - const [ts, o] = objToTS(mixed, this.o, this.zone); - return clone$1(this, { - ts, - o - }); - } - /** - * Add a period of time to this DateTime and return the resulting DateTime - * - * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between. - * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @example DateTime.local().plus(123) //~> in 123 milliseconds - * @example DateTime.local().plus({ minutes: 15 }) //~> in 15 minutes - * @example DateTime.local().plus({ days: 1 }) //~> this time tomorrow - * @example DateTime.local().plus({ days: -1 }) //~> this time yesterday - * @example DateTime.local().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min - * @example DateTime.local().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min - * @return {DateTime} - */ - - - plus(duration) { - if (!this.isValid) return this; - const dur = friendlyDuration(duration); - return clone$1(this, adjustTime(this, dur)); - } - /** - * Subtract a period of time to this DateTime and return the resulting DateTime - * See {@link plus} - * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - @return {DateTime} - */ - - - minus(duration) { - if (!this.isValid) return this; - const dur = friendlyDuration(duration).negate(); - return clone$1(this, adjustTime(this, dur)); - } - /** - * "Set" this DateTime to the beginning of a unit of time. - * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. - * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01' - * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01' - * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00' - * @return {DateTime} - */ - - - startOf(unit) { - if (!this.isValid) return this; - const o = {}, - normalizedUnit = Duration.normalizeUnit(unit); - - switch (normalizedUnit) { - case "years": - o.month = 1; - // falls through - - case "quarters": - case "months": - o.day = 1; - // falls through - - case "weeks": - case "days": - o.hour = 0; - // falls through - - case "hours": - o.minute = 0; - // falls through - - case "minutes": - o.second = 0; - // falls through - - case "seconds": - o.millisecond = 0; - break; - // no default, invalid units throw in normalizeUnit() - } - - if (normalizedUnit === "weeks") { - o.weekday = 1; - } - - if (normalizedUnit === "quarters") { - const q = Math.ceil(this.month / 3); - o.month = (q - 1) * 3 + 1; - } - - return this.set(o); - } - /** - * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time - * @param {string} unit - The unit to go to the end of. Can be 'year', 'month', 'day', 'hour', 'minute', 'second', or 'millisecond'. - * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00' - * @return {DateTime} - */ - - - endOf(unit) { - return this.isValid ? this.plus({ - [unit]: 1 - }).startOf(unit).minus(1) : this; - } // OUTPUT - - /** - * Returns a string representation of this DateTime formatted according to the specified format string. - * **You may not want this.** See {@link toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens). - * Defaults to en-US if no locale has been specified, regardless of the system's locale. - * @see https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens - * @param {string} fmt - the format string - * @param {Object} opts - opts to override the configuration options - * @example DateTime.local().toFormat('yyyy LLL dd') //=> '2017 Apr 22' - * @example DateTime.local().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22' - * @example DateTime.local().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22' - * @example DateTime.local().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes' - * @return {string} - */ - - - toFormat(fmt, opts = {}) { - return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID$2; - } - /** - * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`. - * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation - * of the DateTime in the assigned locale. - * Defaults to the system's locale if no locale has been specified - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param opts {Object} - Intl.DateTimeFormat constructor options and configuration options - * @example DateTime.local().toLocaleString(); //=> 4/20/2017 - * @example DateTime.local().setLocale('en-gb').toLocaleString(); //=> '20/04/2017' - * @example DateTime.local().toLocaleString({ locale: 'en-gb' }); //=> '20/04/2017' - * @example DateTime.local().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017' - * @example DateTime.local().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM' - * @example DateTime.local().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM' - * @example DateTime.local().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20' - * @example DateTime.local().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM' - * @example DateTime.local().toLocaleString({ hour: '2-digit', minute: '2-digit', hour12: false }); //=> '11:32' - * @return {string} - */ - - - toLocaleString(opts = DATE_SHORT) { - return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTime(this) : INVALID$2; - } - /** - * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output. - * Defaults to the system's locale if no locale has been specified - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts - * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`. - * @example DateTime.local().toLocaleParts(); //=> [ - * //=> { type: 'day', value: '25' }, - * //=> { type: 'literal', value: '/' }, - * //=> { type: 'month', value: '05' }, - * //=> { type: 'literal', value: '/' }, - * //=> { type: 'year', value: '1982' } - * //=> ] - */ - - - toLocaleParts(opts = {}) { - return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : []; - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc(1982, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z' - * @example DateTime.local().toISO() //=> '2017-04-22T20:47:05.335-04:00' - * @example DateTime.local().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335' - * @example DateTime.local().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400' - * @return {string} - */ - - - toISO(opts = {}) { - if (!this.isValid) { - return null; - } - - return `${this.toISODate(opts)}T${this.toISOTime(opts)}`; - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's date component - * @param {Object} opts - options - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25' - * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525' - * @return {string} - */ - - - toISODate({ - format = "extended" - } = {}) { - let fmt = format === "basic" ? "yyyyMMdd" : "yyyy-MM-dd"; - - if (this.year > 9999) { - fmt = "+" + fmt; - } - - return toTechFormat(this, fmt); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's week date - * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2' - * @return {string} - */ - - - toISOWeekDate() { - return toTechFormat(this, "kkkk-'W'WW-c"); - } - /** - * Returns an ISO 8601-compliant string representation of this DateTime's time component - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z' - * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z' - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z' - * @return {string} - */ - - - toISOTime({ - suppressMilliseconds = false, - suppressSeconds = false, - includeOffset = true, - format = "extended" - } = {}) { - return toTechTimeFormat(this, { - suppressSeconds, - suppressMilliseconds, - includeOffset, - format - }); - } - /** - * Returns an RFC 2822-compatible string representation of this DateTime, always in UTC - * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000' - * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400' - * @return {string} - */ - - - toRFC2822() { - return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false); - } - /** - * Returns a string representation of this DateTime appropriate for use in HTTP headers. - * Specifically, the string conforms to RFC 1123. - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 - * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT' - * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT' - * @return {string} - */ - - - toHTTP() { - return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL Date - * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13' - * @return {string} - */ - - - toSQLDate() { - return toTechFormat(this, "yyyy-MM-dd"); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL Time - * @param {Object} opts - options - * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @example DateTime.utc().toSQL() //=> '05:15:16.345' - * @example DateTime.local().toSQL() //=> '05:15:16.345 -04:00' - * @example DateTime.local().toSQL({ includeOffset: false }) //=> '05:15:16.345' - * @example DateTime.local().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York' - * @return {string} - */ - - - toSQLTime({ - includeOffset = true, - includeZone = false - } = {}) { - return toTechTimeFormat(this, { - includeOffset, - includeZone, - spaceZone: true - }); - } - /** - * Returns a string representation of this DateTime appropriate for use in SQL DateTime - * @param {Object} opts - options - * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z' - * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00' - * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000' - * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York' - * @return {string} - */ - - - toSQL(opts = {}) { - if (!this.isValid) { - return null; - } - - return `${this.toSQLDate()} ${this.toSQLTime(opts)}`; - } - /** - * Returns a string representation of this DateTime appropriate for debugging - * @return {string} - */ - - - toString() { - return this.isValid ? this.toISO() : INVALID$2; - } - /** - * Returns the epoch milliseconds of this DateTime. Alias of {@link toMillis} - * @return {number} - */ - - - valueOf() { - return this.toMillis(); - } - /** - * Returns the epoch milliseconds of this DateTime. - * @return {number} - */ - - - toMillis() { - return this.isValid ? this.ts : NaN; - } - /** - * Returns the epoch seconds of this DateTime. - * @return {number} - */ - - - toSeconds() { - return this.isValid ? this.ts / 1000 : NaN; - } - /** - * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON. - * @return {string} - */ - - - toJSON() { - return this.toISO(); - } - /** - * Returns a BSON serializable equivalent to this DateTime. - * @return {Date} - */ - - - toBSON() { - return this.toJSDate(); - } - /** - * Returns a Javascript object with this DateTime's year, month, day, and so on. - * @param opts - options for generating the object - * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output - * @example DateTime.local().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 } - * @return {Object} - */ - - - toObject(opts = {}) { - if (!this.isValid) return {}; - const base = Object.assign({}, this.c); - - if (opts.includeConfig) { - base.outputCalendar = this.outputCalendar; - base.numberingSystem = this.loc.numberingSystem; - base.locale = this.loc.locale; - } - - return base; - } - /** - * Returns a Javascript Date equivalent to this DateTime. - * @return {Date} - */ - - - toJSDate() { - return new Date(this.isValid ? this.ts : NaN); - } // COMPARE - - /** - * Return the difference between two DateTimes as a Duration. - * @param {DateTime} otherDateTime - the DateTime to compare this one to - * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration. - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @example - * var i1 = DateTime.fromISO('1982-05-25T09:45'), - * i2 = DateTime.fromISO('1983-10-14T10:30'); - * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 } - * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 } - * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 } - * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 } - * @return {Duration} - */ - - - diff(otherDateTime, unit = "milliseconds", opts = {}) { - if (!this.isValid || !otherDateTime.isValid) { - return Duration.invalid(this.invalid || otherDateTime.invalid, "created by diffing an invalid DateTime"); - } - - const durOpts = Object.assign({ - locale: this.locale, - numberingSystem: this.numberingSystem - }, opts); - const units = maybeArray(unit).map(Duration.normalizeUnit), - otherIsLater = otherDateTime.valueOf() > this.valueOf(), - earlier = otherIsLater ? this : otherDateTime, - later = otherIsLater ? otherDateTime : this, - diffed = diff(earlier, later, units, durOpts); - return otherIsLater ? diffed.negate() : diffed; - } - /** - * Return the difference between this DateTime and right now. - * See {@link diff} - * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - - - diffNow(unit = "milliseconds", opts = {}) { - return this.diff(DateTime.local(), unit, opts); - } - /** - * Return an Interval spanning between this DateTime and another DateTime - * @param {DateTime} otherDateTime - the other end point of the Interval - * @return {Interval} - */ - - - until(otherDateTime) { - return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this; - } - /** - * Return whether this DateTime is in the same unit of time as another DateTime - * @param {DateTime} otherDateTime - the other DateTime - * @param {string} unit - the unit of time to check sameness on - * @example DateTime.local().hasSame(otherDT, 'day'); //~> true if both the same calendar day - * @return {boolean} - */ - - - hasSame(otherDateTime, unit) { - if (!this.isValid) return false; - - if (unit === "millisecond") { - return this.valueOf() === otherDateTime.valueOf(); - } else { - const inputMs = otherDateTime.valueOf(); - return this.startOf(unit) <= inputMs && inputMs <= this.endOf(unit); - } - } - /** - * Equality check - * Two DateTimes are equal iff they represent the same millisecond, have the same zone and location, and are both valid. - * To compare just the millisecond values, use `+dt1 === +dt2`. - * @param {DateTime} other - the other DateTime - * @return {boolean} - */ - - - equals(other) { - return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc); - } - /** - * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your - * platform supports Intl.RelativeTimeFormat. Rounds down by default. - * @param {Object} options - options that affect the output - * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now. - * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow" - * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds" - * @param {boolean} [options.round=true] - whether to round the numbers in the output. - * @param {boolean} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding. - * @param {string} options.locale - override the locale of this DateTime - * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this - * @example DateTime.local().plus({ days: 1 }).toRelative() //=> "in 1 day" - * @example DateTime.local().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día" - * @example DateTime.local().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures" - * @example DateTime.local().minus({ days: 2 }).toRelative() //=> "2 days ago" - * @example DateTime.local().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago" - * @example DateTime.local().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago" - */ - - - toRelative(options = {}) { - if (!this.isValid) return null; - const base = options.base || DateTime.fromObject({ - zone: this.zone - }), - padding = options.padding ? this < base ? -options.padding : options.padding : 0; - return diffRelative(base, this.plus(padding), Object.assign(options, { - numeric: "always", - units: ["years", "months", "days", "hours", "minutes", "seconds"] - })); - } - /** - * Returns a string representation of this date relative to today, such as "yesterday" or "next month". - * Only internationalizes on platforms that supports Intl.RelativeTimeFormat. - * @param {Object} options - options that affect the output - * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now. - * @param {string} options.locale - override the locale of this DateTime - * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days" - * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this - * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow" - * @example DateTime.local().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana" - * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain" - * @example DateTime.local().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago" - */ - - - toRelativeCalendar(options = {}) { - if (!this.isValid) return null; - return diffRelative(options.base || DateTime.fromObject({ - zone: this.zone - }), this, Object.assign(options, { - numeric: "auto", - units: ["years", "months", "days"], - calendary: true - })); - } - /** - * Return the min of several date times - * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum - * @return {DateTime} the min DateTime, or undefined if called with no argument - */ - - - static min(...dateTimes) { - if (!dateTimes.every(DateTime.isDateTime)) { - throw new InvalidArgumentError("min requires all arguments be DateTimes"); - } - - return bestBy(dateTimes, i => i.valueOf(), Math.min); - } - /** - * Return the max of several date times - * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum - * @return {DateTime} the max DateTime, or undefined if called with no argument - */ - - - static max(...dateTimes) { - if (!dateTimes.every(DateTime.isDateTime)) { - throw new InvalidArgumentError("max requires all arguments be DateTimes"); - } - - return bestBy(dateTimes, i => i.valueOf(), Math.max); - } // MISC - - /** - * Explain how a string would be parsed by fromFormat() - * @param {string} text - the string to parse - * @param {string} fmt - the format the string is expected to be in (see description) - * @param {Object} options - options taken by fromFormat() - * @return {Object} - */ - - - static fromFormatExplain(text, fmt, options = {}) { - const { - locale = null, - numberingSystem = null - } = options, - localeToUse = Locale.fromOpts({ - locale, - numberingSystem, - defaultToEN: true - }); - return explainFromTokens(localeToUse, text, fmt); - } - /** - * @deprecated use fromFormatExplain instead - */ - - - static fromStringExplain(text, fmt, options = {}) { - return DateTime.fromFormatExplain(text, fmt, options); - } // FORMAT PRESETS - - /** - * {@link toLocaleString} format like 10/14/1983 - * @type {Object} - */ - - - static get DATE_SHORT() { - return DATE_SHORT; - } - /** - * {@link toLocaleString} format like 'Oct 14, 1983' - * @type {Object} - */ - - - static get DATE_MED() { - return DATE_MED; - } - /** - * {@link toLocaleString} format like 'Fri, Oct 14, 1983' - * @type {Object} - */ - - - static get DATE_MED_WITH_WEEKDAY() { - return DATE_MED_WITH_WEEKDAY; - } - /** - * {@link toLocaleString} format like 'October 14, 1983' - * @type {Object} - */ - - - static get DATE_FULL() { - return DATE_FULL; - } - /** - * {@link toLocaleString} format like 'Tuesday, October 14, 1983' - * @type {Object} - */ - - - static get DATE_HUGE() { - return DATE_HUGE; - } - /** - * {@link toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get TIME_SIMPLE() { - return TIME_SIMPLE; - } - /** - * {@link toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get TIME_WITH_SECONDS() { - return TIME_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get TIME_WITH_SHORT_OFFSET() { - return TIME_WITH_SHORT_OFFSET; - } - /** - * {@link toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get TIME_WITH_LONG_OFFSET() { - return TIME_WITH_LONG_OFFSET; - } - /** - * {@link toLocaleString} format like '09:30', always 24-hour. - * @type {Object} - */ - - - static get TIME_24_SIMPLE() { - return TIME_24_SIMPLE; - } - /** - * {@link toLocaleString} format like '09:30:23', always 24-hour. - * @type {Object} - */ - - - static get TIME_24_WITH_SECONDS() { - return TIME_24_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like '09:30:23 EDT', always 24-hour. - * @type {Object} - */ - - - static get TIME_24_WITH_SHORT_OFFSET() { - return TIME_24_WITH_SHORT_OFFSET; - } - /** - * {@link toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour. - * @type {Object} - */ - - - static get TIME_24_WITH_LONG_OFFSET() { - return TIME_24_WITH_LONG_OFFSET; - } - /** - * {@link toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get DATETIME_SHORT() { - return DATETIME_SHORT; - } - /** - * {@link toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get DATETIME_SHORT_WITH_SECONDS() { - return DATETIME_SHORT_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get DATETIME_MED() { - return DATETIME_MED; - } - /** - * {@link toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get DATETIME_MED_WITH_SECONDS() { - return DATETIME_MED_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get DATETIME_MED_WITH_WEEKDAY() { - return DATETIME_MED_WITH_WEEKDAY; - } - /** - * {@link toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get DATETIME_FULL() { - return DATETIME_FULL; - } - /** - * {@link toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get DATETIME_FULL_WITH_SECONDS() { - return DATETIME_FULL_WITH_SECONDS; - } - /** - * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get DATETIME_HUGE() { - return DATETIME_HUGE; - } - /** - * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - - - static get DATETIME_HUGE_WITH_SECONDS() { - return DATETIME_HUGE_WITH_SECONDS; - } - -} -/** - * @private - */ - -function friendlyDateTime(dateTimeish) { - if (DateTime.isDateTime(dateTimeish)) { - return dateTimeish; - } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) { - return DateTime.fromJSDate(dateTimeish); - } else if (dateTimeish && typeof dateTimeish === "object") { - return DateTime.fromObject(dateTimeish); - } else { - throw new InvalidArgumentError(`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`); - } -} - -exports.DateTime = DateTime; -exports.Duration = Duration; -exports.FixedOffsetZone = FixedOffsetZone; -exports.IANAZone = IANAZone; -exports.Info = Info; -exports.Interval = Interval; -exports.InvalidZone = InvalidZone; -exports.LocalZone = LocalZone; -exports.Settings = Settings; -exports.Zone = Zone; -//# sourceMappingURL=luxon.js.map diff --git a/node_modules/luxon/build/node/luxon.js.map b/node_modules/luxon/build/node/luxon.js.map deleted file mode 100644 index ed15c1e..0000000 --- a/node_modules/luxon/build/node/luxon.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"luxon.js","sources":["../../src/errors.js","../../src/impl/formats.js","../../src/impl/util.js","../../src/impl/english.js","../../src/impl/formatter.js","../../src/impl/invalid.js","../../src/zone.js","../../src/zones/localZone.js","../../src/zones/IANAZone.js","../../src/zones/fixedOffsetZone.js","../../src/zones/invalidZone.js","../../src/impl/zoneUtil.js","../../src/settings.js","../../src/impl/locale.js","../../src/impl/regexParser.js","../../src/duration.js","../../src/interval.js","../../src/info.js","../../src/impl/diff.js","../../src/impl/digits.js","../../src/impl/tokenParser.js","../../src/impl/conversions.js","../../src/datetime.js"],"sourcesContent":["// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nexport class InvalidDateTimeError extends LuxonError {\n constructor(reason) {\n super(`Invalid DateTime: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidIntervalError extends LuxonError {\n constructor(reason) {\n super(`Invalid Interval: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidDurationError extends LuxonError {\n constructor(reason) {\n super(`Invalid Duration: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nexport class InvalidUnitError extends LuxonError {\n constructor(unit) {\n super(`Invalid unit ${unit}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nexport class ZoneIsAbstractError extends LuxonError {\n constructor() {\n super(\"Zone is an abstract class\");\n }\n}\n","/**\n * @private\n */\n\nconst n = \"numeric\",\n s = \"short\",\n l = \"long\";\n\nexport const DATE_SHORT = {\n year: n,\n month: n,\n day: n\n};\n\nexport const DATE_MED = {\n year: n,\n month: s,\n day: n\n};\n\nexport const DATE_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s\n};\n\nexport const DATE_FULL = {\n year: n,\n month: l,\n day: n\n};\n\nexport const DATE_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l\n};\n\nexport const TIME_SIMPLE = {\n hour: n,\n minute: n\n};\n\nexport const TIME_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n\n};\n\nexport const TIME_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s\n};\n\nexport const TIME_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l\n};\n\nexport const TIME_24_SIMPLE = {\n hour: n,\n minute: n,\n hour12: false\n};\n\n/**\n * {@link toLocaleString}; format like '09:30:23', always 24-hour.\n */\nexport const TIME_24_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n hour12: false\n};\n\n/**\n * {@link toLocaleString}; format like '09:30:23 EDT', always 24-hour.\n */\nexport const TIME_24_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hour12: false,\n timeZoneName: s\n};\n\n/**\n * {@link toLocaleString}; format like '09:30:23 Eastern Daylight Time', always 24-hour.\n */\nexport const TIME_24_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hour12: false,\n timeZoneName: l\n};\n\n/**\n * {@link toLocaleString}; format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n */\nexport const DATETIME_SHORT = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n\n};\n\n/**\n * {@link toLocaleString}; format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n */\nexport const DATETIME_SHORT_WITH_SECONDS = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n second: n\n};\n\nexport const DATETIME_MED = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n\n};\n\nexport const DATETIME_MED_WITH_SECONDS = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n second: n\n};\n\nexport const DATETIME_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n hour: n,\n minute: n\n};\n\nexport const DATETIME_FULL = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n timeZoneName: s\n};\n\nexport const DATETIME_FULL_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s\n};\n\nexport const DATETIME_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n timeZoneName: l\n};\n\nexport const DATETIME_HUGE_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l\n};\n","/*\n This is just a junk drawer, containing anything used across multiple classes.\n Because Luxon is small(ish), this should stay small and we won't worry about splitting\n it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\nimport { InvalidArgumentError } from \"../errors.js\";\n\n/**\n * @private\n */\n\n// TYPES\n\nexport function isUndefined(o) {\n return typeof o === \"undefined\";\n}\n\nexport function isNumber(o) {\n return typeof o === \"number\";\n}\n\nexport function isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\n\nexport function isString(o) {\n return typeof o === \"string\";\n}\n\nexport function isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nexport function hasIntl() {\n try {\n return typeof Intl !== \"undefined\" && Intl.DateTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\nexport function hasFormatToParts() {\n return !isUndefined(Intl.DateTimeFormat.prototype.formatToParts);\n}\n\nexport function hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\n// OBJECTS AND ARRAYS\n\nexport function maybeArray(thing) {\n return Array.isArray(thing) ? thing : [thing];\n}\n\nexport function bestBy(arr, by, compare) {\n if (arr.length === 0) {\n return undefined;\n }\n return arr.reduce((best, next) => {\n const pair = [by(next), next];\n if (!best) {\n return pair;\n } else if (compare(best[0], pair[0]) === best[0]) {\n return best;\n } else {\n return pair;\n }\n }, null)[1];\n}\n\nexport function pick(obj, keys) {\n return keys.reduce((a, k) => {\n a[k] = obj[k];\n return a;\n }, {});\n}\n\nexport function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\n// NUMBERS AND STRINGS\n\nexport function integerBetween(thing, bottom, top) {\n return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nexport function floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\n\nexport function padStart(input, n = 2) {\n if (input.toString().length < n) {\n return (\"0\".repeat(n) + input).slice(-n);\n } else {\n return input.toString();\n }\n}\n\nexport function parseInteger(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseInt(string, 10);\n }\n}\n\nexport function parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n return undefined;\n } else {\n const f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\n\nexport function roundTo(number, digits, towardZero = false) {\n const factor = 10 ** digits,\n rounder = towardZero ? Math.trunc : Math.round;\n return rounder(number * factor) / factor;\n}\n\n// DATE BASICS\n\nexport function isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\nexport function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nexport function daysInMonth(year, month) {\n const modMonth = floorMod(month - 1, 12) + 1,\n modYear = year + (month - modMonth) / 12;\n\n if (modMonth === 2) {\n return isLeapYear(modYear) ? 29 : 28;\n } else {\n return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n }\n}\n\n// covert a calendar object to a local timestamp (epoch, but with the offset baked in)\nexport function objToLocalTS(obj) {\n let d = Date.UTC(\n obj.year,\n obj.month - 1,\n obj.day,\n obj.hour,\n obj.minute,\n obj.second,\n obj.millisecond\n );\n\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n return +d;\n}\n\nexport function weeksInWeekYear(weekYear) {\n const p1 =\n (weekYear +\n Math.floor(weekYear / 4) -\n Math.floor(weekYear / 100) +\n Math.floor(weekYear / 400)) %\n 7,\n last = weekYear - 1,\n p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7;\n return p1 === 4 || p2 === 3 ? 53 : 52;\n}\n\nexport function untruncateYear(year) {\n if (year > 99) {\n return year;\n } else return year > 60 ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nexport function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n const date = new Date(ts),\n intlOpts = {\n hour12: false,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\"\n };\n\n if (timeZone) {\n intlOpts.timeZone = timeZone;\n }\n\n const modified = Object.assign({ timeZoneName: offsetFormat }, intlOpts),\n intl = hasIntl();\n\n if (intl && hasFormatToParts()) {\n const parsed = new Intl.DateTimeFormat(locale, modified)\n .formatToParts(date)\n .find(m => m.type.toLowerCase() === \"timezonename\");\n return parsed ? parsed.value : null;\n } else if (intl) {\n // this probably doesn't work for all locales\n const without = new Intl.DateTimeFormat(locale, intlOpts).format(date),\n included = new Intl.DateTimeFormat(locale, modified).format(date),\n diffed = included.substring(without.length),\n trimmed = diffed.replace(/^[, \\u200e]+/, \"\");\n return trimmed;\n } else {\n return null;\n }\n}\n\n// signedOffset('-5', '30') -> -330\nexport function signedOffset(offHourStr, offMinuteStr) {\n let offHour = parseInt(offHourStr, 10);\n\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) {\n offHour = 0;\n }\n\n const offMin = parseInt(offMinuteStr, 10) || 0,\n offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nexport function asNumber(value) {\n const numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || Number.isNaN(numericValue))\n throw new InvalidArgumentError(`Invalid unit value ${value}`);\n return numericValue;\n}\n\nexport function normalizeObject(obj, normalizer, nonUnitKeys) {\n const normalized = {};\n for (const u in obj) {\n if (hasOwnProperty(obj, u)) {\n if (nonUnitKeys.indexOf(u) >= 0) continue;\n const v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = asNumber(v);\n }\n }\n return normalized;\n}\n\nexport function formatOffset(offset, format) {\n const hours = Math.trunc(Math.abs(offset / 60)),\n minutes = Math.trunc(Math.abs(offset % 60)),\n sign = offset >= 0 ? \"+\" : \"-\";\n\n switch (format) {\n case \"short\":\n return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n case \"narrow\":\n return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n case \"techie\":\n return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n default:\n throw new RangeError(`Value format ${format} is out of range for property format`);\n }\n}\n\nexport function timeObject(obj) {\n return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n\nexport const ianaRegex = /[A-Za-z_+-]{1,256}(:?\\/[A-Za-z_+-]{1,256}(\\/[A-Za-z_+-]{1,256})?)?/;\n","import * as Formats from \"./formats.js\";\nimport { pick } from \"./util.js\";\n\nfunction stringify(obj) {\n return JSON.stringify(obj, Object.keys(obj).sort());\n}\n\n/**\n * @private\n */\n\nexport const monthsLong = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n];\n\nexport const monthsShort = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\"\n];\n\nexport const monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\n\nexport function months(length) {\n switch (length) {\n case \"narrow\":\n return monthsNarrow;\n case \"short\":\n return monthsShort;\n case \"long\":\n return monthsLong;\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n case \"2-digit\":\n return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n default:\n return null;\n }\n}\n\nexport const weekdaysLong = [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\"\n];\n\nexport const weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nexport const weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\n\nexport function weekdays(length) {\n switch (length) {\n case \"narrow\":\n return weekdaysNarrow;\n case \"short\":\n return weekdaysShort;\n case \"long\":\n return weekdaysLong;\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n default:\n return null;\n }\n}\n\nexport const meridiems = [\"AM\", \"PM\"];\n\nexport const erasLong = [\"Before Christ\", \"Anno Domini\"];\n\nexport const erasShort = [\"BC\", \"AD\"];\n\nexport const erasNarrow = [\"B\", \"A\"];\n\nexport function eras(length) {\n switch (length) {\n case \"narrow\":\n return erasNarrow;\n case \"short\":\n return erasShort;\n case \"long\":\n return erasLong;\n default:\n return null;\n }\n}\n\nexport function meridiemForDateTime(dt) {\n return meridiems[dt.hour < 12 ? 0 : 1];\n}\n\nexport function weekdayForDateTime(dt, length) {\n return weekdays(length)[dt.weekday - 1];\n}\n\nexport function monthForDateTime(dt, length) {\n return months(length)[dt.month - 1];\n}\n\nexport function eraForDateTime(dt, length) {\n return eras(length)[dt.year < 0 ? 0 : 1];\n}\n\nexport function formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n const units = {\n years: [\"year\", \"yr.\"],\n quarters: [\"quarter\", \"qtr.\"],\n months: [\"month\", \"mo.\"],\n weeks: [\"week\", \"wk.\"],\n days: [\"day\", \"day\", \"days\"],\n hours: [\"hour\", \"hr.\"],\n minutes: [\"minute\", \"min.\"],\n seconds: [\"second\", \"sec.\"]\n };\n\n const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n\n if (numeric === \"auto\" && lastable) {\n const isDay = unit === \"days\";\n switch (count) {\n case 1:\n return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n case -1:\n return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n case 0:\n return isDay ? \"today\" : `this ${units[unit][0]}`;\n default: // fall through\n }\n }\n\n const isInPast = Object.is(count, -0) || count < 0,\n fmtValue = Math.abs(count),\n singular = fmtValue === 1,\n lilUnits = units[unit],\n fmtUnit = narrow\n ? singular\n ? lilUnits[1]\n : lilUnits[2] || lilUnits[1]\n : singular\n ? units[unit][0]\n : unit;\n return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nexport function formatString(knownFormat) {\n // these all have the offsets removed because we don't have access to them\n // without all the intl stuff this is backfilling\n const filtered = pick(knownFormat, [\n \"weekday\",\n \"era\",\n \"year\",\n \"month\",\n \"day\",\n \"hour\",\n \"minute\",\n \"second\",\n \"timeZoneName\",\n \"hour12\"\n ]),\n key = stringify(filtered),\n dateTimeHuge = \"EEEE, LLLL d, yyyy, h:mm a\";\n switch (key) {\n case stringify(Formats.DATE_SHORT):\n return \"M/d/yyyy\";\n case stringify(Formats.DATE_MED):\n return \"LLL d, yyyy\";\n case stringify(Formats.DATE_MED_WITH_WEEKDAY):\n return \"EEE, LLL d, yyyy\";\n case stringify(Formats.DATE_FULL):\n return \"LLLL d, yyyy\";\n case stringify(Formats.DATE_HUGE):\n return \"EEEE, LLLL d, yyyy\";\n case stringify(Formats.TIME_SIMPLE):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_SECONDS):\n return \"h:mm:ss a\";\n case stringify(Formats.TIME_WITH_SHORT_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_LONG_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_24_SIMPLE):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_SECONDS):\n return \"HH:mm:ss\";\n case stringify(Formats.TIME_24_WITH_SHORT_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_LONG_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.DATETIME_SHORT):\n return \"M/d/yyyy, h:mm a\";\n case stringify(Formats.DATETIME_MED):\n return \"LLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL):\n return \"LLLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_HUGE):\n return dateTimeHuge;\n case stringify(Formats.DATETIME_SHORT_WITH_SECONDS):\n return \"M/d/yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_SECONDS):\n return \"LLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):\n return \"EEE, d LLL yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL_WITH_SECONDS):\n return \"LLLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_HUGE_WITH_SECONDS):\n return \"EEEE, LLLL d, yyyy, h:mm:ss a\";\n default:\n return dateTimeHuge;\n }\n}\n","import * as English from \"./english.js\";\nimport * as Formats from \"./formats.js\";\nimport { hasFormatToParts, padStart } from \"./util.js\";\n\nfunction stringifyTokens(splits, tokenToString) {\n let s = \"\";\n for (const token of splits) {\n if (token.literal) {\n s += token.val;\n } else {\n s += tokenToString(token.val);\n }\n }\n return s;\n}\n\nconst macroTokenToFormatOpts = {\n D: Formats.DATE_SHORT,\n DD: Formats.DATE_MED,\n DDD: Formats.DATE_FULL,\n DDDD: Formats.DATE_HUGE,\n t: Formats.TIME_SIMPLE,\n tt: Formats.TIME_WITH_SECONDS,\n ttt: Formats.TIME_WITH_SHORT_OFFSET,\n tttt: Formats.TIME_WITH_LONG_OFFSET,\n T: Formats.TIME_24_SIMPLE,\n TT: Formats.TIME_24_WITH_SECONDS,\n TTT: Formats.TIME_24_WITH_SHORT_OFFSET,\n TTTT: Formats.TIME_24_WITH_LONG_OFFSET,\n f: Formats.DATETIME_SHORT,\n ff: Formats.DATETIME_MED,\n fff: Formats.DATETIME_FULL,\n ffff: Formats.DATETIME_HUGE,\n F: Formats.DATETIME_SHORT_WITH_SECONDS,\n FF: Formats.DATETIME_MED_WITH_SECONDS,\n FFF: Formats.DATETIME_FULL_WITH_SECONDS,\n FFFF: Formats.DATETIME_HUGE_WITH_SECONDS\n};\n\n/**\n * @private\n */\n\nexport default class Formatter {\n static create(locale, opts = {}) {\n return new Formatter(locale, opts);\n }\n\n static parseFormat(fmt) {\n let current = null,\n currentFull = \"\",\n bracketed = false;\n const splits = [];\n for (let i = 0; i < fmt.length; i++) {\n const c = fmt.charAt(i);\n if (c === \"'\") {\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed, val: currentFull });\n }\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) {\n currentFull += c;\n } else if (c === current) {\n currentFull += c;\n } else {\n if (currentFull.length > 0) {\n splits.push({ literal: false, val: currentFull });\n }\n currentFull = c;\n current = c;\n }\n }\n\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed, val: currentFull });\n }\n\n return splits;\n }\n\n static macroTokenToFormatOpts(token) {\n return macroTokenToFormatOpts[token];\n }\n\n constructor(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n\n formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) {\n this.systemLoc = this.loc.redefaultToSystem();\n }\n const df = this.systemLoc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.format();\n }\n\n formatDateTime(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.format();\n }\n\n formatDateTimeParts(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.formatToParts();\n }\n\n resolvedOptions(dt, opts = {}) {\n const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));\n return df.resolvedOptions();\n }\n\n num(n, p = 0) {\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) {\n return padStart(n, p);\n }\n\n const opts = Object.assign({}, this.opts);\n\n if (p > 0) {\n opts.padTo = p;\n }\n\n return this.loc.numberFormatter(opts).format(n);\n }\n\n formatDateTimeFromString(dt, fmt) {\n const knownEnglish = this.loc.listingMode() === \"en\",\n useDateTimeFormatter =\n this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\" && hasFormatToParts(),\n string = (opts, extract) => this.loc.extract(dt, opts, extract),\n formatOffset = opts => {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n return \"Z\";\n }\n\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n },\n meridiem = () =>\n knownEnglish\n ? English.meridiemForDateTime(dt)\n : string({ hour: \"numeric\", hour12: true }, \"dayperiod\"),\n month = (length, standalone) =>\n knownEnglish\n ? English.monthForDateTime(dt, length)\n : string(standalone ? { month: length } : { month: length, day: \"numeric\" }, \"month\"),\n weekday = (length, standalone) =>\n knownEnglish\n ? English.weekdayForDateTime(dt, length)\n : string(\n standalone ? { weekday: length } : { weekday: length, month: \"long\", day: \"numeric\" },\n \"weekday\"\n ),\n maybeMacro = token => {\n const formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) {\n return this.formatWithSystemDefault(dt, formatOpts);\n } else {\n return token;\n }\n },\n era = length =>\n knownEnglish ? English.eraForDateTime(dt, length) : string({ era: length }, \"era\"),\n tokenToString = token => {\n // Where possible: http://cldr.unicode.org/translation/date-time#TOC-Stand-Alone-vs.-Format-Styles\n switch (token) {\n // ms\n case \"S\":\n return this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return this.num(dt.second);\n case \"ss\":\n return this.num(dt.second, 2);\n // minutes\n case \"m\":\n return this.num(dt.minute);\n case \"mm\":\n return this.num(dt.minute, 2);\n // hours\n case \"h\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return this.num(dt.hour);\n case \"HH\":\n return this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({ format: \"narrow\", allowZ: this.opts.allowZ });\n case \"ZZ\":\n // like +06:00\n return formatOffset({ format: \"short\", allowZ: this.opts.allowZ });\n case \"ZZZ\":\n // like +0600\n return formatOffset({ format: \"techie\", allowZ: this.opts.allowZ });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, { format: \"short\", locale: this.loc.locale });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, { format: \"long\", locale: this.loc.locale });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({ day: \"numeric\" }, \"day\") : this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({ day: \"2-digit\" }, \"day\") : this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\", day: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter\n ? string({ month: \"2-digit\", day: \"numeric\" }, \"month\")\n : this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter\n ? string({ month: \"2-digit\" }, \"month\")\n : this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({ year: \"numeric\" }, \"year\") : this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter\n ? string({ year: \"2-digit\" }, \"year\")\n : this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return this.num(dt.weekYear, 4);\n case \"W\":\n return this.num(dt.weekNumber);\n case \"WW\":\n return this.num(dt.weekNumber, 2);\n case \"o\":\n return this.num(dt.ordinal);\n case \"ooo\":\n return this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return this.num(dt.quarter);\n case \"qq\":\n // like 01\n return this.num(dt.quarter, 2);\n case \"X\":\n return this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n\n return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n }\n\n formatDurationFromString(dur, fmt) {\n const tokenToField = token => {\n switch (token[0]) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n default:\n return null;\n }\n },\n tokenToString = lildur => token => {\n const mapped = tokenToField(token);\n if (mapped) {\n return this.num(lildur.get(mapped), token.length);\n } else {\n return token;\n }\n },\n tokens = Formatter.parseFormat(fmt),\n realTokens = tokens.reduce(\n (found, { literal, val }) => (literal ? found : found.concat(val)),\n []\n ),\n collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter(t => t));\n return stringifyTokens(tokens, tokenToString(collapsed));\n }\n}\n","export default class Invalid {\n constructor(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n\n toMessage() {\n if (this.explanation) {\n return `${this.reason}: ${this.explanation}`;\n } else {\n return this.reason;\n }\n }\n}\n","/* eslint no-unused-vars: \"off\" */\nimport { ZoneIsAbstractError } from \"./errors.js\";\n\n/**\n * @interface\n */\nexport default class Zone {\n /**\n * The type of zone\n * @abstract\n * @type {string}\n */\n get type() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The name of this zone.\n * @abstract\n * @type {string}\n */\n get name() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year.\n * @abstract\n * @type {boolean}\n */\n get universal() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, opts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */\n get isValid() {\n throw new ZoneIsAbstractError();\n }\n}\n","import { formatOffset, parseZoneInfo, hasIntl } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * Represents the local zone for this Javascript environment.\n * @implements {Zone}\n */\nexport default class LocalZone extends Zone {\n /**\n * Get a singleton instance of the local zone\n * @return {LocalZone}\n */\n static get instance() {\n if (singleton === null) {\n singleton = new LocalZone();\n }\n return singleton;\n }\n\n /** @override **/\n get type() {\n return \"local\";\n }\n\n /** @override **/\n get name() {\n if (hasIntl()) {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n } else return \"local\";\n }\n\n /** @override **/\n get universal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"local\";\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import { formatOffset, parseZoneInfo, isUndefined, ianaRegex, objToLocalTS } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nconst matchingRegex = RegExp(`^${ianaRegex.source}$`);\n\nlet dtfCache = {};\nfunction makeDTF(zone) {\n if (!dtfCache[zone]) {\n dtfCache[zone] = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\"\n });\n }\n return dtfCache[zone];\n}\n\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n hour: 3,\n minute: 4,\n second: 5\n};\n\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n parsed = /(\\d+)\\/(\\d+)\\/(\\d+),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed;\n return [fYear, fMonth, fDay, fHour, fMinute, fSecond];\n}\n\nfunction partsOffset(dtf, date) {\n const formatted = dtf.formatToParts(date),\n filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const { type, value } = formatted[i],\n pos = typeToPos[type];\n\n if (!isUndefined(pos)) {\n filled[pos] = parseInt(value, 10);\n }\n }\n return filled;\n}\n\nlet ianaZoneCache = {};\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nexport default class IANAZone extends Zone {\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */\n static create(name) {\n if (!ianaZoneCache[name]) {\n ianaZoneCache[name] = new IANAZone(name);\n }\n return ianaZoneCache[name];\n }\n\n /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCache() {\n ianaZoneCache = {};\n dtfCache = {};\n }\n\n /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Fantasia/Castle\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidSpecifier(s) {\n return !!(s && s.match(matchingRegex));\n }\n\n /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidZone(zone) {\n try {\n new Intl.DateTimeFormat(\"en-US\", { timeZone: zone }).format();\n return true;\n } catch (e) {\n return false;\n }\n }\n\n // Etc/GMT+8 -> -480\n /** @ignore */\n static parseGMTOffset(specifier) {\n if (specifier) {\n const match = specifier.match(/^Etc\\/GMT([+-]\\d{1,2})$/i);\n if (match) {\n return -60 * parseInt(match[1]);\n }\n }\n return null;\n }\n\n constructor(name) {\n super();\n /** @private **/\n this.zoneName = name;\n /** @private **/\n this.valid = IANAZone.isValidZone(name);\n }\n\n /** @override **/\n get type() {\n return \"iana\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get universal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale, this.name);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n const date = new Date(ts),\n dtf = makeDTF(this.name),\n [year, month, day, hour, minute, second] = dtf.formatToParts\n ? partsOffset(dtf, date)\n : hackyOffset(dtf, date),\n // work around https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n adjustedHour = hour === 24 ? 0 : hour;\n\n const asUTC = objToLocalTS({\n year,\n month,\n day,\n hour: adjustedHour,\n minute,\n second,\n millisecond: 0\n });\n\n let asTS = +date;\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / (60 * 1000);\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n }\n\n /** @override **/\n get isValid() {\n return this.valid;\n }\n}\n","import { formatOffset, signedOffset } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nexport default class FixedOffsetZone extends Zone {\n /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */\n static get utcInstance() {\n if (singleton === null) {\n singleton = new FixedOffsetZone(0);\n }\n return singleton;\n }\n\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */\n static instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n }\n\n /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */\n static parseSpecifier(s) {\n if (s) {\n const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) {\n return new FixedOffsetZone(signedOffset(r[1], r[2]));\n }\n }\n return null;\n }\n\n constructor(offset) {\n super();\n /** @private **/\n this.fixed = offset;\n }\n\n /** @override **/\n get type() {\n return \"fixed\";\n }\n\n /** @override **/\n get name() {\n return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n }\n\n /** @override **/\n offsetName() {\n return this.name;\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.fixed, format);\n }\n\n /** @override **/\n get universal() {\n return true;\n }\n\n /** @override **/\n offset() {\n return this.fixed;\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import Zone from \"../zone.js\";\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nexport default class InvalidZone extends Zone {\n constructor(zoneName) {\n super();\n /** @private */\n this.zoneName = zoneName;\n }\n\n /** @override **/\n get type() {\n return \"invalid\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get universal() {\n return false;\n }\n\n /** @override **/\n offsetName() {\n return null;\n }\n\n /** @override **/\n formatOffset() {\n return \"\";\n }\n\n /** @override **/\n offset() {\n return NaN;\n }\n\n /** @override **/\n equals() {\n return false;\n }\n\n /** @override **/\n get isValid() {\n return false;\n }\n}\n","/**\n * @private\n */\n\nimport Zone from \"../zone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport InvalidZone from \"../zones/invalidZone.js\";\n\nimport { isUndefined, isString, isNumber } from \"./util.js\";\n\nexport function normalizeZone(input, defaultZone) {\n let offset;\n if (isUndefined(input) || input === null) {\n return defaultZone;\n } else if (input instanceof Zone) {\n return input;\n } else if (isString(input)) {\n const lowered = input.toLowerCase();\n if (lowered === \"local\") return defaultZone;\n else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;\n else if ((offset = IANAZone.parseGMTOffset(input)) != null) {\n // handle Etc/GMT-4, which V8 chokes on\n return FixedOffsetZone.instance(offset);\n } else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input);\n else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input);\n } else if (isNumber(input)) {\n return FixedOffsetZone.instance(input);\n } else if (typeof input === \"object\" && input.offset && typeof input.offset === \"number\") {\n // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n } else {\n return new InvalidZone(input);\n }\n}\n","import LocalZone from \"./zones/localZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport Locale from \"./impl/locale.js\";\n\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nlet now = () => Date.now(),\n defaultZone = null, // not setting this directly to LocalZone.instance bc loading order issues\n defaultLocale = null,\n defaultNumberingSystem = null,\n defaultOutputCalendar = null,\n throwOnInvalid = false;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nexport default class Settings {\n /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */\n static get now() {\n return now;\n }\n\n /**\n * Set the callback for returning the current timestamp.\n * The function should return a number, which will be interpreted as an Epoch millisecond count\n * @type {function}\n * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n */\n static set now(n) {\n now = n;\n }\n\n /**\n * Get the default time zone to create DateTimes in.\n * @type {string}\n */\n static get defaultZoneName() {\n return Settings.defaultZone.name;\n }\n\n /**\n * Set the default time zone to create DateTimes in. Does not affect existing instances.\n * @type {string}\n */\n static set defaultZoneName(z) {\n if (!z) {\n defaultZone = null;\n } else {\n defaultZone = normalizeZone(z);\n }\n }\n\n /**\n * Get the default time zone object to create DateTimes in. Does not affect existing instances.\n * @type {Zone}\n */\n static get defaultZone() {\n return defaultZone || LocalZone.instance;\n }\n\n /**\n * Get the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultLocale() {\n return defaultLocale;\n }\n\n /**\n * Set the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultLocale(locale) {\n defaultLocale = locale;\n }\n\n /**\n * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultNumberingSystem() {\n return defaultNumberingSystem;\n }\n\n /**\n * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultNumberingSystem(numberingSystem) {\n defaultNumberingSystem = numberingSystem;\n }\n\n /**\n * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultOutputCalendar() {\n return defaultOutputCalendar;\n }\n\n /**\n * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultOutputCalendar(outputCalendar) {\n defaultOutputCalendar = outputCalendar;\n }\n\n /**\n * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static get throwOnInvalid() {\n return throwOnInvalid;\n }\n\n /**\n * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static set throwOnInvalid(t) {\n throwOnInvalid = t;\n }\n\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCaches() {\n Locale.resetCache();\n IANAZone.resetCache();\n }\n}\n","import { hasFormatToParts, hasIntl, padStart, roundTo, hasRelative } from \"./util.js\";\nimport * as English from \"./english.js\";\nimport Settings from \"../settings.js\";\nimport DateTime from \"../datetime.js\";\nimport Formatter from \"./formatter.js\";\n\nlet intlDTCache = {};\nfunction getCachedDTF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlDTCache[key];\n if (!dtf) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n intlDTCache[key] = dtf;\n }\n return dtf;\n}\n\nlet intlNumCache = {};\nfunction getCachedINF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let inf = intlNumCache[key];\n if (!inf) {\n inf = new Intl.NumberFormat(locString, opts);\n intlNumCache[key] = inf;\n }\n return inf;\n}\n\nlet intlRelCache = {};\nfunction getCachedRTF(locString, opts = {}) {\n const { base, ...cacheKeyOpts } = opts; // exclude `base` from the options\n const key = JSON.stringify([locString, cacheKeyOpts]);\n let inf = intlRelCache[key];\n if (!inf) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n intlRelCache[key] = inf;\n }\n return inf;\n}\n\nlet sysLocaleCache = null;\nfunction systemLocale() {\n if (sysLocaleCache) {\n return sysLocaleCache;\n } else if (hasIntl()) {\n const computedSys = new Intl.DateTimeFormat().resolvedOptions().locale;\n // node sometimes defaults to \"und\". Override that because that is dumb\n sysLocaleCache = !computedSys || computedSys === \"und\" ? \"en-US\" : computedSys;\n return sysLocaleCache;\n } else {\n sysLocaleCache = \"en-US\";\n return sysLocaleCache;\n }\n}\n\nfunction parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n\n const uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) {\n return [localeStr];\n } else {\n let options;\n const smaller = localeStr.substring(0, uIndex);\n try {\n options = getCachedDTF(localeStr).resolvedOptions();\n } catch (e) {\n options = getCachedDTF(smaller).resolvedOptions();\n }\n\n const { numberingSystem, calendar } = options;\n // return the smaller one so that we can append the calendar and numbering overrides to it\n return [smaller, numberingSystem, calendar];\n }\n}\n\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (hasIntl()) {\n if (outputCalendar || numberingSystem) {\n localeStr += \"-u\";\n\n if (outputCalendar) {\n localeStr += `-ca-${outputCalendar}`;\n }\n\n if (numberingSystem) {\n localeStr += `-nu-${numberingSystem}`;\n }\n return localeStr;\n } else {\n return localeStr;\n }\n } else {\n return [];\n }\n}\n\nfunction mapMonths(f) {\n const ms = [];\n for (let i = 1; i <= 12; i++) {\n const dt = DateTime.utc(2016, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction mapWeekdays(f) {\n const ms = [];\n for (let i = 1; i <= 7; i++) {\n const dt = DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction listStuff(loc, length, defaultOK, englishFn, intlFn) {\n const mode = loc.listingMode(defaultOK);\n\n if (mode === \"error\") {\n return null;\n } else if (mode === \"en\") {\n return englishFn(length);\n } else {\n return intlFn(length);\n }\n}\n\nfunction supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n return false;\n } else {\n return (\n loc.numberingSystem === \"latn\" ||\n !loc.locale ||\n loc.locale.startsWith(\"en\") ||\n (hasIntl() && new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === \"latn\")\n );\n }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n constructor(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n\n if (!forceSimple && hasIntl()) {\n const intlOpts = { useGrouping: false };\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = getCachedINF(intl, intlOpts);\n }\n }\n\n format(i) {\n if (this.inf) {\n const fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n return padStart(fixed, this.padTo);\n }\n }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n constructor(dt, intl, opts) {\n this.opts = opts;\n this.hasIntl = hasIntl();\n\n let z;\n if (dt.zone.universal && this.hasIntl) {\n // Chromium doesn't support fixed-offset zones like Etc/GMT+8 in its formatter,\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=364374.\n // So we have to make do. Two cases:\n // 1. The format options tell us to show the zone. We can't do that, so the best\n // we can do is format the date in UTC.\n // 2. The format options don't tell us to show the zone. Then we can adjust them\n // the time and tell the formatter to show it to us in UTC, so that the time is right\n // and the bad zone doesn't show up.\n // We can clean all this up when Chrome fixes this.\n z = \"UTC\";\n if (opts.timeZoneName) {\n this.dt = dt;\n } else {\n this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1000);\n }\n } else if (dt.zone.type === \"local\") {\n this.dt = dt;\n } else {\n this.dt = dt;\n z = dt.zone.name;\n }\n\n if (this.hasIntl) {\n const intlOpts = Object.assign({}, this.opts);\n if (z) {\n intlOpts.timeZone = z;\n }\n this.dtf = getCachedDTF(intl, intlOpts);\n }\n }\n\n format() {\n if (this.hasIntl) {\n return this.dtf.format(this.dt.toJSDate());\n } else {\n const tokenFormat = English.formatString(this.opts),\n loc = Locale.create(\"en-US\");\n return Formatter.create(loc).formatDateTimeFromString(this.dt, tokenFormat);\n }\n }\n\n formatToParts() {\n if (this.hasIntl && hasFormatToParts()) {\n return this.dtf.formatToParts(this.dt.toJSDate());\n } else {\n // This is kind of a cop out. We actually could do this for English. However, we couldn't do it for intl strings\n // and IMO it's too weird to have an uncanny valley like that\n return [];\n }\n }\n\n resolvedOptions() {\n if (this.hasIntl) {\n return this.dtf.resolvedOptions();\n } else {\n return {\n locale: \"en-US\",\n numberingSystem: \"latn\",\n outputCalendar: \"gregory\"\n };\n }\n }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n constructor(intl, isEnglish, opts) {\n this.opts = Object.assign({ style: \"long\" }, opts);\n if (!isEnglish && hasRelative()) {\n this.rtf = getCachedRTF(intl, opts);\n }\n }\n\n format(count, unit) {\n if (this.rtf) {\n return this.rtf.format(count, unit);\n } else {\n return English.formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n }\n }\n\n formatToParts(count, unit) {\n if (this.rtf) {\n return this.rtf.formatToParts(count, unit);\n } else {\n return [];\n }\n }\n}\n\n/**\n * @private\n */\n\nexport default class Locale {\n static fromOpts(opts) {\n return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN);\n }\n\n static create(locale, numberingSystem, outputCalendar, defaultToEN = false) {\n const specifiedLocale = locale || Settings.defaultLocale,\n // the system locale is useful for human readable strings but annoying for parsing/formatting known formats\n localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale()),\n numberingSystemR = numberingSystem || Settings.defaultNumberingSystem,\n outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale);\n }\n\n static resetCache() {\n sysLocaleCache = null;\n intlDTCache = {};\n intlNumCache = {};\n intlRelCache = {};\n }\n\n static fromObject({ locale, numberingSystem, outputCalendar } = {}) {\n return Locale.create(locale, numberingSystem, outputCalendar);\n }\n\n constructor(locale, numbering, outputCalendar, specifiedLocale) {\n const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n\n this.weekdaysCache = { format: {}, standalone: {} };\n this.monthsCache = { format: {}, standalone: {} };\n this.meridiemCache = null;\n this.eraCache = {};\n\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n\n get fastNumbers() {\n if (this.fastNumbersCached == null) {\n this.fastNumbersCached = supportsFastNumbers(this);\n }\n\n return this.fastNumbersCached;\n }\n\n listingMode(defaultOK = true) {\n const intl = hasIntl(),\n hasFTP = intl && hasFormatToParts(),\n isActuallyEn = this.isEnglish(),\n hasNoWeirdness =\n (this.numberingSystem === null || this.numberingSystem === \"latn\") &&\n (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n\n if (!hasFTP && !(isActuallyEn && hasNoWeirdness) && !defaultOK) {\n return \"error\";\n } else if (!hasFTP || (isActuallyEn && hasNoWeirdness)) {\n return \"en\";\n } else {\n return \"intl\";\n }\n }\n\n clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n return this;\n } else {\n return Locale.create(\n alts.locale || this.specifiedLocale,\n alts.numberingSystem || this.numberingSystem,\n alts.outputCalendar || this.outputCalendar,\n alts.defaultToEN || false\n );\n }\n }\n\n redefaultToEN(alts = {}) {\n return this.clone(Object.assign({}, alts, { defaultToEN: true }));\n }\n\n redefaultToSystem(alts = {}) {\n return this.clone(Object.assign({}, alts, { defaultToEN: false }));\n }\n\n months(length, format = false, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.months, () => {\n const intl = format ? { month: length, day: \"numeric\" } : { month: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.monthsCache[formatStr][length]) {\n this.monthsCache[formatStr][length] = mapMonths(dt => this.extract(dt, intl, \"month\"));\n }\n return this.monthsCache[formatStr][length];\n });\n }\n\n weekdays(length, format = false, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.weekdays, () => {\n const intl = format\n ? { weekday: length, year: \"numeric\", month: \"long\", day: \"numeric\" }\n : { weekday: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.weekdaysCache[formatStr][length]) {\n this.weekdaysCache[formatStr][length] = mapWeekdays(dt =>\n this.extract(dt, intl, \"weekday\")\n );\n }\n return this.weekdaysCache[formatStr][length];\n });\n }\n\n meridiems(defaultOK = true) {\n return listStuff(\n this,\n undefined,\n defaultOK,\n () => English.meridiems,\n () => {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!this.meridiemCache) {\n const intl = { hour: \"numeric\", hour12: true };\n this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(\n dt => this.extract(dt, intl, \"dayperiod\")\n );\n }\n\n return this.meridiemCache;\n }\n );\n }\n\n eras(length, defaultOK = true) {\n return listStuff(this, length, defaultOK, English.eras, () => {\n const intl = { era: length };\n\n // This is utter bullshit. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!this.eraCache[length]) {\n this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(dt =>\n this.extract(dt, intl, \"era\")\n );\n }\n\n return this.eraCache[length];\n });\n }\n\n extract(dt, intlOpts, field) {\n const df = this.dtFormatter(dt, intlOpts),\n results = df.formatToParts(),\n matching = results.find(m => m.type.toLowerCase() === field);\n return matching ? matching.value : null;\n }\n\n numberFormatter(opts = {}) {\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n }\n\n dtFormatter(dt, intlOpts = {}) {\n return new PolyDateFormatter(dt, this.intl, intlOpts);\n }\n\n relFormatter(opts = {}) {\n return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n }\n\n isEnglish() {\n return (\n this.locale === \"en\" ||\n this.locale.toLowerCase() === \"en-us\" ||\n (hasIntl() && new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith(\"en-us\"))\n );\n }\n\n equals(other) {\n return (\n this.locale === other.locale &&\n this.numberingSystem === other.numberingSystem &&\n this.outputCalendar === other.outputCalendar\n );\n }\n}\n","import {\n untruncateYear,\n signedOffset,\n parseInteger,\n parseMillis,\n ianaRegex,\n isUndefined\n} from \"./util.js\";\nimport * as English from \"./english.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nfunction combineRegexes(...regexes) {\n const full = regexes.reduce((f, r) => f + r.source, \"\");\n return RegExp(`^${full}$`);\n}\n\nfunction combineExtractors(...extractors) {\n return m =>\n extractors\n .reduce(\n ([mergedVals, mergedZone, cursor], ex) => {\n const [val, zone, next] = ex(m, cursor);\n return [Object.assign(mergedVals, val), mergedZone || zone, next];\n },\n [{}, null, 1]\n )\n .slice(0, 2);\n}\n\nfunction parse(s, ...patterns) {\n if (s == null) {\n return [null, null];\n }\n\n for (const [regex, extractor] of patterns) {\n const m = regex.exec(s);\n if (m) {\n return extractor(m);\n }\n }\n return [null, null];\n}\n\nfunction simpleParse(...keys) {\n return (match, cursor) => {\n const ret = {};\n let i;\n\n for (i = 0; i < keys.length; i++) {\n ret[keys[i]] = parseInteger(match[cursor + i]);\n }\n return [ret, null, cursor + i];\n };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:(Z)|([+-]\\d\\d)(?::?(\\d\\d))?)/,\n isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/,\n isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${offsetRegex.source}?`),\n isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`),\n isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/,\n isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/,\n isoOrdinalRegex = /(\\d{4})-?(\\d{3})/,\n extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\"),\n extractISOOrdinalData = simpleParse(\"year\", \"ordinal\"),\n sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/, // dumbed-down version of the ISO one\n sqlTimeRegex = RegExp(\n `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`\n ),\n sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\n\nfunction int(match, pos, fallback) {\n const m = match[pos];\n return isUndefined(m) ? fallback : parseInteger(m);\n}\n\nfunction extractISOYmd(match, cursor) {\n const item = {\n year: int(match, cursor),\n month: int(match, cursor + 1, 1),\n day: int(match, cursor + 2, 1)\n };\n\n return [item, null, cursor + 3];\n}\n\nfunction extractISOTime(match, cursor) {\n const item = {\n hour: int(match, cursor, 0),\n minute: int(match, cursor + 1, 0),\n second: int(match, cursor + 2, 0),\n millisecond: parseMillis(match[cursor + 3])\n };\n\n return [item, null, cursor + 4];\n}\n\nfunction extractISOOffset(match, cursor) {\n const local = !match[cursor] && !match[cursor + 1],\n fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n zone = local ? null : FixedOffsetZone.instance(fullOffset);\n return [{}, zone, cursor + 3];\n}\n\nfunction extractIANAZone(match, cursor) {\n const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n return [{}, zone, cursor + 1];\n}\n\n// ISO duration parsing\n\nconst isoDuration = /^-?P(?:(?:(-?\\d{1,9})Y)?(?:(-?\\d{1,9})M)?(?:(-?\\d{1,9})W)?(?:(-?\\d{1,9})D)?(?:T(?:(-?\\d{1,9})H)?(?:(-?\\d{1,9})M)?(?:(-?\\d{1,20})(?:[.,](-?\\d{1,9}))?S)?)?)$/;\n\nfunction extractISODuration(match) {\n const [\n s,\n yearStr,\n monthStr,\n weekStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr,\n millisecondsStr\n ] = match;\n\n const hasNegativePrefix = s[0] === \"-\";\n\n const maybeNegate = num => (num && hasNegativePrefix ? -num : num);\n\n return [\n {\n years: maybeNegate(parseInteger(yearStr)),\n months: maybeNegate(parseInteger(monthStr)),\n weeks: maybeNegate(parseInteger(weekStr)),\n days: maybeNegate(parseInteger(dayStr)),\n hours: maybeNegate(parseInteger(hourStr)),\n minutes: maybeNegate(parseInteger(minuteStr)),\n seconds: maybeNegate(parseInteger(secondStr)),\n milliseconds: maybeNegate(parseMillis(millisecondsStr))\n }\n ];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60\n};\n\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n const result = {\n year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n month: English.monthsShort.indexOf(monthStr) + 1,\n day: parseInteger(dayStr),\n hour: parseInteger(hourStr),\n minute: parseInteger(minuteStr)\n };\n\n if (secondStr) result.second = parseInteger(secondStr);\n if (weekdayStr) {\n result.weekday =\n weekdayStr.length > 3\n ? English.weekdaysLong.indexOf(weekdayStr) + 1\n : English.weekdaysShort.indexOf(weekdayStr) + 1;\n }\n\n return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\\d\\d)(\\d\\d)))$/;\n\nfunction extractRFC2822(match) {\n const [\n ,\n weekdayStr,\n dayStr,\n monthStr,\n yearStr,\n hourStr,\n minuteStr,\n secondStr,\n obsOffset,\n milOffset,\n offHourStr,\n offMinuteStr\n ] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n\n let offset;\n if (obsOffset) {\n offset = obsOffsets[obsOffset];\n } else if (milOffset) {\n offset = 0;\n } else {\n offset = signedOffset(offHourStr, offMinuteStr);\n }\n\n return [result, new FixedOffsetZone(offset)];\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^)]*\\)|[\\n\\t]/g, \" \")\n .replace(/(\\s\\s+)/g, \" \")\n .trim();\n}\n\n// http date\n\nconst rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d\\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n rfc850 = /^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\\d\\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) GMT$/,\n ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \\d|\\d\\d) (\\d\\d):(\\d\\d):(\\d\\d) (\\d{4})$/;\n\nfunction extractRFC1123Or850(match) {\n const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nfunction extractASCII(match) {\n const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\n\nconst extractISOYmdTimeAndOffset = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset\n);\nconst extractISOWeekTimeAndOffset = combineExtractors(\n extractISOWeekData,\n extractISOTime,\n extractISOOffset\n);\nconst extractISOOrdinalDataAndTime = combineExtractors(extractISOOrdinalData, extractISOTime);\nconst extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset);\n\n/**\n * @private\n */\n\nexport function parseISODate(s) {\n return parse(\n s,\n [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],\n [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDataAndTime],\n [isoTimeCombinedRegex, extractISOTimeAndOffset]\n );\n}\n\nexport function parseRFC2822Date(s) {\n return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\n\nexport function parseHTTPDate(s) {\n return parse(\n s,\n [rfc1123, extractRFC1123Or850],\n [rfc850, extractRFC1123Or850],\n [ascii, extractASCII]\n );\n}\n\nexport function parseISODuration(s) {\n return parse(s, [isoDuration, extractISODuration]);\n}\n\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\n\nconst extractISOYmdTimeOffsetAndIANAZone = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\nexport function parseSQL(s) {\n return parse(\n s,\n [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeOffsetAndIANAZone],\n [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]\n );\n}\n","import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from \"./errors.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Locale from \"./impl/locale.js\";\nimport { parseISODuration } from \"./impl/regexParser.js\";\nimport {\n asNumber,\n hasOwnProperty,\n isNumber,\n isUndefined,\n normalizeObject,\n roundTo\n} from \"./impl/util.js\";\nimport Settings from \"./settings.js\";\n\nconst INVALID = \"Invalid Duration\";\n\n// unit conversion constants\nconst lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 7 * 24,\n minutes: 7 * 24 * 60,\n seconds: 7 * 24 * 60 * 60,\n milliseconds: 7 * 24 * 60 * 60 * 1000\n },\n days: {\n hours: 24,\n minutes: 24 * 60,\n seconds: 24 * 60 * 60,\n milliseconds: 24 * 60 * 60 * 1000\n },\n hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1000 },\n minutes: { seconds: 60, milliseconds: 60 * 1000 },\n seconds: { milliseconds: 1000 }\n },\n casualMatrix = Object.assign(\n {\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 365 * 24,\n minutes: 365 * 24 * 60,\n seconds: 365 * 24 * 60 * 60,\n milliseconds: 365 * 24 * 60 * 60 * 1000\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 91 * 24,\n minutes: 91 * 24 * 60,\n seconds: 91 * 24 * 60 * 60,\n milliseconds: 91 * 24 * 60 * 60 * 1000\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 30 * 24,\n minutes: 30 * 24 * 60,\n seconds: 30 * 24 * 60 * 60,\n milliseconds: 30 * 24 * 60 * 60 * 1000\n }\n },\n lowOrderMatrix\n ),\n daysInYearAccurate = 146097.0 / 400,\n daysInMonthAccurate = 146097.0 / 4800,\n accurateMatrix = Object.assign(\n {\n years: {\n quarters: 4,\n months: 12,\n weeks: daysInYearAccurate / 7,\n days: daysInYearAccurate,\n hours: daysInYearAccurate * 24,\n minutes: daysInYearAccurate * 24 * 60,\n seconds: daysInYearAccurate * 24 * 60 * 60,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000\n },\n quarters: {\n months: 3,\n weeks: daysInYearAccurate / 28,\n days: daysInYearAccurate / 4,\n hours: (daysInYearAccurate * 24) / 4,\n minutes: (daysInYearAccurate * 24 * 60) / 4,\n seconds: (daysInYearAccurate * 24 * 60 * 60) / 4,\n milliseconds: (daysInYearAccurate * 24 * 60 * 60 * 1000) / 4\n },\n months: {\n weeks: daysInMonthAccurate / 7,\n days: daysInMonthAccurate,\n hours: daysInMonthAccurate * 24,\n minutes: daysInMonthAccurate * 24 * 60,\n seconds: daysInMonthAccurate * 24 * 60 * 60,\n milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000\n }\n },\n lowOrderMatrix\n );\n\n// units ordered by size\nconst orderedUnits = [\n \"years\",\n \"quarters\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\"\n];\n\nconst reverseUnits = orderedUnits.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone(dur, alts, clear = false) {\n // deep merge for vals\n const conf = {\n values: clear ? alts.values : Object.assign({}, dur.values, alts.values || {}),\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy\n };\n return new Duration(conf);\n}\n\nfunction antiTrunc(n) {\n return n < 0 ? Math.floor(n) : Math.ceil(n);\n}\n\n// NB: mutates parameters\nfunction convert(matrix, fromMap, fromUnit, toMap, toUnit) {\n const conv = matrix[toUnit][fromUnit],\n raw = fromMap[fromUnit] / conv,\n sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]),\n // ok, so this is wild, but see the matrix in the tests\n added =\n !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw);\n toMap[toUnit] += added;\n fromMap[fromUnit] -= added * conv;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n reverseUnits.reduce((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n convert(matrix, vals, previous, vals, current);\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime.plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration.years}, {@link Duration.months}, {@link Duration.weeks}, {@link Duration.days}, {@link Duration.hours}, {@link Duration.minutes}, {@link Duration.seconds}, {@link Duration.milliseconds} accessors.\n * * **Configuration** See {@link Duration.locale} and {@link Duration.numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration.plus}, {@link Duration.minus}, {@link Duration.normalize}, {@link Duration.set}, {@link Duration.reconfigure}, {@link Duration.shiftTo}, and {@link Duration.negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration.as}, {@link Duration.toISO}, {@link Duration.toFormat}, and {@link Duration.toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nexport default class Duration {\n /**\n * @private\n */\n constructor(config) {\n const accurate = config.conversionAccuracy === \"longterm\" || false;\n /**\n * @access private\n */\n this.values = config.values;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.matrix = accurate ? accurateMatrix : casualMatrix;\n /**\n * @access private\n */\n this.isLuxonDuration = true;\n }\n\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromMillis(count, opts) {\n return Duration.fromObject(Object.assign({ milliseconds: count }, opts));\n }\n\n /**\n * Create a Duration from a Javascript object with keys like 'years' and 'hours.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {string} [obj.locale='en-US'] - the locale to use\n * @param {string} obj.numberingSystem - the numbering system to use\n * @param {string} [obj.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromObject(obj) {\n if (obj == null || typeof obj !== \"object\") {\n throw new InvalidArgumentError(\n `Duration.fromObject: argument expected to be an object, got ${\n obj === null ? \"null\" : typeof obj\n }`\n );\n }\n return new Duration({\n values: normalizeObject(obj, Duration.normalizeUnit, [\n \"locale\",\n \"numberingSystem\",\n \"conversionAccuracy\",\n \"zone\" // a bit of debt; it's super inconvenient internally not to be able to blindly pass this\n ]),\n loc: Locale.fromObject(obj),\n conversionAccuracy: obj.conversionAccuracy\n });\n }\n\n /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */\n static fromISO(text, opts) {\n const [parsed] = parseISODuration(text);\n if (parsed) {\n const obj = Object.assign(parsed, opts);\n return Duration.fromObject(obj);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDurationError(invalid);\n } else {\n return new Duration({ invalid });\n }\n }\n\n /**\n * @private\n */\n static normalizeUnit(unit) {\n const normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\"\n }[unit ? unit.toLowerCase() : unit];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n }\n\n /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDuration(o) {\n return (o && o.isLuxonDuration) || false;\n }\n\n /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * The duration will be converted to the set of units in the format string using {@link Duration.shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n const fmtOpts = Object.assign({}, opts, {\n floor: opts.round !== false && opts.floor !== false\n });\n return this.isValid\n ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a Javascript object with this Duration's values.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = Object.assign({}, this.values);\n\n if (opts.includeConfig) {\n base.conversionAccuracy = this.conversionAccuracy;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */\n toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n\n let s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)\n s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0)\n // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */\n toString() {\n return this.toISO();\n }\n\n /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */\n valueOf() {\n return this.as(\"milliseconds\");\n }\n\n /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n plus(duration) {\n if (!this.isValid) return this;\n\n const dur = friendlyDuration(duration),\n result = {};\n\n for (const k of orderedUnits) {\n if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n result[k] = dur.get(k) + this.get(k);\n }\n }\n\n return clone(this, { values: result }, true);\n }\n\n /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n minus(duration) {\n if (!this.isValid) return this;\n\n const dur = friendlyDuration(duration);\n return this.plus(dur.negate());\n }\n\n /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit((x, u) => u === \"hour\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */\n mapUnits(fn) {\n if (!this.isValid) return this;\n const result = {};\n for (const k of Object.keys(this.values)) {\n result[k] = asNumber(fn(this.values[k], k));\n }\n return clone(this, { values: result }, true);\n }\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).years //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).months //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).days //=> 3\n * @return {number}\n */\n get(unit) {\n return this[Duration.normalizeUnit(unit)];\n }\n\n /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const mixed = Object.assign(this.values, normalizeObject(values, Duration.normalizeUnit, []));\n return clone(this, { values: mixed });\n }\n\n /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */\n reconfigure({ locale, numberingSystem, conversionAccuracy } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem }),\n opts = { loc };\n\n if (conversionAccuracy) {\n opts.conversionAccuracy = conversionAccuracy;\n }\n\n return clone(this, opts);\n }\n\n /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */\n as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n }\n\n /**\n * Reduce this Duration to its canonical representation in its current units.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @return {Duration}\n */\n normalize() {\n if (!this.isValid) return this;\n const vals = this.toObject();\n normalizeValues(this.matrix, vals);\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */\n shiftTo(...units) {\n if (!this.isValid) return this;\n\n if (units.length === 0) {\n return this;\n }\n\n units = units.map(u => Duration.normalizeUnit(u));\n\n const built = {},\n accumulated = {},\n vals = this.toObject();\n let lastUnit;\n\n for (const k of orderedUnits) {\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n\n let own = 0;\n\n // anything we haven't boiled down yet should get boiled to this unit\n for (const ak in accumulated) {\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n\n // plus anything that's already in this unit\n if (isNumber(vals[k])) {\n own += vals[k];\n }\n\n const i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = own - i; // we'd like to absorb these fractions in another unit\n\n // plus anything further down the chain that should be rolled up in to this\n for (const down in vals) {\n if (orderedUnits.indexOf(down) > orderedUnits.indexOf(k)) {\n convert(this.matrix, vals, down, built, k);\n }\n }\n // otherwise, keep it in the wings to boil it later\n } else if (isNumber(vals[k])) {\n accumulated[k] = vals[k];\n }\n }\n\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for (const key in accumulated) {\n if (accumulated[key] !== 0) {\n built[lastUnit] +=\n key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n }\n }\n\n return clone(this, { values: built }, true).normalize();\n }\n\n /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */\n negate() {\n if (!this.isValid) return this;\n const negated = {};\n for (const k of Object.keys(this.values)) {\n negated[k] = -this.values[k];\n }\n return clone(this, { values: negated }, true);\n }\n\n /**\n * Get the years.\n * @type {number}\n */\n get years() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n\n /**\n * Get the quarters.\n * @type {number}\n */\n get quarters() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n\n /**\n * Get the months.\n * @type {number}\n */\n get months() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n\n /**\n * Get the weeks\n * @type {number}\n */\n get weeks() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n\n /**\n * Get the days.\n * @type {number}\n */\n get days() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n\n /**\n * Get the hours.\n * @type {number}\n */\n get hours() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n\n /**\n * Get the minutes.\n * @type {number}\n */\n get minutes() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n\n /**\n * Get the seconds.\n * @return {number}\n */\n get seconds() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n\n /**\n * Get the milliseconds.\n * @return {number}\n */\n get milliseconds() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n\n /**\n * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n * on invalid DateTimes or Intervals.\n * @return {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this Duration became invalid, or null if the Duration is valid\n * @return {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n if (!this.loc.equals(other.loc)) {\n return false;\n }\n\n for (const u of orderedUnits) {\n if (this.values[u] !== other.values[u]) {\n return false;\n }\n }\n return true;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDuration(durationish) {\n if (isNumber(durationish)) {\n return Duration.fromMillis(durationish);\n } else if (Duration.isDuration(durationish)) {\n return durationish;\n } else if (typeof durationish === \"object\") {\n return Duration.fromObject(durationish);\n } else {\n throw new InvalidArgumentError(\n `Unknown duration argument ${durationish} of type ${typeof durationish}`\n );\n }\n}\n","import DateTime, { friendlyDateTime } from \"./datetime.js\";\nimport Duration, { friendlyDuration } from \"./duration.js\";\nimport Settings from \"./settings.js\";\nimport { InvalidArgumentError, InvalidIntervalError } from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\n \"end before start\",\n `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`\n );\n } else {\n return null;\n }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link fromDateTimes}, {@link after}, {@link before}, or {@link fromISO}.\n * * **Accessors** Use {@link start} and {@link end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link count}, {@link length}, {@link hasSame}, {@link contains}, {@link isAfter}, or {@link isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link set}, {@link splitAt}, {@link splitBy}, {@link divideEqually}, {@link merge}, {@link xor}, {@link union}, {@link intersection}, or {@link difference}.\n * * **Comparison** To compare this Interval to another one, use {@link equals}, {@link overlaps}, {@link abutsStart}, {@link abutsEnd}, {@link engulfs}.\n * * **Output** To convert the Interval into other representations, see {@link toString}, {@link toISO}, {@link toISODate}, {@link toISOTime}, {@link toFormat}, and {@link toDuration}.\n */\nexport default class Interval {\n /**\n * @private\n */\n constructor(config) {\n /**\n * @access private\n */\n this.s = config.start;\n /**\n * @access private\n */\n this.e = config.end;\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.isLuxonInterval = true;\n }\n\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidIntervalError(invalid);\n } else {\n return new Interval({ invalid });\n }\n }\n\n /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */\n static fromDateTimes(start, end) {\n const builtStart = friendlyDateTime(start),\n builtEnd = friendlyDateTime(end);\n\n const validateError = validateStartEnd(builtStart, builtEnd);\n\n if (validateError == null) {\n return new Interval({\n start: builtStart,\n end: builtEnd\n });\n } else {\n return validateError;\n }\n }\n\n /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static after(start, duration) {\n const dur = friendlyDuration(duration),\n dt = friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n }\n\n /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static before(end, duration) {\n const dur = friendlyDuration(duration),\n dt = friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n }\n\n /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `/`, `/`, and `/` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime.fromISO} and optionally {@link Duration.fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */\n static fromISO(text, opts) {\n const [s, e] = (text || \"\").split(\"/\", 2);\n if (s && e) {\n let start, startIsValid;\n try {\n start = DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n\n let end, endIsValid;\n try {\n end = DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n\n if (startIsValid && endIsValid) {\n return Interval.fromDateTimes(start, end);\n }\n\n if (startIsValid) {\n const dur = Duration.fromISO(e, opts);\n if (dur.isValid) {\n return Interval.after(start, dur);\n }\n } else if (endIsValid) {\n const dur = Duration.fromISO(s, opts);\n if (dur.isValid) {\n return Interval.before(end, dur);\n }\n }\n }\n return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n\n /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isInterval(o) {\n return (o && o.isLuxonInterval) || false;\n }\n\n /**\n * Returns the start of the Interval\n * @type {DateTime}\n */\n get start() {\n return this.isValid ? this.s : null;\n }\n\n /**\n * Returns the end of the Interval\n * @type {DateTime}\n */\n get end() {\n return this.isValid ? this.e : null;\n }\n\n /**\n * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n * @type {boolean}\n */\n get isValid() {\n return this.invalidReason === null;\n }\n\n /**\n * Returns an error code if this Interval is invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */\n length(unit = \"milliseconds\") {\n return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n }\n\n /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @return {number}\n */\n count(unit = \"milliseconds\") {\n if (!this.isValid) return NaN;\n const start = this.start.startOf(unit),\n end = this.end.startOf(unit);\n return Math.floor(end.diff(start, unit).get(unit)) + 1;\n }\n\n /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */\n hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n }\n\n /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */\n isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n }\n\n /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n }\n\n /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n }\n\n /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n }\n\n /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */\n set({ start, end } = {}) {\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n }\n\n /**\n * Split this Interval at each of the specified DateTimes\n * @param {...[DateTime]} dateTimes - the unit of time to count.\n * @return {[Interval]}\n */\n splitAt(...dateTimes) {\n if (!this.isValid) return [];\n const sorted = dateTimes\n .map(friendlyDateTime)\n .filter(d => this.contains(d))\n .sort(),\n results = [];\n let { s } = this,\n i = 0;\n\n while (s < this.e) {\n const added = sorted[i] || this.e,\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {[Interval]}\n */\n splitBy(duration) {\n const dur = friendlyDuration(duration);\n\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n return [];\n }\n\n let { s } = this,\n added,\n next;\n\n const results = [];\n while (s < this.e) {\n added = s.plus(dur);\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {[Interval]}\n */\n divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n }\n\n /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */\n overlaps(other) {\n return this.e > other.s && this.s < other.e;\n }\n\n /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n }\n\n /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n }\n\n /**\n * Return whether this Interval engulfs the start and end of the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n }\n\n /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n return this.s.equals(other.s) && this.e.equals(other.e);\n }\n\n /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */\n intersection(other) {\n if (!this.isValid) return this;\n const s = this.s > other.s ? this.s : other.s,\n e = this.e < other.e ? this.e : other.e;\n\n if (s > e) {\n return null;\n } else {\n return Interval.fromDateTimes(s, e);\n }\n }\n\n /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */\n union(other) {\n if (!this.isValid) return this;\n const s = this.s < other.s ? this.s : other.s,\n e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n }\n\n /**\n * Merge an array of Intervals into a equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * @param {[Interval]} intervals\n * @return {[Interval]}\n */\n static merge(intervals) {\n const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(\n ([sofar, current], item) => {\n if (!current) {\n return [sofar, item];\n } else if (current.overlaps(item) || current.abutsStart(item)) {\n return [sofar, current.union(item)];\n } else {\n return [sofar.concat([current]), item];\n }\n },\n [[], null]\n );\n if (final) {\n found.push(final);\n }\n return found;\n }\n\n /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {[Interval]} intervals\n * @return {[Interval]}\n */\n static xor(intervals) {\n let start = null,\n currentCount = 0;\n const results = [],\n ends = intervals.map(i => [{ time: i.s, type: \"s\" }, { time: i.e, type: \"e\" }]),\n flattened = Array.prototype.concat(...ends),\n arr = flattened.sort((a, b) => a.time - b.time);\n\n for (const i of arr) {\n currentCount += i.type === \"s\" ? 1 : -1;\n\n if (currentCount === 1) {\n start = i.time;\n } else {\n if (start && +start !== +i.time) {\n results.push(Interval.fromDateTimes(start, i.time));\n }\n\n start = null;\n }\n }\n\n return Interval.merge(results);\n }\n\n /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {[Interval]}\n */\n difference(...intervals) {\n return Interval.xor([this].concat(intervals))\n .map(i => this.intersection(i))\n .filter(i => i && !i.isEmpty());\n }\n\n /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */\n toString() {\n if (!this.isValid) return INVALID;\n return `[${this.s.toISO()} – ${this.e.toISO()})`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime.toISO}\n * @return {string}\n */\n toISO(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */\n toISODate() {\n if (!this.isValid) return INVALID;\n return `${this.s.toISODate()}/${this.e.toISODate()}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime.toISO}\n * @return {string}\n */\n toISOTime(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this Interval formatted according to the specified format string.\n * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime.toFormat} for details.\n * @param {Object} opts - options\n * @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations\n * @return {string}\n */\n toFormat(dateFormat, { separator = \" – \" } = {}) {\n if (!this.isValid) return INVALID;\n return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n }\n\n /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */\n toDuration(unit, opts) {\n if (!this.isValid) {\n return Duration.invalid(this.invalidReason);\n }\n return this.e.diff(this.s, unit, opts);\n }\n\n /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */\n mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n }\n}\n","import DateTime from \"./datetime.js\";\nimport Settings from \"./settings.js\";\nimport Locale from \"./impl/locale.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nimport { hasFormatToParts, hasIntl, hasRelative } from \"./impl/util.js\";\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nexport default class Info {\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */\n static hasDST(zone = Settings.defaultZone) {\n const proto = DateTime.local()\n .setZone(zone)\n .set({ month: 12 });\n\n return !zone.universal && proto.offset !== proto.set({ month: 6 }).offset;\n }\n\n /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */\n static isValidIANAZone(zone) {\n return IANAZone.isValidSpecifier(zone) && IANAZone.isValidZone(zone);\n }\n\n /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone.isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */\n static normalizeZone(input) {\n return normalizeZone(input, Settings.defaultZone);\n }\n\n /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {[string]}\n */\n static months(\n length = \"long\",\n { locale = null, numberingSystem = null, outputCalendar = \"gregory\" } = {}\n ) {\n return Locale.create(locale, numberingSystem, outputCalendar).months(length);\n }\n\n /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {[string]}\n */\n static monthsFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, outputCalendar = \"gregory\" } = {}\n ) {\n return Locale.create(locale, numberingSystem, outputCalendar).months(length, true);\n }\n\n /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {[string]}\n */\n static weekdays(length = \"long\", { locale = null, numberingSystem = null } = {}) {\n return Locale.create(locale, numberingSystem, null).weekdays(length);\n }\n\n /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link weekdays}\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @return {[string]}\n */\n static weekdaysFormat(length = \"long\", { locale = null, numberingSystem = null } = {}) {\n return Locale.create(locale, numberingSystem, null).weekdays(length, true);\n }\n\n /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {[string]}\n */\n static meridiems({ locale = null } = {}) {\n return Locale.create(locale).meridiems();\n }\n\n /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {[string]}\n */\n static eras(length = \"short\", { locale = null } = {}) {\n return Locale.create(locale, null, \"gregory\").eras(length);\n }\n\n /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, timezone support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `zones`: whether this environment supports IANA timezones\n * * `intlTokens`: whether this environment supports internationalized token-based formatting/parsing\n * * `intl`: whether this environment supports general internationalization\n * * `relative`: whether this environment supports relative time formatting\n * @example Info.features() //=> { intl: true, intlTokens: false, zones: true, relative: false }\n * @return {Object}\n */\n static features() {\n let intl = false,\n intlTokens = false,\n zones = false,\n relative = false;\n\n if (hasIntl()) {\n intl = true;\n intlTokens = hasFormatToParts();\n relative = hasRelative();\n\n try {\n zones =\n new Intl.DateTimeFormat(\"en\", { timeZone: \"America/New_York\" }).resolvedOptions()\n .timeZone === \"America/New_York\";\n } catch (e) {\n zones = false;\n }\n }\n\n return { intl, intlTokens, zones, relative };\n }\n}\n","import Duration from \"../duration.js\";\n\nfunction dayDiff(earlier, later) {\n const utcDayStart = dt =>\n dt\n .toUTC(0, { keepLocalTime: true })\n .startOf(\"day\")\n .valueOf(),\n ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\n\nfunction highOrderDiffs(cursor, later, units) {\n const differs = [\n [\"years\", (a, b) => b.year - a.year],\n [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12],\n [\n \"weeks\",\n (a, b) => {\n const days = dayDiff(a, b);\n return (days - (days % 7)) / 7;\n }\n ],\n [\"days\", dayDiff]\n ];\n\n const results = {};\n let lowestOrder, highWater;\n\n for (const [unit, differ] of differs) {\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n\n let delta = differ(cursor, later);\n highWater = cursor.plus({ [unit]: delta });\n\n if (highWater > later) {\n cursor = cursor.plus({ [unit]: delta - 1 });\n delta -= 1;\n } else {\n cursor = highWater;\n }\n\n results[unit] = delta;\n }\n }\n\n return [cursor, results, highWater, lowestOrder];\n}\n\nexport default function(earlier, later, units, opts) {\n let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n\n const remainingMillis = later - cursor;\n\n const lowerOrderUnits = units.filter(\n u => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0\n );\n\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n highWater = cursor.plus({ [lowestOrder]: 1 });\n }\n\n if (highWater !== cursor) {\n results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n }\n\n const duration = Duration.fromObject(Object.assign(results, opts));\n\n if (lowerOrderUnits.length > 0) {\n return Duration.fromMillis(remainingMillis, opts)\n .shiftTo(...lowerOrderUnits)\n .plus(duration);\n } else {\n return duration;\n }\n}\n","const numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\"\n};\n\nconst numberingSystemsUTF16 = {\n arab: [1632, 1641],\n arabext: [1776, 1785],\n bali: [6992, 7001],\n beng: [2534, 2543],\n deva: [2406, 2415],\n fullwide: [65296, 65303],\n gujr: [2790, 2799],\n khmr: [6112, 6121],\n knda: [3302, 3311],\n laoo: [3792, 3801],\n limb: [6470, 6479],\n mlym: [3430, 3439],\n mong: [6160, 6169],\n mymr: [4160, 4169],\n orya: [2918, 2927],\n tamldec: [3046, 3055],\n telu: [3174, 3183],\n thai: [3664, 3673],\n tibt: [3872, 3881]\n};\n\n// eslint-disable-next-line\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\n\nexport function parseDigits(str) {\n let value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (str[i].search(numberingSystems.hanidec) !== -1) {\n value += hanidecChars.indexOf(str[i]);\n } else {\n for (const key in numberingSystemsUTF16) {\n const [min, max] = numberingSystemsUTF16[key];\n if (code >= min && code <= max) {\n value += code - min;\n }\n }\n }\n }\n return parseInt(value, 10);\n } else {\n return value;\n }\n}\n\nexport function digitRegex({ numberingSystem }, append = \"\") {\n return new RegExp(`${numberingSystems[numberingSystem || \"latn\"]}${append}`);\n}\n","import { parseMillis, isUndefined, untruncateYear, signedOffset, hasOwnProperty } from \"./util.js\";\nimport Formatter from \"./formatter.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport DateTime from \"../datetime.js\";\nimport { digitRegex, parseDigits } from \"./digits.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\n\nfunction intUnit(regex, post = i => i) {\n return { regex, deser: ([s]) => post(parseDigits(s)) };\n}\n\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `( |${NBSP})`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\n\nfunction fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\n\nfunction stripInsensitivities(s) {\n return s\n .replace(/\\./g, \"\") // ignore dots that were made optional\n .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\n\nfunction oneOf(strings, startIndex) {\n if (strings === null) {\n return null;\n } else {\n return {\n regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n deser: ([s]) =>\n strings.findIndex(i => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex\n };\n }\n}\n\nfunction offset(regex, groups) {\n return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };\n}\n\nfunction simple(regex) {\n return { regex, deser: ([s]) => s };\n}\n\nfunction escapeToken(value) {\n // eslint-disable-next-line no-useless-escape\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\nfunction unitForToken(token, loc) {\n const one = digitRegex(loc),\n two = digitRegex(loc, \"{2}\"),\n three = digitRegex(loc, \"{3}\"),\n four = digitRegex(loc, \"{4}\"),\n six = digitRegex(loc, \"{6}\"),\n oneOrTwo = digitRegex(loc, \"{1,2}\"),\n oneToThree = digitRegex(loc, \"{1,3}\"),\n oneToSix = digitRegex(loc, \"{1,6}\"),\n oneToNine = digitRegex(loc, \"{1,9}\"),\n twoToFour = digitRegex(loc, \"{2,4}\"),\n fourToSix = digitRegex(loc, \"{4,6}\"),\n literal = t => ({ regex: RegExp(escapeToken(t.val)), deser: ([s]) => s, literal: true }),\n unitate = t => {\n if (token.literal) {\n return literal(t);\n }\n switch (t.val) {\n // era\n case \"G\":\n return oneOf(loc.eras(\"short\", false), 0);\n case \"GG\":\n return oneOf(loc.eras(\"long\", false), 0);\n // years\n case \"y\":\n return intUnit(oneToSix);\n case \"yy\":\n return intUnit(twoToFour, untruncateYear);\n case \"yyyy\":\n return intUnit(four);\n case \"yyyyy\":\n return intUnit(fourToSix);\n case \"yyyyyy\":\n return intUnit(six);\n // months\n case \"M\":\n return intUnit(oneOrTwo);\n case \"MM\":\n return intUnit(two);\n case \"MMM\":\n return oneOf(loc.months(\"short\", true, false), 1);\n case \"MMMM\":\n return oneOf(loc.months(\"long\", true, false), 1);\n case \"L\":\n return intUnit(oneOrTwo);\n case \"LL\":\n return intUnit(two);\n case \"LLL\":\n return oneOf(loc.months(\"short\", false, false), 1);\n case \"LLLL\":\n return oneOf(loc.months(\"long\", false, false), 1);\n // dates\n case \"d\":\n return intUnit(oneOrTwo);\n case \"dd\":\n return intUnit(two);\n // ordinals\n case \"o\":\n return intUnit(oneToThree);\n case \"ooo\":\n return intUnit(three);\n // time\n case \"HH\":\n return intUnit(two);\n case \"H\":\n return intUnit(oneOrTwo);\n case \"hh\":\n return intUnit(two);\n case \"h\":\n return intUnit(oneOrTwo);\n case \"mm\":\n return intUnit(two);\n case \"m\":\n return intUnit(oneOrTwo);\n case \"q\":\n return intUnit(oneOrTwo);\n case \"qq\":\n return intUnit(two);\n case \"s\":\n return intUnit(oneOrTwo);\n case \"ss\":\n return intUnit(two);\n case \"S\":\n return intUnit(oneToThree);\n case \"SSS\":\n return intUnit(three);\n case \"u\":\n return simple(oneToNine);\n // meridiem\n case \"a\":\n return oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return intUnit(four);\n case \"kk\":\n return intUnit(twoToFour, untruncateYear);\n // weekNumber (W)\n case \"W\":\n return intUnit(oneOrTwo);\n case \"WW\":\n return intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return intUnit(one);\n case \"EEE\":\n return oneOf(loc.weekdays(\"short\", false, false), 1);\n case \"EEEE\":\n return oneOf(loc.weekdays(\"long\", false, false), 1);\n case \"ccc\":\n return oneOf(loc.weekdays(\"short\", true, false), 1);\n case \"cccc\":\n return oneOf(loc.weekdays(\"long\", true, false), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n case \"ZZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return simple(/[a-z_+-/]{1,256}?/i);\n default:\n return literal(t);\n }\n };\n\n const unit = unitate(token) || {\n invalidReason: MISSING_FTP\n };\n\n unit.token = token;\n\n return unit;\n}\n\nconst partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\"\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\"\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\"\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\"\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour: {\n numeric: \"h\",\n \"2-digit\": \"hh\"\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\"\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\"\n }\n};\n\nfunction tokenForPart(part, locale, formatOpts) {\n const { type, value } = part;\n\n if (type === \"literal\") {\n return {\n literal: true,\n val: value\n };\n }\n\n const style = formatOpts[type];\n\n let val = partTypeStyleToTokenVal[type];\n if (typeof val === \"object\") {\n val = val[style];\n }\n\n if (val) {\n return {\n literal: false,\n val\n };\n }\n\n return undefined;\n}\n\nfunction buildRegex(units) {\n const re = units.map(u => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n return [`^${re}$`, units];\n}\n\nfunction match(input, regex, handlers) {\n const matches = input.match(regex);\n\n if (matches) {\n const all = {};\n let matchIndex = 1;\n for (const i in handlers) {\n if (hasOwnProperty(handlers, i)) {\n const h = handlers[i],\n groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) {\n all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n }\n matchIndex += groups;\n }\n }\n return [matches, all];\n } else {\n return [matches, {}];\n }\n}\n\nfunction dateTimeFromMatches(matches) {\n const toField = token => {\n switch (token) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n\n let zone;\n if (!isUndefined(matches.Z)) {\n zone = new FixedOffsetZone(matches.Z);\n } else if (!isUndefined(matches.z)) {\n zone = IANAZone.create(matches.z);\n } else {\n zone = null;\n }\n\n if (!isUndefined(matches.q)) {\n matches.M = (matches.q - 1) * 3 + 1;\n }\n\n if (!isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) {\n matches.h += 12;\n } else if (matches.h === 12 && matches.a === 0) {\n matches.h = 0;\n }\n }\n\n if (matches.G === 0 && matches.y) {\n matches.y = -matches.y;\n }\n\n if (!isUndefined(matches.u)) {\n matches.S = parseMillis(matches.u);\n }\n\n const vals = Object.keys(matches).reduce((r, k) => {\n const f = toField(k);\n if (f) {\n r[f] = matches[k];\n }\n\n return r;\n }, {});\n\n return [vals, zone];\n}\n\nlet dummyDateTimeCache = null;\n\nfunction getDummyDateTime() {\n if (!dummyDateTimeCache) {\n dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n }\n\n return dummyDateTimeCache;\n}\n\nfunction maybeExpandMacroToken(token, locale) {\n if (token.literal) {\n return token;\n }\n\n const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n\n if (!formatOpts) {\n return token;\n }\n\n const formatter = Formatter.create(locale, formatOpts);\n const parts = formatter.formatDateTimeParts(getDummyDateTime());\n\n const tokens = parts.map(p => tokenForPart(p, locale, formatOpts));\n\n if (tokens.includes(undefined)) {\n return token;\n }\n\n return tokens;\n}\n\nfunction expandMacroTokens(tokens, locale) {\n return Array.prototype.concat(...tokens.map(t => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nexport function explainFromTokens(locale, input, format) {\n const tokens = expandMacroTokens(Formatter.parseFormat(format), locale),\n units = tokens.map(t => unitForToken(t, locale)),\n disqualifyingUnit = units.find(t => t.invalidReason);\n\n if (disqualifyingUnit) {\n return { input, tokens, invalidReason: disqualifyingUnit.invalidReason };\n } else {\n const [regexString, handlers] = buildRegex(units),\n regex = RegExp(regexString, \"i\"),\n [rawMatches, matches] = match(input, regex, handlers),\n [result, zone] = matches ? dateTimeFromMatches(matches) : [null, null];\n if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n throw new ConflictingSpecificationError(\n \"Can't include meridiem when specifying 24-hour format\"\n );\n }\n return { input, tokens, regex, rawMatches, matches, result, zone };\n }\n}\n\nexport function parseFromTokens(locale, input, format) {\n const { result, zone, invalidReason } = explainFromTokens(locale, input, format);\n return [result, zone, invalidReason];\n}\n","import {\n integerBetween,\n isLeapYear,\n timeObject,\n daysInYear,\n daysInMonth,\n weeksInWeekYear,\n isInteger\n} from \"./util.js\";\nimport Invalid from \"./invalid.js\";\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\nfunction unitOutOfRange(unit, value) {\n return new Invalid(\n \"unit out of range\",\n `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`\n );\n}\n\nfunction dayOfWeek(year, month, day) {\n const js = new Date(Date.UTC(year, month - 1, day)).getUTCDay();\n return js === 0 ? 7 : js;\n}\n\nfunction computeOrdinal(year, month, day) {\n return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\n\nfunction uncomputeOrdinal(year, ordinal) {\n const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n month0 = table.findIndex(i => i < ordinal),\n day = ordinal - table[month0];\n return { month: month0 + 1, day };\n}\n\n/**\n * @private\n */\n\nexport function gregorianToWeek(gregObj) {\n const { year, month, day } = gregObj,\n ordinal = computeOrdinal(year, month, day),\n weekday = dayOfWeek(year, month, day);\n\n let weekNumber = Math.floor((ordinal - weekday + 10) / 7),\n weekYear;\n\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = weeksInWeekYear(weekYear);\n } else if (weekNumber > weeksInWeekYear(year)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else {\n weekYear = year;\n }\n\n return Object.assign({ weekYear, weekNumber, weekday }, timeObject(gregObj));\n}\n\nexport function weekToGregorian(weekData) {\n const { weekYear, weekNumber, weekday } = weekData,\n weekdayOfJan4 = dayOfWeek(weekYear, 1, 4),\n yearInDays = daysInYear(weekYear);\n\n let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3,\n year;\n\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= daysInYear(weekYear);\n } else {\n year = weekYear;\n }\n\n const { month, day } = uncomputeOrdinal(year, ordinal);\n\n return Object.assign({ year, month, day }, timeObject(weekData));\n}\n\nexport function gregorianToOrdinal(gregData) {\n const { year, month, day } = gregData,\n ordinal = computeOrdinal(year, month, day);\n\n return Object.assign({ year, ordinal }, timeObject(gregData));\n}\n\nexport function ordinalToGregorian(ordinalData) {\n const { year, ordinal } = ordinalData,\n { month, day } = uncomputeOrdinal(year, ordinal);\n\n return Object.assign({ year, month, day }, timeObject(ordinalData));\n}\n\nexport function hasInvalidWeekData(obj) {\n const validYear = isInteger(obj.weekYear),\n validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear)),\n validWeekday = integerBetween(obj.weekday, 1, 7);\n\n if (!validYear) {\n return unitOutOfRange(\"weekYear\", obj.weekYear);\n } else if (!validWeek) {\n return unitOutOfRange(\"week\", obj.week);\n } else if (!validWeekday) {\n return unitOutOfRange(\"weekday\", obj.weekday);\n } else return false;\n}\n\nexport function hasInvalidOrdinalData(obj) {\n const validYear = isInteger(obj.year),\n validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validOrdinal) {\n return unitOutOfRange(\"ordinal\", obj.ordinal);\n } else return false;\n}\n\nexport function hasInvalidGregorianData(obj) {\n const validYear = isInteger(obj.year),\n validMonth = integerBetween(obj.month, 1, 12),\n validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validMonth) {\n return unitOutOfRange(\"month\", obj.month);\n } else if (!validDay) {\n return unitOutOfRange(\"day\", obj.day);\n } else return false;\n}\n\nexport function hasInvalidTimeData(obj) {\n const { hour, minute, second, millisecond } = obj;\n const validHour =\n integerBetween(hour, 0, 23) ||\n (hour === 24 && minute === 0 && second === 0 && millisecond === 0),\n validMinute = integerBetween(minute, 0, 59),\n validSecond = integerBetween(second, 0, 59),\n validMillisecond = integerBetween(millisecond, 0, 999);\n\n if (!validHour) {\n return unitOutOfRange(\"hour\", hour);\n } else if (!validMinute) {\n return unitOutOfRange(\"minute\", minute);\n } else if (!validSecond) {\n return unitOutOfRange(\"second\", second);\n } else if (!validMillisecond) {\n return unitOutOfRange(\"millisecond\", millisecond);\n } else return false;\n}\n","import Duration, { friendlyDuration } from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Settings from \"./settings.js\";\nimport Info from \"./info.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport {\n isUndefined,\n maybeArray,\n isDate,\n isNumber,\n bestBy,\n daysInMonth,\n daysInYear,\n isLeapYear,\n weeksInWeekYear,\n normalizeObject,\n roundTo,\n objToLocalTS\n} from \"./impl/util.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport diff from \"./impl/diff.js\";\nimport { parseRFC2822Date, parseISODate, parseHTTPDate, parseSQL } from \"./impl/regexParser.js\";\nimport { parseFromTokens, explainFromTokens } from \"./impl/tokenParser.js\";\nimport {\n gregorianToWeek,\n weekToGregorian,\n gregorianToOrdinal,\n ordinalToGregorian,\n hasInvalidGregorianData,\n hasInvalidWeekData,\n hasInvalidOrdinalData,\n hasInvalidTimeData\n} from \"./impl/conversions.js\";\nimport * as Formats from \"./impl/formats.js\";\nimport {\n InvalidArgumentError,\n ConflictingSpecificationError,\n InvalidUnitError,\n InvalidDateTimeError\n} from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\n\nfunction unsupportedZone(zone) {\n return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\nfunction possiblyCachedWeekData(dt) {\n if (dt.weekData === null) {\n dt.weekData = gregorianToWeek(dt.c);\n }\n return dt.weekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n const current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid\n };\n return new DateTime(Object.assign({}, current, alts, { old: current }));\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n const o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n const o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n ts += offset * 60 * 1000;\n\n const d = new Date(ts);\n\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds()\n };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n const oPre = inst.o,\n year = inst.c.year + Math.trunc(dur.years),\n month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n c = Object.assign({}, inst.c, {\n year,\n month,\n day:\n Math.min(inst.c.day, daysInMonth(year, month)) +\n Math.trunc(dur.days) +\n Math.trunc(dur.weeks) * 7\n }),\n millisToAdd = Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds\n }).as(\"milliseconds\"),\n localTS = objToLocalTS(c);\n\n let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n\n return { ts, o };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text) {\n const { setZone, zone } = opts;\n if (parsed && Object.keys(parsed).length !== 0) {\n const interpretationZone = parsedZone || zone,\n inst = DateTime.fromObject(\n Object.assign(parsed, opts, {\n zone: interpretationZone,\n // setZone is a valid option in the calling methods, but not in fromObject\n setZone: undefined\n })\n );\n return setZone ? inst : inst.setZone(zone);\n } else {\n return DateTime.invalid(\n new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`)\n );\n }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n return dt.isValid\n ? Formatter.create(Locale.create(\"en-US\"), {\n allowZ,\n forceSimple: true\n }).formatDateTimeFromString(dt, format)\n : null;\n}\n\n// technical time formats (e.g. the time part of ISO 8601), take some options\n// and this commonizes their handling\nfunction toTechTimeFormat(\n dt,\n {\n suppressSeconds = false,\n suppressMilliseconds = false,\n includeOffset,\n includeZone = false,\n spaceZone = false,\n format = \"extended\"\n }\n) {\n let fmt = format === \"basic\" ? \"HHmm\" : \"HH:mm\";\n\n if (!suppressSeconds || dt.second !== 0 || dt.millisecond !== 0) {\n fmt += format === \"basic\" ? \"ss\" : \":ss\";\n if (!suppressMilliseconds || dt.millisecond !== 0) {\n fmt += \".SSS\";\n }\n }\n\n if ((includeZone || includeOffset) && spaceZone) {\n fmt += \" \";\n }\n\n if (includeZone) {\n fmt += \"z\";\n } else if (includeOffset) {\n fmt += format === \"basic\" ? \"ZZZ\" : \"ZZ\";\n }\n\n return toTechFormat(dt, fmt);\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n },\n defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n },\n defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0\n };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedWeekUnits = [\n \"weekYear\",\n \"weekNumber\",\n \"weekday\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\"\n ],\n orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\"\n }[unit.toLowerCase()];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, zone) {\n // assume we have the higher-order units\n for (const u of orderedUnits) {\n if (isUndefined(obj[u])) {\n obj[u] = defaultUnitValues[u];\n }\n }\n\n const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n const tsNow = Settings.now(),\n offsetProvis = zone.offset(tsNow),\n [ts, o] = objToTS(obj, offsetProvis, zone);\n\n return new DateTime({\n ts,\n zone,\n o\n });\n}\n\nfunction diffRelative(start, end, opts) {\n const round = isUndefined(opts.round) ? true : opts.round,\n format = (c, unit) => {\n c = roundTo(c, round || opts.calendary ? 0 : 2, true);\n const formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n },\n differ = unit => {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) {\n return end\n .startOf(unit)\n .diff(start.startOf(unit), unit)\n .get(unit);\n } else return 0;\n } else {\n return end.diff(start, unit).get(unit);\n }\n };\n\n if (opts.unit) {\n return format(differ(opts.unit), opts.unit);\n }\n\n for (const unit of opts.units) {\n const count = differ(unit);\n if (Math.abs(count) >= 1) {\n return format(count, unit);\n }\n }\n return format(0, opts.units[opts.units.length - 1]);\n}\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link local}, {@link utc}, and (most flexibly) {@link fromObject}. To create one from a standard string format, use {@link fromISO}, {@link fromHTTP}, and {@link fromRFC2822}. To create one from a custom string format, use {@link fromFormat}. To create one from a native JS date, use {@link fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link toObject}), use the {@link year}, {@link month},\n * {@link day}, {@link hour}, {@link minute}, {@link second}, {@link millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link weekYear}, {@link weekNumber}, and {@link weekday} accessors.\n * * **Configuration** See the {@link locale} and {@link numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link set}, {@link reconfigure}, {@link setZone}, {@link setLocale}, {@link plus}, {@link minus}, {@link endOf}, {@link startOf}, {@link toUTC}, and {@link toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link toRelative}, {@link toRelativeCalendar}, {@link toJSON}, {@link toISO}, {@link toHTTP}, {@link toObject}, {@link toRFC2822}, {@link toString}, {@link toLocaleString}, {@link toFormat}, {@link toMillis} and {@link toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nexport default class DateTime {\n /**\n * @access private\n */\n constructor(config) {\n const zone = config.zone || Settings.defaultZone;\n\n let invalid =\n config.invalid ||\n (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) ||\n (!zone.isValid ? unsupportedZone(zone) : null);\n /**\n * @access private\n */\n this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n\n let c = null,\n o = null;\n if (!invalid) {\n const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n\n if (unchanged) {\n [c, o] = [config.old.c, config.old.o];\n } else {\n const ot = zone.offset(this.ts);\n c = tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n\n /**\n * @access private\n */\n this._zone = zone;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.invalid = invalid;\n /**\n * @access private\n */\n this.weekData = null;\n /**\n * @access private\n */\n this.c = c;\n /**\n * @access private\n */\n this.o = o;\n /**\n * @access private\n */\n this.isLuxonDateTime = true;\n }\n\n // CONSTRUCT\n\n /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12) //~> 2017-03-12T00:00:00\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */\n static local(year, month, day, hour, minute, second, millisecond) {\n if (isUndefined(year)) {\n return new DateTime({ ts: Settings.now() });\n } else {\n return quickDT(\n {\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond\n },\n Settings.defaultZone\n );\n }\n }\n\n /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765Z\n * @return {DateTime}\n */\n static utc(year, month, day, hour, minute, second, millisecond) {\n if (isUndefined(year)) {\n return new DateTime({\n ts: Settings.now(),\n zone: FixedOffsetZone.utcInstance\n });\n } else {\n return quickDT(\n {\n year,\n month,\n day,\n hour,\n minute,\n second,\n millisecond\n },\n FixedOffsetZone.utcInstance\n );\n }\n }\n\n /**\n * Create a DateTime from a Javascript Date object. Uses the default zone.\n * @param {Date} date - a Javascript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */\n static fromJSDate(date, options = {}) {\n const ts = isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) {\n return DateTime.invalid(\"invalid input\");\n }\n\n const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: Locale.fromObject(options)\n });\n }\n\n /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromMillis(milliseconds, options = {}) {\n if (!isNumber(milliseconds)) {\n throw new InvalidArgumentError(\n `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`\n );\n } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n } else {\n return new DateTime({\n ts: milliseconds,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options)\n });\n }\n }\n\n /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromSeconds(seconds, options = {}) {\n if (!isNumber(seconds)) {\n throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n } else {\n return new DateTime({\n ts: seconds * 1000,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options)\n });\n }\n }\n\n /**\n * Create a DateTime from a Javascript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {string|Zone} [obj.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [obj.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} obj.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} obj.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @return {DateTime}\n */\n static fromObject(obj) {\n const zoneToUse = normalizeZone(obj.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n const tsNow = Settings.now(),\n offsetProvis = zoneToUse.offset(tsNow),\n normalized = normalizeObject(obj, normalizeUnit, [\n \"zone\",\n \"locale\",\n \"outputCalendar\",\n \"numberingSystem\"\n ]),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber,\n loc = Locale.fromObject(obj);\n\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n const useWeekData = definiteWeekDef || (normalized.weekday && !containsGregor);\n\n // configure ourselves to deal with gregorian dates or week stuff\n let units,\n defaultValues,\n objNow = tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = orderedWeekUnits;\n defaultValues = defaultWeekUnitValues;\n objNow = gregorianToWeek(objNow);\n } else if (containsOrdinal) {\n units = orderedOrdinalUnits;\n defaultValues = defaultOrdinalUnitValues;\n objNow = gregorianToOrdinal(objNow);\n } else {\n units = orderedUnits;\n defaultValues = defaultUnitValues;\n }\n\n // set default values for missing stuff\n let foundFirst = false;\n for (const u of units) {\n const v = normalized[u];\n if (!isUndefined(v)) {\n foundFirst = true;\n } else if (foundFirst) {\n normalized[u] = defaultValues[u];\n } else {\n normalized[u] = objNow[u];\n }\n }\n\n // make sure the values we have are in range\n const higherOrderInvalid = useWeekData\n ? hasInvalidWeekData(normalized)\n : containsOrdinal\n ? hasInvalidOrdinalData(normalized)\n : hasInvalidGregorianData(normalized),\n invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n // compute the actual time\n const gregorian = useWeekData\n ? weekToGregorian(normalized)\n : containsOrdinal\n ? ordinalToGregorian(normalized)\n : normalized,\n [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc\n });\n\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n return DateTime.invalid(\n \"mismatched weekday\",\n `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`\n );\n }\n\n return inst;\n }\n\n /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */\n static fromISO(text, opts = {}) {\n const [vals, parsedZone] = parseISODate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n }\n\n /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */\n static fromRFC2822(text, opts = {}) {\n const [vals, parsedZone] = parseRFC2822Date(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n }\n\n /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */\n static fromHTTP(text, opts = {}) {\n const [vals, parsedZone] = parseHTTPDate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n }\n\n /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @see https://moment.github.io/luxon/docs/manual/parsing.html#table-of-tokens\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromFormat(text, fmt, opts = {}) {\n if (isUndefined(text) || isUndefined(fmt)) {\n throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n }\n\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true\n }),\n [vals, parsedZone, invalid] = parseFromTokens(localeToUse, text, fmt);\n if (invalid) {\n return DateTime.invalid(invalid);\n } else {\n return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text);\n }\n }\n\n /**\n * @deprecated use fromFormat instead\n */\n static fromString(text, fmt, opts = {}) {\n return DateTime.fromFormat(text, fmt, opts);\n }\n\n /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */\n static fromSQL(text, opts = {}) {\n const [vals, parsedZone] = parseSQL(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n }\n\n /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDateTimeError(invalid);\n } else {\n return new DateTime({ invalid });\n }\n }\n\n /**\n * Check if an object is a DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDateTime(o) {\n return (o && o.isLuxonDateTime) || false;\n }\n\n // INFO\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */\n get(unit) {\n return this[unit];\n }\n\n /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n *\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n *\n * @type {string}\n */\n get outputCalendar() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n\n /**\n * Get the time zone associated with this DateTime.\n * @type {Zone}\n */\n get zone() {\n return this._zone;\n }\n\n /**\n * Get the name of the time zone.\n * @type {string}\n */\n get zoneName() {\n return this.isValid ? this.zone.name : null;\n }\n\n /**\n * Get the year\n * @example DateTime.local(2017, 5, 25).year //=> 2017\n * @type {number}\n */\n get year() {\n return this.isValid ? this.c.year : NaN;\n }\n\n /**\n * Get the quarter\n * @example DateTime.local(2017, 5, 25).quarter //=> 2\n * @type {number}\n */\n get quarter() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n\n /**\n * Get the month (1-12).\n * @example DateTime.local(2017, 5, 25).month //=> 5\n * @type {number}\n */\n get month() {\n return this.isValid ? this.c.month : NaN;\n }\n\n /**\n * Get the day of the month (1-30ish).\n * @example DateTime.local(2017, 5, 25).day //=> 25\n * @type {number}\n */\n get day() {\n return this.isValid ? this.c.day : NaN;\n }\n\n /**\n * Get the hour of the day (0-23).\n * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n * @type {number}\n */\n get hour() {\n return this.isValid ? this.c.hour : NaN;\n }\n\n /**\n * Get the minute of the hour (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n * @type {number}\n */\n get minute() {\n return this.isValid ? this.c.minute : NaN;\n }\n\n /**\n * Get the second of the minute (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n * @type {number}\n */\n get second() {\n return this.isValid ? this.c.second : NaN;\n }\n\n /**\n * Get the millisecond of the second (0-999).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n * @type {number}\n */\n get millisecond() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n\n /**\n * Get the week year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekYear //=> 2015\n * @type {number}\n */\n get weekYear() {\n return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the week number of the week year (1-52ish).\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n * @type {number}\n */\n get weekNumber() {\n return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the day of the week.\n * 1 is Monday and 7 is Sunday\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekday //=> 4\n * @type {number}\n */\n get weekday() {\n return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n }\n\n /**\n * Get the ordinal (meaning the day of the year)\n * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n * @type {number|DateTime}\n */\n get ordinal() {\n return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n }\n\n /**\n * Get the human readable short month name, such as 'Oct'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n * @type {string}\n */\n get monthShort() {\n return this.isValid ? Info.months(\"short\", { locale: this.locale })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable long month name, such as 'October'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthLong //=> October\n * @type {string}\n */\n get monthLong() {\n return this.isValid ? Info.months(\"long\", { locale: this.locale })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable short weekday, such as 'Mon'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n * @type {string}\n */\n get weekdayShort() {\n return this.isValid ? Info.weekdays(\"short\", { locale: this.locale })[this.weekday - 1] : null;\n }\n\n /**\n * Get the human readable long weekday, such as 'Monday'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n * @type {string}\n */\n get weekdayLong() {\n return this.isValid ? Info.weekdays(\"long\", { locale: this.locale })[this.weekday - 1] : null;\n }\n\n /**\n * Get the UTC offset of this DateTime in minutes\n * @example DateTime.local().offset //=> -240\n * @example DateTime.utc().offset //=> 0\n * @type {number}\n */\n get offset() {\n return this.isValid ? +this.o : NaN;\n }\n\n /**\n * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameShort() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameLong() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get whether this zone's offset ever changes, as in a DST.\n * @type {boolean}\n */\n get isOffsetFixed() {\n return this.isValid ? this.zone.universal : null;\n }\n\n /**\n * Get whether the DateTime is in a DST.\n * @type {boolean}\n */\n get isInDST() {\n if (this.isOffsetFixed) {\n return false;\n } else {\n return (\n this.offset > this.set({ month: 1 }).offset || this.offset > this.set({ month: 5 }).offset\n );\n }\n }\n\n /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */\n get isInLeapYear() {\n return isLeapYear(this.year);\n }\n\n /**\n * Returns the number of days in this DateTime's month\n * @example DateTime.local(2016, 2).daysInMonth //=> 29\n * @example DateTime.local(2016, 3).daysInMonth //=> 31\n * @type {number}\n */\n get daysInMonth() {\n return daysInMonth(this.year, this.month);\n }\n\n /**\n * Returns the number of days in this DateTime's year\n * @example DateTime.local(2016).daysInYear //=> 366\n * @example DateTime.local(2013).daysInYear //=> 365\n * @type {number}\n */\n get daysInYear() {\n return this.isValid ? daysInYear(this.year) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2004).weeksInWeekYear //=> 53\n * @example DateTime.local(2013).weeksInWeekYear //=> 52\n * @type {number}\n */\n get weeksInWeekYear() {\n return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n }\n\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */\n resolvedLocaleOpts(opts = {}) {\n const { locale, numberingSystem, calendar } = Formatter.create(\n this.loc.clone(opts),\n opts\n ).resolvedOptions(this);\n return { locale, numberingSystem, outputCalendar: calendar };\n }\n\n // TRANSFORM\n\n /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */\n toUTC(offset = 0, opts = {}) {\n return this.setZone(FixedOffsetZone.instance(offset), opts);\n }\n\n /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */\n toLocal() {\n return this.setZone(Settings.defaultZone);\n }\n\n /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link plus}. You may wish to use {@link toLocal} and {@link toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */\n setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {\n zone = normalizeZone(zone, Settings.defaultZone);\n if (zone.equals(this.zone)) {\n return this;\n } else if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n } else {\n let newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n const offsetGuess = zone.offset(this.ts);\n const asObj = this.toObject();\n [newTS] = objToTS(asObj, offsetGuess, zone);\n }\n return clone(this, { ts: newTS, zone });\n }\n }\n\n /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */\n reconfigure({ locale, numberingSystem, outputCalendar } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });\n return clone(this, { loc });\n }\n\n /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */\n setLocale(locale) {\n return this.reconfigure({ locale });\n }\n\n /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link reconfigure} and {@link setZone}.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const normalized = normalizeObject(values, normalizeUnit, []),\n settingWeekStuff =\n !isUndefined(normalized.weekYear) ||\n !isUndefined(normalized.weekNumber) ||\n !isUndefined(normalized.weekday);\n\n let mixed;\n if (settingWeekStuff) {\n mixed = weekToGregorian(Object.assign(gregorianToWeek(this.c), normalized));\n } else if (!isUndefined(normalized.ordinal)) {\n mixed = ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c), normalized));\n } else {\n mixed = Object.assign(this.toObject(), normalized);\n\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if (isUndefined(normalized.day)) {\n mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n }\n\n const [ts, o] = objToTS(mixed, this.o, this.zone);\n return clone(this, { ts, o });\n }\n\n /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.local().plus(123) //~> in 123 milliseconds\n * @example DateTime.local().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.local().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.local().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.local().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.local().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */\n plus(duration) {\n if (!this.isValid) return this;\n const dur = friendlyDuration(duration);\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */\n minus(duration) {\n if (!this.isValid) return this;\n const dur = friendlyDuration(duration).negate();\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */\n startOf(unit) {\n if (!this.isValid) return this;\n const o = {},\n normalizedUnit = Duration.normalizeUnit(unit);\n switch (normalizedUnit) {\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n case \"milliseconds\":\n break;\n // no default, invalid units throw in normalizeUnit()\n }\n\n if (normalizedUnit === \"weeks\") {\n o.weekday = 1;\n }\n\n if (normalizedUnit === \"quarters\") {\n const q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n\n return this.set(o);\n }\n\n /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'month', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */\n endOf(unit) {\n return this.isValid\n ? this.plus({ [unit]: 1 })\n .startOf(unit)\n .minus(1)\n : this;\n }\n\n // OUTPUT\n\n /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @see https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options\n * @example DateTime.local().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.local().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.local().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.local().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param opts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @example DateTime.local().toLocaleString(); //=> 4/20/2017\n * @example DateTime.local().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.local().toLocaleString({ locale: 'en-gb' }); //=> '20/04/2017'\n * @example DateTime.local().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.local().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.local().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.local().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.local().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.local().toLocaleString({ hour: '2-digit', minute: '2-digit', hour12: false }); //=> '11:32'\n * @return {string}\n */\n toLocaleString(opts = Formats.DATE_SHORT) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTime(this)\n : INVALID;\n }\n\n /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.local().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */\n toLocaleParts(opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this)\n : [];\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.local().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.local().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.local().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @return {string}\n */\n toISO(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toISODate(opts)}T${this.toISOTime(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @return {string}\n */\n toISODate({ format = \"extended\" } = {}) {\n let fmt = format === \"basic\" ? \"yyyyMMdd\" : \"yyyy-MM-dd\";\n if (this.year > 9999) {\n fmt = \"+\" + fmt;\n }\n\n return toTechFormat(this, fmt);\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */\n toISOWeekDate() {\n return toTechFormat(this, \"kkkk-'W'WW-c\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @return {string}\n */\n toISOTime({\n suppressMilliseconds = false,\n suppressSeconds = false,\n includeOffset = true,\n format = \"extended\"\n } = {}) {\n return toTechTimeFormat(this, {\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n format\n });\n }\n\n /**\n * Returns an RFC 2822-compatible string representation of this DateTime, always in UTC\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */\n toRFC2822() {\n return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */\n toHTTP() {\n return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string}\n */\n toSQLDate() {\n return toTechFormat(this, \"yyyy-MM-dd\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.local().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.local().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.local().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */\n toSQLTime({ includeOffset = true, includeZone = false } = {}) {\n return toTechTimeFormat(this, {\n includeOffset,\n includeZone,\n spaceZone: true\n });\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */\n toSQL(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */\n toString() {\n return this.isValid ? this.toISO() : INVALID;\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */\n toMillis() {\n return this.isValid ? this.ts : NaN;\n }\n\n /**\n * Returns the epoch seconds of this DateTime.\n * @return {number}\n */\n toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n }\n\n /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */\n toBSON() {\n return this.toJSDate();\n }\n\n /**\n * Returns a Javascript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.local().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = Object.assign({}, this.c);\n\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns a Javascript Date equivalent to this DateTime.\n * @return {Date}\n */\n toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n }\n\n // COMPARE\n\n /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */\n diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n if (!this.isValid || !otherDateTime.isValid) {\n return Duration.invalid(\n this.invalid || otherDateTime.invalid,\n \"created by diffing an invalid DateTime\"\n );\n }\n\n const durOpts = Object.assign(\n { locale: this.locale, numberingSystem: this.numberingSystem },\n opts\n );\n\n const units = maybeArray(unit).map(Duration.normalizeUnit),\n otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n earlier = otherIsLater ? this : otherDateTime,\n later = otherIsLater ? otherDateTime : this,\n diffed = diff(earlier, later, units, durOpts);\n\n return otherIsLater ? diffed.negate() : diffed;\n }\n\n /**\n * Return the difference between this DateTime and right now.\n * See {@link diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n diffNow(unit = \"milliseconds\", opts = {}) {\n return this.diff(DateTime.local(), unit, opts);\n }\n\n /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval}\n */\n until(otherDateTime) {\n return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n }\n\n /**\n * Return whether this DateTime is in the same unit of time as another DateTime\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @example DateTime.local().hasSame(otherDT, 'day'); //~> true if both the same calendar day\n * @return {boolean}\n */\n hasSame(otherDateTime, unit) {\n if (!this.isValid) return false;\n if (unit === \"millisecond\") {\n return this.valueOf() === otherDateTime.valueOf();\n } else {\n const inputMs = otherDateTime.valueOf();\n return this.startOf(unit) <= inputMs && inputMs <= this.endOf(unit);\n }\n }\n\n /**\n * Equality check\n * Two DateTimes are equal iff they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */\n equals(other) {\n return (\n this.isValid &&\n other.isValid &&\n this.valueOf() === other.valueOf() &&\n this.zone.equals(other.zone) &&\n this.loc.equals(other.loc)\n );\n }\n\n /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds down by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {boolean} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.local().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.local().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.local().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.local().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.local().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.local().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */\n toRelative(options = {}) {\n if (!this.isValid) return null;\n const base = options.base || DateTime.fromObject({ zone: this.zone }),\n padding = options.padding ? (this < base ? -options.padding : options.padding) : 0;\n return diffRelative(\n base,\n this.plus(padding),\n Object.assign(options, {\n numeric: \"always\",\n units: [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"]\n })\n );\n }\n\n /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.local().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.local().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */\n toRelativeCalendar(options = {}) {\n if (!this.isValid) return null;\n\n return diffRelative(\n options.base || DateTime.fromObject({ zone: this.zone }),\n this,\n Object.assign(options, {\n numeric: \"auto\",\n units: [\"years\", \"months\", \"days\"],\n calendary: true\n })\n );\n }\n\n /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */\n static min(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, i => i.valueOf(), Math.min);\n }\n\n /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */\n static max(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, i => i.valueOf(), Math.max);\n }\n\n // MISC\n\n /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */\n static fromFormatExplain(text, fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true\n });\n return explainFromTokens(localeToUse, text, fmt);\n }\n\n /**\n * @deprecated use fromFormatExplain instead\n */\n static fromStringExplain(text, fmt, options = {}) {\n return DateTime.fromFormatExplain(text, fmt, options);\n }\n\n // FORMAT PRESETS\n\n /**\n * {@link toLocaleString} format like 10/14/1983\n * @type {Object}\n */\n static get DATE_SHORT() {\n return Formats.DATE_SHORT;\n }\n\n /**\n * {@link toLocaleString} format like 'Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED() {\n return Formats.DATE_MED;\n }\n\n /**\n * {@link toLocaleString} format like 'Fri, Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED_WITH_WEEKDAY() {\n return Formats.DATE_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link toLocaleString} format like 'October 14, 1983'\n * @type {Object}\n */\n static get DATE_FULL() {\n return Formats.DATE_FULL;\n }\n\n /**\n * {@link toLocaleString} format like 'Tuesday, October 14, 1983'\n * @type {Object}\n */\n static get DATE_HUGE() {\n return Formats.DATE_HUGE;\n }\n\n /**\n * {@link toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_SIMPLE() {\n return Formats.TIME_SIMPLE;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SECONDS() {\n return Formats.TIME_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SHORT_OFFSET() {\n return Formats.TIME_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_LONG_OFFSET() {\n return Formats.TIME_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '09:30', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_SIMPLE() {\n return Formats.TIME_24_SIMPLE;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SECONDS() {\n return Formats.TIME_24_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 EDT', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SHORT_OFFSET() {\n return Formats.TIME_24_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_LONG_OFFSET() {\n return Formats.TIME_24_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT() {\n return Formats.DATETIME_SHORT;\n }\n\n /**\n * {@link toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT_WITH_SECONDS() {\n return Formats.DATETIME_SHORT_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED() {\n return Formats.DATETIME_MED;\n }\n\n /**\n * {@link toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_SECONDS() {\n return Formats.DATETIME_MED_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_WEEKDAY() {\n return Formats.DATETIME_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL() {\n return Formats.DATETIME_FULL;\n }\n\n /**\n * {@link toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL_WITH_SECONDS() {\n return Formats.DATETIME_FULL_WITH_SECONDS;\n }\n\n /**\n * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE() {\n return Formats.DATETIME_HUGE;\n }\n\n /**\n * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE_WITH_SECONDS() {\n return Formats.DATETIME_HUGE_WITH_SECONDS;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDateTime(dateTimeish) {\n if (DateTime.isDateTime(dateTimeish)) {\n return dateTimeish;\n } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n return DateTime.fromJSDate(dateTimeish);\n } else if (dateTimeish && typeof dateTimeish === \"object\") {\n return DateTime.fromObject(dateTimeish);\n } else {\n throw new InvalidArgumentError(\n `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`\n );\n }\n}\n"],"names":["LuxonError","Error","InvalidDateTimeError","constructor","reason","toMessage","InvalidIntervalError","InvalidDurationError","ConflictingSpecificationError","InvalidUnitError","unit","InvalidArgumentError","ZoneIsAbstractError","n","s","l","DATE_SHORT","year","month","day","DATE_MED","DATE_MED_WITH_WEEKDAY","weekday","DATE_FULL","DATE_HUGE","TIME_SIMPLE","hour","minute","TIME_WITH_SECONDS","second","TIME_WITH_SHORT_OFFSET","timeZoneName","TIME_WITH_LONG_OFFSET","TIME_24_SIMPLE","hour12","TIME_24_WITH_SECONDS","TIME_24_WITH_SHORT_OFFSET","TIME_24_WITH_LONG_OFFSET","DATETIME_SHORT","DATETIME_SHORT_WITH_SECONDS","DATETIME_MED","DATETIME_MED_WITH_SECONDS","DATETIME_MED_WITH_WEEKDAY","DATETIME_FULL","DATETIME_FULL_WITH_SECONDS","DATETIME_HUGE","DATETIME_HUGE_WITH_SECONDS","isUndefined","o","isNumber","isInteger","isString","isDate","Object","prototype","toString","call","hasIntl","Intl","DateTimeFormat","e","hasFormatToParts","formatToParts","hasRelative","RelativeTimeFormat","maybeArray","thing","Array","isArray","bestBy","arr","by","compare","length","undefined","reduce","best","next","pair","pick","obj","keys","a","k","hasOwnProperty","prop","integerBetween","bottom","top","floorMod","x","Math","floor","padStart","input","repeat","slice","parseInteger","string","parseInt","parseMillis","fraction","f","parseFloat","roundTo","number","digits","towardZero","factor","rounder","trunc","round","isLeapYear","daysInYear","daysInMonth","modMonth","modYear","objToLocalTS","d","Date","UTC","millisecond","setUTCFullYear","getUTCFullYear","weeksInWeekYear","weekYear","p1","last","p2","untruncateYear","parseZoneInfo","ts","offsetFormat","locale","timeZone","date","intlOpts","modified","assign","intl","parsed","find","m","type","toLowerCase","value","without","format","included","diffed","substring","trimmed","replace","signedOffset","offHourStr","offMinuteStr","offHour","Number","isNaN","offMin","offMinSigned","is","asNumber","numericValue","normalizeObject","normalizer","nonUnitKeys","normalized","u","indexOf","v","formatOffset","offset","hours","abs","minutes","sign","RangeError","timeObject","ianaRegex","stringify","JSON","sort","monthsLong","monthsShort","monthsNarrow","months","weekdaysLong","weekdaysShort","weekdaysNarrow","weekdays","meridiems","erasLong","erasShort","erasNarrow","eras","meridiemForDateTime","dt","weekdayForDateTime","monthForDateTime","eraForDateTime","formatRelativeTime","count","numeric","narrow","units","years","quarters","weeks","days","seconds","lastable","isDay","isInPast","fmtValue","singular","lilUnits","fmtUnit","formatString","knownFormat","filtered","key","dateTimeHuge","Formats","stringifyTokens","splits","tokenToString","token","literal","val","macroTokenToFormatOpts","D","DD","DDD","DDDD","t","tt","ttt","tttt","T","TT","TTT","TTTT","ff","fff","ffff","F","FF","FFF","FFFF","Formatter","create","opts","parseFormat","fmt","current","currentFull","bracketed","i","c","charAt","push","formatOpts","loc","systemLoc","formatWithSystemDefault","redefaultToSystem","df","dtFormatter","formatDateTime","formatDateTimeParts","resolvedOptions","num","p","forceSimple","padTo","numberFormatter","formatDateTimeFromString","knownEnglish","listingMode","useDateTimeFormatter","outputCalendar","extract","isOffsetFixed","allowZ","isValid","zone","meridiem","English","standalone","maybeMacro","era","offsetName","zoneName","weekNumber","ordinal","quarter","formatDurationFromString","dur","tokenToField","lildur","mapped","get","tokens","realTokens","found","concat","collapsed","shiftTo","map","filter","Invalid","explanation","Zone","name","universal","equals","otherZone","singleton","LocalZone","instance","getTimezoneOffset","matchingRegex","RegExp","source","dtfCache","makeDTF","typeToPos","hackyOffset","dtf","formatted","exec","fMonth","fDay","fYear","fHour","fMinute","fSecond","partsOffset","filled","pos","ianaZoneCache","IANAZone","resetCache","isValidSpecifier","match","isValidZone","parseGMTOffset","specifier","valid","adjustedHour","asUTC","asTS","over","FixedOffsetZone","utcInstance","parseSpecifier","r","fixed","InvalidZone","NaN","normalizeZone","defaultZone","lowered","now","defaultLocale","defaultNumberingSystem","defaultOutputCalendar","throwOnInvalid","Settings","defaultZoneName","z","numberingSystem","resetCaches","Locale","intlDTCache","getCachedDTF","locString","intlNumCache","getCachedINF","inf","NumberFormat","intlRelCache","getCachedRTF","cacheKeyOpts","sysLocaleCache","systemLocale","computedSys","parseLocaleString","localeStr","uIndex","options","smaller","calendar","intlConfigString","mapMonths","ms","DateTime","utc","mapWeekdays","listStuff","defaultOK","englishFn","intlFn","mode","supportsFastNumbers","startsWith","PolyNumberFormatter","useGrouping","minimumIntegerDigits","PolyDateFormatter","fromMillis","toJSDate","tokenFormat","PolyRelFormatter","isEnglish","style","rtf","fromOpts","defaultToEN","specifiedLocale","localeR","numberingSystemR","outputCalendarR","fromObject","numbering","parsedLocale","parsedNumberingSystem","parsedOutputCalendar","weekdaysCache","monthsCache","meridiemCache","eraCache","fastNumbersCached","fastNumbers","hasFTP","isActuallyEn","hasNoWeirdness","clone","alts","getOwnPropertyNames","redefaultToEN","formatStr","field","results","matching","relFormatter","other","combineRegexes","regexes","full","combineExtractors","extractors","mergedVals","mergedZone","cursor","ex","parse","patterns","regex","extractor","simpleParse","ret","offsetRegex","isoTimeBaseRegex","isoTimeRegex","isoTimeExtensionRegex","isoYmdRegex","isoWeekRegex","isoOrdinalRegex","extractISOWeekData","extractISOOrdinalData","sqlYmdRegex","sqlTimeRegex","sqlTimeExtensionRegex","int","fallback","extractISOYmd","item","extractISOTime","extractISOOffset","local","fullOffset","extractIANAZone","isoDuration","extractISODuration","yearStr","monthStr","weekStr","dayStr","hourStr","minuteStr","secondStr","millisecondsStr","hasNegativePrefix","maybeNegate","milliseconds","obsOffsets","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","fromStrings","weekdayStr","result","rfc2822","extractRFC2822","obsOffset","milOffset","preprocessRFC2822","trim","rfc1123","rfc850","ascii","extractRFC1123Or850","extractASCII","isoYmdWithTimeExtensionRegex","isoWeekWithTimeExtensionRegex","isoOrdinalWithTimeExtensionRegex","isoTimeCombinedRegex","extractISOYmdTimeAndOffset","extractISOWeekTimeAndOffset","extractISOOrdinalDataAndTime","extractISOTimeAndOffset","parseISODate","parseRFC2822Date","parseHTTPDate","parseISODuration","sqlYmdWithTimeExtensionRegex","sqlTimeCombinedRegex","extractISOYmdTimeOffsetAndIANAZone","extractISOTimeOffsetAndIANAZone","parseSQL","INVALID","lowOrderMatrix","casualMatrix","daysInYearAccurate","daysInMonthAccurate","accurateMatrix","orderedUnits","reverseUnits","reverse","clear","conf","values","conversionAccuracy","Duration","antiTrunc","ceil","convert","matrix","fromMap","fromUnit","toMap","toUnit","conv","raw","sameSign","added","normalizeValues","vals","previous","config","accurate","invalid","isLuxonDuration","normalizeUnit","fromISO","text","week","isDuration","toFormat","fmtOpts","toObject","base","includeConfig","toISO","toJSON","valueOf","as","plus","duration","friendlyDuration","minus","negate","mapUnits","fn","set","mixed","reconfigure","normalize","built","accumulated","lastUnit","own","ak","down","negated","invalidReason","invalidExplanation","durationish","validateStartEnd","start","end","Interval","isLuxonInterval","fromDateTimes","builtStart","friendlyDateTime","builtEnd","validateError","after","before","split","startIsValid","endIsValid","isInterval","toDuration","startOf","diff","hasSame","isEmpty","isAfter","dateTime","isBefore","contains","splitAt","dateTimes","sorted","splitBy","divideEqually","numberOfParts","overlaps","abutsStart","abutsEnd","engulfs","intersection","union","merge","intervals","final","b","sofar","xor","currentCount","ends","time","flattened","difference","toISODate","toISOTime","dateFormat","separator","mapEndpoints","mapFn","Info","hasDST","proto","setZone","isValidIANAZone","monthsFormat","weekdaysFormat","features","intlTokens","zones","relative","dayDiff","earlier","later","utcDayStart","toUTC","keepLocalTime","highOrderDiffs","differs","lowestOrder","highWater","differ","delta","remainingMillis","lowerOrderUnits","numberingSystems","arab","arabext","bali","beng","deva","fullwide","gujr","hanidec","khmr","knda","laoo","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt","latn","numberingSystemsUTF16","hanidecChars","parseDigits","str","code","charCodeAt","search","min","max","digitRegex","append","MISSING_FTP","intUnit","post","deser","NBSP","String","fromCharCode","spaceOrNBSP","spaceOrNBSPRegExp","fixListRegex","stripInsensitivities","oneOf","strings","startIndex","join","findIndex","groups","h","simple","escapeToken","unitForToken","one","two","three","four","six","oneOrTwo","oneToThree","oneToSix","oneToNine","twoToFour","fourToSix","unitate","partTypeStyleToTokenVal","short","long","dayperiod","dayPeriod","tokenForPart","part","buildRegex","re","handlers","matches","all","matchIndex","dateTimeFromMatches","toField","Z","q","M","G","y","S","dummyDateTimeCache","getDummyDateTime","maybeExpandMacroToken","formatter","parts","includes","expandMacroTokens","explainFromTokens","disqualifyingUnit","regexString","rawMatches","parseFromTokens","nonLeapLadder","leapLadder","unitOutOfRange","dayOfWeek","js","getUTCDay","computeOrdinal","uncomputeOrdinal","table","month0","gregorianToWeek","gregObj","weekToGregorian","weekData","weekdayOfJan4","yearInDays","gregorianToOrdinal","gregData","ordinalToGregorian","ordinalData","hasInvalidWeekData","validYear","validWeek","validWeekday","hasInvalidOrdinalData","validOrdinal","hasInvalidGregorianData","validMonth","validDay","hasInvalidTimeData","validHour","validMinute","validSecond","validMillisecond","MAX_DATE","unsupportedZone","possiblyCachedWeekData","inst","old","fixOffset","localTS","tz","utcGuess","o2","o3","tsToObj","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","objToTS","adjustTime","oPre","millisToAdd","parseDataToDateTime","parsedZone","interpretationZone","toTechFormat","toTechTimeFormat","suppressSeconds","suppressMilliseconds","includeOffset","includeZone","spaceZone","defaultUnitValues","defaultWeekUnitValues","defaultOrdinalUnitValues","orderedWeekUnits","orderedOrdinalUnits","weeknumber","weeksnumber","weeknumbers","weekyear","weekyears","quickDT","tsNow","offsetProvis","diffRelative","calendary","unchanged","ot","_zone","isLuxonDateTime","fromJSDate","zoneToUse","fromSeconds","containsOrdinal","containsGregorYear","containsGregorMD","containsGregor","definiteWeekDef","useWeekData","defaultValues","objNow","foundFirst","higherOrderInvalid","gregorian","tsFinal","offsetFinal","fromRFC2822","fromHTTP","fromFormat","localeToUse","fromString","fromSQL","isDateTime","monthShort","monthLong","weekdayShort","weekdayLong","offsetNameShort","offsetNameLong","isInDST","isInLeapYear","resolvedLocaleOpts","toLocal","keepCalendarTime","newTS","offsetGuess","asObj","setLocale","settingWeekStuff","normalizedUnit","endOf","toLocaleString","toLocaleParts","toISOWeekDate","toRFC2822","toHTTP","toSQLDate","toSQLTime","toSQL","toMillis","toSeconds","toBSON","otherDateTime","durOpts","otherIsLater","diffNow","until","inputMs","toRelative","padding","toRelativeCalendar","every","fromFormatExplain","fromStringExplain","dateTimeish"],"mappings":";;;;AAAA;;AAEA;;;AAGA,MAAMA,UAAN,SAAyBC,KAAzB,CAA+B;AAE/B;;;;;AAGO,MAAMC,oBAAN,SAAmCF,UAAnC,CAA8C;AACnDG,EAAAA,WAAW,CAACC,MAAD,EAAS;AAClB,UAAO,qBAAoBA,MAAM,CAACC,SAAP,EAAmB,EAA9C;AACD;;AAHkD;AAMrD;;;;AAGO,MAAMC,oBAAN,SAAmCN,UAAnC,CAA8C;AACnDG,EAAAA,WAAW,CAACC,MAAD,EAAS;AAClB,UAAO,qBAAoBA,MAAM,CAACC,SAAP,EAAmB,EAA9C;AACD;;AAHkD;AAMrD;;;;AAGO,MAAME,oBAAN,SAAmCP,UAAnC,CAA8C;AACnDG,EAAAA,WAAW,CAACC,MAAD,EAAS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;AACvC,WAAOwL,2BAAP;AACD;AAED;;;;;;AAIA,aAAWvL,YAAX,GAA0B;AACxB,WAAOuL,YAAP;AACD;AAED;;;;;;AAIA,aAAWtL,yBAAX,GAAuC;AACrC,WAAOsL,yBAAP;AACD;AAED;;;;;;AAIA,aAAWrL,yBAAX,GAAuC;AACrC,WAAOqL,yBAAP;AACD;AAED;;;;;;AAIA,aAAWpL,aAAX,GAA2B;AACzB,WAAOoL,aAAP;AACD;AAED;;;;;;AAIA,aAAWnL,0BAAX,GAAwC;AACtC,WAAOmL,0BAAP;AACD;AAED;;;;;;AAIA,aAAWlL,aAAX,GAA2B;AACzB,WAAOkL,aAAP;AACD;AAED;;;;;;AAIA,aAAWjL,0BAAX,GAAwC;AACtC,WAAOiL,0BAAP;AACD;;AA9rD2B;AAisD9B;;;;AAGA,AAAO,SAASsY,gBAAT,CAA0BgU,WAA1B,EAAuC;AAC5C,MAAIxhB,QAAQ,CAAC8e,UAAT,CAAoB0C,WAApB,CAAJ,EAAsC;AACpC,WAAOA,WAAP;AACD,GAFD,MAEO,IAAIA,WAAW,IAAIA,WAAW,CAAC9V,OAA3B,IAAsCthB,QAAQ,CAACo3B,WAAW,CAAC9V,OAAZ,EAAD,CAAlD,EAA2E;AAChF,WAAO1L,QAAQ,CAACwd,UAAT,CAAoBgE,WAApB,CAAP;AACD,GAFM,MAEA,IAAIA,WAAW,IAAI,OAAOA,WAAP,KAAuB,QAA1C,EAAoD;AACzD,WAAOxhB,QAAQ,CAAC2B,UAAT,CAAoB6f,WAApB,CAAP;AACD,GAFM,MAEA;AACL,UAAM,IAAI15B,oBAAJ,CACH,8BAA6B05B,WAAY,aAAY,OAAOA,WAAY,EADrE,CAAN;AAGD;AACF;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/node_modules/luxon/build/readme.md b/node_modules/luxon/build/readme.md deleted file mode 100644 index 0f48ea9..0000000 --- a/node_modules/luxon/build/readme.md +++ /dev/null @@ -1 +0,0 @@ -This contains Luxon's tiny website. Use `npm run site` command to copy it to the build directory. diff --git a/node_modules/luxon/package.json b/node_modules/luxon/package.json deleted file mode 100644 index 1829c91..0000000 --- a/node_modules/luxon/package.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "_from": "luxon@1.25.0", - "_id": "luxon@1.25.0", - "_inBundle": false, - "_integrity": "sha512-hEgLurSH8kQRjY6i4YLey+mcKVAWXbDNlZRmM6AgWDJ1cY3atl8Ztf5wEY7VBReFbmGnwQPz7KYJblL8B2k0jQ==", - "_location": "/luxon", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "luxon@1.25.0", - "name": "luxon", - "escapedName": "luxon", - "rawSpec": "1.25.0", - "saveSpec": null, - "fetchSpec": "1.25.0" - }, - "_requiredBy": [ - "/docker-hub-utils" - ], - "_resolved": "https://registry.npmjs.org/luxon/-/luxon-1.25.0.tgz", - "_shasum": "d86219e90bc0102c0eb299d65b2f5e95efe1fe72", - "_spec": "luxon@1.25.0", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/docker-hub-utils", - "author": { - "name": "Isaac Cambron" - }, - "browser": "build/cjs-browser/luxon.js", - "bugs": { - "url": "https://github.com/moment/luxon/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Immutable date wrapper", - "devDependencies": { - "@babel/core": "^7.9.0", - "@babel/node": "^7.8.7", - "@babel/plugin-external-helpers": "^7.8.3", - "@babel/preset-env": "^7.9.5", - "@rollup/plugin-commonjs": "^11.1.0", - "@rollup/plugin-node-resolve": "^7.1.3", - "babel-core": "^7.0.0-bridge.0", - "babel-eslint": "latest", - "babel-jest": "^25.3.0", - "benchmark": "latest", - "codecov": ">= 3.6.5", - "core-js": "^3.6.5", - "esdoc": "^1.1.0", - "esdoc-standard-plugin": "latest", - "eslint": "6.4.0", - "eslint-config-defaults": "latest", - "eslint-config-prettier": "6.3.0", - "eslint-config-standard": "^14.1.1", - "eslint-plugin-babel": "latest", - "eslint-plugin-import": "^2.20.2", - "eslint-plugin-node": "10.0.0", - "eslint-plugin-prettier": "3.1.1", - "eslint-plugin-promise": "latest", - "eslint-plugin-react": "^7.19.0", - "eslint-plugin-standard": "^4.0.1", - "fs-extra": "^6.0.1", - "full-icu": "^1.3.1", - "husky": "^4.2.5", - "jest": "^25.3.0", - "lint-staged": "^10.1.3", - "prettier": "1.14.3", - "rollup": "^1.32.1", - "rollup-plugin-babel": "^4.4.0", - "rollup-plugin-babel-minify": "^6.2.0", - "uglify-js": "^3.9.0" - }, - "engines": { - "node": "*" - }, - "files": [ - "build/node/luxon.js", - "build/node/luxon.js.map", - "build/cjs-browser/luxon.js", - "build/cjs-browser/luxon.js.map", - "build/amd/luxon.js", - "build/amd/luxon.js.map", - "build/global/luxon.js", - "build/global/luxon.js.map", - "build/global/luxon.min.js", - "build/global/luxon.min.js.map", - "src" - ], - "homepage": "https://github.com/moment/luxon#readme", - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "jsdelivr": "build/global/luxon.min.js", - "keywords": [ - "date", - "immutable" - ], - "license": "MIT", - "lint-staged": { - "*.{js,json}": [ - "prettier --write" - ] - }, - "main": "build/node/luxon.js", - "module": "src/luxon.js", - "name": "luxon", - "repository": { - "type": "git", - "url": "git+https://github.com/moment/luxon.git" - }, - "scripts": { - "benchmark": "babel-node benchmarks/datetime.js", - "build": "babel-node tasks/buildAll.js", - "build-global": "babel-node tasks/buildGlobal.js", - "build-node": "babel-node tasks/buildNode.js", - "check-doc-coverage": "babel-node tasks/docCoverage", - "codecov": "codecov", - "docs": "esdoc -c docs/index.js", - "format": "prettier --write 'src/**/*.js' 'test/**/*.js' 'benchmarks/*.js'", - "jest": "jest", - "lint": "eslint --quiet src test benchmarks", - "lint!": "npm run format && npm run lint", - "site": "cp -r site/** build/", - "test": "jest --coverage" - }, - "sideEffects": false, - "unpkg": "build/global/luxon.min.js", - "version": "1.25.0" -} diff --git a/node_modules/luxon/src/datetime.js b/node_modules/luxon/src/datetime.js deleted file mode 100644 index 01532ff..0000000 --- a/node_modules/luxon/src/datetime.js +++ /dev/null @@ -1,2123 +0,0 @@ -import Duration, { friendlyDuration } from "./duration.js"; -import Interval from "./interval.js"; -import Settings from "./settings.js"; -import Info from "./info.js"; -import Formatter from "./impl/formatter.js"; -import FixedOffsetZone from "./zones/fixedOffsetZone.js"; -import Locale from "./impl/locale.js"; -import { - isUndefined, - maybeArray, - isDate, - isNumber, - bestBy, - daysInMonth, - daysInYear, - isLeapYear, - weeksInWeekYear, - normalizeObject, - roundTo, - objToLocalTS -} from "./impl/util.js"; -import { normalizeZone } from "./impl/zoneUtil.js"; -import diff from "./impl/diff.js"; -import { parseRFC2822Date, parseISODate, parseHTTPDate, parseSQL } from "./impl/regexParser.js"; -import { parseFromTokens, explainFromTokens } from "./impl/tokenParser.js"; -import { - gregorianToWeek, - weekToGregorian, - gregorianToOrdinal, - ordinalToGregorian, - hasInvalidGregorianData, - hasInvalidWeekData, - hasInvalidOrdinalData, - hasInvalidTimeData -} from "./impl/conversions.js"; -import * as Formats from "./impl/formats.js"; -import { - InvalidArgumentError, - ConflictingSpecificationError, - InvalidUnitError, - InvalidDateTimeError -} from "./errors.js"; -import Invalid from "./impl/invalid.js"; - -const INVALID = "Invalid DateTime"; -const MAX_DATE = 8.64e15; - -function unsupportedZone(zone) { - return new Invalid("unsupported zone", `the zone "${zone.name}" is not supported`); -} - -// we cache week data on the DT object and this intermediates the cache -function possiblyCachedWeekData(dt) { - if (dt.weekData === null) { - dt.weekData = gregorianToWeek(dt.c); - } - return dt.weekData; -} - -// clone really means, "make a new object with these modifications". all "setters" really use this -// to create a new object while only changing some of the properties -function clone(inst, alts) { - const current = { - ts: inst.ts, - zone: inst.zone, - c: inst.c, - o: inst.o, - loc: inst.loc, - invalid: inst.invalid - }; - return new DateTime(Object.assign({}, current, alts, { old: current })); -} - -// find the right offset a given local time. The o input is our guess, which determines which -// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST) -function fixOffset(localTS, o, tz) { - // Our UTC time is just a guess because our offset is just a guess - let utcGuess = localTS - o * 60 * 1000; - - // Test whether the zone matches the offset for this ts - const o2 = tz.offset(utcGuess); - - // If so, offset didn't change and we're done - if (o === o2) { - return [utcGuess, o]; - } - - // If not, change the ts by the difference in the offset - utcGuess -= (o2 - o) * 60 * 1000; - - // If that gives us the local time we want, we're done - const o3 = tz.offset(utcGuess); - if (o2 === o3) { - return [utcGuess, o2]; - } - - // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time - return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)]; -} - -// convert an epoch timestamp into a calendar object with the given offset -function tsToObj(ts, offset) { - ts += offset * 60 * 1000; - - const d = new Date(ts); - - return { - year: d.getUTCFullYear(), - month: d.getUTCMonth() + 1, - day: d.getUTCDate(), - hour: d.getUTCHours(), - minute: d.getUTCMinutes(), - second: d.getUTCSeconds(), - millisecond: d.getUTCMilliseconds() - }; -} - -// convert a calendar object to a epoch timestamp -function objToTS(obj, offset, zone) { - return fixOffset(objToLocalTS(obj), offset, zone); -} - -// create a new DT instance by adding a duration, adjusting for DSTs -function adjustTime(inst, dur) { - const oPre = inst.o, - year = inst.c.year + Math.trunc(dur.years), - month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, - c = Object.assign({}, inst.c, { - year, - month, - day: - Math.min(inst.c.day, daysInMonth(year, month)) + - Math.trunc(dur.days) + - Math.trunc(dur.weeks) * 7 - }), - millisToAdd = Duration.fromObject({ - years: dur.years - Math.trunc(dur.years), - quarters: dur.quarters - Math.trunc(dur.quarters), - months: dur.months - Math.trunc(dur.months), - weeks: dur.weeks - Math.trunc(dur.weeks), - days: dur.days - Math.trunc(dur.days), - hours: dur.hours, - minutes: dur.minutes, - seconds: dur.seconds, - milliseconds: dur.milliseconds - }).as("milliseconds"), - localTS = objToLocalTS(c); - - let [ts, o] = fixOffset(localTS, oPre, inst.zone); - - if (millisToAdd !== 0) { - ts += millisToAdd; - // that could have changed the offset by going over a DST, but we want to keep the ts the same - o = inst.zone.offset(ts); - } - - return { ts, o }; -} - -// helper useful in turning the results of parsing into real dates -// by handling the zone options -function parseDataToDateTime(parsed, parsedZone, opts, format, text) { - const { setZone, zone } = opts; - if (parsed && Object.keys(parsed).length !== 0) { - const interpretationZone = parsedZone || zone, - inst = DateTime.fromObject( - Object.assign(parsed, opts, { - zone: interpretationZone, - // setZone is a valid option in the calling methods, but not in fromObject - setZone: undefined - }) - ); - return setZone ? inst : inst.setZone(zone); - } else { - return DateTime.invalid( - new Invalid("unparsable", `the input "${text}" can't be parsed as ${format}`) - ); - } -} - -// if you want to output a technical format (e.g. RFC 2822), this helper -// helps handle the details -function toTechFormat(dt, format, allowZ = true) { - return dt.isValid - ? Formatter.create(Locale.create("en-US"), { - allowZ, - forceSimple: true - }).formatDateTimeFromString(dt, format) - : null; -} - -// technical time formats (e.g. the time part of ISO 8601), take some options -// and this commonizes their handling -function toTechTimeFormat( - dt, - { - suppressSeconds = false, - suppressMilliseconds = false, - includeOffset, - includeZone = false, - spaceZone = false, - format = "extended" - } -) { - let fmt = format === "basic" ? "HHmm" : "HH:mm"; - - if (!suppressSeconds || dt.second !== 0 || dt.millisecond !== 0) { - fmt += format === "basic" ? "ss" : ":ss"; - if (!suppressMilliseconds || dt.millisecond !== 0) { - fmt += ".SSS"; - } - } - - if ((includeZone || includeOffset) && spaceZone) { - fmt += " "; - } - - if (includeZone) { - fmt += "z"; - } else if (includeOffset) { - fmt += format === "basic" ? "ZZZ" : "ZZ"; - } - - return toTechFormat(dt, fmt); -} - -// defaults for unspecified units in the supported calendars -const defaultUnitValues = { - month: 1, - day: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 - }, - defaultWeekUnitValues = { - weekNumber: 1, - weekday: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 - }, - defaultOrdinalUnitValues = { - ordinal: 1, - hour: 0, - minute: 0, - second: 0, - millisecond: 0 - }; - -// Units in the supported calendars, sorted by bigness -const orderedUnits = ["year", "month", "day", "hour", "minute", "second", "millisecond"], - orderedWeekUnits = [ - "weekYear", - "weekNumber", - "weekday", - "hour", - "minute", - "second", - "millisecond" - ], - orderedOrdinalUnits = ["year", "ordinal", "hour", "minute", "second", "millisecond"]; - -// standardize case and plurality in units -function normalizeUnit(unit) { - const normalized = { - year: "year", - years: "year", - month: "month", - months: "month", - day: "day", - days: "day", - hour: "hour", - hours: "hour", - minute: "minute", - minutes: "minute", - quarter: "quarter", - quarters: "quarter", - second: "second", - seconds: "second", - millisecond: "millisecond", - milliseconds: "millisecond", - weekday: "weekday", - weekdays: "weekday", - weeknumber: "weekNumber", - weeksnumber: "weekNumber", - weeknumbers: "weekNumber", - weekyear: "weekYear", - weekyears: "weekYear", - ordinal: "ordinal" - }[unit.toLowerCase()]; - - if (!normalized) throw new InvalidUnitError(unit); - - return normalized; -} - -// this is a dumbed down version of fromObject() that runs about 60% faster -// but doesn't do any validation, makes a bunch of assumptions about what units -// are present, and so on. -function quickDT(obj, zone) { - // assume we have the higher-order units - for (const u of orderedUnits) { - if (isUndefined(obj[u])) { - obj[u] = defaultUnitValues[u]; - } - } - - const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj); - if (invalid) { - return DateTime.invalid(invalid); - } - - const tsNow = Settings.now(), - offsetProvis = zone.offset(tsNow), - [ts, o] = objToTS(obj, offsetProvis, zone); - - return new DateTime({ - ts, - zone, - o - }); -} - -function diffRelative(start, end, opts) { - const round = isUndefined(opts.round) ? true : opts.round, - format = (c, unit) => { - c = roundTo(c, round || opts.calendary ? 0 : 2, true); - const formatter = end.loc.clone(opts).relFormatter(opts); - return formatter.format(c, unit); - }, - differ = unit => { - if (opts.calendary) { - if (!end.hasSame(start, unit)) { - return end - .startOf(unit) - .diff(start.startOf(unit), unit) - .get(unit); - } else return 0; - } else { - return end.diff(start, unit).get(unit); - } - }; - - if (opts.unit) { - return format(differ(opts.unit), opts.unit); - } - - for (const unit of opts.units) { - const count = differ(unit); - if (Math.abs(count) >= 1) { - return format(count, unit); - } - } - return format(0, opts.units[opts.units.length - 1]); -} - -/** - * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them. - * - * A DateTime comprises of: - * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch. - * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone). - * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`. - * - * Here is a brief overview of the most commonly used functionality it provides: - * - * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link local}, {@link utc}, and (most flexibly) {@link fromObject}. To create one from a standard string format, use {@link fromISO}, {@link fromHTTP}, and {@link fromRFC2822}. To create one from a custom string format, use {@link fromFormat}. To create one from a native JS date, use {@link fromJSDate}. - * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link toObject}), use the {@link year}, {@link month}, - * {@link day}, {@link hour}, {@link minute}, {@link second}, {@link millisecond} accessors. - * * **Week calendar**: For ISO week calendar attributes, see the {@link weekYear}, {@link weekNumber}, and {@link weekday} accessors. - * * **Configuration** See the {@link locale} and {@link numberingSystem} accessors. - * * **Transformation**: To transform the DateTime into other DateTimes, use {@link set}, {@link reconfigure}, {@link setZone}, {@link setLocale}, {@link plus}, {@link minus}, {@link endOf}, {@link startOf}, {@link toUTC}, and {@link toLocal}. - * * **Output**: To convert the DateTime to other representations, use the {@link toRelative}, {@link toRelativeCalendar}, {@link toJSON}, {@link toISO}, {@link toHTTP}, {@link toObject}, {@link toRFC2822}, {@link toString}, {@link toLocaleString}, {@link toFormat}, {@link toMillis} and {@link toJSDate}. - * - * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation. - */ -export default class DateTime { - /** - * @access private - */ - constructor(config) { - const zone = config.zone || Settings.defaultZone; - - let invalid = - config.invalid || - (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || - (!zone.isValid ? unsupportedZone(zone) : null); - /** - * @access private - */ - this.ts = isUndefined(config.ts) ? Settings.now() : config.ts; - - let c = null, - o = null; - if (!invalid) { - const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone); - - if (unchanged) { - [c, o] = [config.old.c, config.old.o]; - } else { - const ot = zone.offset(this.ts); - c = tsToObj(this.ts, ot); - invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null; - c = invalid ? null : c; - o = invalid ? null : ot; - } - } - - /** - * @access private - */ - this._zone = zone; - /** - * @access private - */ - this.loc = config.loc || Locale.create(); - /** - * @access private - */ - this.invalid = invalid; - /** - * @access private - */ - this.weekData = null; - /** - * @access private - */ - this.c = c; - /** - * @access private - */ - this.o = o; - /** - * @access private - */ - this.isLuxonDateTime = true; - } - - // CONSTRUCT - - /** - * Create a local DateTime - * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used - * @param {number} [month=1] - The month, 1-indexed - * @param {number} [day=1] - The day of the month - * @param {number} [hour=0] - The hour of the day, in 24-hour time - * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 - * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 - * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 - * @example DateTime.local() //~> now - * @example DateTime.local(2017) //~> 2017-01-01T00:00:00 - * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00 - * @example DateTime.local(2017, 3, 12) //~> 2017-03-12T00:00:00 - * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00 - * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00 - * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10 - * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765 - * @return {DateTime} - */ - static local(year, month, day, hour, minute, second, millisecond) { - if (isUndefined(year)) { - return new DateTime({ ts: Settings.now() }); - } else { - return quickDT( - { - year, - month, - day, - hour, - minute, - second, - millisecond - }, - Settings.defaultZone - ); - } - } - - /** - * Create a DateTime in UTC - * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used - * @param {number} [month=1] - The month, 1-indexed - * @param {number} [day=1] - The day of the month - * @param {number} [hour=0] - The hour of the day, in 24-hour time - * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59 - * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59 - * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999 - * @example DateTime.utc() //~> now - * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z - * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z - * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z - * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z - * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z - * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z - * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765Z - * @return {DateTime} - */ - static utc(year, month, day, hour, minute, second, millisecond) { - if (isUndefined(year)) { - return new DateTime({ - ts: Settings.now(), - zone: FixedOffsetZone.utcInstance - }); - } else { - return quickDT( - { - year, - month, - day, - hour, - minute, - second, - millisecond - }, - FixedOffsetZone.utcInstance - ); - } - } - - /** - * Create a DateTime from a Javascript Date object. Uses the default zone. - * @param {Date} date - a Javascript Date object - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @return {DateTime} - */ - static fromJSDate(date, options = {}) { - const ts = isDate(date) ? date.valueOf() : NaN; - if (Number.isNaN(ts)) { - return DateTime.invalid("invalid input"); - } - - const zoneToUse = normalizeZone(options.zone, Settings.defaultZone); - if (!zoneToUse.isValid) { - return DateTime.invalid(unsupportedZone(zoneToUse)); - } - - return new DateTime({ - ts: ts, - zone: zoneToUse, - loc: Locale.fromObject(options) - }); - } - - /** - * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. - * @param {number} milliseconds - a number of milliseconds since 1970 UTC - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance - * @return {DateTime} - */ - static fromMillis(milliseconds, options = {}) { - if (!isNumber(milliseconds)) { - throw new InvalidArgumentError( - `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}` - ); - } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) { - // this isn't perfect because because we can still end up out of range because of additional shifting, but it's a start - return DateTime.invalid("Timestamp out of range"); - } else { - return new DateTime({ - ts: milliseconds, - zone: normalizeZone(options.zone, Settings.defaultZone), - loc: Locale.fromObject(options) - }); - } - } - - /** - * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone. - * @param {number} seconds - a number of seconds since 1970 UTC - * @param {Object} options - configuration options for the DateTime - * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into - * @param {string} [options.locale] - a locale to set on the resulting DateTime instance - * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance - * @return {DateTime} - */ - static fromSeconds(seconds, options = {}) { - if (!isNumber(seconds)) { - throw new InvalidArgumentError("fromSeconds requires a numerical input"); - } else { - return new DateTime({ - ts: seconds * 1000, - zone: normalizeZone(options.zone, Settings.defaultZone), - loc: Locale.fromObject(options) - }); - } - } - - /** - * Create a DateTime from a Javascript object with keys like 'year' and 'hour' with reasonable defaults. - * @param {Object} obj - the object to create the DateTime from - * @param {number} obj.year - a year, such as 1987 - * @param {number} obj.month - a month, 1-12 - * @param {number} obj.day - a day of the month, 1-31, depending on the month - * @param {number} obj.ordinal - day of the year, 1-365 or 366 - * @param {number} obj.weekYear - an ISO week year - * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year - * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday - * @param {number} obj.hour - hour of the day, 0-23 - * @param {number} obj.minute - minute of the hour, 0-59 - * @param {number} obj.second - second of the minute, 0-59 - * @param {number} obj.millisecond - millisecond of the second, 0-999 - * @param {string|Zone} [obj.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone() - * @param {string} [obj.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} obj.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} obj.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25' - * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01' - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06 - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'utc' }), - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'local' }) - * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6, zone: 'America/New_York' }) - * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13' - * @return {DateTime} - */ - static fromObject(obj) { - const zoneToUse = normalizeZone(obj.zone, Settings.defaultZone); - if (!zoneToUse.isValid) { - return DateTime.invalid(unsupportedZone(zoneToUse)); - } - - const tsNow = Settings.now(), - offsetProvis = zoneToUse.offset(tsNow), - normalized = normalizeObject(obj, normalizeUnit, [ - "zone", - "locale", - "outputCalendar", - "numberingSystem" - ]), - containsOrdinal = !isUndefined(normalized.ordinal), - containsGregorYear = !isUndefined(normalized.year), - containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), - containsGregor = containsGregorYear || containsGregorMD, - definiteWeekDef = normalized.weekYear || normalized.weekNumber, - loc = Locale.fromObject(obj); - - // cases: - // just a weekday -> this week's instance of that weekday, no worries - // (gregorian data or ordinal) + (weekYear or weekNumber) -> error - // (gregorian month or day) + ordinal -> error - // otherwise just use weeks or ordinals or gregorian, depending on what's specified - - if ((containsGregor || containsOrdinal) && definiteWeekDef) { - throw new ConflictingSpecificationError( - "Can't mix weekYear/weekNumber units with year/month/day or ordinals" - ); - } - - if (containsGregorMD && containsOrdinal) { - throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day"); - } - - const useWeekData = definiteWeekDef || (normalized.weekday && !containsGregor); - - // configure ourselves to deal with gregorian dates or week stuff - let units, - defaultValues, - objNow = tsToObj(tsNow, offsetProvis); - if (useWeekData) { - units = orderedWeekUnits; - defaultValues = defaultWeekUnitValues; - objNow = gregorianToWeek(objNow); - } else if (containsOrdinal) { - units = orderedOrdinalUnits; - defaultValues = defaultOrdinalUnitValues; - objNow = gregorianToOrdinal(objNow); - } else { - units = orderedUnits; - defaultValues = defaultUnitValues; - } - - // set default values for missing stuff - let foundFirst = false; - for (const u of units) { - const v = normalized[u]; - if (!isUndefined(v)) { - foundFirst = true; - } else if (foundFirst) { - normalized[u] = defaultValues[u]; - } else { - normalized[u] = objNow[u]; - } - } - - // make sure the values we have are in range - const higherOrderInvalid = useWeekData - ? hasInvalidWeekData(normalized) - : containsOrdinal - ? hasInvalidOrdinalData(normalized) - : hasInvalidGregorianData(normalized), - invalid = higherOrderInvalid || hasInvalidTimeData(normalized); - - if (invalid) { - return DateTime.invalid(invalid); - } - - // compute the actual time - const gregorian = useWeekData - ? weekToGregorian(normalized) - : containsOrdinal - ? ordinalToGregorian(normalized) - : normalized, - [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse), - inst = new DateTime({ - ts: tsFinal, - zone: zoneToUse, - o: offsetFinal, - loc - }); - - // gregorian data + weekday serves only to validate - if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) { - return DateTime.invalid( - "mismatched weekday", - `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}` - ); - } - - return inst; - } - - /** - * Create a DateTime from an ISO 8601 string - * @param {string} text - the ISO string - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromISO('2016-05-25T09:08:34.123') - * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00') - * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true}) - * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'}) - * @example DateTime.fromISO('2016-W05-4') - * @return {DateTime} - */ - static fromISO(text, opts = {}) { - const [vals, parsedZone] = parseISODate(text); - return parseDataToDateTime(vals, parsedZone, opts, "ISO 8601", text); - } - - /** - * Create a DateTime from an RFC 2822 string - * @param {string} text - the RFC 2822 string - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. - * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT') - * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600') - * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z') - * @return {DateTime} - */ - static fromRFC2822(text, opts = {}) { - const [vals, parsedZone] = parseRFC2822Date(text); - return parseDataToDateTime(vals, parsedZone, opts, "RFC 2822", text); - } - - /** - * Create a DateTime from an HTTP header date - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 - * @param {string} text - the HTTP header date - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in. - * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods. - * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance - * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT') - * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT') - * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994') - * @return {DateTime} - */ - static fromHTTP(text, opts = {}) { - const [vals, parsedZone] = parseHTTPDate(text); - return parseDataToDateTime(vals, parsedZone, opts, "HTTP", opts); - } - - /** - * Create a DateTime from an input string and format string. - * Defaults to en-US if no locale has been specified, regardless of the system's locale. - * @see https://moment.github.io/luxon/docs/manual/parsing.html#table-of-tokens - * @param {string} text - the string to parse - * @param {string} fmt - the format the string is expected to be in (see the link below for the formats) - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale - * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @return {DateTime} - */ - static fromFormat(text, fmt, opts = {}) { - if (isUndefined(text) || isUndefined(fmt)) { - throw new InvalidArgumentError("fromFormat requires an input string and a format"); - } - - const { locale = null, numberingSystem = null } = opts, - localeToUse = Locale.fromOpts({ - locale, - numberingSystem, - defaultToEN: true - }), - [vals, parsedZone, invalid] = parseFromTokens(localeToUse, text, fmt); - if (invalid) { - return DateTime.invalid(invalid); - } else { - return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text); - } - } - - /** - * @deprecated use fromFormat instead - */ - static fromString(text, fmt, opts = {}) { - return DateTime.fromFormat(text, fmt, opts); - } - - /** - * Create a DateTime from a SQL date, time, or datetime - * Defaults to en-US if no locale has been specified, regardless of the system's locale - * @param {string} text - the string to parse - * @param {Object} opts - options to affect the creation - * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone - * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one - * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale - * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system - * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance - * @example DateTime.fromSQL('2017-05-15') - * @example DateTime.fromSQL('2017-05-15 09:12:34') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles') - * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true }) - * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' }) - * @example DateTime.fromSQL('09:12:34.342') - * @return {DateTime} - */ - static fromSQL(text, opts = {}) { - const [vals, parsedZone] = parseSQL(text); - return parseDataToDateTime(vals, parsedZone, opts, "SQL", text); - } - - /** - * Create an invalid DateTime. - * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {DateTime} - */ - static invalid(reason, explanation = null) { - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the DateTime is invalid"); - } - - const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidDateTimeError(invalid); - } else { - return new DateTime({ invalid }); - } - } - - /** - * Check if an object is a DateTime. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - static isDateTime(o) { - return (o && o.isLuxonDateTime) || false; - } - - // INFO - - /** - * Get the value of unit. - * @param {string} unit - a unit such as 'minute' or 'day' - * @example DateTime.local(2017, 7, 4).get('month'); //=> 7 - * @example DateTime.local(2017, 7, 4).get('day'); //=> 4 - * @return {number} - */ - get(unit) { - return this[unit]; - } - - /** - * Returns whether the DateTime is valid. Invalid DateTimes occur when: - * * The DateTime was created from invalid calendar information, such as the 13th month or February 30 - * * The DateTime was created by an operation on another invalid date - * @type {boolean} - */ - get isValid() { - return this.invalid === null; - } - - /** - * Returns an error code if this DateTime is invalid, or null if the DateTime is valid - * @type {string} - */ - get invalidReason() { - return this.invalid ? this.invalid.reason : null; - } - - /** - * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid - * @type {string} - */ - get invalidExplanation() { - return this.invalid ? this.invalid.explanation : null; - } - - /** - * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime - * - * @type {string} - */ - get locale() { - return this.isValid ? this.loc.locale : null; - } - - /** - * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime - * - * @type {string} - */ - get numberingSystem() { - return this.isValid ? this.loc.numberingSystem : null; - } - - /** - * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime - * - * @type {string} - */ - get outputCalendar() { - return this.isValid ? this.loc.outputCalendar : null; - } - - /** - * Get the time zone associated with this DateTime. - * @type {Zone} - */ - get zone() { - return this._zone; - } - - /** - * Get the name of the time zone. - * @type {string} - */ - get zoneName() { - return this.isValid ? this.zone.name : null; - } - - /** - * Get the year - * @example DateTime.local(2017, 5, 25).year //=> 2017 - * @type {number} - */ - get year() { - return this.isValid ? this.c.year : NaN; - } - - /** - * Get the quarter - * @example DateTime.local(2017, 5, 25).quarter //=> 2 - * @type {number} - */ - get quarter() { - return this.isValid ? Math.ceil(this.c.month / 3) : NaN; - } - - /** - * Get the month (1-12). - * @example DateTime.local(2017, 5, 25).month //=> 5 - * @type {number} - */ - get month() { - return this.isValid ? this.c.month : NaN; - } - - /** - * Get the day of the month (1-30ish). - * @example DateTime.local(2017, 5, 25).day //=> 25 - * @type {number} - */ - get day() { - return this.isValid ? this.c.day : NaN; - } - - /** - * Get the hour of the day (0-23). - * @example DateTime.local(2017, 5, 25, 9).hour //=> 9 - * @type {number} - */ - get hour() { - return this.isValid ? this.c.hour : NaN; - } - - /** - * Get the minute of the hour (0-59). - * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30 - * @type {number} - */ - get minute() { - return this.isValid ? this.c.minute : NaN; - } - - /** - * Get the second of the minute (0-59). - * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52 - * @type {number} - */ - get second() { - return this.isValid ? this.c.second : NaN; - } - - /** - * Get the millisecond of the second (0-999). - * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654 - * @type {number} - */ - get millisecond() { - return this.isValid ? this.c.millisecond : NaN; - } - - /** - * Get the week year - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2014, 11, 31).weekYear //=> 2015 - * @type {number} - */ - get weekYear() { - return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN; - } - - /** - * Get the week number of the week year (1-52ish). - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2017, 5, 25).weekNumber //=> 21 - * @type {number} - */ - get weekNumber() { - return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN; - } - - /** - * Get the day of the week. - * 1 is Monday and 7 is Sunday - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2014, 11, 31).weekday //=> 4 - * @type {number} - */ - get weekday() { - return this.isValid ? possiblyCachedWeekData(this).weekday : NaN; - } - - /** - * Get the ordinal (meaning the day of the year) - * @example DateTime.local(2017, 5, 25).ordinal //=> 145 - * @type {number|DateTime} - */ - get ordinal() { - return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN; - } - - /** - * Get the human readable short month name, such as 'Oct'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).monthShort //=> Oct - * @type {string} - */ - get monthShort() { - return this.isValid ? Info.months("short", { locale: this.locale })[this.month - 1] : null; - } - - /** - * Get the human readable long month name, such as 'October'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).monthLong //=> October - * @type {string} - */ - get monthLong() { - return this.isValid ? Info.months("long", { locale: this.locale })[this.month - 1] : null; - } - - /** - * Get the human readable short weekday, such as 'Mon'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon - * @type {string} - */ - get weekdayShort() { - return this.isValid ? Info.weekdays("short", { locale: this.locale })[this.weekday - 1] : null; - } - - /** - * Get the human readable long weekday, such as 'Monday'. - * Defaults to the system's locale if no locale has been specified - * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday - * @type {string} - */ - get weekdayLong() { - return this.isValid ? Info.weekdays("long", { locale: this.locale })[this.weekday - 1] : null; - } - - /** - * Get the UTC offset of this DateTime in minutes - * @example DateTime.local().offset //=> -240 - * @example DateTime.utc().offset //=> 0 - * @type {number} - */ - get offset() { - return this.isValid ? +this.o : NaN; - } - - /** - * Get the short human name for the zone's current offset, for example "EST" or "EDT". - * Defaults to the system's locale if no locale has been specified - * @type {string} - */ - get offsetNameShort() { - if (this.isValid) { - return this.zone.offsetName(this.ts, { - format: "short", - locale: this.locale - }); - } else { - return null; - } - } - - /** - * Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time". - * Defaults to the system's locale if no locale has been specified - * @type {string} - */ - get offsetNameLong() { - if (this.isValid) { - return this.zone.offsetName(this.ts, { - format: "long", - locale: this.locale - }); - } else { - return null; - } - } - - /** - * Get whether this zone's offset ever changes, as in a DST. - * @type {boolean} - */ - get isOffsetFixed() { - return this.isValid ? this.zone.universal : null; - } - - /** - * Get whether the DateTime is in a DST. - * @type {boolean} - */ - get isInDST() { - if (this.isOffsetFixed) { - return false; - } else { - return ( - this.offset > this.set({ month: 1 }).offset || this.offset > this.set({ month: 5 }).offset - ); - } - } - - /** - * Returns true if this DateTime is in a leap year, false otherwise - * @example DateTime.local(2016).isInLeapYear //=> true - * @example DateTime.local(2013).isInLeapYear //=> false - * @type {boolean} - */ - get isInLeapYear() { - return isLeapYear(this.year); - } - - /** - * Returns the number of days in this DateTime's month - * @example DateTime.local(2016, 2).daysInMonth //=> 29 - * @example DateTime.local(2016, 3).daysInMonth //=> 31 - * @type {number} - */ - get daysInMonth() { - return daysInMonth(this.year, this.month); - } - - /** - * Returns the number of days in this DateTime's year - * @example DateTime.local(2016).daysInYear //=> 366 - * @example DateTime.local(2013).daysInYear //=> 365 - * @type {number} - */ - get daysInYear() { - return this.isValid ? daysInYear(this.year) : NaN; - } - - /** - * Returns the number of weeks in this DateTime's year - * @see https://en.wikipedia.org/wiki/ISO_week_date - * @example DateTime.local(2004).weeksInWeekYear //=> 53 - * @example DateTime.local(2013).weeksInWeekYear //=> 52 - * @type {number} - */ - get weeksInWeekYear() { - return this.isValid ? weeksInWeekYear(this.weekYear) : NaN; - } - - /** - * Returns the resolved Intl options for this DateTime. - * This is useful in understanding the behavior of formatting methods - * @param {Object} opts - the same options as toLocaleString - * @return {Object} - */ - resolvedLocaleOpts(opts = {}) { - const { locale, numberingSystem, calendar } = Formatter.create( - this.loc.clone(opts), - opts - ).resolvedOptions(this); - return { locale, numberingSystem, outputCalendar: calendar }; - } - - // TRANSFORM - - /** - * "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime. - * - * Equivalent to {@link setZone}('utc') - * @param {number} [offset=0] - optionally, an offset from UTC in minutes - * @param {Object} [opts={}] - options to pass to `setZone()` - * @return {DateTime} - */ - toUTC(offset = 0, opts = {}) { - return this.setZone(FixedOffsetZone.instance(offset), opts); - } - - /** - * "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime. - * - * Equivalent to `setZone('local')` - * @return {DateTime} - */ - toLocal() { - return this.setZone(Settings.defaultZone); - } - - /** - * "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime. - * - * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link plus}. You may wish to use {@link toLocal} and {@link toUTC} which provide simple convenience wrappers for commonly used zones. - * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link Zone} class. - * @param {Object} opts - options - * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this. - * @return {DateTime} - */ - setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) { - zone = normalizeZone(zone, Settings.defaultZone); - if (zone.equals(this.zone)) { - return this; - } else if (!zone.isValid) { - return DateTime.invalid(unsupportedZone(zone)); - } else { - let newTS = this.ts; - if (keepLocalTime || keepCalendarTime) { - const offsetGuess = zone.offset(this.ts); - const asObj = this.toObject(); - [newTS] = objToTS(asObj, offsetGuess, zone); - } - return clone(this, { ts: newTS, zone }); - } - } - - /** - * "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime. - * @param {Object} properties - the properties to set - * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' }) - * @return {DateTime} - */ - reconfigure({ locale, numberingSystem, outputCalendar } = {}) { - const loc = this.loc.clone({ locale, numberingSystem, outputCalendar }); - return clone(this, { loc }); - } - - /** - * "Set" the locale. Returns a newly-constructed DateTime. - * Just a convenient alias for reconfigure({ locale }) - * @example DateTime.local(2017, 5, 25).setLocale('en-GB') - * @return {DateTime} - */ - setLocale(locale) { - return this.reconfigure({ locale }); - } - - /** - * "Set" the values of specified units. Returns a newly-constructed DateTime. - * You can only set units with this method; for "setting" metadata, see {@link reconfigure} and {@link setZone}. - * @param {Object} values - a mapping of units to numbers - * @example dt.set({ year: 2017 }) - * @example dt.set({ hour: 8, minute: 30 }) - * @example dt.set({ weekday: 5 }) - * @example dt.set({ year: 2005, ordinal: 234 }) - * @return {DateTime} - */ - set(values) { - if (!this.isValid) return this; - - const normalized = normalizeObject(values, normalizeUnit, []), - settingWeekStuff = - !isUndefined(normalized.weekYear) || - !isUndefined(normalized.weekNumber) || - !isUndefined(normalized.weekday); - - let mixed; - if (settingWeekStuff) { - mixed = weekToGregorian(Object.assign(gregorianToWeek(this.c), normalized)); - } else if (!isUndefined(normalized.ordinal)) { - mixed = ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c), normalized)); - } else { - mixed = Object.assign(this.toObject(), normalized); - - // if we didn't set the day but we ended up on an overflow date, - // use the last day of the right month - if (isUndefined(normalized.day)) { - mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day); - } - } - - const [ts, o] = objToTS(mixed, this.o, this.zone); - return clone(this, { ts, o }); - } - - /** - * Add a period of time to this DateTime and return the resulting DateTime - * - * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between. - * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @example DateTime.local().plus(123) //~> in 123 milliseconds - * @example DateTime.local().plus({ minutes: 15 }) //~> in 15 minutes - * @example DateTime.local().plus({ days: 1 }) //~> this time tomorrow - * @example DateTime.local().plus({ days: -1 }) //~> this time yesterday - * @example DateTime.local().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min - * @example DateTime.local().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min - * @return {DateTime} - */ - plus(duration) { - if (!this.isValid) return this; - const dur = friendlyDuration(duration); - return clone(this, adjustTime(this, dur)); - } - - /** - * Subtract a period of time to this DateTime and return the resulting DateTime - * See {@link plus} - * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - @return {DateTime} - */ - minus(duration) { - if (!this.isValid) return this; - const dur = friendlyDuration(duration).negate(); - return clone(this, adjustTime(this, dur)); - } - - /** - * "Set" this DateTime to the beginning of a unit of time. - * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'. - * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01' - * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01' - * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00' - * @return {DateTime} - */ - startOf(unit) { - if (!this.isValid) return this; - const o = {}, - normalizedUnit = Duration.normalizeUnit(unit); - switch (normalizedUnit) { - case "years": - o.month = 1; - // falls through - case "quarters": - case "months": - o.day = 1; - // falls through - case "weeks": - case "days": - o.hour = 0; - // falls through - case "hours": - o.minute = 0; - // falls through - case "minutes": - o.second = 0; - // falls through - case "seconds": - o.millisecond = 0; - break; - case "milliseconds": - break; - // no default, invalid units throw in normalizeUnit() - } - - if (normalizedUnit === "weeks") { - o.weekday = 1; - } - - if (normalizedUnit === "quarters") { - const q = Math.ceil(this.month / 3); - o.month = (q - 1) * 3 + 1; - } - - return this.set(o); - } - - /** - * "Set" this DateTime to the end (meaning the last millisecond) of a unit of time - * @param {string} unit - The unit to go to the end of. Can be 'year', 'month', 'day', 'hour', 'minute', 'second', or 'millisecond'. - * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00' - * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00' - * @return {DateTime} - */ - endOf(unit) { - return this.isValid - ? this.plus({ [unit]: 1 }) - .startOf(unit) - .minus(1) - : this; - } - - // OUTPUT - - /** - * Returns a string representation of this DateTime formatted according to the specified format string. - * **You may not want this.** See {@link toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens). - * Defaults to en-US if no locale has been specified, regardless of the system's locale. - * @see https://moment.github.io/luxon/docs/manual/formatting.html#table-of-tokens - * @param {string} fmt - the format string - * @param {Object} opts - opts to override the configuration options - * @example DateTime.local().toFormat('yyyy LLL dd') //=> '2017 Apr 22' - * @example DateTime.local().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22' - * @example DateTime.local().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22' - * @example DateTime.local().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes' - * @return {string} - */ - toFormat(fmt, opts = {}) { - return this.isValid - ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) - : INVALID; - } - - /** - * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`. - * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation - * of the DateTime in the assigned locale. - * Defaults to the system's locale if no locale has been specified - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param opts {Object} - Intl.DateTimeFormat constructor options and configuration options - * @example DateTime.local().toLocaleString(); //=> 4/20/2017 - * @example DateTime.local().setLocale('en-gb').toLocaleString(); //=> '20/04/2017' - * @example DateTime.local().toLocaleString({ locale: 'en-gb' }); //=> '20/04/2017' - * @example DateTime.local().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017' - * @example DateTime.local().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM' - * @example DateTime.local().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM' - * @example DateTime.local().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20' - * @example DateTime.local().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM' - * @example DateTime.local().toLocaleString({ hour: '2-digit', minute: '2-digit', hour12: false }); //=> '11:32' - * @return {string} - */ - toLocaleString(opts = Formats.DATE_SHORT) { - return this.isValid - ? Formatter.create(this.loc.clone(opts), opts).formatDateTime(this) - : INVALID; - } - - /** - * Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output. - * Defaults to the system's locale if no locale has been specified - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts - * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`. - * @example DateTime.local().toLocaleParts(); //=> [ - * //=> { type: 'day', value: '25' }, - * //=> { type: 'literal', value: '/' }, - * //=> { type: 'month', value: '05' }, - * //=> { type: 'literal', value: '/' }, - * //=> { type: 'year', value: '1982' } - * //=> ] - */ - toLocaleParts(opts = {}) { - return this.isValid - ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) - : []; - } - - /** - * Returns an ISO 8601-compliant string representation of this DateTime - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc(1982, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z' - * @example DateTime.local().toISO() //=> '2017-04-22T20:47:05.335-04:00' - * @example DateTime.local().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335' - * @example DateTime.local().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400' - * @return {string} - */ - toISO(opts = {}) { - if (!this.isValid) { - return null; - } - - return `${this.toISODate(opts)}T${this.toISOTime(opts)}`; - } - - /** - * Returns an ISO 8601-compliant string representation of this DateTime's date component - * @param {Object} opts - options - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25' - * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525' - * @return {string} - */ - toISODate({ format = "extended" } = {}) { - let fmt = format === "basic" ? "yyyyMMdd" : "yyyy-MM-dd"; - if (this.year > 9999) { - fmt = "+" + fmt; - } - - return toTechFormat(this, fmt); - } - - /** - * Returns an ISO 8601-compliant string representation of this DateTime's week date - * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2' - * @return {string} - */ - toISOWeekDate() { - return toTechFormat(this, "kkkk-'W'WW-c"); - } - - /** - * Returns an ISO 8601-compliant string representation of this DateTime's time component - * @param {Object} opts - options - * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0 - * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0 - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @param {string} [opts.format='extended'] - choose between the basic and extended format - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z' - * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z' - * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z' - * @return {string} - */ - toISOTime({ - suppressMilliseconds = false, - suppressSeconds = false, - includeOffset = true, - format = "extended" - } = {}) { - return toTechTimeFormat(this, { - suppressSeconds, - suppressMilliseconds, - includeOffset, - format - }); - } - - /** - * Returns an RFC 2822-compatible string representation of this DateTime, always in UTC - * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000' - * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400' - * @return {string} - */ - toRFC2822() { - return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false); - } - - /** - * Returns a string representation of this DateTime appropriate for use in HTTP headers. - * Specifically, the string conforms to RFC 1123. - * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 - * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT' - * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT' - * @return {string} - */ - toHTTP() { - return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'"); - } - - /** - * Returns a string representation of this DateTime appropriate for use in SQL Date - * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13' - * @return {string} - */ - toSQLDate() { - return toTechFormat(this, "yyyy-MM-dd"); - } - - /** - * Returns a string representation of this DateTime appropriate for use in SQL Time - * @param {Object} opts - options - * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @example DateTime.utc().toSQL() //=> '05:15:16.345' - * @example DateTime.local().toSQL() //=> '05:15:16.345 -04:00' - * @example DateTime.local().toSQL({ includeOffset: false }) //=> '05:15:16.345' - * @example DateTime.local().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York' - * @return {string} - */ - toSQLTime({ includeOffset = true, includeZone = false } = {}) { - return toTechTimeFormat(this, { - includeOffset, - includeZone, - spaceZone: true - }); - } - - /** - * Returns a string representation of this DateTime appropriate for use in SQL DateTime - * @param {Object} opts - options - * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset. - * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00' - * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z' - * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00' - * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000' - * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York' - * @return {string} - */ - toSQL(opts = {}) { - if (!this.isValid) { - return null; - } - - return `${this.toSQLDate()} ${this.toSQLTime(opts)}`; - } - - /** - * Returns a string representation of this DateTime appropriate for debugging - * @return {string} - */ - toString() { - return this.isValid ? this.toISO() : INVALID; - } - - /** - * Returns the epoch milliseconds of this DateTime. Alias of {@link toMillis} - * @return {number} - */ - valueOf() { - return this.toMillis(); - } - - /** - * Returns the epoch milliseconds of this DateTime. - * @return {number} - */ - toMillis() { - return this.isValid ? this.ts : NaN; - } - - /** - * Returns the epoch seconds of this DateTime. - * @return {number} - */ - toSeconds() { - return this.isValid ? this.ts / 1000 : NaN; - } - - /** - * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON. - * @return {string} - */ - toJSON() { - return this.toISO(); - } - - /** - * Returns a BSON serializable equivalent to this DateTime. - * @return {Date} - */ - toBSON() { - return this.toJSDate(); - } - - /** - * Returns a Javascript object with this DateTime's year, month, day, and so on. - * @param opts - options for generating the object - * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output - * @example DateTime.local().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 } - * @return {Object} - */ - toObject(opts = {}) { - if (!this.isValid) return {}; - - const base = Object.assign({}, this.c); - - if (opts.includeConfig) { - base.outputCalendar = this.outputCalendar; - base.numberingSystem = this.loc.numberingSystem; - base.locale = this.loc.locale; - } - return base; - } - - /** - * Returns a Javascript Date equivalent to this DateTime. - * @return {Date} - */ - toJSDate() { - return new Date(this.isValid ? this.ts : NaN); - } - - // COMPARE - - /** - * Return the difference between two DateTimes as a Duration. - * @param {DateTime} otherDateTime - the DateTime to compare this one to - * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration. - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @example - * var i1 = DateTime.fromISO('1982-05-25T09:45'), - * i2 = DateTime.fromISO('1983-10-14T10:30'); - * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 } - * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 } - * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 } - * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 } - * @return {Duration} - */ - diff(otherDateTime, unit = "milliseconds", opts = {}) { - if (!this.isValid || !otherDateTime.isValid) { - return Duration.invalid( - this.invalid || otherDateTime.invalid, - "created by diffing an invalid DateTime" - ); - } - - const durOpts = Object.assign( - { locale: this.locale, numberingSystem: this.numberingSystem }, - opts - ); - - const units = maybeArray(unit).map(Duration.normalizeUnit), - otherIsLater = otherDateTime.valueOf() > this.valueOf(), - earlier = otherIsLater ? this : otherDateTime, - later = otherIsLater ? otherDateTime : this, - diffed = diff(earlier, later, units, durOpts); - - return otherIsLater ? diffed.negate() : diffed; - } - - /** - * Return the difference between this DateTime and right now. - * See {@link diff} - * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - diffNow(unit = "milliseconds", opts = {}) { - return this.diff(DateTime.local(), unit, opts); - } - - /** - * Return an Interval spanning between this DateTime and another DateTime - * @param {DateTime} otherDateTime - the other end point of the Interval - * @return {Interval} - */ - until(otherDateTime) { - return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this; - } - - /** - * Return whether this DateTime is in the same unit of time as another DateTime - * @param {DateTime} otherDateTime - the other DateTime - * @param {string} unit - the unit of time to check sameness on - * @example DateTime.local().hasSame(otherDT, 'day'); //~> true if both the same calendar day - * @return {boolean} - */ - hasSame(otherDateTime, unit) { - if (!this.isValid) return false; - if (unit === "millisecond") { - return this.valueOf() === otherDateTime.valueOf(); - } else { - const inputMs = otherDateTime.valueOf(); - return this.startOf(unit) <= inputMs && inputMs <= this.endOf(unit); - } - } - - /** - * Equality check - * Two DateTimes are equal iff they represent the same millisecond, have the same zone and location, and are both valid. - * To compare just the millisecond values, use `+dt1 === +dt2`. - * @param {DateTime} other - the other DateTime - * @return {boolean} - */ - equals(other) { - return ( - this.isValid && - other.isValid && - this.valueOf() === other.valueOf() && - this.zone.equals(other.zone) && - this.loc.equals(other.loc) - ); - } - - /** - * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your - * platform supports Intl.RelativeTimeFormat. Rounds down by default. - * @param {Object} options - options that affect the output - * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now. - * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow" - * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds" - * @param {boolean} [options.round=true] - whether to round the numbers in the output. - * @param {boolean} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding. - * @param {string} options.locale - override the locale of this DateTime - * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this - * @example DateTime.local().plus({ days: 1 }).toRelative() //=> "in 1 day" - * @example DateTime.local().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día" - * @example DateTime.local().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures" - * @example DateTime.local().minus({ days: 2 }).toRelative() //=> "2 days ago" - * @example DateTime.local().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago" - * @example DateTime.local().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago" - */ - toRelative(options = {}) { - if (!this.isValid) return null; - const base = options.base || DateTime.fromObject({ zone: this.zone }), - padding = options.padding ? (this < base ? -options.padding : options.padding) : 0; - return diffRelative( - base, - this.plus(padding), - Object.assign(options, { - numeric: "always", - units: ["years", "months", "days", "hours", "minutes", "seconds"] - }) - ); - } - - /** - * Returns a string representation of this date relative to today, such as "yesterday" or "next month". - * Only internationalizes on platforms that supports Intl.RelativeTimeFormat. - * @param {Object} options - options that affect the output - * @param {DateTime} [options.base=DateTime.local()] - the DateTime to use as the basis to which this time is compared. Defaults to now. - * @param {string} options.locale - override the locale of this DateTime - * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days" - * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this - * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow" - * @example DateTime.local().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana" - * @example DateTime.local().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain" - * @example DateTime.local().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago" - */ - toRelativeCalendar(options = {}) { - if (!this.isValid) return null; - - return diffRelative( - options.base || DateTime.fromObject({ zone: this.zone }), - this, - Object.assign(options, { - numeric: "auto", - units: ["years", "months", "days"], - calendary: true - }) - ); - } - - /** - * Return the min of several date times - * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum - * @return {DateTime} the min DateTime, or undefined if called with no argument - */ - static min(...dateTimes) { - if (!dateTimes.every(DateTime.isDateTime)) { - throw new InvalidArgumentError("min requires all arguments be DateTimes"); - } - return bestBy(dateTimes, i => i.valueOf(), Math.min); - } - - /** - * Return the max of several date times - * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum - * @return {DateTime} the max DateTime, or undefined if called with no argument - */ - static max(...dateTimes) { - if (!dateTimes.every(DateTime.isDateTime)) { - throw new InvalidArgumentError("max requires all arguments be DateTimes"); - } - return bestBy(dateTimes, i => i.valueOf(), Math.max); - } - - // MISC - - /** - * Explain how a string would be parsed by fromFormat() - * @param {string} text - the string to parse - * @param {string} fmt - the format the string is expected to be in (see description) - * @param {Object} options - options taken by fromFormat() - * @return {Object} - */ - static fromFormatExplain(text, fmt, options = {}) { - const { locale = null, numberingSystem = null } = options, - localeToUse = Locale.fromOpts({ - locale, - numberingSystem, - defaultToEN: true - }); - return explainFromTokens(localeToUse, text, fmt); - } - - /** - * @deprecated use fromFormatExplain instead - */ - static fromStringExplain(text, fmt, options = {}) { - return DateTime.fromFormatExplain(text, fmt, options); - } - - // FORMAT PRESETS - - /** - * {@link toLocaleString} format like 10/14/1983 - * @type {Object} - */ - static get DATE_SHORT() { - return Formats.DATE_SHORT; - } - - /** - * {@link toLocaleString} format like 'Oct 14, 1983' - * @type {Object} - */ - static get DATE_MED() { - return Formats.DATE_MED; - } - - /** - * {@link toLocaleString} format like 'Fri, Oct 14, 1983' - * @type {Object} - */ - static get DATE_MED_WITH_WEEKDAY() { - return Formats.DATE_MED_WITH_WEEKDAY; - } - - /** - * {@link toLocaleString} format like 'October 14, 1983' - * @type {Object} - */ - static get DATE_FULL() { - return Formats.DATE_FULL; - } - - /** - * {@link toLocaleString} format like 'Tuesday, October 14, 1983' - * @type {Object} - */ - static get DATE_HUGE() { - return Formats.DATE_HUGE; - } - - /** - * {@link toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get TIME_SIMPLE() { - return Formats.TIME_SIMPLE; - } - - /** - * {@link toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get TIME_WITH_SECONDS() { - return Formats.TIME_WITH_SECONDS; - } - - /** - * {@link toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - static get TIME_WITH_SHORT_OFFSET() { - return Formats.TIME_WITH_SHORT_OFFSET; - } - - /** - * {@link toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - static get TIME_WITH_LONG_OFFSET() { - return Formats.TIME_WITH_LONG_OFFSET; - } - - /** - * {@link toLocaleString} format like '09:30', always 24-hour. - * @type {Object} - */ - static get TIME_24_SIMPLE() { - return Formats.TIME_24_SIMPLE; - } - - /** - * {@link toLocaleString} format like '09:30:23', always 24-hour. - * @type {Object} - */ - static get TIME_24_WITH_SECONDS() { - return Formats.TIME_24_WITH_SECONDS; - } - - /** - * {@link toLocaleString} format like '09:30:23 EDT', always 24-hour. - * @type {Object} - */ - static get TIME_24_WITH_SHORT_OFFSET() { - return Formats.TIME_24_WITH_SHORT_OFFSET; - } - - /** - * {@link toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour. - * @type {Object} - */ - static get TIME_24_WITH_LONG_OFFSET() { - return Formats.TIME_24_WITH_LONG_OFFSET; - } - - /** - * {@link toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_SHORT() { - return Formats.DATETIME_SHORT; - } - - /** - * {@link toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_SHORT_WITH_SECONDS() { - return Formats.DATETIME_SHORT_WITH_SECONDS; - } - - /** - * {@link toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_MED() { - return Formats.DATETIME_MED; - } - - /** - * {@link toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_MED_WITH_SECONDS() { - return Formats.DATETIME_MED_WITH_SECONDS; - } - - /** - * {@link toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_MED_WITH_WEEKDAY() { - return Formats.DATETIME_MED_WITH_WEEKDAY; - } - - /** - * {@link toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_FULL() { - return Formats.DATETIME_FULL; - } - - /** - * {@link toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_FULL_WITH_SECONDS() { - return Formats.DATETIME_FULL_WITH_SECONDS; - } - - /** - * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_HUGE() { - return Formats.DATETIME_HUGE; - } - - /** - * {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is. - * @type {Object} - */ - static get DATETIME_HUGE_WITH_SECONDS() { - return Formats.DATETIME_HUGE_WITH_SECONDS; - } -} - -/** - * @private - */ -export function friendlyDateTime(dateTimeish) { - if (DateTime.isDateTime(dateTimeish)) { - return dateTimeish; - } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) { - return DateTime.fromJSDate(dateTimeish); - } else if (dateTimeish && typeof dateTimeish === "object") { - return DateTime.fromObject(dateTimeish); - } else { - throw new InvalidArgumentError( - `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}` - ); - } -} diff --git a/node_modules/luxon/src/duration.js b/node_modules/luxon/src/duration.js deleted file mode 100644 index 3c6889a..0000000 --- a/node_modules/luxon/src/duration.js +++ /dev/null @@ -1,789 +0,0 @@ -import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from "./errors.js"; -import Formatter from "./impl/formatter.js"; -import Invalid from "./impl/invalid.js"; -import Locale from "./impl/locale.js"; -import { parseISODuration } from "./impl/regexParser.js"; -import { - asNumber, - hasOwnProperty, - isNumber, - isUndefined, - normalizeObject, - roundTo -} from "./impl/util.js"; -import Settings from "./settings.js"; - -const INVALID = "Invalid Duration"; - -// unit conversion constants -const lowOrderMatrix = { - weeks: { - days: 7, - hours: 7 * 24, - minutes: 7 * 24 * 60, - seconds: 7 * 24 * 60 * 60, - milliseconds: 7 * 24 * 60 * 60 * 1000 - }, - days: { - hours: 24, - minutes: 24 * 60, - seconds: 24 * 60 * 60, - milliseconds: 24 * 60 * 60 * 1000 - }, - hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1000 }, - minutes: { seconds: 60, milliseconds: 60 * 1000 }, - seconds: { milliseconds: 1000 } - }, - casualMatrix = Object.assign( - { - years: { - quarters: 4, - months: 12, - weeks: 52, - days: 365, - hours: 365 * 24, - minutes: 365 * 24 * 60, - seconds: 365 * 24 * 60 * 60, - milliseconds: 365 * 24 * 60 * 60 * 1000 - }, - quarters: { - months: 3, - weeks: 13, - days: 91, - hours: 91 * 24, - minutes: 91 * 24 * 60, - seconds: 91 * 24 * 60 * 60, - milliseconds: 91 * 24 * 60 * 60 * 1000 - }, - months: { - weeks: 4, - days: 30, - hours: 30 * 24, - minutes: 30 * 24 * 60, - seconds: 30 * 24 * 60 * 60, - milliseconds: 30 * 24 * 60 * 60 * 1000 - } - }, - lowOrderMatrix - ), - daysInYearAccurate = 146097.0 / 400, - daysInMonthAccurate = 146097.0 / 4800, - accurateMatrix = Object.assign( - { - years: { - quarters: 4, - months: 12, - weeks: daysInYearAccurate / 7, - days: daysInYearAccurate, - hours: daysInYearAccurate * 24, - minutes: daysInYearAccurate * 24 * 60, - seconds: daysInYearAccurate * 24 * 60 * 60, - milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000 - }, - quarters: { - months: 3, - weeks: daysInYearAccurate / 28, - days: daysInYearAccurate / 4, - hours: (daysInYearAccurate * 24) / 4, - minutes: (daysInYearAccurate * 24 * 60) / 4, - seconds: (daysInYearAccurate * 24 * 60 * 60) / 4, - milliseconds: (daysInYearAccurate * 24 * 60 * 60 * 1000) / 4 - }, - months: { - weeks: daysInMonthAccurate / 7, - days: daysInMonthAccurate, - hours: daysInMonthAccurate * 24, - minutes: daysInMonthAccurate * 24 * 60, - seconds: daysInMonthAccurate * 24 * 60 * 60, - milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000 - } - }, - lowOrderMatrix - ); - -// units ordered by size -const orderedUnits = [ - "years", - "quarters", - "months", - "weeks", - "days", - "hours", - "minutes", - "seconds", - "milliseconds" -]; - -const reverseUnits = orderedUnits.slice(0).reverse(); - -// clone really means "create another instance just like this one, but with these changes" -function clone(dur, alts, clear = false) { - // deep merge for vals - const conf = { - values: clear ? alts.values : Object.assign({}, dur.values, alts.values || {}), - loc: dur.loc.clone(alts.loc), - conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy - }; - return new Duration(conf); -} - -function antiTrunc(n) { - return n < 0 ? Math.floor(n) : Math.ceil(n); -} - -// NB: mutates parameters -function convert(matrix, fromMap, fromUnit, toMap, toUnit) { - const conv = matrix[toUnit][fromUnit], - raw = fromMap[fromUnit] / conv, - sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]), - // ok, so this is wild, but see the matrix in the tests - added = - !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw); - toMap[toUnit] += added; - fromMap[fromUnit] -= added * conv; -} - -// NB: mutates parameters -function normalizeValues(matrix, vals) { - reverseUnits.reduce((previous, current) => { - if (!isUndefined(vals[current])) { - if (previous) { - convert(matrix, vals, previous, vals, current); - } - return current; - } else { - return previous; - } - }, null); -} - -/** - * A Duration object represents a period of time, like "2 months" or "1 day, 1 hour". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime.plus} to add a Duration object to a DateTime, producing another DateTime. - * - * Here is a brief overview of commonly used methods and getters in Duration: - * - * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}. - * * **Unit values** See the {@link Duration.years}, {@link Duration.months}, {@link Duration.weeks}, {@link Duration.days}, {@link Duration.hours}, {@link Duration.minutes}, {@link Duration.seconds}, {@link Duration.milliseconds} accessors. - * * **Configuration** See {@link Duration.locale} and {@link Duration.numberingSystem} accessors. - * * **Transformation** To create new Durations out of old ones use {@link Duration.plus}, {@link Duration.minus}, {@link Duration.normalize}, {@link Duration.set}, {@link Duration.reconfigure}, {@link Duration.shiftTo}, and {@link Duration.negate}. - * * **Output** To convert the Duration into other representations, see {@link Duration.as}, {@link Duration.toISO}, {@link Duration.toFormat}, and {@link Duration.toJSON} - * - * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation. - */ -export default class Duration { - /** - * @private - */ - constructor(config) { - const accurate = config.conversionAccuracy === "longterm" || false; - /** - * @access private - */ - this.values = config.values; - /** - * @access private - */ - this.loc = config.loc || Locale.create(); - /** - * @access private - */ - this.conversionAccuracy = accurate ? "longterm" : "casual"; - /** - * @access private - */ - this.invalid = config.invalid || null; - /** - * @access private - */ - this.matrix = accurate ? accurateMatrix : casualMatrix; - /** - * @access private - */ - this.isLuxonDuration = true; - } - - /** - * Create Duration from a number of milliseconds. - * @param {number} count of milliseconds - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - static fromMillis(count, opts) { - return Duration.fromObject(Object.assign({ milliseconds: count }, opts)); - } - - /** - * Create a Duration from a Javascript object with keys like 'years' and 'hours. - * If this object is empty then a zero milliseconds duration is returned. - * @param {Object} obj - the object to create the DateTime from - * @param {number} obj.years - * @param {number} obj.quarters - * @param {number} obj.months - * @param {number} obj.weeks - * @param {number} obj.days - * @param {number} obj.hours - * @param {number} obj.minutes - * @param {number} obj.seconds - * @param {number} obj.milliseconds - * @param {string} [obj.locale='en-US'] - the locale to use - * @param {string} obj.numberingSystem - the numbering system to use - * @param {string} [obj.conversionAccuracy='casual'] - the conversion system to use - * @return {Duration} - */ - static fromObject(obj) { - if (obj == null || typeof obj !== "object") { - throw new InvalidArgumentError( - `Duration.fromObject: argument expected to be an object, got ${ - obj === null ? "null" : typeof obj - }` - ); - } - return new Duration({ - values: normalizeObject(obj, Duration.normalizeUnit, [ - "locale", - "numberingSystem", - "conversionAccuracy", - "zone" // a bit of debt; it's super inconvenient internally not to be able to blindly pass this - ]), - loc: Locale.fromObject(obj), - conversionAccuracy: obj.conversionAccuracy - }); - } - - /** - * Create a Duration from an ISO 8601 duration string. - * @param {string} text - text to parse - * @param {Object} opts - options for parsing - * @param {string} [opts.locale='en-US'] - the locale to use - * @param {string} opts.numberingSystem - the numbering system to use - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @see https://en.wikipedia.org/wiki/ISO_8601#Durations - * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 } - * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 } - * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 } - * @return {Duration} - */ - static fromISO(text, opts) { - const [parsed] = parseISODuration(text); - if (parsed) { - const obj = Object.assign(parsed, opts); - return Duration.fromObject(obj); - } else { - return Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); - } - } - - /** - * Create an invalid Duration. - * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {Duration} - */ - static invalid(reason, explanation = null) { - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the Duration is invalid"); - } - - const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidDurationError(invalid); - } else { - return new Duration({ invalid }); - } - } - - /** - * @private - */ - static normalizeUnit(unit) { - const normalized = { - year: "years", - years: "years", - quarter: "quarters", - quarters: "quarters", - month: "months", - months: "months", - week: "weeks", - weeks: "weeks", - day: "days", - days: "days", - hour: "hours", - hours: "hours", - minute: "minutes", - minutes: "minutes", - second: "seconds", - seconds: "seconds", - millisecond: "milliseconds", - milliseconds: "milliseconds" - }[unit ? unit.toLowerCase() : unit]; - - if (!normalized) throw new InvalidUnitError(unit); - - return normalized; - } - - /** - * Check if an object is a Duration. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - static isDuration(o) { - return (o && o.isLuxonDuration) || false; - } - - /** - * Get the locale of a Duration, such 'en-GB' - * @type {string} - */ - get locale() { - return this.isValid ? this.loc.locale : null; - } - - /** - * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration - * - * @type {string} - */ - get numberingSystem() { - return this.isValid ? this.loc.numberingSystem : null; - } - - /** - * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens: - * * `S` for milliseconds - * * `s` for seconds - * * `m` for minutes - * * `h` for hours - * * `d` for days - * * `M` for months - * * `y` for years - * Notes: - * * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits - * * The duration will be converted to the set of units in the format string using {@link Duration.shiftTo} and the Durations's conversion accuracy setting. - * @param {string} fmt - the format string - * @param {Object} opts - options - * @param {boolean} [opts.floor=true] - floor numerical values - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2" - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002" - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000" - * @return {string} - */ - toFormat(fmt, opts = {}) { - // reverse-compat since 1.2; we always round down now, never up, and we do it by default - const fmtOpts = Object.assign({}, opts, { - floor: opts.round !== false && opts.floor !== false - }); - return this.isValid - ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) - : INVALID; - } - - /** - * Returns a Javascript object with this Duration's values. - * @param opts - options for generating the object - * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output - * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 } - * @return {Object} - */ - toObject(opts = {}) { - if (!this.isValid) return {}; - - const base = Object.assign({}, this.values); - - if (opts.includeConfig) { - base.conversionAccuracy = this.conversionAccuracy; - base.numberingSystem = this.loc.numberingSystem; - base.locale = this.loc.locale; - } - return base; - } - - /** - * Returns an ISO 8601-compliant string representation of this Duration. - * @see https://en.wikipedia.org/wiki/ISO_8601#Durations - * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S' - * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S' - * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M' - * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M' - * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S' - * @return {string} - */ - toISO() { - // we could use the formatter, but this is an easier way to get the minimum string - if (!this.isValid) return null; - - let s = "P"; - if (this.years !== 0) s += this.years + "Y"; - if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + "M"; - if (this.weeks !== 0) s += this.weeks + "W"; - if (this.days !== 0) s += this.days + "D"; - if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0) - s += "T"; - if (this.hours !== 0) s += this.hours + "H"; - if (this.minutes !== 0) s += this.minutes + "M"; - if (this.seconds !== 0 || this.milliseconds !== 0) - // this will handle "floating point madness" by removing extra decimal places - // https://stackoverflow.com/questions/588004/is-floating-point-math-broken - s += roundTo(this.seconds + this.milliseconds / 1000, 3) + "S"; - if (s === "P") s += "T0S"; - return s; - } - - /** - * Returns an ISO 8601 representation of this Duration appropriate for use in JSON. - * @return {string} - */ - toJSON() { - return this.toISO(); - } - - /** - * Returns an ISO 8601 representation of this Duration appropriate for use in debugging. - * @return {string} - */ - toString() { - return this.toISO(); - } - - /** - * Returns an milliseconds value of this Duration. - * @return {number} - */ - valueOf() { - return this.as("milliseconds"); - } - - /** - * Make this Duration longer by the specified amount. Return a newly-constructed Duration. - * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @return {Duration} - */ - plus(duration) { - if (!this.isValid) return this; - - const dur = friendlyDuration(duration), - result = {}; - - for (const k of orderedUnits) { - if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) { - result[k] = dur.get(k) + this.get(k); - } - } - - return clone(this, { values: result }, true); - } - - /** - * Make this Duration shorter by the specified amount. Return a newly-constructed Duration. - * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject() - * @return {Duration} - */ - minus(duration) { - if (!this.isValid) return this; - - const dur = friendlyDuration(duration); - return this.plus(dur.negate()); - } - - /** - * Scale this Duration by the specified amount. Return a newly-constructed Duration. - * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number. - * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit(x => x * 2) //=> { hours: 2, minutes: 60 } - * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnit((x, u) => u === "hour" ? x * 2 : x) //=> { hours: 2, minutes: 30 } - * @return {Duration} - */ - mapUnits(fn) { - if (!this.isValid) return this; - const result = {}; - for (const k of Object.keys(this.values)) { - result[k] = asNumber(fn(this.values[k], k)); - } - return clone(this, { values: result }, true); - } - - /** - * Get the value of unit. - * @param {string} unit - a unit such as 'minute' or 'day' - * @example Duration.fromObject({years: 2, days: 3}).years //=> 2 - * @example Duration.fromObject({years: 2, days: 3}).months //=> 0 - * @example Duration.fromObject({years: 2, days: 3}).days //=> 3 - * @return {number} - */ - get(unit) { - return this[Duration.normalizeUnit(unit)]; - } - - /** - * "Set" the values of specified units. Return a newly-constructed Duration. - * @param {Object} values - a mapping of units to numbers - * @example dur.set({ years: 2017 }) - * @example dur.set({ hours: 8, minutes: 30 }) - * @return {Duration} - */ - set(values) { - if (!this.isValid) return this; - - const mixed = Object.assign(this.values, normalizeObject(values, Duration.normalizeUnit, [])); - return clone(this, { values: mixed }); - } - - /** - * "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration. - * @example dur.reconfigure({ locale: 'en-GB' }) - * @return {Duration} - */ - reconfigure({ locale, numberingSystem, conversionAccuracy } = {}) { - const loc = this.loc.clone({ locale, numberingSystem }), - opts = { loc }; - - if (conversionAccuracy) { - opts.conversionAccuracy = conversionAccuracy; - } - - return clone(this, opts); - } - - /** - * Return the length of the duration in the specified unit. - * @param {string} unit - a unit such as 'minutes' or 'days' - * @example Duration.fromObject({years: 1}).as('days') //=> 365 - * @example Duration.fromObject({years: 1}).as('months') //=> 12 - * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5 - * @return {number} - */ - as(unit) { - return this.isValid ? this.shiftTo(unit).get(unit) : NaN; - } - - /** - * Reduce this Duration to its canonical representation in its current units. - * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 } - * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 } - * @return {Duration} - */ - normalize() { - if (!this.isValid) return this; - const vals = this.toObject(); - normalizeValues(this.matrix, vals); - return clone(this, { values: vals }, true); - } - - /** - * Convert this Duration into its representation in a different set of units. - * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 } - * @return {Duration} - */ - shiftTo(...units) { - if (!this.isValid) return this; - - if (units.length === 0) { - return this; - } - - units = units.map(u => Duration.normalizeUnit(u)); - - const built = {}, - accumulated = {}, - vals = this.toObject(); - let lastUnit; - - for (const k of orderedUnits) { - if (units.indexOf(k) >= 0) { - lastUnit = k; - - let own = 0; - - // anything we haven't boiled down yet should get boiled to this unit - for (const ak in accumulated) { - own += this.matrix[ak][k] * accumulated[ak]; - accumulated[ak] = 0; - } - - // plus anything that's already in this unit - if (isNumber(vals[k])) { - own += vals[k]; - } - - const i = Math.trunc(own); - built[k] = i; - accumulated[k] = own - i; // we'd like to absorb these fractions in another unit - - // plus anything further down the chain that should be rolled up in to this - for (const down in vals) { - if (orderedUnits.indexOf(down) > orderedUnits.indexOf(k)) { - convert(this.matrix, vals, down, built, k); - } - } - // otherwise, keep it in the wings to boil it later - } else if (isNumber(vals[k])) { - accumulated[k] = vals[k]; - } - } - - // anything leftover becomes the decimal for the last unit - // lastUnit must be defined since units is not empty - for (const key in accumulated) { - if (accumulated[key] !== 0) { - built[lastUnit] += - key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key]; - } - } - - return clone(this, { values: built }, true).normalize(); - } - - /** - * Return the negative of this Duration. - * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 } - * @return {Duration} - */ - negate() { - if (!this.isValid) return this; - const negated = {}; - for (const k of Object.keys(this.values)) { - negated[k] = -this.values[k]; - } - return clone(this, { values: negated }, true); - } - - /** - * Get the years. - * @type {number} - */ - get years() { - return this.isValid ? this.values.years || 0 : NaN; - } - - /** - * Get the quarters. - * @type {number} - */ - get quarters() { - return this.isValid ? this.values.quarters || 0 : NaN; - } - - /** - * Get the months. - * @type {number} - */ - get months() { - return this.isValid ? this.values.months || 0 : NaN; - } - - /** - * Get the weeks - * @type {number} - */ - get weeks() { - return this.isValid ? this.values.weeks || 0 : NaN; - } - - /** - * Get the days. - * @type {number} - */ - get days() { - return this.isValid ? this.values.days || 0 : NaN; - } - - /** - * Get the hours. - * @type {number} - */ - get hours() { - return this.isValid ? this.values.hours || 0 : NaN; - } - - /** - * Get the minutes. - * @type {number} - */ - get minutes() { - return this.isValid ? this.values.minutes || 0 : NaN; - } - - /** - * Get the seconds. - * @return {number} - */ - get seconds() { - return this.isValid ? this.values.seconds || 0 : NaN; - } - - /** - * Get the milliseconds. - * @return {number} - */ - get milliseconds() { - return this.isValid ? this.values.milliseconds || 0 : NaN; - } - - /** - * Returns whether the Duration is invalid. Invalid durations are returned by diff operations - * on invalid DateTimes or Intervals. - * @return {boolean} - */ - get isValid() { - return this.invalid === null; - } - - /** - * Returns an error code if this Duration became invalid, or null if the Duration is valid - * @return {string} - */ - get invalidReason() { - return this.invalid ? this.invalid.reason : null; - } - - /** - * Returns an explanation of why this Duration became invalid, or null if the Duration is valid - * @type {string} - */ - get invalidExplanation() { - return this.invalid ? this.invalid.explanation : null; - } - - /** - * Equality check - * Two Durations are equal iff they have the same units and the same values for each unit. - * @param {Duration} other - * @return {boolean} - */ - equals(other) { - if (!this.isValid || !other.isValid) { - return false; - } - - if (!this.loc.equals(other.loc)) { - return false; - } - - for (const u of orderedUnits) { - if (this.values[u] !== other.values[u]) { - return false; - } - } - return true; - } -} - -/** - * @private - */ -export function friendlyDuration(durationish) { - if (isNumber(durationish)) { - return Duration.fromMillis(durationish); - } else if (Duration.isDuration(durationish)) { - return durationish; - } else if (typeof durationish === "object") { - return Duration.fromObject(durationish); - } else { - throw new InvalidArgumentError( - `Unknown duration argument ${durationish} of type ${typeof durationish}` - ); - } -} diff --git a/node_modules/luxon/src/errors.js b/node_modules/luxon/src/errors.js deleted file mode 100644 index c1f363e..0000000 --- a/node_modules/luxon/src/errors.js +++ /dev/null @@ -1,61 +0,0 @@ -// these aren't really private, but nor are they really useful to document - -/** - * @private - */ -class LuxonError extends Error {} - -/** - * @private - */ -export class InvalidDateTimeError extends LuxonError { - constructor(reason) { - super(`Invalid DateTime: ${reason.toMessage()}`); - } -} - -/** - * @private - */ -export class InvalidIntervalError extends LuxonError { - constructor(reason) { - super(`Invalid Interval: ${reason.toMessage()}`); - } -} - -/** - * @private - */ -export class InvalidDurationError extends LuxonError { - constructor(reason) { - super(`Invalid Duration: ${reason.toMessage()}`); - } -} - -/** - * @private - */ -export class ConflictingSpecificationError extends LuxonError {} - -/** - * @private - */ -export class InvalidUnitError extends LuxonError { - constructor(unit) { - super(`Invalid unit ${unit}`); - } -} - -/** - * @private - */ -export class InvalidArgumentError extends LuxonError {} - -/** - * @private - */ -export class ZoneIsAbstractError extends LuxonError { - constructor() { - super("Zone is an abstract class"); - } -} diff --git a/node_modules/luxon/src/impl/conversions.js b/node_modules/luxon/src/impl/conversions.js deleted file mode 100644 index cbe7172..0000000 --- a/node_modules/luxon/src/impl/conversions.js +++ /dev/null @@ -1,157 +0,0 @@ -import { - integerBetween, - isLeapYear, - timeObject, - daysInYear, - daysInMonth, - weeksInWeekYear, - isInteger -} from "./util.js"; -import Invalid from "./invalid.js"; - -const nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334], - leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335]; - -function unitOutOfRange(unit, value) { - return new Invalid( - "unit out of range", - `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid` - ); -} - -function dayOfWeek(year, month, day) { - const js = new Date(Date.UTC(year, month - 1, day)).getUTCDay(); - return js === 0 ? 7 : js; -} - -function computeOrdinal(year, month, day) { - return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1]; -} - -function uncomputeOrdinal(year, ordinal) { - const table = isLeapYear(year) ? leapLadder : nonLeapLadder, - month0 = table.findIndex(i => i < ordinal), - day = ordinal - table[month0]; - return { month: month0 + 1, day }; -} - -/** - * @private - */ - -export function gregorianToWeek(gregObj) { - const { year, month, day } = gregObj, - ordinal = computeOrdinal(year, month, day), - weekday = dayOfWeek(year, month, day); - - let weekNumber = Math.floor((ordinal - weekday + 10) / 7), - weekYear; - - if (weekNumber < 1) { - weekYear = year - 1; - weekNumber = weeksInWeekYear(weekYear); - } else if (weekNumber > weeksInWeekYear(year)) { - weekYear = year + 1; - weekNumber = 1; - } else { - weekYear = year; - } - - return Object.assign({ weekYear, weekNumber, weekday }, timeObject(gregObj)); -} - -export function weekToGregorian(weekData) { - const { weekYear, weekNumber, weekday } = weekData, - weekdayOfJan4 = dayOfWeek(weekYear, 1, 4), - yearInDays = daysInYear(weekYear); - - let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3, - year; - - if (ordinal < 1) { - year = weekYear - 1; - ordinal += daysInYear(year); - } else if (ordinal > yearInDays) { - year = weekYear + 1; - ordinal -= daysInYear(weekYear); - } else { - year = weekYear; - } - - const { month, day } = uncomputeOrdinal(year, ordinal); - - return Object.assign({ year, month, day }, timeObject(weekData)); -} - -export function gregorianToOrdinal(gregData) { - const { year, month, day } = gregData, - ordinal = computeOrdinal(year, month, day); - - return Object.assign({ year, ordinal }, timeObject(gregData)); -} - -export function ordinalToGregorian(ordinalData) { - const { year, ordinal } = ordinalData, - { month, day } = uncomputeOrdinal(year, ordinal); - - return Object.assign({ year, month, day }, timeObject(ordinalData)); -} - -export function hasInvalidWeekData(obj) { - const validYear = isInteger(obj.weekYear), - validWeek = integerBetween(obj.weekNumber, 1, weeksInWeekYear(obj.weekYear)), - validWeekday = integerBetween(obj.weekday, 1, 7); - - if (!validYear) { - return unitOutOfRange("weekYear", obj.weekYear); - } else if (!validWeek) { - return unitOutOfRange("week", obj.week); - } else if (!validWeekday) { - return unitOutOfRange("weekday", obj.weekday); - } else return false; -} - -export function hasInvalidOrdinalData(obj) { - const validYear = isInteger(obj.year), - validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year)); - - if (!validYear) { - return unitOutOfRange("year", obj.year); - } else if (!validOrdinal) { - return unitOutOfRange("ordinal", obj.ordinal); - } else return false; -} - -export function hasInvalidGregorianData(obj) { - const validYear = isInteger(obj.year), - validMonth = integerBetween(obj.month, 1, 12), - validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month)); - - if (!validYear) { - return unitOutOfRange("year", obj.year); - } else if (!validMonth) { - return unitOutOfRange("month", obj.month); - } else if (!validDay) { - return unitOutOfRange("day", obj.day); - } else return false; -} - -export function hasInvalidTimeData(obj) { - const { hour, minute, second, millisecond } = obj; - const validHour = - integerBetween(hour, 0, 23) || - (hour === 24 && minute === 0 && second === 0 && millisecond === 0), - validMinute = integerBetween(minute, 0, 59), - validSecond = integerBetween(second, 0, 59), - validMillisecond = integerBetween(millisecond, 0, 999); - - if (!validHour) { - return unitOutOfRange("hour", hour); - } else if (!validMinute) { - return unitOutOfRange("minute", minute); - } else if (!validSecond) { - return unitOutOfRange("second", second); - } else if (!validMillisecond) { - return unitOutOfRange("millisecond", millisecond); - } else return false; -} diff --git a/node_modules/luxon/src/impl/diff.js b/node_modules/luxon/src/impl/diff.js deleted file mode 100644 index 57246dc..0000000 --- a/node_modules/luxon/src/impl/diff.js +++ /dev/null @@ -1,79 +0,0 @@ -import Duration from "../duration.js"; - -function dayDiff(earlier, later) { - const utcDayStart = dt => - dt - .toUTC(0, { keepLocalTime: true }) - .startOf("day") - .valueOf(), - ms = utcDayStart(later) - utcDayStart(earlier); - return Math.floor(Duration.fromMillis(ms).as("days")); -} - -function highOrderDiffs(cursor, later, units) { - const differs = [ - ["years", (a, b) => b.year - a.year], - ["months", (a, b) => b.month - a.month + (b.year - a.year) * 12], - [ - "weeks", - (a, b) => { - const days = dayDiff(a, b); - return (days - (days % 7)) / 7; - } - ], - ["days", dayDiff] - ]; - - const results = {}; - let lowestOrder, highWater; - - for (const [unit, differ] of differs) { - if (units.indexOf(unit) >= 0) { - lowestOrder = unit; - - let delta = differ(cursor, later); - highWater = cursor.plus({ [unit]: delta }); - - if (highWater > later) { - cursor = cursor.plus({ [unit]: delta - 1 }); - delta -= 1; - } else { - cursor = highWater; - } - - results[unit] = delta; - } - } - - return [cursor, results, highWater, lowestOrder]; -} - -export default function(earlier, later, units, opts) { - let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units); - - const remainingMillis = later - cursor; - - const lowerOrderUnits = units.filter( - u => ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0 - ); - - if (lowerOrderUnits.length === 0) { - if (highWater < later) { - highWater = cursor.plus({ [lowestOrder]: 1 }); - } - - if (highWater !== cursor) { - results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor); - } - } - - const duration = Duration.fromObject(Object.assign(results, opts)); - - if (lowerOrderUnits.length > 0) { - return Duration.fromMillis(remainingMillis, opts) - .shiftTo(...lowerOrderUnits) - .plus(duration); - } else { - return duration; - } -} diff --git a/node_modules/luxon/src/impl/digits.js b/node_modules/luxon/src/impl/digits.js deleted file mode 100644 index 0d081c2..0000000 --- a/node_modules/luxon/src/impl/digits.js +++ /dev/null @@ -1,76 +0,0 @@ -const numberingSystems = { - arab: "[\u0660-\u0669]", - arabext: "[\u06F0-\u06F9]", - bali: "[\u1B50-\u1B59]", - beng: "[\u09E6-\u09EF]", - deva: "[\u0966-\u096F]", - fullwide: "[\uFF10-\uFF19]", - gujr: "[\u0AE6-\u0AEF]", - hanidec: "[〇|一|二|三|四|五|六|七|八|九]", - khmr: "[\u17E0-\u17E9]", - knda: "[\u0CE6-\u0CEF]", - laoo: "[\u0ED0-\u0ED9]", - limb: "[\u1946-\u194F]", - mlym: "[\u0D66-\u0D6F]", - mong: "[\u1810-\u1819]", - mymr: "[\u1040-\u1049]", - orya: "[\u0B66-\u0B6F]", - tamldec: "[\u0BE6-\u0BEF]", - telu: "[\u0C66-\u0C6F]", - thai: "[\u0E50-\u0E59]", - tibt: "[\u0F20-\u0F29]", - latn: "\\d" -}; - -const numberingSystemsUTF16 = { - arab: [1632, 1641], - arabext: [1776, 1785], - bali: [6992, 7001], - beng: [2534, 2543], - deva: [2406, 2415], - fullwide: [65296, 65303], - gujr: [2790, 2799], - khmr: [6112, 6121], - knda: [3302, 3311], - laoo: [3792, 3801], - limb: [6470, 6479], - mlym: [3430, 3439], - mong: [6160, 6169], - mymr: [4160, 4169], - orya: [2918, 2927], - tamldec: [3046, 3055], - telu: [3174, 3183], - thai: [3664, 3673], - tibt: [3872, 3881] -}; - -// eslint-disable-next-line -const hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split(""); - -export function parseDigits(str) { - let value = parseInt(str, 10); - if (isNaN(value)) { - value = ""; - for (let i = 0; i < str.length; i++) { - const code = str.charCodeAt(i); - - if (str[i].search(numberingSystems.hanidec) !== -1) { - value += hanidecChars.indexOf(str[i]); - } else { - for (const key in numberingSystemsUTF16) { - const [min, max] = numberingSystemsUTF16[key]; - if (code >= min && code <= max) { - value += code - min; - } - } - } - } - return parseInt(value, 10); - } else { - return value; - } -} - -export function digitRegex({ numberingSystem }, append = "") { - return new RegExp(`${numberingSystems[numberingSystem || "latn"]}${append}`); -} diff --git a/node_modules/luxon/src/impl/english.js b/node_modules/luxon/src/impl/english.js deleted file mode 100644 index 633f594..0000000 --- a/node_modules/luxon/src/impl/english.js +++ /dev/null @@ -1,233 +0,0 @@ -import * as Formats from "./formats.js"; -import { pick } from "./util.js"; - -function stringify(obj) { - return JSON.stringify(obj, Object.keys(obj).sort()); -} - -/** - * @private - */ - -export const monthsLong = [ - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December" -]; - -export const monthsShort = [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec" -]; - -export const monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]; - -export function months(length) { - switch (length) { - case "narrow": - return monthsNarrow; - case "short": - return monthsShort; - case "long": - return monthsLong; - case "numeric": - return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"]; - case "2-digit": - return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"]; - default: - return null; - } -} - -export const weekdaysLong = [ - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday" -]; - -export const weekdaysShort = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]; - -export const weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"]; - -export function weekdays(length) { - switch (length) { - case "narrow": - return weekdaysNarrow; - case "short": - return weekdaysShort; - case "long": - return weekdaysLong; - case "numeric": - return ["1", "2", "3", "4", "5", "6", "7"]; - default: - return null; - } -} - -export const meridiems = ["AM", "PM"]; - -export const erasLong = ["Before Christ", "Anno Domini"]; - -export const erasShort = ["BC", "AD"]; - -export const erasNarrow = ["B", "A"]; - -export function eras(length) { - switch (length) { - case "narrow": - return erasNarrow; - case "short": - return erasShort; - case "long": - return erasLong; - default: - return null; - } -} - -export function meridiemForDateTime(dt) { - return meridiems[dt.hour < 12 ? 0 : 1]; -} - -export function weekdayForDateTime(dt, length) { - return weekdays(length)[dt.weekday - 1]; -} - -export function monthForDateTime(dt, length) { - return months(length)[dt.month - 1]; -} - -export function eraForDateTime(dt, length) { - return eras(length)[dt.year < 0 ? 0 : 1]; -} - -export function formatRelativeTime(unit, count, numeric = "always", narrow = false) { - const units = { - years: ["year", "yr."], - quarters: ["quarter", "qtr."], - months: ["month", "mo."], - weeks: ["week", "wk."], - days: ["day", "day", "days"], - hours: ["hour", "hr."], - minutes: ["minute", "min."], - seconds: ["second", "sec."] - }; - - const lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1; - - if (numeric === "auto" && lastable) { - const isDay = unit === "days"; - switch (count) { - case 1: - return isDay ? "tomorrow" : `next ${units[unit][0]}`; - case -1: - return isDay ? "yesterday" : `last ${units[unit][0]}`; - case 0: - return isDay ? "today" : `this ${units[unit][0]}`; - default: // fall through - } - } - - const isInPast = Object.is(count, -0) || count < 0, - fmtValue = Math.abs(count), - singular = fmtValue === 1, - lilUnits = units[unit], - fmtUnit = narrow - ? singular - ? lilUnits[1] - : lilUnits[2] || lilUnits[1] - : singular - ? units[unit][0] - : unit; - return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`; -} - -export function formatString(knownFormat) { - // these all have the offsets removed because we don't have access to them - // without all the intl stuff this is backfilling - const filtered = pick(knownFormat, [ - "weekday", - "era", - "year", - "month", - "day", - "hour", - "minute", - "second", - "timeZoneName", - "hour12" - ]), - key = stringify(filtered), - dateTimeHuge = "EEEE, LLLL d, yyyy, h:mm a"; - switch (key) { - case stringify(Formats.DATE_SHORT): - return "M/d/yyyy"; - case stringify(Formats.DATE_MED): - return "LLL d, yyyy"; - case stringify(Formats.DATE_MED_WITH_WEEKDAY): - return "EEE, LLL d, yyyy"; - case stringify(Formats.DATE_FULL): - return "LLLL d, yyyy"; - case stringify(Formats.DATE_HUGE): - return "EEEE, LLLL d, yyyy"; - case stringify(Formats.TIME_SIMPLE): - return "h:mm a"; - case stringify(Formats.TIME_WITH_SECONDS): - return "h:mm:ss a"; - case stringify(Formats.TIME_WITH_SHORT_OFFSET): - return "h:mm a"; - case stringify(Formats.TIME_WITH_LONG_OFFSET): - return "h:mm a"; - case stringify(Formats.TIME_24_SIMPLE): - return "HH:mm"; - case stringify(Formats.TIME_24_WITH_SECONDS): - return "HH:mm:ss"; - case stringify(Formats.TIME_24_WITH_SHORT_OFFSET): - return "HH:mm"; - case stringify(Formats.TIME_24_WITH_LONG_OFFSET): - return "HH:mm"; - case stringify(Formats.DATETIME_SHORT): - return "M/d/yyyy, h:mm a"; - case stringify(Formats.DATETIME_MED): - return "LLL d, yyyy, h:mm a"; - case stringify(Formats.DATETIME_FULL): - return "LLLL d, yyyy, h:mm a"; - case stringify(Formats.DATETIME_HUGE): - return dateTimeHuge; - case stringify(Formats.DATETIME_SHORT_WITH_SECONDS): - return "M/d/yyyy, h:mm:ss a"; - case stringify(Formats.DATETIME_MED_WITH_SECONDS): - return "LLL d, yyyy, h:mm:ss a"; - case stringify(Formats.DATETIME_MED_WITH_WEEKDAY): - return "EEE, d LLL yyyy, h:mm a"; - case stringify(Formats.DATETIME_FULL_WITH_SECONDS): - return "LLLL d, yyyy, h:mm:ss a"; - case stringify(Formats.DATETIME_HUGE_WITH_SECONDS): - return "EEEE, LLLL d, yyyy, h:mm:ss a"; - default: - return dateTimeHuge; - } -} diff --git a/node_modules/luxon/src/impl/formats.js b/node_modules/luxon/src/impl/formats.js deleted file mode 100644 index 25210f6..0000000 --- a/node_modules/luxon/src/impl/formats.js +++ /dev/null @@ -1,191 +0,0 @@ -/** - * @private - */ - -const n = "numeric", - s = "short", - l = "long"; - -export const DATE_SHORT = { - year: n, - month: n, - day: n -}; - -export const DATE_MED = { - year: n, - month: s, - day: n -}; - -export const DATE_MED_WITH_WEEKDAY = { - year: n, - month: s, - day: n, - weekday: s -}; - -export const DATE_FULL = { - year: n, - month: l, - day: n -}; - -export const DATE_HUGE = { - year: n, - month: l, - day: n, - weekday: l -}; - -export const TIME_SIMPLE = { - hour: n, - minute: n -}; - -export const TIME_WITH_SECONDS = { - hour: n, - minute: n, - second: n -}; - -export const TIME_WITH_SHORT_OFFSET = { - hour: n, - minute: n, - second: n, - timeZoneName: s -}; - -export const TIME_WITH_LONG_OFFSET = { - hour: n, - minute: n, - second: n, - timeZoneName: l -}; - -export const TIME_24_SIMPLE = { - hour: n, - minute: n, - hour12: false -}; - -/** - * {@link toLocaleString}; format like '09:30:23', always 24-hour. - */ -export const TIME_24_WITH_SECONDS = { - hour: n, - minute: n, - second: n, - hour12: false -}; - -/** - * {@link toLocaleString}; format like '09:30:23 EDT', always 24-hour. - */ -export const TIME_24_WITH_SHORT_OFFSET = { - hour: n, - minute: n, - second: n, - hour12: false, - timeZoneName: s -}; - -/** - * {@link toLocaleString}; format like '09:30:23 Eastern Daylight Time', always 24-hour. - */ -export const TIME_24_WITH_LONG_OFFSET = { - hour: n, - minute: n, - second: n, - hour12: false, - timeZoneName: l -}; - -/** - * {@link toLocaleString}; format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is. - */ -export const DATETIME_SHORT = { - year: n, - month: n, - day: n, - hour: n, - minute: n -}; - -/** - * {@link toLocaleString}; format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is. - */ -export const DATETIME_SHORT_WITH_SECONDS = { - year: n, - month: n, - day: n, - hour: n, - minute: n, - second: n -}; - -export const DATETIME_MED = { - year: n, - month: s, - day: n, - hour: n, - minute: n -}; - -export const DATETIME_MED_WITH_SECONDS = { - year: n, - month: s, - day: n, - hour: n, - minute: n, - second: n -}; - -export const DATETIME_MED_WITH_WEEKDAY = { - year: n, - month: s, - day: n, - weekday: s, - hour: n, - minute: n -}; - -export const DATETIME_FULL = { - year: n, - month: l, - day: n, - hour: n, - minute: n, - timeZoneName: s -}; - -export const DATETIME_FULL_WITH_SECONDS = { - year: n, - month: l, - day: n, - hour: n, - minute: n, - second: n, - timeZoneName: s -}; - -export const DATETIME_HUGE = { - year: n, - month: l, - day: n, - weekday: l, - hour: n, - minute: n, - timeZoneName: l -}; - -export const DATETIME_HUGE_WITH_SECONDS = { - year: n, - month: l, - day: n, - weekday: l, - hour: n, - minute: n, - second: n, - timeZoneName: l -}; diff --git a/node_modules/luxon/src/impl/formatter.js b/node_modules/luxon/src/impl/formatter.js deleted file mode 100644 index 98872f9..0000000 --- a/node_modules/luxon/src/impl/formatter.js +++ /dev/null @@ -1,386 +0,0 @@ -import * as English from "./english.js"; -import * as Formats from "./formats.js"; -import { hasFormatToParts, padStart } from "./util.js"; - -function stringifyTokens(splits, tokenToString) { - let s = ""; - for (const token of splits) { - if (token.literal) { - s += token.val; - } else { - s += tokenToString(token.val); - } - } - return s; -} - -const macroTokenToFormatOpts = { - D: Formats.DATE_SHORT, - DD: Formats.DATE_MED, - DDD: Formats.DATE_FULL, - DDDD: Formats.DATE_HUGE, - t: Formats.TIME_SIMPLE, - tt: Formats.TIME_WITH_SECONDS, - ttt: Formats.TIME_WITH_SHORT_OFFSET, - tttt: Formats.TIME_WITH_LONG_OFFSET, - T: Formats.TIME_24_SIMPLE, - TT: Formats.TIME_24_WITH_SECONDS, - TTT: Formats.TIME_24_WITH_SHORT_OFFSET, - TTTT: Formats.TIME_24_WITH_LONG_OFFSET, - f: Formats.DATETIME_SHORT, - ff: Formats.DATETIME_MED, - fff: Formats.DATETIME_FULL, - ffff: Formats.DATETIME_HUGE, - F: Formats.DATETIME_SHORT_WITH_SECONDS, - FF: Formats.DATETIME_MED_WITH_SECONDS, - FFF: Formats.DATETIME_FULL_WITH_SECONDS, - FFFF: Formats.DATETIME_HUGE_WITH_SECONDS -}; - -/** - * @private - */ - -export default class Formatter { - static create(locale, opts = {}) { - return new Formatter(locale, opts); - } - - static parseFormat(fmt) { - let current = null, - currentFull = "", - bracketed = false; - const splits = []; - for (let i = 0; i < fmt.length; i++) { - const c = fmt.charAt(i); - if (c === "'") { - if (currentFull.length > 0) { - splits.push({ literal: bracketed, val: currentFull }); - } - current = null; - currentFull = ""; - bracketed = !bracketed; - } else if (bracketed) { - currentFull += c; - } else if (c === current) { - currentFull += c; - } else { - if (currentFull.length > 0) { - splits.push({ literal: false, val: currentFull }); - } - currentFull = c; - current = c; - } - } - - if (currentFull.length > 0) { - splits.push({ literal: bracketed, val: currentFull }); - } - - return splits; - } - - static macroTokenToFormatOpts(token) { - return macroTokenToFormatOpts[token]; - } - - constructor(locale, formatOpts) { - this.opts = formatOpts; - this.loc = locale; - this.systemLoc = null; - } - - formatWithSystemDefault(dt, opts) { - if (this.systemLoc === null) { - this.systemLoc = this.loc.redefaultToSystem(); - } - const df = this.systemLoc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.format(); - } - - formatDateTime(dt, opts = {}) { - const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.format(); - } - - formatDateTimeParts(dt, opts = {}) { - const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.formatToParts(); - } - - resolvedOptions(dt, opts = {}) { - const df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts)); - return df.resolvedOptions(); - } - - num(n, p = 0) { - // we get some perf out of doing this here, annoyingly - if (this.opts.forceSimple) { - return padStart(n, p); - } - - const opts = Object.assign({}, this.opts); - - if (p > 0) { - opts.padTo = p; - } - - return this.loc.numberFormatter(opts).format(n); - } - - formatDateTimeFromString(dt, fmt) { - const knownEnglish = this.loc.listingMode() === "en", - useDateTimeFormatter = - this.loc.outputCalendar && this.loc.outputCalendar !== "gregory" && hasFormatToParts(), - string = (opts, extract) => this.loc.extract(dt, opts, extract), - formatOffset = opts => { - if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) { - return "Z"; - } - - return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : ""; - }, - meridiem = () => - knownEnglish - ? English.meridiemForDateTime(dt) - : string({ hour: "numeric", hour12: true }, "dayperiod"), - month = (length, standalone) => - knownEnglish - ? English.monthForDateTime(dt, length) - : string(standalone ? { month: length } : { month: length, day: "numeric" }, "month"), - weekday = (length, standalone) => - knownEnglish - ? English.weekdayForDateTime(dt, length) - : string( - standalone ? { weekday: length } : { weekday: length, month: "long", day: "numeric" }, - "weekday" - ), - maybeMacro = token => { - const formatOpts = Formatter.macroTokenToFormatOpts(token); - if (formatOpts) { - return this.formatWithSystemDefault(dt, formatOpts); - } else { - return token; - } - }, - era = length => - knownEnglish ? English.eraForDateTime(dt, length) : string({ era: length }, "era"), - tokenToString = token => { - // Where possible: http://cldr.unicode.org/translation/date-time#TOC-Stand-Alone-vs.-Format-Styles - switch (token) { - // ms - case "S": - return this.num(dt.millisecond); - case "u": - // falls through - case "SSS": - return this.num(dt.millisecond, 3); - // seconds - case "s": - return this.num(dt.second); - case "ss": - return this.num(dt.second, 2); - // minutes - case "m": - return this.num(dt.minute); - case "mm": - return this.num(dt.minute, 2); - // hours - case "h": - return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12); - case "hh": - return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2); - case "H": - return this.num(dt.hour); - case "HH": - return this.num(dt.hour, 2); - // offset - case "Z": - // like +6 - return formatOffset({ format: "narrow", allowZ: this.opts.allowZ }); - case "ZZ": - // like +06:00 - return formatOffset({ format: "short", allowZ: this.opts.allowZ }); - case "ZZZ": - // like +0600 - return formatOffset({ format: "techie", allowZ: this.opts.allowZ }); - case "ZZZZ": - // like EST - return dt.zone.offsetName(dt.ts, { format: "short", locale: this.loc.locale }); - case "ZZZZZ": - // like Eastern Standard Time - return dt.zone.offsetName(dt.ts, { format: "long", locale: this.loc.locale }); - // zone - case "z": - // like America/New_York - return dt.zoneName; - // meridiems - case "a": - return meridiem(); - // dates - case "d": - return useDateTimeFormatter ? string({ day: "numeric" }, "day") : this.num(dt.day); - case "dd": - return useDateTimeFormatter ? string({ day: "2-digit" }, "day") : this.num(dt.day, 2); - // weekdays - standalone - case "c": - // like 1 - return this.num(dt.weekday); - case "ccc": - // like 'Tues' - return weekday("short", true); - case "cccc": - // like 'Tuesday' - return weekday("long", true); - case "ccccc": - // like 'T' - return weekday("narrow", true); - // weekdays - format - case "E": - // like 1 - return this.num(dt.weekday); - case "EEE": - // like 'Tues' - return weekday("short", false); - case "EEEE": - // like 'Tuesday' - return weekday("long", false); - case "EEEEE": - // like 'T' - return weekday("narrow", false); - // months - standalone - case "L": - // like 1 - return useDateTimeFormatter - ? string({ month: "numeric", day: "numeric" }, "month") - : this.num(dt.month); - case "LL": - // like 01, doesn't seem to work - return useDateTimeFormatter - ? string({ month: "2-digit", day: "numeric" }, "month") - : this.num(dt.month, 2); - case "LLL": - // like Jan - return month("short", true); - case "LLLL": - // like January - return month("long", true); - case "LLLLL": - // like J - return month("narrow", true); - // months - format - case "M": - // like 1 - return useDateTimeFormatter - ? string({ month: "numeric" }, "month") - : this.num(dt.month); - case "MM": - // like 01 - return useDateTimeFormatter - ? string({ month: "2-digit" }, "month") - : this.num(dt.month, 2); - case "MMM": - // like Jan - return month("short", false); - case "MMMM": - // like January - return month("long", false); - case "MMMMM": - // like J - return month("narrow", false); - // years - case "y": - // like 2014 - return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year); - case "yy": - // like 14 - return useDateTimeFormatter - ? string({ year: "2-digit" }, "year") - : this.num(dt.year.toString().slice(-2), 2); - case "yyyy": - // like 0012 - return useDateTimeFormatter - ? string({ year: "numeric" }, "year") - : this.num(dt.year, 4); - case "yyyyyy": - // like 000012 - return useDateTimeFormatter - ? string({ year: "numeric" }, "year") - : this.num(dt.year, 6); - // eras - case "G": - // like AD - return era("short"); - case "GG": - // like Anno Domini - return era("long"); - case "GGGGG": - return era("narrow"); - case "kk": - return this.num(dt.weekYear.toString().slice(-2), 2); - case "kkkk": - return this.num(dt.weekYear, 4); - case "W": - return this.num(dt.weekNumber); - case "WW": - return this.num(dt.weekNumber, 2); - case "o": - return this.num(dt.ordinal); - case "ooo": - return this.num(dt.ordinal, 3); - case "q": - // like 1 - return this.num(dt.quarter); - case "qq": - // like 01 - return this.num(dt.quarter, 2); - case "X": - return this.num(Math.floor(dt.ts / 1000)); - case "x": - return this.num(dt.ts); - default: - return maybeMacro(token); - } - }; - - return stringifyTokens(Formatter.parseFormat(fmt), tokenToString); - } - - formatDurationFromString(dur, fmt) { - const tokenToField = token => { - switch (token[0]) { - case "S": - return "millisecond"; - case "s": - return "second"; - case "m": - return "minute"; - case "h": - return "hour"; - case "d": - return "day"; - case "M": - return "month"; - case "y": - return "year"; - default: - return null; - } - }, - tokenToString = lildur => token => { - const mapped = tokenToField(token); - if (mapped) { - return this.num(lildur.get(mapped), token.length); - } else { - return token; - } - }, - tokens = Formatter.parseFormat(fmt), - realTokens = tokens.reduce( - (found, { literal, val }) => (literal ? found : found.concat(val)), - [] - ), - collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter(t => t)); - return stringifyTokens(tokens, tokenToString(collapsed)); - } -} diff --git a/node_modules/luxon/src/impl/invalid.js b/node_modules/luxon/src/impl/invalid.js deleted file mode 100644 index 2a2c95b..0000000 --- a/node_modules/luxon/src/impl/invalid.js +++ /dev/null @@ -1,14 +0,0 @@ -export default class Invalid { - constructor(reason, explanation) { - this.reason = reason; - this.explanation = explanation; - } - - toMessage() { - if (this.explanation) { - return `${this.reason}: ${this.explanation}`; - } else { - return this.reason; - } - } -} diff --git a/node_modules/luxon/src/impl/locale.js b/node_modules/luxon/src/impl/locale.js deleted file mode 100644 index 0f797b1..0000000 --- a/node_modules/luxon/src/impl/locale.js +++ /dev/null @@ -1,469 +0,0 @@ -import { hasFormatToParts, hasIntl, padStart, roundTo, hasRelative } from "./util.js"; -import * as English from "./english.js"; -import Settings from "../settings.js"; -import DateTime from "../datetime.js"; -import Formatter from "./formatter.js"; - -let intlDTCache = {}; -function getCachedDTF(locString, opts = {}) { - const key = JSON.stringify([locString, opts]); - let dtf = intlDTCache[key]; - if (!dtf) { - dtf = new Intl.DateTimeFormat(locString, opts); - intlDTCache[key] = dtf; - } - return dtf; -} - -let intlNumCache = {}; -function getCachedINF(locString, opts = {}) { - const key = JSON.stringify([locString, opts]); - let inf = intlNumCache[key]; - if (!inf) { - inf = new Intl.NumberFormat(locString, opts); - intlNumCache[key] = inf; - } - return inf; -} - -let intlRelCache = {}; -function getCachedRTF(locString, opts = {}) { - const { base, ...cacheKeyOpts } = opts; // exclude `base` from the options - const key = JSON.stringify([locString, cacheKeyOpts]); - let inf = intlRelCache[key]; - if (!inf) { - inf = new Intl.RelativeTimeFormat(locString, opts); - intlRelCache[key] = inf; - } - return inf; -} - -let sysLocaleCache = null; -function systemLocale() { - if (sysLocaleCache) { - return sysLocaleCache; - } else if (hasIntl()) { - const computedSys = new Intl.DateTimeFormat().resolvedOptions().locale; - // node sometimes defaults to "und". Override that because that is dumb - sysLocaleCache = !computedSys || computedSys === "und" ? "en-US" : computedSys; - return sysLocaleCache; - } else { - sysLocaleCache = "en-US"; - return sysLocaleCache; - } -} - -function parseLocaleString(localeStr) { - // I really want to avoid writing a BCP 47 parser - // see, e.g. https://github.com/wooorm/bcp-47 - // Instead, we'll do this: - - // a) if the string has no -u extensions, just leave it alone - // b) if it does, use Intl to resolve everything - // c) if Intl fails, try again without the -u - - const uIndex = localeStr.indexOf("-u-"); - if (uIndex === -1) { - return [localeStr]; - } else { - let options; - const smaller = localeStr.substring(0, uIndex); - try { - options = getCachedDTF(localeStr).resolvedOptions(); - } catch (e) { - options = getCachedDTF(smaller).resolvedOptions(); - } - - const { numberingSystem, calendar } = options; - // return the smaller one so that we can append the calendar and numbering overrides to it - return [smaller, numberingSystem, calendar]; - } -} - -function intlConfigString(localeStr, numberingSystem, outputCalendar) { - if (hasIntl()) { - if (outputCalendar || numberingSystem) { - localeStr += "-u"; - - if (outputCalendar) { - localeStr += `-ca-${outputCalendar}`; - } - - if (numberingSystem) { - localeStr += `-nu-${numberingSystem}`; - } - return localeStr; - } else { - return localeStr; - } - } else { - return []; - } -} - -function mapMonths(f) { - const ms = []; - for (let i = 1; i <= 12; i++) { - const dt = DateTime.utc(2016, i, 1); - ms.push(f(dt)); - } - return ms; -} - -function mapWeekdays(f) { - const ms = []; - for (let i = 1; i <= 7; i++) { - const dt = DateTime.utc(2016, 11, 13 + i); - ms.push(f(dt)); - } - return ms; -} - -function listStuff(loc, length, defaultOK, englishFn, intlFn) { - const mode = loc.listingMode(defaultOK); - - if (mode === "error") { - return null; - } else if (mode === "en") { - return englishFn(length); - } else { - return intlFn(length); - } -} - -function supportsFastNumbers(loc) { - if (loc.numberingSystem && loc.numberingSystem !== "latn") { - return false; - } else { - return ( - loc.numberingSystem === "latn" || - !loc.locale || - loc.locale.startsWith("en") || - (hasIntl() && new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === "latn") - ); - } -} - -/** - * @private - */ - -class PolyNumberFormatter { - constructor(intl, forceSimple, opts) { - this.padTo = opts.padTo || 0; - this.floor = opts.floor || false; - - if (!forceSimple && hasIntl()) { - const intlOpts = { useGrouping: false }; - if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo; - this.inf = getCachedINF(intl, intlOpts); - } - } - - format(i) { - if (this.inf) { - const fixed = this.floor ? Math.floor(i) : i; - return this.inf.format(fixed); - } else { - // to match the browser's numberformatter defaults - const fixed = this.floor ? Math.floor(i) : roundTo(i, 3); - return padStart(fixed, this.padTo); - } - } -} - -/** - * @private - */ - -class PolyDateFormatter { - constructor(dt, intl, opts) { - this.opts = opts; - this.hasIntl = hasIntl(); - - let z; - if (dt.zone.universal && this.hasIntl) { - // Chromium doesn't support fixed-offset zones like Etc/GMT+8 in its formatter, - // See https://bugs.chromium.org/p/chromium/issues/detail?id=364374. - // So we have to make do. Two cases: - // 1. The format options tell us to show the zone. We can't do that, so the best - // we can do is format the date in UTC. - // 2. The format options don't tell us to show the zone. Then we can adjust them - // the time and tell the formatter to show it to us in UTC, so that the time is right - // and the bad zone doesn't show up. - // We can clean all this up when Chrome fixes this. - z = "UTC"; - if (opts.timeZoneName) { - this.dt = dt; - } else { - this.dt = dt.offset === 0 ? dt : DateTime.fromMillis(dt.ts + dt.offset * 60 * 1000); - } - } else if (dt.zone.type === "local") { - this.dt = dt; - } else { - this.dt = dt; - z = dt.zone.name; - } - - if (this.hasIntl) { - const intlOpts = Object.assign({}, this.opts); - if (z) { - intlOpts.timeZone = z; - } - this.dtf = getCachedDTF(intl, intlOpts); - } - } - - format() { - if (this.hasIntl) { - return this.dtf.format(this.dt.toJSDate()); - } else { - const tokenFormat = English.formatString(this.opts), - loc = Locale.create("en-US"); - return Formatter.create(loc).formatDateTimeFromString(this.dt, tokenFormat); - } - } - - formatToParts() { - if (this.hasIntl && hasFormatToParts()) { - return this.dtf.formatToParts(this.dt.toJSDate()); - } else { - // This is kind of a cop out. We actually could do this for English. However, we couldn't do it for intl strings - // and IMO it's too weird to have an uncanny valley like that - return []; - } - } - - resolvedOptions() { - if (this.hasIntl) { - return this.dtf.resolvedOptions(); - } else { - return { - locale: "en-US", - numberingSystem: "latn", - outputCalendar: "gregory" - }; - } - } -} - -/** - * @private - */ -class PolyRelFormatter { - constructor(intl, isEnglish, opts) { - this.opts = Object.assign({ style: "long" }, opts); - if (!isEnglish && hasRelative()) { - this.rtf = getCachedRTF(intl, opts); - } - } - - format(count, unit) { - if (this.rtf) { - return this.rtf.format(count, unit); - } else { - return English.formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== "long"); - } - } - - formatToParts(count, unit) { - if (this.rtf) { - return this.rtf.formatToParts(count, unit); - } else { - return []; - } - } -} - -/** - * @private - */ - -export default class Locale { - static fromOpts(opts) { - return Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN); - } - - static create(locale, numberingSystem, outputCalendar, defaultToEN = false) { - const specifiedLocale = locale || Settings.defaultLocale, - // the system locale is useful for human readable strings but annoying for parsing/formatting known formats - localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale()), - numberingSystemR = numberingSystem || Settings.defaultNumberingSystem, - outputCalendarR = outputCalendar || Settings.defaultOutputCalendar; - return new Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale); - } - - static resetCache() { - sysLocaleCache = null; - intlDTCache = {}; - intlNumCache = {}; - intlRelCache = {}; - } - - static fromObject({ locale, numberingSystem, outputCalendar } = {}) { - return Locale.create(locale, numberingSystem, outputCalendar); - } - - constructor(locale, numbering, outputCalendar, specifiedLocale) { - const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale); - - this.locale = parsedLocale; - this.numberingSystem = numbering || parsedNumberingSystem || null; - this.outputCalendar = outputCalendar || parsedOutputCalendar || null; - this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar); - - this.weekdaysCache = { format: {}, standalone: {} }; - this.monthsCache = { format: {}, standalone: {} }; - this.meridiemCache = null; - this.eraCache = {}; - - this.specifiedLocale = specifiedLocale; - this.fastNumbersCached = null; - } - - get fastNumbers() { - if (this.fastNumbersCached == null) { - this.fastNumbersCached = supportsFastNumbers(this); - } - - return this.fastNumbersCached; - } - - listingMode(defaultOK = true) { - const intl = hasIntl(), - hasFTP = intl && hasFormatToParts(), - isActuallyEn = this.isEnglish(), - hasNoWeirdness = - (this.numberingSystem === null || this.numberingSystem === "latn") && - (this.outputCalendar === null || this.outputCalendar === "gregory"); - - if (!hasFTP && !(isActuallyEn && hasNoWeirdness) && !defaultOK) { - return "error"; - } else if (!hasFTP || (isActuallyEn && hasNoWeirdness)) { - return "en"; - } else { - return "intl"; - } - } - - clone(alts) { - if (!alts || Object.getOwnPropertyNames(alts).length === 0) { - return this; - } else { - return Locale.create( - alts.locale || this.specifiedLocale, - alts.numberingSystem || this.numberingSystem, - alts.outputCalendar || this.outputCalendar, - alts.defaultToEN || false - ); - } - } - - redefaultToEN(alts = {}) { - return this.clone(Object.assign({}, alts, { defaultToEN: true })); - } - - redefaultToSystem(alts = {}) { - return this.clone(Object.assign({}, alts, { defaultToEN: false })); - } - - months(length, format = false, defaultOK = true) { - return listStuff(this, length, defaultOK, English.months, () => { - const intl = format ? { month: length, day: "numeric" } : { month: length }, - formatStr = format ? "format" : "standalone"; - if (!this.monthsCache[formatStr][length]) { - this.monthsCache[formatStr][length] = mapMonths(dt => this.extract(dt, intl, "month")); - } - return this.monthsCache[formatStr][length]; - }); - } - - weekdays(length, format = false, defaultOK = true) { - return listStuff(this, length, defaultOK, English.weekdays, () => { - const intl = format - ? { weekday: length, year: "numeric", month: "long", day: "numeric" } - : { weekday: length }, - formatStr = format ? "format" : "standalone"; - if (!this.weekdaysCache[formatStr][length]) { - this.weekdaysCache[formatStr][length] = mapWeekdays(dt => - this.extract(dt, intl, "weekday") - ); - } - return this.weekdaysCache[formatStr][length]; - }); - } - - meridiems(defaultOK = true) { - return listStuff( - this, - undefined, - defaultOK, - () => English.meridiems, - () => { - // In theory there could be aribitrary day periods. We're gonna assume there are exactly two - // for AM and PM. This is probably wrong, but it's makes parsing way easier. - if (!this.meridiemCache) { - const intl = { hour: "numeric", hour12: true }; - this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map( - dt => this.extract(dt, intl, "dayperiod") - ); - } - - return this.meridiemCache; - } - ); - } - - eras(length, defaultOK = true) { - return listStuff(this, length, defaultOK, English.eras, () => { - const intl = { era: length }; - - // This is utter bullshit. Different calendars are going to define eras totally differently. What I need is the minimum set of dates - // to definitely enumerate them. - if (!this.eraCache[length]) { - this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(dt => - this.extract(dt, intl, "era") - ); - } - - return this.eraCache[length]; - }); - } - - extract(dt, intlOpts, field) { - const df = this.dtFormatter(dt, intlOpts), - results = df.formatToParts(), - matching = results.find(m => m.type.toLowerCase() === field); - return matching ? matching.value : null; - } - - numberFormatter(opts = {}) { - // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave) - // (in contrast, the rest of the condition is used heavily) - return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts); - } - - dtFormatter(dt, intlOpts = {}) { - return new PolyDateFormatter(dt, this.intl, intlOpts); - } - - relFormatter(opts = {}) { - return new PolyRelFormatter(this.intl, this.isEnglish(), opts); - } - - isEnglish() { - return ( - this.locale === "en" || - this.locale.toLowerCase() === "en-us" || - (hasIntl() && new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")) - ); - } - - equals(other) { - return ( - this.locale === other.locale && - this.numberingSystem === other.numberingSystem && - this.outputCalendar === other.outputCalendar - ); - } -} diff --git a/node_modules/luxon/src/impl/regexParser.js b/node_modules/luxon/src/impl/regexParser.js deleted file mode 100644 index 74ba737..0000000 --- a/node_modules/luxon/src/impl/regexParser.js +++ /dev/null @@ -1,319 +0,0 @@ -import { - untruncateYear, - signedOffset, - parseInteger, - parseMillis, - ianaRegex, - isUndefined -} from "./util.js"; -import * as English from "./english.js"; -import FixedOffsetZone from "../zones/fixedOffsetZone.js"; -import IANAZone from "../zones/IANAZone.js"; - -/* - * This file handles parsing for well-specified formats. Here's how it works: - * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match. - * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object - * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence. - * Extractors can take a "cursor" representing the offset in the match to look at. This makes it easy to combine extractors. - * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions. - * Some extractions are super dumb and simpleParse and fromStrings help DRY them. - */ - -function combineRegexes(...regexes) { - const full = regexes.reduce((f, r) => f + r.source, ""); - return RegExp(`^${full}$`); -} - -function combineExtractors(...extractors) { - return m => - extractors - .reduce( - ([mergedVals, mergedZone, cursor], ex) => { - const [val, zone, next] = ex(m, cursor); - return [Object.assign(mergedVals, val), mergedZone || zone, next]; - }, - [{}, null, 1] - ) - .slice(0, 2); -} - -function parse(s, ...patterns) { - if (s == null) { - return [null, null]; - } - - for (const [regex, extractor] of patterns) { - const m = regex.exec(s); - if (m) { - return extractor(m); - } - } - return [null, null]; -} - -function simpleParse(...keys) { - return (match, cursor) => { - const ret = {}; - let i; - - for (i = 0; i < keys.length; i++) { - ret[keys[i]] = parseInteger(match[cursor + i]); - } - return [ret, null, cursor + i]; - }; -} - -// ISO and SQL parsing -const offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/, - isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/, - isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${offsetRegex.source}?`), - isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`), - isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/, - isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/, - isoOrdinalRegex = /(\d{4})-?(\d{3})/, - extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay"), - extractISOOrdinalData = simpleParse("year", "ordinal"), - sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/, // dumbed-down version of the ISO one - sqlTimeRegex = RegExp( - `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?` - ), - sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`); - -function int(match, pos, fallback) { - const m = match[pos]; - return isUndefined(m) ? fallback : parseInteger(m); -} - -function extractISOYmd(match, cursor) { - const item = { - year: int(match, cursor), - month: int(match, cursor + 1, 1), - day: int(match, cursor + 2, 1) - }; - - return [item, null, cursor + 3]; -} - -function extractISOTime(match, cursor) { - const item = { - hour: int(match, cursor, 0), - minute: int(match, cursor + 1, 0), - second: int(match, cursor + 2, 0), - millisecond: parseMillis(match[cursor + 3]) - }; - - return [item, null, cursor + 4]; -} - -function extractISOOffset(match, cursor) { - const local = !match[cursor] && !match[cursor + 1], - fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]), - zone = local ? null : FixedOffsetZone.instance(fullOffset); - return [{}, zone, cursor + 3]; -} - -function extractIANAZone(match, cursor) { - const zone = match[cursor] ? IANAZone.create(match[cursor]) : null; - return [{}, zone, cursor + 1]; -} - -// ISO duration parsing - -const isoDuration = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/; - -function extractISODuration(match) { - const [ - s, - yearStr, - monthStr, - weekStr, - dayStr, - hourStr, - minuteStr, - secondStr, - millisecondsStr - ] = match; - - const hasNegativePrefix = s[0] === "-"; - - const maybeNegate = num => (num && hasNegativePrefix ? -num : num); - - return [ - { - years: maybeNegate(parseInteger(yearStr)), - months: maybeNegate(parseInteger(monthStr)), - weeks: maybeNegate(parseInteger(weekStr)), - days: maybeNegate(parseInteger(dayStr)), - hours: maybeNegate(parseInteger(hourStr)), - minutes: maybeNegate(parseInteger(minuteStr)), - seconds: maybeNegate(parseInteger(secondStr)), - milliseconds: maybeNegate(parseMillis(millisecondsStr)) - } - ]; -} - -// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York -// and not just that we're in -240 *right now*. But since I don't think these are used that often -// I'm just going to ignore that -const obsOffsets = { - GMT: 0, - EDT: -4 * 60, - EST: -5 * 60, - CDT: -5 * 60, - CST: -6 * 60, - MDT: -6 * 60, - MST: -7 * 60, - PDT: -7 * 60, - PST: -8 * 60 -}; - -function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { - const result = { - year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr), - month: English.monthsShort.indexOf(monthStr) + 1, - day: parseInteger(dayStr), - hour: parseInteger(hourStr), - minute: parseInteger(minuteStr) - }; - - if (secondStr) result.second = parseInteger(secondStr); - if (weekdayStr) { - result.weekday = - weekdayStr.length > 3 - ? English.weekdaysLong.indexOf(weekdayStr) + 1 - : English.weekdaysShort.indexOf(weekdayStr) + 1; - } - - return result; -} - -// RFC 2822/5322 -const rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/; - -function extractRFC2822(match) { - const [ - , - weekdayStr, - dayStr, - monthStr, - yearStr, - hourStr, - minuteStr, - secondStr, - obsOffset, - milOffset, - offHourStr, - offMinuteStr - ] = match, - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - - let offset; - if (obsOffset) { - offset = obsOffsets[obsOffset]; - } else if (milOffset) { - offset = 0; - } else { - offset = signedOffset(offHourStr, offMinuteStr); - } - - return [result, new FixedOffsetZone(offset)]; -} - -function preprocessRFC2822(s) { - // Remove comments and folding whitespace and replace multiple-spaces with a single space - return s - .replace(/\([^)]*\)|[\n\t]/g, " ") - .replace(/(\s\s+)/g, " ") - .trim(); -} - -// http date - -const rfc1123 = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, - rfc850 = /^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, - ascii = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/; - -function extractRFC1123Or850(match) { - const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match, - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - return [result, FixedOffsetZone.utcInstance]; -} - -function extractASCII(match) { - const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match, - result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr); - return [result, FixedOffsetZone.utcInstance]; -} - -const isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex); -const isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex); -const isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex); -const isoTimeCombinedRegex = combineRegexes(isoTimeRegex); - -const extractISOYmdTimeAndOffset = combineExtractors( - extractISOYmd, - extractISOTime, - extractISOOffset -); -const extractISOWeekTimeAndOffset = combineExtractors( - extractISOWeekData, - extractISOTime, - extractISOOffset -); -const extractISOOrdinalDataAndTime = combineExtractors(extractISOOrdinalData, extractISOTime); -const extractISOTimeAndOffset = combineExtractors(extractISOTime, extractISOOffset); - -/** - * @private - */ - -export function parseISODate(s) { - return parse( - s, - [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset], - [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset], - [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDataAndTime], - [isoTimeCombinedRegex, extractISOTimeAndOffset] - ); -} - -export function parseRFC2822Date(s) { - return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]); -} - -export function parseHTTPDate(s) { - return parse( - s, - [rfc1123, extractRFC1123Or850], - [rfc850, extractRFC1123Or850], - [ascii, extractASCII] - ); -} - -export function parseISODuration(s) { - return parse(s, [isoDuration, extractISODuration]); -} - -const sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex); -const sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex); - -const extractISOYmdTimeOffsetAndIANAZone = combineExtractors( - extractISOYmd, - extractISOTime, - extractISOOffset, - extractIANAZone -); -const extractISOTimeOffsetAndIANAZone = combineExtractors( - extractISOTime, - extractISOOffset, - extractIANAZone -); - -export function parseSQL(s) { - return parse( - s, - [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeOffsetAndIANAZone], - [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone] - ); -} diff --git a/node_modules/luxon/src/impl/tokenParser.js b/node_modules/luxon/src/impl/tokenParser.js deleted file mode 100644 index 4ca0401..0000000 --- a/node_modules/luxon/src/impl/tokenParser.js +++ /dev/null @@ -1,424 +0,0 @@ -import { parseMillis, isUndefined, untruncateYear, signedOffset, hasOwnProperty } from "./util.js"; -import Formatter from "./formatter.js"; -import FixedOffsetZone from "../zones/fixedOffsetZone.js"; -import IANAZone from "../zones/IANAZone.js"; -import DateTime from "../datetime.js"; -import { digitRegex, parseDigits } from "./digits.js"; -import { ConflictingSpecificationError } from "../errors.js"; - -const MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support"; - -function intUnit(regex, post = i => i) { - return { regex, deser: ([s]) => post(parseDigits(s)) }; -} - -const NBSP = String.fromCharCode(160); -const spaceOrNBSP = `( |${NBSP})`; -const spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g"); - -function fixListRegex(s) { - // make dots optional and also make them literal - // make space and non breakable space characters interchangeable - return s.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP); -} - -function stripInsensitivities(s) { - return s - .replace(/\./g, "") // ignore dots that were made optional - .replace(spaceOrNBSPRegExp, " ") // interchange space and nbsp - .toLowerCase(); -} - -function oneOf(strings, startIndex) { - if (strings === null) { - return null; - } else { - return { - regex: RegExp(strings.map(fixListRegex).join("|")), - deser: ([s]) => - strings.findIndex(i => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex - }; - } -} - -function offset(regex, groups) { - return { regex, deser: ([, h, m]) => signedOffset(h, m), groups }; -} - -function simple(regex) { - return { regex, deser: ([s]) => s }; -} - -function escapeToken(value) { - // eslint-disable-next-line no-useless-escape - return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); -} - -function unitForToken(token, loc) { - const one = digitRegex(loc), - two = digitRegex(loc, "{2}"), - three = digitRegex(loc, "{3}"), - four = digitRegex(loc, "{4}"), - six = digitRegex(loc, "{6}"), - oneOrTwo = digitRegex(loc, "{1,2}"), - oneToThree = digitRegex(loc, "{1,3}"), - oneToSix = digitRegex(loc, "{1,6}"), - oneToNine = digitRegex(loc, "{1,9}"), - twoToFour = digitRegex(loc, "{2,4}"), - fourToSix = digitRegex(loc, "{4,6}"), - literal = t => ({ regex: RegExp(escapeToken(t.val)), deser: ([s]) => s, literal: true }), - unitate = t => { - if (token.literal) { - return literal(t); - } - switch (t.val) { - // era - case "G": - return oneOf(loc.eras("short", false), 0); - case "GG": - return oneOf(loc.eras("long", false), 0); - // years - case "y": - return intUnit(oneToSix); - case "yy": - return intUnit(twoToFour, untruncateYear); - case "yyyy": - return intUnit(four); - case "yyyyy": - return intUnit(fourToSix); - case "yyyyyy": - return intUnit(six); - // months - case "M": - return intUnit(oneOrTwo); - case "MM": - return intUnit(two); - case "MMM": - return oneOf(loc.months("short", true, false), 1); - case "MMMM": - return oneOf(loc.months("long", true, false), 1); - case "L": - return intUnit(oneOrTwo); - case "LL": - return intUnit(two); - case "LLL": - return oneOf(loc.months("short", false, false), 1); - case "LLLL": - return oneOf(loc.months("long", false, false), 1); - // dates - case "d": - return intUnit(oneOrTwo); - case "dd": - return intUnit(two); - // ordinals - case "o": - return intUnit(oneToThree); - case "ooo": - return intUnit(three); - // time - case "HH": - return intUnit(two); - case "H": - return intUnit(oneOrTwo); - case "hh": - return intUnit(two); - case "h": - return intUnit(oneOrTwo); - case "mm": - return intUnit(two); - case "m": - return intUnit(oneOrTwo); - case "q": - return intUnit(oneOrTwo); - case "qq": - return intUnit(two); - case "s": - return intUnit(oneOrTwo); - case "ss": - return intUnit(two); - case "S": - return intUnit(oneToThree); - case "SSS": - return intUnit(three); - case "u": - return simple(oneToNine); - // meridiem - case "a": - return oneOf(loc.meridiems(), 0); - // weekYear (k) - case "kkkk": - return intUnit(four); - case "kk": - return intUnit(twoToFour, untruncateYear); - // weekNumber (W) - case "W": - return intUnit(oneOrTwo); - case "WW": - return intUnit(two); - // weekdays - case "E": - case "c": - return intUnit(one); - case "EEE": - return oneOf(loc.weekdays("short", false, false), 1); - case "EEEE": - return oneOf(loc.weekdays("long", false, false), 1); - case "ccc": - return oneOf(loc.weekdays("short", true, false), 1); - case "cccc": - return oneOf(loc.weekdays("long", true, false), 1); - // offset/zone - case "Z": - case "ZZ": - return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2); - case "ZZZ": - return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2); - // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing - // because we don't have any way to figure out what they are - case "z": - return simple(/[a-z_+-/]{1,256}?/i); - default: - return literal(t); - } - }; - - const unit = unitate(token) || { - invalidReason: MISSING_FTP - }; - - unit.token = token; - - return unit; -} - -const partTypeStyleToTokenVal = { - year: { - "2-digit": "yy", - numeric: "yyyyy" - }, - month: { - numeric: "M", - "2-digit": "MM", - short: "MMM", - long: "MMMM" - }, - day: { - numeric: "d", - "2-digit": "dd" - }, - weekday: { - short: "EEE", - long: "EEEE" - }, - dayperiod: "a", - dayPeriod: "a", - hour: { - numeric: "h", - "2-digit": "hh" - }, - minute: { - numeric: "m", - "2-digit": "mm" - }, - second: { - numeric: "s", - "2-digit": "ss" - } -}; - -function tokenForPart(part, locale, formatOpts) { - const { type, value } = part; - - if (type === "literal") { - return { - literal: true, - val: value - }; - } - - const style = formatOpts[type]; - - let val = partTypeStyleToTokenVal[type]; - if (typeof val === "object") { - val = val[style]; - } - - if (val) { - return { - literal: false, - val - }; - } - - return undefined; -} - -function buildRegex(units) { - const re = units.map(u => u.regex).reduce((f, r) => `${f}(${r.source})`, ""); - return [`^${re}$`, units]; -} - -function match(input, regex, handlers) { - const matches = input.match(regex); - - if (matches) { - const all = {}; - let matchIndex = 1; - for (const i in handlers) { - if (hasOwnProperty(handlers, i)) { - const h = handlers[i], - groups = h.groups ? h.groups + 1 : 1; - if (!h.literal && h.token) { - all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups)); - } - matchIndex += groups; - } - } - return [matches, all]; - } else { - return [matches, {}]; - } -} - -function dateTimeFromMatches(matches) { - const toField = token => { - switch (token) { - case "S": - return "millisecond"; - case "s": - return "second"; - case "m": - return "minute"; - case "h": - case "H": - return "hour"; - case "d": - return "day"; - case "o": - return "ordinal"; - case "L": - case "M": - return "month"; - case "y": - return "year"; - case "E": - case "c": - return "weekday"; - case "W": - return "weekNumber"; - case "k": - return "weekYear"; - case "q": - return "quarter"; - default: - return null; - } - }; - - let zone; - if (!isUndefined(matches.Z)) { - zone = new FixedOffsetZone(matches.Z); - } else if (!isUndefined(matches.z)) { - zone = IANAZone.create(matches.z); - } else { - zone = null; - } - - if (!isUndefined(matches.q)) { - matches.M = (matches.q - 1) * 3 + 1; - } - - if (!isUndefined(matches.h)) { - if (matches.h < 12 && matches.a === 1) { - matches.h += 12; - } else if (matches.h === 12 && matches.a === 0) { - matches.h = 0; - } - } - - if (matches.G === 0 && matches.y) { - matches.y = -matches.y; - } - - if (!isUndefined(matches.u)) { - matches.S = parseMillis(matches.u); - } - - const vals = Object.keys(matches).reduce((r, k) => { - const f = toField(k); - if (f) { - r[f] = matches[k]; - } - - return r; - }, {}); - - return [vals, zone]; -} - -let dummyDateTimeCache = null; - -function getDummyDateTime() { - if (!dummyDateTimeCache) { - dummyDateTimeCache = DateTime.fromMillis(1555555555555); - } - - return dummyDateTimeCache; -} - -function maybeExpandMacroToken(token, locale) { - if (token.literal) { - return token; - } - - const formatOpts = Formatter.macroTokenToFormatOpts(token.val); - - if (!formatOpts) { - return token; - } - - const formatter = Formatter.create(locale, formatOpts); - const parts = formatter.formatDateTimeParts(getDummyDateTime()); - - const tokens = parts.map(p => tokenForPart(p, locale, formatOpts)); - - if (tokens.includes(undefined)) { - return token; - } - - return tokens; -} - -function expandMacroTokens(tokens, locale) { - return Array.prototype.concat(...tokens.map(t => maybeExpandMacroToken(t, locale))); -} - -/** - * @private - */ - -export function explainFromTokens(locale, input, format) { - const tokens = expandMacroTokens(Formatter.parseFormat(format), locale), - units = tokens.map(t => unitForToken(t, locale)), - disqualifyingUnit = units.find(t => t.invalidReason); - - if (disqualifyingUnit) { - return { input, tokens, invalidReason: disqualifyingUnit.invalidReason }; - } else { - const [regexString, handlers] = buildRegex(units), - regex = RegExp(regexString, "i"), - [rawMatches, matches] = match(input, regex, handlers), - [result, zone] = matches ? dateTimeFromMatches(matches) : [null, null]; - if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) { - throw new ConflictingSpecificationError( - "Can't include meridiem when specifying 24-hour format" - ); - } - return { input, tokens, regex, rawMatches, matches, result, zone }; - } -} - -export function parseFromTokens(locale, input, format) { - const { result, zone, invalidReason } = explainFromTokens(locale, input, format); - return [result, zone, invalidReason]; -} diff --git a/node_modules/luxon/src/impl/util.js b/node_modules/luxon/src/impl/util.js deleted file mode 100644 index b345c69..0000000 --- a/node_modules/luxon/src/impl/util.js +++ /dev/null @@ -1,286 +0,0 @@ -/* - This is just a junk drawer, containing anything used across multiple classes. - Because Luxon is small(ish), this should stay small and we won't worry about splitting - it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area. -*/ - -import { InvalidArgumentError } from "../errors.js"; - -/** - * @private - */ - -// TYPES - -export function isUndefined(o) { - return typeof o === "undefined"; -} - -export function isNumber(o) { - return typeof o === "number"; -} - -export function isInteger(o) { - return typeof o === "number" && o % 1 === 0; -} - -export function isString(o) { - return typeof o === "string"; -} - -export function isDate(o) { - return Object.prototype.toString.call(o) === "[object Date]"; -} - -// CAPABILITIES - -export function hasIntl() { - try { - return typeof Intl !== "undefined" && Intl.DateTimeFormat; - } catch (e) { - return false; - } -} - -export function hasFormatToParts() { - return !isUndefined(Intl.DateTimeFormat.prototype.formatToParts); -} - -export function hasRelative() { - try { - return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat; - } catch (e) { - return false; - } -} - -// OBJECTS AND ARRAYS - -export function maybeArray(thing) { - return Array.isArray(thing) ? thing : [thing]; -} - -export function bestBy(arr, by, compare) { - if (arr.length === 0) { - return undefined; - } - return arr.reduce((best, next) => { - const pair = [by(next), next]; - if (!best) { - return pair; - } else if (compare(best[0], pair[0]) === best[0]) { - return best; - } else { - return pair; - } - }, null)[1]; -} - -export function pick(obj, keys) { - return keys.reduce((a, k) => { - a[k] = obj[k]; - return a; - }, {}); -} - -export function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -// NUMBERS AND STRINGS - -export function integerBetween(thing, bottom, top) { - return isInteger(thing) && thing >= bottom && thing <= top; -} - -// x % n but takes the sign of n instead of x -export function floorMod(x, n) { - return x - n * Math.floor(x / n); -} - -export function padStart(input, n = 2) { - if (input.toString().length < n) { - return ("0".repeat(n) + input).slice(-n); - } else { - return input.toString(); - } -} - -export function parseInteger(string) { - if (isUndefined(string) || string === null || string === "") { - return undefined; - } else { - return parseInt(string, 10); - } -} - -export function parseMillis(fraction) { - // Return undefined (instead of 0) in these cases, where fraction is not set - if (isUndefined(fraction) || fraction === null || fraction === "") { - return undefined; - } else { - const f = parseFloat("0." + fraction) * 1000; - return Math.floor(f); - } -} - -export function roundTo(number, digits, towardZero = false) { - const factor = 10 ** digits, - rounder = towardZero ? Math.trunc : Math.round; - return rounder(number * factor) / factor; -} - -// DATE BASICS - -export function isLeapYear(year) { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -} - -export function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; -} - -export function daysInMonth(year, month) { - const modMonth = floorMod(month - 1, 12) + 1, - modYear = year + (month - modMonth) / 12; - - if (modMonth === 2) { - return isLeapYear(modYear) ? 29 : 28; - } else { - return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1]; - } -} - -// covert a calendar object to a local timestamp (epoch, but with the offset baked in) -export function objToLocalTS(obj) { - let d = Date.UTC( - obj.year, - obj.month - 1, - obj.day, - obj.hour, - obj.minute, - obj.second, - obj.millisecond - ); - - // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that - if (obj.year < 100 && obj.year >= 0) { - d = new Date(d); - d.setUTCFullYear(d.getUTCFullYear() - 1900); - } - return +d; -} - -export function weeksInWeekYear(weekYear) { - const p1 = - (weekYear + - Math.floor(weekYear / 4) - - Math.floor(weekYear / 100) + - Math.floor(weekYear / 400)) % - 7, - last = weekYear - 1, - p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7; - return p1 === 4 || p2 === 3 ? 53 : 52; -} - -export function untruncateYear(year) { - if (year > 99) { - return year; - } else return year > 60 ? 1900 + year : 2000 + year; -} - -// PARSING - -export function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) { - const date = new Date(ts), - intlOpts = { - hour12: false, - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit" - }; - - if (timeZone) { - intlOpts.timeZone = timeZone; - } - - const modified = Object.assign({ timeZoneName: offsetFormat }, intlOpts), - intl = hasIntl(); - - if (intl && hasFormatToParts()) { - const parsed = new Intl.DateTimeFormat(locale, modified) - .formatToParts(date) - .find(m => m.type.toLowerCase() === "timezonename"); - return parsed ? parsed.value : null; - } else if (intl) { - // this probably doesn't work for all locales - const without = new Intl.DateTimeFormat(locale, intlOpts).format(date), - included = new Intl.DateTimeFormat(locale, modified).format(date), - diffed = included.substring(without.length), - trimmed = diffed.replace(/^[, \u200e]+/, ""); - return trimmed; - } else { - return null; - } -} - -// signedOffset('-5', '30') -> -330 -export function signedOffset(offHourStr, offMinuteStr) { - let offHour = parseInt(offHourStr, 10); - - // don't || this because we want to preserve -0 - if (Number.isNaN(offHour)) { - offHour = 0; - } - - const offMin = parseInt(offMinuteStr, 10) || 0, - offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin; - return offHour * 60 + offMinSigned; -} - -// COERCION - -export function asNumber(value) { - const numericValue = Number(value); - if (typeof value === "boolean" || value === "" || Number.isNaN(numericValue)) - throw new InvalidArgumentError(`Invalid unit value ${value}`); - return numericValue; -} - -export function normalizeObject(obj, normalizer, nonUnitKeys) { - const normalized = {}; - for (const u in obj) { - if (hasOwnProperty(obj, u)) { - if (nonUnitKeys.indexOf(u) >= 0) continue; - const v = obj[u]; - if (v === undefined || v === null) continue; - normalized[normalizer(u)] = asNumber(v); - } - } - return normalized; -} - -export function formatOffset(offset, format) { - const hours = Math.trunc(Math.abs(offset / 60)), - minutes = Math.trunc(Math.abs(offset % 60)), - sign = offset >= 0 ? "+" : "-"; - - switch (format) { - case "short": - return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`; - case "narrow": - return `${sign}${hours}${minutes > 0 ? `:${minutes}` : ""}`; - case "techie": - return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`; - default: - throw new RangeError(`Value format ${format} is out of range for property format`); - } -} - -export function timeObject(obj) { - return pick(obj, ["hour", "minute", "second", "millisecond"]); -} - -export const ianaRegex = /[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/; diff --git a/node_modules/luxon/src/impl/zoneUtil.js b/node_modules/luxon/src/impl/zoneUtil.js deleted file mode 100644 index c45e828..0000000 --- a/node_modules/luxon/src/impl/zoneUtil.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @private - */ - -import Zone from "../zone.js"; -import IANAZone from "../zones/IANAZone.js"; -import FixedOffsetZone from "../zones/fixedOffsetZone.js"; -import InvalidZone from "../zones/invalidZone.js"; - -import { isUndefined, isString, isNumber } from "./util.js"; - -export function normalizeZone(input, defaultZone) { - let offset; - if (isUndefined(input) || input === null) { - return defaultZone; - } else if (input instanceof Zone) { - return input; - } else if (isString(input)) { - const lowered = input.toLowerCase(); - if (lowered === "local") return defaultZone; - else if (lowered === "utc" || lowered === "gmt") return FixedOffsetZone.utcInstance; - else if ((offset = IANAZone.parseGMTOffset(input)) != null) { - // handle Etc/GMT-4, which V8 chokes on - return FixedOffsetZone.instance(offset); - } else if (IANAZone.isValidSpecifier(lowered)) return IANAZone.create(input); - else return FixedOffsetZone.parseSpecifier(lowered) || new InvalidZone(input); - } else if (isNumber(input)) { - return FixedOffsetZone.instance(input); - } else if (typeof input === "object" && input.offset && typeof input.offset === "number") { - // This is dumb, but the instanceof check above doesn't seem to really work - // so we're duck checking it - return input; - } else { - return new InvalidZone(input); - } -} diff --git a/node_modules/luxon/src/info.js b/node_modules/luxon/src/info.js deleted file mode 100644 index 52912ac..0000000 --- a/node_modules/luxon/src/info.js +++ /dev/null @@ -1,186 +0,0 @@ -import DateTime from "./datetime.js"; -import Settings from "./settings.js"; -import Locale from "./impl/locale.js"; -import IANAZone from "./zones/IANAZone.js"; -import { normalizeZone } from "./impl/zoneUtil.js"; - -import { hasFormatToParts, hasIntl, hasRelative } from "./impl/util.js"; - -/** - * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment. - */ -export default class Info { - /** - * Return whether the specified zone contains a DST. - * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone. - * @return {boolean} - */ - static hasDST(zone = Settings.defaultZone) { - const proto = DateTime.local() - .setZone(zone) - .set({ month: 12 }); - - return !zone.universal && proto.offset !== proto.set({ month: 6 }).offset; - } - - /** - * Return whether the specified zone is a valid IANA specifier. - * @param {string} zone - Zone to check - * @return {boolean} - */ - static isValidIANAZone(zone) { - return IANAZone.isValidSpecifier(zone) && IANAZone.isValidZone(zone); - } - - /** - * Converts the input into a {@link Zone} instance. - * - * * If `input` is already a Zone instance, it is returned unchanged. - * * If `input` is a string containing a valid time zone name, a Zone instance - * with that name is returned. - * * If `input` is a string that doesn't refer to a known time zone, a Zone - * instance with {@link Zone.isValid} == false is returned. - * * If `input is a number, a Zone instance with the specified fixed offset - * in minutes is returned. - * * If `input` is `null` or `undefined`, the default zone is returned. - * @param {string|Zone|number} [input] - the value to be converted - * @return {Zone} - */ - static normalizeZone(input) { - return normalizeZone(input, Settings.defaultZone); - } - - /** - * Return an array of standalone month names. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.outputCalendar='gregory'] - the calendar - * @example Info.months()[0] //=> 'January' - * @example Info.months('short')[0] //=> 'Jan' - * @example Info.months('numeric')[0] //=> '1' - * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.' - * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١' - * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I' - * @return {[string]} - */ - static months( - length = "long", - { locale = null, numberingSystem = null, outputCalendar = "gregory" } = {} - ) { - return Locale.create(locale, numberingSystem, outputCalendar).months(length); - } - - /** - * Return an array of format month names. - * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that - * changes the string. - * See {@link months} - * @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long" - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @param {string} [opts.outputCalendar='gregory'] - the calendar - * @return {[string]} - */ - static monthsFormat( - length = "long", - { locale = null, numberingSystem = null, outputCalendar = "gregory" } = {} - ) { - return Locale.create(locale, numberingSystem, outputCalendar).months(length, true); - } - - /** - * Return an array of standalone week names. - * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat - * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @example Info.weekdays()[0] //=> 'Monday' - * @example Info.weekdays('short')[0] //=> 'Mon' - * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.' - * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين' - * @return {[string]} - */ - static weekdays(length = "long", { locale = null, numberingSystem = null } = {}) { - return Locale.create(locale, numberingSystem, null).weekdays(length); - } - - /** - * Return an array of format week names. - * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that - * changes the string. - * See {@link weekdays} - * @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long". - * @param {Object} opts - options - * @param {string} [opts.locale=null] - the locale code - * @param {string} [opts.numberingSystem=null] - the numbering system - * @return {[string]} - */ - static weekdaysFormat(length = "long", { locale = null, numberingSystem = null } = {}) { - return Locale.create(locale, numberingSystem, null).weekdays(length, true); - } - - /** - * Return an array of meridiems. - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @example Info.meridiems() //=> [ 'AM', 'PM' ] - * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ] - * @return {[string]} - */ - static meridiems({ locale = null } = {}) { - return Locale.create(locale).meridiems(); - } - - /** - * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian. - * @param {string} [length='short'] - the length of the era representation, such as "short" or "long". - * @param {Object} opts - options - * @param {string} [opts.locale] - the locale code - * @example Info.eras() //=> [ 'BC', 'AD' ] - * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ] - * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ] - * @return {[string]} - */ - static eras(length = "short", { locale = null } = {}) { - return Locale.create(locale, null, "gregory").eras(length); - } - - /** - * Return the set of available features in this environment. - * Some features of Luxon are not available in all environments. For example, on older browsers, timezone support is not available. Use this function to figure out if that's the case. - * Keys: - * * `zones`: whether this environment supports IANA timezones - * * `intlTokens`: whether this environment supports internationalized token-based formatting/parsing - * * `intl`: whether this environment supports general internationalization - * * `relative`: whether this environment supports relative time formatting - * @example Info.features() //=> { intl: true, intlTokens: false, zones: true, relative: false } - * @return {Object} - */ - static features() { - let intl = false, - intlTokens = false, - zones = false, - relative = false; - - if (hasIntl()) { - intl = true; - intlTokens = hasFormatToParts(); - relative = hasRelative(); - - try { - zones = - new Intl.DateTimeFormat("en", { timeZone: "America/New_York" }).resolvedOptions() - .timeZone === "America/New_York"; - } catch (e) { - zones = false; - } - } - - return { intl, intlTokens, zones, relative }; - } -} diff --git a/node_modules/luxon/src/interval.js b/node_modules/luxon/src/interval.js deleted file mode 100644 index f2cfce8..0000000 --- a/node_modules/luxon/src/interval.js +++ /dev/null @@ -1,601 +0,0 @@ -import DateTime, { friendlyDateTime } from "./datetime.js"; -import Duration, { friendlyDuration } from "./duration.js"; -import Settings from "./settings.js"; -import { InvalidArgumentError, InvalidIntervalError } from "./errors.js"; -import Invalid from "./impl/invalid.js"; - -const INVALID = "Invalid Interval"; - -// checks if the start is equal to or before the end -function validateStartEnd(start, end) { - if (!start || !start.isValid) { - return Interval.invalid("missing or invalid start"); - } else if (!end || !end.isValid) { - return Interval.invalid("missing or invalid end"); - } else if (end < start) { - return Interval.invalid( - "end before start", - `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}` - ); - } else { - return null; - } -} - -/** - * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them. - * - * Here is a brief overview of the most commonly used methods and getters in Interval: - * - * * **Creation** To create an Interval, use {@link fromDateTimes}, {@link after}, {@link before}, or {@link fromISO}. - * * **Accessors** Use {@link start} and {@link end} to get the start and end. - * * **Interrogation** To analyze the Interval, use {@link count}, {@link length}, {@link hasSame}, {@link contains}, {@link isAfter}, or {@link isBefore}. - * * **Transformation** To create other Intervals out of this one, use {@link set}, {@link splitAt}, {@link splitBy}, {@link divideEqually}, {@link merge}, {@link xor}, {@link union}, {@link intersection}, or {@link difference}. - * * **Comparison** To compare this Interval to another one, use {@link equals}, {@link overlaps}, {@link abutsStart}, {@link abutsEnd}, {@link engulfs}. - * * **Output** To convert the Interval into other representations, see {@link toString}, {@link toISO}, {@link toISODate}, {@link toISOTime}, {@link toFormat}, and {@link toDuration}. - */ -export default class Interval { - /** - * @private - */ - constructor(config) { - /** - * @access private - */ - this.s = config.start; - /** - * @access private - */ - this.e = config.end; - /** - * @access private - */ - this.invalid = config.invalid || null; - /** - * @access private - */ - this.isLuxonInterval = true; - } - - /** - * Create an invalid Interval. - * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent - * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information - * @return {Interval} - */ - static invalid(reason, explanation = null) { - if (!reason) { - throw new InvalidArgumentError("need to specify a reason the Interval is invalid"); - } - - const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation); - - if (Settings.throwOnInvalid) { - throw new InvalidIntervalError(invalid); - } else { - return new Interval({ invalid }); - } - } - - /** - * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end. - * @param {DateTime|Date|Object} start - * @param {DateTime|Date|Object} end - * @return {Interval} - */ - static fromDateTimes(start, end) { - const builtStart = friendlyDateTime(start), - builtEnd = friendlyDateTime(end); - - const validateError = validateStartEnd(builtStart, builtEnd); - - if (validateError == null) { - return new Interval({ - start: builtStart, - end: builtEnd - }); - } else { - return validateError; - } - } - - /** - * Create an Interval from a start DateTime and a Duration to extend to. - * @param {DateTime|Date|Object} start - * @param {Duration|Object|number} duration - the length of the Interval. - * @return {Interval} - */ - static after(start, duration) { - const dur = friendlyDuration(duration), - dt = friendlyDateTime(start); - return Interval.fromDateTimes(dt, dt.plus(dur)); - } - - /** - * Create an Interval from an end DateTime and a Duration to extend backwards to. - * @param {DateTime|Date|Object} end - * @param {Duration|Object|number} duration - the length of the Interval. - * @return {Interval} - */ - static before(end, duration) { - const dur = friendlyDuration(duration), - dt = friendlyDateTime(end); - return Interval.fromDateTimes(dt.minus(dur), dt); - } - - /** - * Create an Interval from an ISO 8601 string. - * Accepts `/`, `/`, and `/` formats. - * @param {string} text - the ISO string to parse - * @param {Object} [opts] - options to pass {@link DateTime.fromISO} and optionally {@link Duration.fromISO} - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @return {Interval} - */ - static fromISO(text, opts) { - const [s, e] = (text || "").split("/", 2); - if (s && e) { - let start, startIsValid; - try { - start = DateTime.fromISO(s, opts); - startIsValid = start.isValid; - } catch (e) { - startIsValid = false; - } - - let end, endIsValid; - try { - end = DateTime.fromISO(e, opts); - endIsValid = end.isValid; - } catch (e) { - endIsValid = false; - } - - if (startIsValid && endIsValid) { - return Interval.fromDateTimes(start, end); - } - - if (startIsValid) { - const dur = Duration.fromISO(e, opts); - if (dur.isValid) { - return Interval.after(start, dur); - } - } else if (endIsValid) { - const dur = Duration.fromISO(s, opts); - if (dur.isValid) { - return Interval.before(end, dur); - } - } - } - return Interval.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`); - } - - /** - * Check if an object is an Interval. Works across context boundaries - * @param {object} o - * @return {boolean} - */ - static isInterval(o) { - return (o && o.isLuxonInterval) || false; - } - - /** - * Returns the start of the Interval - * @type {DateTime} - */ - get start() { - return this.isValid ? this.s : null; - } - - /** - * Returns the end of the Interval - * @type {DateTime} - */ - get end() { - return this.isValid ? this.e : null; - } - - /** - * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'. - * @type {boolean} - */ - get isValid() { - return this.invalidReason === null; - } - - /** - * Returns an error code if this Interval is invalid, or null if the Interval is valid - * @type {string} - */ - get invalidReason() { - return this.invalid ? this.invalid.reason : null; - } - - /** - * Returns an explanation of why this Interval became invalid, or null if the Interval is valid - * @type {string} - */ - get invalidExplanation() { - return this.invalid ? this.invalid.explanation : null; - } - - /** - * Returns the length of the Interval in the specified unit. - * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in. - * @return {number} - */ - length(unit = "milliseconds") { - return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN; - } - - /** - * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part. - * Unlike {@link length} this counts sections of the calendar, not periods of time, e.g. specifying 'day' - * asks 'what dates are included in this interval?', not 'how many days long is this interval?' - * @param {string} [unit='milliseconds'] - the unit of time to count. - * @return {number} - */ - count(unit = "milliseconds") { - if (!this.isValid) return NaN; - const start = this.start.startOf(unit), - end = this.end.startOf(unit); - return Math.floor(end.diff(start, unit).get(unit)) + 1; - } - - /** - * Returns whether this Interval's start and end are both in the same unit of time - * @param {string} unit - the unit of time to check sameness on - * @return {boolean} - */ - hasSame(unit) { - return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false; - } - - /** - * Return whether this Interval has the same start and end DateTimes. - * @return {boolean} - */ - isEmpty() { - return this.s.valueOf() === this.e.valueOf(); - } - - /** - * Return whether this Interval's start is after the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - isAfter(dateTime) { - if (!this.isValid) return false; - return this.s > dateTime; - } - - /** - * Return whether this Interval's end is before the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - isBefore(dateTime) { - if (!this.isValid) return false; - return this.e <= dateTime; - } - - /** - * Return whether this Interval contains the specified DateTime. - * @param {DateTime} dateTime - * @return {boolean} - */ - contains(dateTime) { - if (!this.isValid) return false; - return this.s <= dateTime && this.e > dateTime; - } - - /** - * "Sets" the start and/or end dates. Returns a newly-constructed Interval. - * @param {Object} values - the values to set - * @param {DateTime} values.start - the starting DateTime - * @param {DateTime} values.end - the ending DateTime - * @return {Interval} - */ - set({ start, end } = {}) { - if (!this.isValid) return this; - return Interval.fromDateTimes(start || this.s, end || this.e); - } - - /** - * Split this Interval at each of the specified DateTimes - * @param {...[DateTime]} dateTimes - the unit of time to count. - * @return {[Interval]} - */ - splitAt(...dateTimes) { - if (!this.isValid) return []; - const sorted = dateTimes - .map(friendlyDateTime) - .filter(d => this.contains(d)) - .sort(), - results = []; - let { s } = this, - i = 0; - - while (s < this.e) { - const added = sorted[i] || this.e, - next = +added > +this.e ? this.e : added; - results.push(Interval.fromDateTimes(s, next)); - s = next; - i += 1; - } - - return results; - } - - /** - * Split this Interval into smaller Intervals, each of the specified length. - * Left over time is grouped into a smaller interval - * @param {Duration|Object|number} duration - The length of each resulting interval. - * @return {[Interval]} - */ - splitBy(duration) { - const dur = friendlyDuration(duration); - - if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) { - return []; - } - - let { s } = this, - added, - next; - - const results = []; - while (s < this.e) { - added = s.plus(dur); - next = +added > +this.e ? this.e : added; - results.push(Interval.fromDateTimes(s, next)); - s = next; - } - - return results; - } - - /** - * Split this Interval into the specified number of smaller intervals. - * @param {number} numberOfParts - The number of Intervals to divide the Interval into. - * @return {[Interval]} - */ - divideEqually(numberOfParts) { - if (!this.isValid) return []; - return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts); - } - - /** - * Return whether this Interval overlaps with the specified Interval - * @param {Interval} other - * @return {boolean} - */ - overlaps(other) { - return this.e > other.s && this.s < other.e; - } - - /** - * Return whether this Interval's end is adjacent to the specified Interval's start. - * @param {Interval} other - * @return {boolean} - */ - abutsStart(other) { - if (!this.isValid) return false; - return +this.e === +other.s; - } - - /** - * Return whether this Interval's start is adjacent to the specified Interval's end. - * @param {Interval} other - * @return {boolean} - */ - abutsEnd(other) { - if (!this.isValid) return false; - return +other.e === +this.s; - } - - /** - * Return whether this Interval engulfs the start and end of the specified Interval. - * @param {Interval} other - * @return {boolean} - */ - engulfs(other) { - if (!this.isValid) return false; - return this.s <= other.s && this.e >= other.e; - } - - /** - * Return whether this Interval has the same start and end as the specified Interval. - * @param {Interval} other - * @return {boolean} - */ - equals(other) { - if (!this.isValid || !other.isValid) { - return false; - } - - return this.s.equals(other.s) && this.e.equals(other.e); - } - - /** - * Return an Interval representing the intersection of this Interval and the specified Interval. - * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals. - * Returns null if the intersection is empty, meaning, the intervals don't intersect. - * @param {Interval} other - * @return {Interval} - */ - intersection(other) { - if (!this.isValid) return this; - const s = this.s > other.s ? this.s : other.s, - e = this.e < other.e ? this.e : other.e; - - if (s > e) { - return null; - } else { - return Interval.fromDateTimes(s, e); - } - } - - /** - * Return an Interval representing the union of this Interval and the specified Interval. - * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals. - * @param {Interval} other - * @return {Interval} - */ - union(other) { - if (!this.isValid) return this; - const s = this.s < other.s ? this.s : other.s, - e = this.e > other.e ? this.e : other.e; - return Interval.fromDateTimes(s, e); - } - - /** - * Merge an array of Intervals into a equivalent minimal set of Intervals. - * Combines overlapping and adjacent Intervals. - * @param {[Interval]} intervals - * @return {[Interval]} - */ - static merge(intervals) { - const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce( - ([sofar, current], item) => { - if (!current) { - return [sofar, item]; - } else if (current.overlaps(item) || current.abutsStart(item)) { - return [sofar, current.union(item)]; - } else { - return [sofar.concat([current]), item]; - } - }, - [[], null] - ); - if (final) { - found.push(final); - } - return found; - } - - /** - * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals. - * @param {[Interval]} intervals - * @return {[Interval]} - */ - static xor(intervals) { - let start = null, - currentCount = 0; - const results = [], - ends = intervals.map(i => [{ time: i.s, type: "s" }, { time: i.e, type: "e" }]), - flattened = Array.prototype.concat(...ends), - arr = flattened.sort((a, b) => a.time - b.time); - - for (const i of arr) { - currentCount += i.type === "s" ? 1 : -1; - - if (currentCount === 1) { - start = i.time; - } else { - if (start && +start !== +i.time) { - results.push(Interval.fromDateTimes(start, i.time)); - } - - start = null; - } - } - - return Interval.merge(results); - } - - /** - * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals. - * @param {...Interval} intervals - * @return {[Interval]} - */ - difference(...intervals) { - return Interval.xor([this].concat(intervals)) - .map(i => this.intersection(i)) - .filter(i => i && !i.isEmpty()); - } - - /** - * Returns a string representation of this Interval appropriate for debugging. - * @return {string} - */ - toString() { - if (!this.isValid) return INVALID; - return `[${this.s.toISO()} – ${this.e.toISO()})`; - } - - /** - * Returns an ISO 8601-compliant string representation of this Interval. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @param {Object} opts - The same options as {@link DateTime.toISO} - * @return {string} - */ - toISO(opts) { - if (!this.isValid) return INVALID; - return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`; - } - - /** - * Returns an ISO 8601-compliant string representation of date of this Interval. - * The time components are ignored. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @return {string} - */ - toISODate() { - if (!this.isValid) return INVALID; - return `${this.s.toISODate()}/${this.e.toISODate()}`; - } - - /** - * Returns an ISO 8601-compliant string representation of time of this Interval. - * The date components are ignored. - * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals - * @param {Object} opts - The same options as {@link DateTime.toISO} - * @return {string} - */ - toISOTime(opts) { - if (!this.isValid) return INVALID; - return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`; - } - - /** - * Returns a string representation of this Interval formatted according to the specified format string. - * @param {string} dateFormat - the format string. This string formats the start and end time. See {@link DateTime.toFormat} for details. - * @param {Object} opts - options - * @param {string} [opts.separator = ' – '] - a separator to place between the start and end representations - * @return {string} - */ - toFormat(dateFormat, { separator = " – " } = {}) { - if (!this.isValid) return INVALID; - return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`; - } - - /** - * Return a Duration representing the time spanned by this interval. - * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration. - * @param {Object} opts - options that affect the creation of the Duration - * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use - * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 } - * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 } - * @return {Duration} - */ - toDuration(unit, opts) { - if (!this.isValid) { - return Duration.invalid(this.invalidReason); - } - return this.e.diff(this.s, unit, opts); - } - - /** - * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes - * @param {function} mapFn - * @return {Interval} - * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC()) - * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 })) - */ - mapEndpoints(mapFn) { - return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e)); - } -} diff --git a/node_modules/luxon/src/luxon.js b/node_modules/luxon/src/luxon.js deleted file mode 100644 index 31b9738..0000000 --- a/node_modules/luxon/src/luxon.js +++ /dev/null @@ -1,23 +0,0 @@ -import DateTime from "./datetime.js"; -import Duration from "./duration.js"; -import Interval from "./interval.js"; -import Info from "./info.js"; -import Zone from "./zone.js"; -import FixedOffsetZone from "./zones/fixedOffsetZone.js"; -import IANAZone from "./zones/IANAZone.js"; -import InvalidZone from "./zones/invalidZone.js"; -import LocalZone from "./zones/localZone.js"; -import Settings from "./settings.js"; - -export { - DateTime, - Duration, - Interval, - Info, - Zone, - FixedOffsetZone, - IANAZone, - InvalidZone, - LocalZone, - Settings -}; diff --git a/node_modules/luxon/src/luxonFilled.js b/node_modules/luxon/src/luxonFilled.js deleted file mode 100644 index 5145b18..0000000 --- a/node_modules/luxon/src/luxonFilled.js +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint import/no-extraneous-dependencies: off */ - -import "core-js/features/symbol"; -import "core-js/features/symbol/iterator"; -import "core-js/features/object"; -import "core-js/features/number/is-nan"; -import "core-js/features/array"; -import "core-js/features/string/virtual/starts-with"; -import "core-js/features/string/virtual/repeat"; -import "core-js/features/math/trunc"; -import "core-js/features/math/sign"; - -export * from "./luxon.js"; diff --git a/node_modules/luxon/src/settings.js b/node_modules/luxon/src/settings.js deleted file mode 100644 index 57f68e9..0000000 --- a/node_modules/luxon/src/settings.js +++ /dev/null @@ -1,137 +0,0 @@ -import LocalZone from "./zones/localZone.js"; -import IANAZone from "./zones/IANAZone.js"; -import Locale from "./impl/locale.js"; - -import { normalizeZone } from "./impl/zoneUtil.js"; - -let now = () => Date.now(), - defaultZone = null, // not setting this directly to LocalZone.instance bc loading order issues - defaultLocale = null, - defaultNumberingSystem = null, - defaultOutputCalendar = null, - throwOnInvalid = false; - -/** - * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here. - */ -export default class Settings { - /** - * Get the callback for returning the current timestamp. - * @type {function} - */ - static get now() { - return now; - } - - /** - * Set the callback for returning the current timestamp. - * The function should return a number, which will be interpreted as an Epoch millisecond count - * @type {function} - * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future - * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time - */ - static set now(n) { - now = n; - } - - /** - * Get the default time zone to create DateTimes in. - * @type {string} - */ - static get defaultZoneName() { - return Settings.defaultZone.name; - } - - /** - * Set the default time zone to create DateTimes in. Does not affect existing instances. - * @type {string} - */ - static set defaultZoneName(z) { - if (!z) { - defaultZone = null; - } else { - defaultZone = normalizeZone(z); - } - } - - /** - * Get the default time zone object to create DateTimes in. Does not affect existing instances. - * @type {Zone} - */ - static get defaultZone() { - return defaultZone || LocalZone.instance; - } - - /** - * Get the default locale to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - static get defaultLocale() { - return defaultLocale; - } - - /** - * Set the default locale to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - static set defaultLocale(locale) { - defaultLocale = locale; - } - - /** - * Get the default numbering system to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - static get defaultNumberingSystem() { - return defaultNumberingSystem; - } - - /** - * Set the default numbering system to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - static set defaultNumberingSystem(numberingSystem) { - defaultNumberingSystem = numberingSystem; - } - - /** - * Get the default output calendar to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - static get defaultOutputCalendar() { - return defaultOutputCalendar; - } - - /** - * Set the default output calendar to create DateTimes with. Does not affect existing instances. - * @type {string} - */ - static set defaultOutputCalendar(outputCalendar) { - defaultOutputCalendar = outputCalendar; - } - - /** - * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals - * @type {boolean} - */ - static get throwOnInvalid() { - return throwOnInvalid; - } - - /** - * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals - * @type {boolean} - */ - static set throwOnInvalid(t) { - throwOnInvalid = t; - } - - /** - * Reset Luxon's global caches. Should only be necessary in testing scenarios. - * @return {void} - */ - static resetCaches() { - Locale.resetCache(); - IANAZone.resetCache(); - } -} diff --git a/node_modules/luxon/src/zone.js b/node_modules/luxon/src/zone.js deleted file mode 100644 index 8a5d070..0000000 --- a/node_modules/luxon/src/zone.js +++ /dev/null @@ -1,88 +0,0 @@ -/* eslint no-unused-vars: "off" */ -import { ZoneIsAbstractError } from "./errors.js"; - -/** - * @interface - */ -export default class Zone { - /** - * The type of zone - * @abstract - * @type {string} - */ - get type() { - throw new ZoneIsAbstractError(); - } - - /** - * The name of this zone. - * @abstract - * @type {string} - */ - get name() { - throw new ZoneIsAbstractError(); - } - - /** - * Returns whether the offset is known to be fixed for the whole year. - * @abstract - * @type {boolean} - */ - get universal() { - throw new ZoneIsAbstractError(); - } - - /** - * Returns the offset's common name (such as EST) at the specified timestamp - * @abstract - * @param {number} ts - Epoch milliseconds for which to get the name - * @param {Object} opts - Options to affect the format - * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'. - * @param {string} opts.locale - What locale to return the offset name in. - * @return {string} - */ - offsetName(ts, opts) { - throw new ZoneIsAbstractError(); - } - - /** - * Returns the offset's value as a string - * @abstract - * @param {number} ts - Epoch milliseconds for which to get the offset - * @param {string} format - What style of offset to return. - * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively - * @return {string} - */ - formatOffset(ts, format) { - throw new ZoneIsAbstractError(); - } - - /** - * Return the offset in minutes for this zone at the specified timestamp. - * @abstract - * @param {number} ts - Epoch milliseconds for which to compute the offset - * @return {number} - */ - offset(ts) { - throw new ZoneIsAbstractError(); - } - - /** - * Return whether this Zone is equal to another zone - * @abstract - * @param {Zone} otherZone - the zone to compare - * @return {boolean} - */ - equals(otherZone) { - throw new ZoneIsAbstractError(); - } - - /** - * Return whether this Zone is valid. - * @abstract - * @type {boolean} - */ - get isValid() { - throw new ZoneIsAbstractError(); - } -} diff --git a/node_modules/luxon/src/zones/IANAZone.js b/node_modules/luxon/src/zones/IANAZone.js deleted file mode 100644 index e2ad296..0000000 --- a/node_modules/luxon/src/zones/IANAZone.js +++ /dev/null @@ -1,188 +0,0 @@ -import { formatOffset, parseZoneInfo, isUndefined, ianaRegex, objToLocalTS } from "../impl/util.js"; -import Zone from "../zone.js"; - -const matchingRegex = RegExp(`^${ianaRegex.source}$`); - -let dtfCache = {}; -function makeDTF(zone) { - if (!dtfCache[zone]) { - dtfCache[zone] = new Intl.DateTimeFormat("en-US", { - hour12: false, - timeZone: zone, - year: "numeric", - month: "2-digit", - day: "2-digit", - hour: "2-digit", - minute: "2-digit", - second: "2-digit" - }); - } - return dtfCache[zone]; -} - -const typeToPos = { - year: 0, - month: 1, - day: 2, - hour: 3, - minute: 4, - second: 5 -}; - -function hackyOffset(dtf, date) { - const formatted = dtf.format(date).replace(/\u200E/g, ""), - parsed = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(formatted), - [, fMonth, fDay, fYear, fHour, fMinute, fSecond] = parsed; - return [fYear, fMonth, fDay, fHour, fMinute, fSecond]; -} - -function partsOffset(dtf, date) { - const formatted = dtf.formatToParts(date), - filled = []; - for (let i = 0; i < formatted.length; i++) { - const { type, value } = formatted[i], - pos = typeToPos[type]; - - if (!isUndefined(pos)) { - filled[pos] = parseInt(value, 10); - } - } - return filled; -} - -let ianaZoneCache = {}; -/** - * A zone identified by an IANA identifier, like America/New_York - * @implements {Zone} - */ -export default class IANAZone extends Zone { - /** - * @param {string} name - Zone name - * @return {IANAZone} - */ - static create(name) { - if (!ianaZoneCache[name]) { - ianaZoneCache[name] = new IANAZone(name); - } - return ianaZoneCache[name]; - } - - /** - * Reset local caches. Should only be necessary in testing scenarios. - * @return {void} - */ - static resetCache() { - ianaZoneCache = {}; - dtfCache = {}; - } - - /** - * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that. - * @param {string} s - The string to check validity on - * @example IANAZone.isValidSpecifier("America/New_York") //=> true - * @example IANAZone.isValidSpecifier("Fantasia/Castle") //=> true - * @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false - * @return {boolean} - */ - static isValidSpecifier(s) { - return !!(s && s.match(matchingRegex)); - } - - /** - * Returns whether the provided string identifies a real zone - * @param {string} zone - The string to check - * @example IANAZone.isValidZone("America/New_York") //=> true - * @example IANAZone.isValidZone("Fantasia/Castle") //=> false - * @example IANAZone.isValidZone("Sport~~blorp") //=> false - * @return {boolean} - */ - static isValidZone(zone) { - try { - new Intl.DateTimeFormat("en-US", { timeZone: zone }).format(); - return true; - } catch (e) { - return false; - } - } - - // Etc/GMT+8 -> -480 - /** @ignore */ - static parseGMTOffset(specifier) { - if (specifier) { - const match = specifier.match(/^Etc\/GMT([+-]\d{1,2})$/i); - if (match) { - return -60 * parseInt(match[1]); - } - } - return null; - } - - constructor(name) { - super(); - /** @private **/ - this.zoneName = name; - /** @private **/ - this.valid = IANAZone.isValidZone(name); - } - - /** @override **/ - get type() { - return "iana"; - } - - /** @override **/ - get name() { - return this.zoneName; - } - - /** @override **/ - get universal() { - return false; - } - - /** @override **/ - offsetName(ts, { format, locale }) { - return parseZoneInfo(ts, format, locale, this.name); - } - - /** @override **/ - formatOffset(ts, format) { - return formatOffset(this.offset(ts), format); - } - - /** @override **/ - offset(ts) { - const date = new Date(ts), - dtf = makeDTF(this.name), - [year, month, day, hour, minute, second] = dtf.formatToParts - ? partsOffset(dtf, date) - : hackyOffset(dtf, date), - // work around https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat - adjustedHour = hour === 24 ? 0 : hour; - - const asUTC = objToLocalTS({ - year, - month, - day, - hour: adjustedHour, - minute, - second, - millisecond: 0 - }); - - let asTS = +date; - const over = asTS % 1000; - asTS -= over >= 0 ? over : 1000 + over; - return (asUTC - asTS) / (60 * 1000); - } - - /** @override **/ - equals(otherZone) { - return otherZone.type === "iana" && otherZone.name === this.name; - } - - /** @override **/ - get isValid() { - return this.valid; - } -} diff --git a/node_modules/luxon/src/zones/fixedOffsetZone.js b/node_modules/luxon/src/zones/fixedOffsetZone.js deleted file mode 100644 index 364e065..0000000 --- a/node_modules/luxon/src/zones/fixedOffsetZone.js +++ /dev/null @@ -1,94 +0,0 @@ -import { formatOffset, signedOffset } from "../impl/util.js"; -import Zone from "../zone.js"; - -let singleton = null; - -/** - * A zone with a fixed offset (meaning no DST) - * @implements {Zone} - */ -export default class FixedOffsetZone extends Zone { - /** - * Get a singleton instance of UTC - * @return {FixedOffsetZone} - */ - static get utcInstance() { - if (singleton === null) { - singleton = new FixedOffsetZone(0); - } - return singleton; - } - - /** - * Get an instance with a specified offset - * @param {number} offset - The offset in minutes - * @return {FixedOffsetZone} - */ - static instance(offset) { - return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset); - } - - /** - * Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6" - * @param {string} s - The offset string to parse - * @example FixedOffsetZone.parseSpecifier("UTC+6") - * @example FixedOffsetZone.parseSpecifier("UTC+06") - * @example FixedOffsetZone.parseSpecifier("UTC-6:00") - * @return {FixedOffsetZone} - */ - static parseSpecifier(s) { - if (s) { - const r = s.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i); - if (r) { - return new FixedOffsetZone(signedOffset(r[1], r[2])); - } - } - return null; - } - - constructor(offset) { - super(); - /** @private **/ - this.fixed = offset; - } - - /** @override **/ - get type() { - return "fixed"; - } - - /** @override **/ - get name() { - return this.fixed === 0 ? "UTC" : `UTC${formatOffset(this.fixed, "narrow")}`; - } - - /** @override **/ - offsetName() { - return this.name; - } - - /** @override **/ - formatOffset(ts, format) { - return formatOffset(this.fixed, format); - } - - /** @override **/ - get universal() { - return true; - } - - /** @override **/ - offset() { - return this.fixed; - } - - /** @override **/ - equals(otherZone) { - return otherZone.type === "fixed" && otherZone.fixed === this.fixed; - } - - /** @override **/ - get isValid() { - return true; - } -} diff --git a/node_modules/luxon/src/zones/invalidZone.js b/node_modules/luxon/src/zones/invalidZone.js deleted file mode 100644 index d7b7104..0000000 --- a/node_modules/luxon/src/zones/invalidZone.js +++ /dev/null @@ -1,53 +0,0 @@ -import Zone from "../zone.js"; - -/** - * A zone that failed to parse. You should never need to instantiate this. - * @implements {Zone} - */ -export default class InvalidZone extends Zone { - constructor(zoneName) { - super(); - /** @private */ - this.zoneName = zoneName; - } - - /** @override **/ - get type() { - return "invalid"; - } - - /** @override **/ - get name() { - return this.zoneName; - } - - /** @override **/ - get universal() { - return false; - } - - /** @override **/ - offsetName() { - return null; - } - - /** @override **/ - formatOffset() { - return ""; - } - - /** @override **/ - offset() { - return NaN; - } - - /** @override **/ - equals() { - return false; - } - - /** @override **/ - get isValid() { - return false; - } -} diff --git a/node_modules/luxon/src/zones/localZone.js b/node_modules/luxon/src/zones/localZone.js deleted file mode 100644 index b8cbcdc..0000000 --- a/node_modules/luxon/src/zones/localZone.js +++ /dev/null @@ -1,63 +0,0 @@ -import { formatOffset, parseZoneInfo, hasIntl } from "../impl/util.js"; -import Zone from "../zone.js"; - -let singleton = null; - -/** - * Represents the local zone for this Javascript environment. - * @implements {Zone} - */ -export default class LocalZone extends Zone { - /** - * Get a singleton instance of the local zone - * @return {LocalZone} - */ - static get instance() { - if (singleton === null) { - singleton = new LocalZone(); - } - return singleton; - } - - /** @override **/ - get type() { - return "local"; - } - - /** @override **/ - get name() { - if (hasIntl()) { - return new Intl.DateTimeFormat().resolvedOptions().timeZone; - } else return "local"; - } - - /** @override **/ - get universal() { - return false; - } - - /** @override **/ - offsetName(ts, { format, locale }) { - return parseZoneInfo(ts, format, locale); - } - - /** @override **/ - formatOffset(ts, format) { - return formatOffset(this.offset(ts), format); - } - - /** @override **/ - offset(ts) { - return -new Date(ts).getTimezoneOffset(); - } - - /** @override **/ - equals(otherZone) { - return otherZone.type === "local"; - } - - /** @override **/ - get isValid() { - return true; - } -} diff --git a/node_modules/map-obj/index.d.ts b/node_modules/map-obj/index.d.ts deleted file mode 100644 index 50b5e17..0000000 --- a/node_modules/map-obj/index.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -declare namespace mapObject { - type Mapper< - SourceObjectType extends {[key: string]: any}, - MappedObjectKeyType extends string, - MappedObjectValueType - > = ( - sourceKey: keyof SourceObjectType, - sourceValue: SourceObjectType[keyof SourceObjectType], - source: SourceObjectType - ) => [MappedObjectKeyType, MappedObjectValueType]; - - interface Options { - /** - Recurse nested objects and objects in arrays. - - @default false - */ - deep?: boolean; - - /** - Target object to map properties on to. - - @default {} - */ - target?: {[key: string]: any}; - } - - interface DeepOptions extends Options { - deep: true; - } - - interface TargetOptions extends Options { - target: TargetObjectType; - } -} - -/** -Map object keys and values into a new object. - -@param source - Source object to copy properties from. -@param mapper - Mapping function. - -@example -``` -import mapObject = require('map-obj'); - -const newObject = mapObject({foo: 'bar'}, (key, value) => [value, key]); -//=> {bar: 'foo'} -``` -*/ -declare function mapObject< - SourceObjectType extends object, - TargetObjectType extends {[key: string]: any}, - MappedObjectKeyType extends string, - MappedObjectValueType ->( - source: SourceObjectType, - mapper: mapObject.Mapper< - SourceObjectType, - MappedObjectKeyType, - MappedObjectValueType - >, - options: mapObject.DeepOptions & mapObject.TargetOptions -): TargetObjectType & {[key: string]: unknown}; -declare function mapObject< - SourceObjectType extends object, - MappedObjectKeyType extends string, - MappedObjectValueType ->( - source: SourceObjectType, - mapper: mapObject.Mapper< - SourceObjectType, - MappedObjectKeyType, - MappedObjectValueType - >, - options: mapObject.DeepOptions -): {[key: string]: unknown}; -declare function mapObject< - SourceObjectType extends {[key: string]: any}, - TargetObjectType extends {[key: string]: any}, - MappedObjectKeyType extends string, - MappedObjectValueType ->( - source: SourceObjectType, - mapper: mapObject.Mapper< - SourceObjectType, - MappedObjectKeyType, - MappedObjectValueType - >, - options: mapObject.TargetOptions -): TargetObjectType & {[K in MappedObjectKeyType]: MappedObjectValueType}; -declare function mapObject< - SourceObjectType extends {[key: string]: any}, - MappedObjectKeyType extends string, - MappedObjectValueType ->( - source: SourceObjectType, - mapper: mapObject.Mapper< - SourceObjectType, - MappedObjectKeyType, - MappedObjectValueType - >, - options?: mapObject.Options -): {[K in MappedObjectKeyType]: MappedObjectValueType}; - -export = mapObject; diff --git a/node_modules/map-obj/index.js b/node_modules/map-obj/index.js deleted file mode 100644 index 4f1e4be..0000000 --- a/node_modules/map-obj/index.js +++ /dev/null @@ -1,54 +0,0 @@ -'use strict'; - -const isObject = value => typeof value === 'object' && value !== null; - -// Customized for this use-case -const isObjectCustom = value => - isObject(value) && - !(value instanceof RegExp) && - !(value instanceof Error) && - !(value instanceof Date); - -const mapObject = (object, mapper, options, isSeen = new WeakMap()) => { - options = { - deep: false, - target: {}, - ...options - }; - - if (isSeen.has(object)) { - return isSeen.get(object); - } - - isSeen.set(object, options.target); - - const {target} = options; - delete options.target; - - const mapArray = array => array.map(element => isObjectCustom(element) ? mapObject(element, mapper, options, isSeen) : element); - if (Array.isArray(object)) { - return mapArray(object); - } - - for (const [key, value] of Object.entries(object)) { - let [newKey, newValue] = mapper(key, value, object); - - if (options.deep && isObjectCustom(newValue)) { - newValue = Array.isArray(newValue) ? - mapArray(newValue) : - mapObject(newValue, mapper, options, isSeen); - } - - target[newKey] = newValue; - } - - return target; -}; - -module.exports = (object, mapper, options) => { - if (!isObject(object)) { - throw new TypeError(`Expected an object, got \`${object}\` (${typeof object})`); - } - - return mapObject(object, mapper, options); -}; diff --git a/node_modules/map-obj/license b/node_modules/map-obj/license deleted file mode 100644 index e7af2f7..0000000 --- a/node_modules/map-obj/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/map-obj/package.json b/node_modules/map-obj/package.json deleted file mode 100644 index 1ad5406..0000000 --- a/node_modules/map-obj/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "map-obj@^4.0.0", - "_id": "map-obj@4.1.0", - "_inBundle": false, - "_integrity": "sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g==", - "_location": "/map-obj", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "map-obj@^4.0.0", - "name": "map-obj", - "escapedName": "map-obj", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/camelcase-keys" - ], - "_resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz", - "_shasum": "b91221b542734b9f14256c0132c897c5d7256fd5", - "_spec": "map-obj@^4.0.0", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/camelcase-keys", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/map-obj/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Map object keys and values into a new object", - "devDependencies": { - "ava": "^2.0.0", - "tsd": "^0.7.3", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/map-obj#readme", - "keywords": [ - "map", - "object", - "key", - "keys", - "value", - "values", - "iterate", - "iterator", - "rename", - "modify", - "deep", - "recurse", - "recursive" - ], - "license": "MIT", - "name": "map-obj", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/map-obj.git" - }, - "scripts": { - "test": "xo && ava && tsd" - }, - "version": "4.1.0" -} diff --git a/node_modules/map-obj/readme.md b/node_modules/map-obj/readme.md deleted file mode 100644 index cd405f5..0000000 --- a/node_modules/map-obj/readme.md +++ /dev/null @@ -1,76 +0,0 @@ -# map-obj [![Build Status](https://travis-ci.org/sindresorhus/map-obj.svg?branch=master)](https://travis-ci.org/sindresorhus/map-obj) - -> Map object keys and values into a new object - - -## Install - -``` -$ npm install map-obj -``` - - -## Usage - -```js -const mapObject = require('map-obj'); - -const newObject = mapObject({foo: 'bar'}, (key, value) => [value, key]); -//=> {bar: 'foo'} -``` - - -## API - -### mapObject(source, mapper, options?) - -#### source - -Type: `object` - -Source object to copy properties from. - -#### mapper - -Type: `Function` - -Mapping function. - -- It has signature `mapper(sourceKey, sourceValue, source)`. -- It must return a two item array: `[targetKey, targetValue]`. - -#### options - -Type: `object` - -##### deep - -Type: `boolean`
-Default: `false` - -Recurse nested objects and objects in arrays. - -##### target - -Type: `object`
-Default: `{}` - -Target object to map properties on to. - - -## Related - -- [filter-obj](https://github.com/sindresorhus/filter-obj) - Filter object keys and values into a new object - - ---- - -
- - Get professional support for this package with a Tidelift subscription - -
- - Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. -
-
diff --git a/node_modules/pino-std-serializers/.editorconfig b/node_modules/pino-std-serializers/.editorconfig deleted file mode 100644 index 3fec5c5..0000000 --- a/node_modules/pino-std-serializers/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ - -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -indent_style = space -indent_size = 2 -trim_trailing_whitespace = true - -# [*.md] -# trim_trailing_whitespace = false diff --git a/node_modules/pino-std-serializers/.travis.yml b/node_modules/pino-std-serializers/.travis.yml deleted file mode 100644 index a8be60d..0000000 --- a/node_modules/pino-std-serializers/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js - -node_js: - - "14" - - "12" - - "10" - - "9" - - "8" - - "6" - -# before_install: -# - curl -L https://unpkg.com/@pnpm/self-installer | node -# install: -# - pnpm install - -script: - - npm run lint-ci - - npm run test-ci - -notifications: - email: - on_success: never - on_failure: always diff --git a/node_modules/pino-std-serializers/Readme.md b/node_modules/pino-std-serializers/Readme.md deleted file mode 100644 index 2f6702c..0000000 --- a/node_modules/pino-std-serializers/Readme.md +++ /dev/null @@ -1,107 +0,0 @@ -# pino-std-serializers  [![Build Status](https://travis-ci.org/pinojs/pino-std-serializers.svg)](https://travis-ci.org/pinojs/pino-std-serializers) - -This module provides a set of standard object serializers for the -[Pino](https://getpino.io) logger. - -## Serializers - -### `exports.err(error)` -Serializes an `Error` like object. Returns an object: - -```js -{ - type: 'string', // The name of the object's constructor. - message: 'string', // The supplied error message. - stack: 'string', // The stack when the error was generated. - raw: Error // Non-enumerable, i.e. will not be in the output, original - // Error object. This is available for subsequent serializers - // to use. -} -``` - -Any other extra properties, e.g. `statusCode`, that have been attached to the -object will also be present on the serialized object. - -### `exports.mapHttpResponse(response)` -Used internally by Pino for general response logging. Returns an object: - -```js -{ - res: {} -} -``` - -Where `res` is the `response` as serialized by the standard response serializer. - -### `exports.mapHttpRequest(request)` -Used internall by Pino for general request logging. Returns an object: - -```js -{ - req: {} -} -``` - -Where `req` is the `request` as serialized by the standard request serializer. - -### `exports.req(request)` -The default `request` serializer. Returns and object: - -```js -{ - id: 'string', // Defaults to `undefined`, unless there is an `id` property - // already attached to the `request` object or to the `request.info` - // object. Attach a synchronous function - // to the `request.id` that returns an identifier to have - // the value filled. - method: 'string', - url: 'string', // the request pathname (as per req.url in core HTTP) - headers: Object, // a reference to the `headers` object from the request - // (as per req.headers in core HTTP) - remoteAddress: 'string', - remotePort: Number, - raw: Object // Non-enumerable, i.e. will not be in the output, original - // request object. This is available for subsequent serializers - // to use. In cases where the `request` input already has - // a `raw` property this will replace the original `request.raw` - // property -} -``` - -### `exports.res(response)` -The default `response` serializer. Returns an object: - -```js -{ - statusCode: Number, - headers: Object, // The headers to be sent in the response. - raw: Object // Non-enumerable, i.e. will not be in the output, original - // response object. This is available for subsequent serializers - // to use. -} -``` - -### `exports.wrapErrorSerializer(customSerializer)` -A utility method for wrapping the default error serializer. This allows -custom serializers to work with the already serialized object. - -The `customSerializer` accepts one parameter — the newly serialized error -object — and returns the new (or updated) error object. - -### `exports.wrapRequestSerializer(customSerializer)` -A utility method for wrapping the default request serializer. This allows -custom serializers to work with the already serialized object. - -The `customSerializer` accepts one parameter — the newly serialized request -object — and returns the new (or updated) request object. - -### `exports.wrapResponseSerializer(customSerializer)` -A utility method for wrapping the default response serializer. This allows -custom serializers to work with the already serialized object. - -The `customSerializer` accepts one parameter — the newly serialized response -object — and returns the new (or updated) response object. - -## License - -MIT License diff --git a/node_modules/pino-std-serializers/index.js b/node_modules/pino-std-serializers/index.js deleted file mode 100644 index f5dfd37..0000000 --- a/node_modules/pino-std-serializers/index.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict' - -var errSerializer = require('./lib/err') -var reqSerializers = require('./lib/req') -var resSerializers = require('./lib/res') - -module.exports = { - err: errSerializer, - mapHttpRequest: reqSerializers.mapHttpRequest, - mapHttpResponse: resSerializers.mapHttpResponse, - req: reqSerializers.reqSerializer, - res: resSerializers.resSerializer, - - wrapErrorSerializer: function wrapErrorSerializer (customSerializer) { - if (customSerializer === errSerializer) return customSerializer - return function wrapErrSerializer (err) { - return customSerializer(errSerializer(err)) - } - }, - - wrapRequestSerializer: function wrapRequestSerializer (customSerializer) { - if (customSerializer === reqSerializers.reqSerializer) return customSerializer - return function wrappedReqSerializer (req) { - return customSerializer(reqSerializers.reqSerializer(req)) - } - }, - - wrapResponseSerializer: function wrapResponseSerializer (customSerializer) { - if (customSerializer === resSerializers.resSerializer) return customSerializer - return function wrappedResSerializer (res) { - return customSerializer(resSerializers.resSerializer(res)) - } - } -} diff --git a/node_modules/pino-std-serializers/lib/err.js b/node_modules/pino-std-serializers/lib/err.js deleted file mode 100644 index 8a3091c..0000000 --- a/node_modules/pino-std-serializers/lib/err.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict' - -module.exports = errSerializer - -const seen = Symbol('circular-ref-tag') -const rawSymbol = Symbol('pino-raw-err-ref') -const pinoErrProto = Object.create({}, { - type: { - enumerable: true, - writable: true, - value: undefined - }, - message: { - enumerable: true, - writable: true, - value: undefined - }, - stack: { - enumerable: true, - writable: true, - value: undefined - }, - raw: { - enumerable: false, - get: function () { - return this[rawSymbol] - }, - set: function (val) { - this[rawSymbol] = val - } - } -}) -Object.defineProperty(pinoErrProto, rawSymbol, { - writable: true, - value: {} -}) - -function errSerializer (err) { - if (!(err instanceof Error)) { - return err - } - - err[seen] = undefined // tag to prevent re-looking at this - const _err = Object.create(pinoErrProto) - _err.type = err.constructor.name - _err.message = err.message - _err.stack = err.stack - for (const key in err) { - if (_err[key] === undefined) { - const val = err[key] - if (val instanceof Error) { - if (!val.hasOwnProperty(seen)) { - _err[key] = errSerializer(val) - } - } else { - _err[key] = val - } - } - } - - delete err[seen] // clean up tag in case err is serialized again later - _err.raw = err - return _err -} diff --git a/node_modules/pino-std-serializers/lib/req.js b/node_modules/pino-std-serializers/lib/req.js deleted file mode 100644 index 1aa14a5..0000000 --- a/node_modules/pino-std-serializers/lib/req.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict' - -module.exports = { - mapHttpRequest, - reqSerializer -} - -var rawSymbol = Symbol('pino-raw-req-ref') -var pinoReqProto = Object.create({}, { - id: { - enumerable: true, - writable: true, - value: '' - }, - method: { - enumerable: true, - writable: true, - value: '' - }, - url: { - enumerable: true, - writable: true, - value: '' - }, - headers: { - enumerable: true, - writable: true, - value: {} - }, - remoteAddress: { - enumerable: true, - writable: true, - value: '' - }, - remotePort: { - enumerable: true, - writable: true, - value: '' - }, - raw: { - enumerable: false, - get: function () { - return this[rawSymbol] - }, - set: function (val) { - this[rawSymbol] = val - } - } -}) -Object.defineProperty(pinoReqProto, rawSymbol, { - writable: true, - value: {} -}) - -function reqSerializer (req) { - // req.info is for hapi compat. - var connection = req.info || req.connection - const _req = Object.create(pinoReqProto) - _req.id = (typeof req.id === 'function' ? req.id() : (req.id || (req.info ? req.info.id : undefined))) - _req.method = req.method - // req.originalUrl is for expressjs compat. - if (req.originalUrl) { - _req.url = req.originalUrl - } else { - // req.url.path is for hapi compat. - _req.url = req.path || (req.url ? (req.url.path || req.url) : undefined) - } - _req.headers = req.headers - _req.remoteAddress = connection && connection.remoteAddress - _req.remotePort = connection && connection.remotePort - // req.raw is for hapi compat/equivalence - _req.raw = req.raw || req - return _req -} - -function mapHttpRequest (req) { - return { - req: reqSerializer(req) - } -} diff --git a/node_modules/pino-std-serializers/lib/res.js b/node_modules/pino-std-serializers/lib/res.js deleted file mode 100644 index 4bdc52e..0000000 --- a/node_modules/pino-std-serializers/lib/res.js +++ /dev/null @@ -1,47 +0,0 @@ -'use strict' - -module.exports = { - mapHttpResponse, - resSerializer -} - -var rawSymbol = Symbol('pino-raw-res-ref') -var pinoResProto = Object.create({}, { - statusCode: { - enumerable: true, - writable: true, - value: 0 - }, - headers: { - enumerable: true, - writable: true, - value: '' - }, - raw: { - enumerable: false, - get: function () { - return this[rawSymbol] - }, - set: function (val) { - this[rawSymbol] = val - } - } -}) -Object.defineProperty(pinoResProto, rawSymbol, { - writable: true, - value: {} -}) - -function resSerializer (res) { - const _res = Object.create(pinoResProto) - _res.statusCode = res.statusCode - _res.headers = res.getHeaders ? res.getHeaders() : res._headers - _res.raw = res - return _res -} - -function mapHttpResponse (res) { - return { - res: resSerializer(res) - } -} diff --git a/node_modules/pino-std-serializers/package.json b/node_modules/pino-std-serializers/package.json deleted file mode 100644 index e9ffaeb..0000000 --- a/node_modules/pino-std-serializers/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "pino-std-serializers@^2.4.2", - "_id": "pino-std-serializers@2.5.0", - "_inBundle": false, - "_integrity": "sha512-wXqbqSrIhE58TdrxxlfLwU9eDhrzppQDvGhBEr1gYbzzM4KKo3Y63gSjiDXRKLVS2UOXdPNR2v+KnQgNrs+xUg==", - "_location": "/pino-std-serializers", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "pino-std-serializers@^2.4.2", - "name": "pino-std-serializers", - "escapedName": "pino-std-serializers", - "rawSpec": "^2.4.2", - "saveSpec": null, - "fetchSpec": "^2.4.2" - }, - "_requiredBy": [ - "/pino" - ], - "_resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-2.5.0.tgz", - "_shasum": "40ead781c65a0ce7ecd9c1c33f409d31fe712315", - "_spec": "pino-std-serializers@^2.4.2", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/pino", - "author": { - "name": "James Sumners", - "email": "james.sumners@gmail.com" - }, - "bugs": { - "url": "https://github.com/pinojs/pino-std-serializers/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A collection of standard object serializers for Pino", - "devDependencies": { - "pre-commit": "^1.2.2", - "snazzy": "^7.0.0", - "standard": "^11.0.0", - "tap": "^12.0.0" - }, - "homepage": "https://github.com/pinojs/pino-std-serializers#readme", - "keywords": [ - "pino", - "logging" - ], - "license": "MIT", - "main": "index.js", - "name": "pino-std-serializers", - "precommit": [ - "lint", - "test" - ], - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/pinojs/pino-std-serializers.git" - }, - "scripts": { - "lint": "standard | snazzy", - "lint-ci": "standard", - "test": "tap --no-cov 'test/**/*.test.js'", - "test-ci": "tap --cov --coverage-report=text 'test/**/*.test.js'" - }, - "version": "2.5.0" -} diff --git a/node_modules/pino-std-serializers/test/err.test.js b/node_modules/pino-std-serializers/test/err.test.js deleted file mode 100644 index e25193f..0000000 --- a/node_modules/pino-std-serializers/test/err.test.js +++ /dev/null @@ -1,106 +0,0 @@ -'use strict' - -var test = require('tap').test -const serializer = require('../lib/err') -var wrapErrorSerializer = require('../').wrapErrorSerializer - -test('serializes Error objects', function (t) { - t.plan(3) - var serialized = serializer(Error('foo')) - t.is(serialized.type, 'Error') - t.is(serialized.message, 'foo') - t.match(serialized.stack, /err\.test\.js:/) -}) - -test('serializes Error objects with extra properties', function (t) { - t.plan(5) - var err = Error('foo') - err.statusCode = 500 - var serialized = serializer(err) - t.is(serialized.type, 'Error') - t.is(serialized.message, 'foo') - t.ok(serialized.statusCode) - t.is(serialized.statusCode, 500) - t.match(serialized.stack, /err\.test\.js:/) -}) - -test('serializes nested errors', function (t) { - t.plan(7) - var err = Error('foo') - err.inner = Error('bar') - var serialized = serializer(err) - t.is(serialized.type, 'Error') - t.is(serialized.message, 'foo') - t.match(serialized.stack, /err\.test\.js:/) - t.is(serialized.inner.type, 'Error') - t.is(serialized.inner.message, 'bar') - t.match(serialized.inner.stack, /Error: bar/) - t.match(serialized.inner.stack, /err\.test\.js:/) -}) - -test('prevents infinite recursion', function (t) { - t.plan(4) - var err = Error('foo') - err.inner = err - var serialized = serializer(err) - t.is(serialized.type, 'Error') - t.is(serialized.message, 'foo') - t.match(serialized.stack, /err\.test\.js:/) - t.notOk(serialized.inner) -}) - -test('cleans up infinite recursion tracking', function (t) { - t.plan(8) - var err = Error('foo') - var bar = Error('bar') - err.inner = bar - bar.inner = err - - serializer(err) - var serialized = serializer(err) - - t.is(serialized.type, 'Error') - t.is(serialized.message, 'foo') - t.match(serialized.stack, /err\.test\.js:/) - t.ok(serialized.inner) - t.is(serialized.inner.type, 'Error') - t.is(serialized.inner.message, 'bar') - t.match(serialized.inner.stack, /Error: bar/) - t.notOk(serialized.inner.inner) -}) - -test('err.raw is available', function (t) { - t.plan(1) - const err = Error('foo') - const serialized = serializer(err) - t.equal(serialized.raw, err) -}) - -test('pass through anything that is not an Error', function (t) { - t.plan(3) - - function check (a) { - t.is(serializer(a), a) - } - - check('foo') - check({ hello: 'world' }) - check([1, 2]) -}) - -test('can wrap err serializers', function (t) { - t.plan(5) - var err = Error('foo') - err.foo = 'foo' - var serializer = wrapErrorSerializer(function (err) { - delete err.foo - err.bar = 'bar' - return err - }) - var serialized = serializer(err) - t.is(serialized.type, 'Error') - t.is(serialized.message, 'foo') - t.match(serialized.stack, /err\.test\.js:/) - t.notOk(serialized.foo) - t.is(serialized.bar, 'bar') -}) diff --git a/node_modules/pino-std-serializers/test/req.test.js b/node_modules/pino-std-serializers/test/req.test.js deleted file mode 100644 index 209fc98..0000000 --- a/node_modules/pino-std-serializers/test/req.test.js +++ /dev/null @@ -1,354 +0,0 @@ -'use strict' - -var http = require('http') -var test = require('tap').test -var serializers = require('../lib/req') -var wrapRequestSerializer = require('../').wrapRequestSerializer - -test('maps request', function (t) { - t.plan(2) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - var serialized = serializers.mapHttpRequest(req) - t.ok(serialized.req) - t.ok(serialized.req.method) - t.end() - res.end() - } -}) - -test('does not return excessively long object', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - var serialized = serializers.reqSerializer(req) - t.is(Object.keys(serialized).length, 6) - res.end() - } -}) - -test('req.raw is available', function (t) { - t.plan(2) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.foo = 'foo' - var serialized = serializers.reqSerializer(req) - t.ok(serialized.raw) - t.is(serialized.raw.foo, 'foo') - res.end() - } -}) - -test('req.raw will be obtained in from input request raw property if input request raw property is truthy', function (t) { - t.plan(2) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.raw = { req: {foo: 'foo'}, res: {} } - var serialized = serializers.reqSerializer(req) - t.ok(serialized.raw) - t.is(serialized.raw.req.foo, 'foo') - res.end() - } -}) - -test('req.id defaults to undefined', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - var serialized = serializers.reqSerializer(req) - t.is(serialized.id, undefined) - res.end() - } -}) - -test('req.id has a non-function value', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - var serialized = serializers.reqSerializer(req) - t.is(typeof serialized.id === 'function', false) - res.end() - } -}) - -test('req.id will be obtained from input request info.id when input request id does not exist', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.info = {id: 'test'} - var serialized = serializers.reqSerializer(req) - t.is(serialized.id, 'test') - res.end() - } -}) - -test('req.id has a non-function value with custom id function', function (t) { - t.plan(2) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.id = function () { return 42 } - var serialized = serializers.reqSerializer(req) - t.is(typeof serialized.id === 'function', false) - t.is(serialized.id, 42) - res.end() - } -}) - -test('req.url will be obtained from input request req.path when input request url is an object', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.path = '/test' - var serialized = serializers.reqSerializer(req) - t.is(serialized.url, '/test') - res.end() - } -}) - -test('req.url will be obtained from input request url.path when input request url is an object', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.url = { path: '/test' } - var serialized = serializers.reqSerializer(req) - t.is(serialized.url, '/test') - res.end() - } -}) - -test('req.url will be obtained from input request url when input request url is not an object', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.url = '/test' - var serialized = serializers.reqSerializer(req) - t.is(serialized.url, '/test') - res.end() - } -}) - -test('req.url will be empty when input request path and url are not defined', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - var serialized = serializers.reqSerializer(req) - t.is(serialized.url, '/') - res.end() - } -}) - -test('req.url will be obtained from input request originalUrl when available', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.originalUrl = '/test' - var serialized = serializers.reqSerializer(req) - t.is(serialized.url, '/test') - res.end() - } -}) - -test('can wrap request serializers', function (t) { - t.plan(3) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - var serailizer = wrapRequestSerializer(function (req) { - t.ok(req.method) - t.is(req.method, 'GET') - delete req.method - return req - }) - - function handler (req, res) { - var serialized = serailizer(req) - t.notOk(serialized.method) - res.end() - } -}) - -test('req.remoteAddress will be obtained from request connect.remoteAddress as fallback', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.connection = {remoteAddress: 'http://localhost'} - var serialized = serializers.reqSerializer(req) - t.is(serialized.remoteAddress, 'http://localhost') - res.end() - } -}) - -test('req.remoteAddress will be obtained from request info.remoteAddress if available', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.info = {remoteAddress: 'http://localhost'} - var serialized = serializers.reqSerializer(req) - t.is(serialized.remoteAddress, 'http://localhost') - res.end() - } -}) - -test('req.remotePort will be obtained from request connect.remotePort as fallback', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.connection = {remotePort: 3000} - var serialized = serializers.reqSerializer(req) - t.is(serialized.remotePort, 3000) - res.end() - } -}) - -test('req.remotePort will be obtained from request info.remotePort if available', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - req.info = {remotePort: 3000} - var serialized = serializers.reqSerializer(req) - t.is(serialized.remotePort, 3000) - res.end() - } -}) diff --git a/node_modules/pino-std-serializers/test/res.test.js b/node_modules/pino-std-serializers/test/res.test.js deleted file mode 100644 index 46d742c..0000000 --- a/node_modules/pino-std-serializers/test/res.test.js +++ /dev/null @@ -1,89 +0,0 @@ -'use strict' - -var http = require('http') -var test = require('tap').test -var serializers = require('../lib/res') -var wrapResponseSerializer = require('../').wrapResponseSerializer - -test('res.raw is not enumerable', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - var serialized = serializers.resSerializer(res) - t.is(serialized.propertyIsEnumerable('raw'), false) - res.end() - } -}) - -test('res.raw is available', function (t) { - t.plan(2) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - res.statusCode = 200 - var serialized = serializers.resSerializer(res) - t.ok(serialized.raw) - t.is(serialized.raw.statusCode, 200) - res.end() - } -}) - -test('can wrap response serializers', function (t) { - t.plan(3) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - var serializer = wrapResponseSerializer(function (res) { - t.ok(res.statusCode) - t.is(res.statusCode, 200) - delete res.statusCode - return res - }) - - function handler (req, res) { - res.statusCode = 200 - var serialized = serializer(res) - t.notOk(serialized.statusCode) - res.end() - } -}) - -test('res.headers is serialized', function (t) { - t.plan(1) - - var server = http.createServer(handler) - server.unref() - server.listen(0, () => { - http.get(server.address(), () => {}) - }) - - t.tearDown(() => server.close()) - - function handler (req, res) { - res.setHeader('x-custom', 'y') - var serialized = serializers.resSerializer(res) - t.is(serialized.headers['x-custom'], 'y') - res.end() - } -}) diff --git a/node_modules/pino/LICENSE b/node_modules/pino/LICENSE deleted file mode 100644 index 5657fb4..0000000 --- a/node_modules/pino/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-2019 Matteo Collina, David Mark Clements and the Pino contributors - -Pino contributors listed at https://github.com/pinojs/pino#the-team and in -the README file. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/pino/README.md b/node_modules/pino/README.md deleted file mode 100644 index 04a4070..0000000 --- a/node_modules/pino/README.md +++ /dev/null @@ -1,152 +0,0 @@ -![banner](pino-banner.png) - -# pino  [![Build Status](https://travis-ci.org/pinojs/pino.svg?branch=master)](https://travis-ci.org/pinojs/pino) [![Coverage Status](https://coveralls.io/repos/github/pinojs/pino/badge.svg?branch=master)](https://coveralls.io/github/pinojs/pino?branch=master) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![TypeScript definitions on DefinitelyTyped](https://definitelytyped.org/badges/standard.svg)](https://definitelytyped.org) - -[Very low overhead](#low-overhead) Node.js logger, inspired by Bunyan. - -## Documentation - -* [Benchmarks ⇗](/docs/benchmarks.md) -* [API ⇗](/docs/api.md) -* [Browser API ⇗](/docs/browser.md) -* [Redaction ⇗](/docs/redaction.md) -* [Child Loggers ⇗](/docs/child-loggers.md) -* [Transports ⇗](/docs/transports.md) -* [Web Frameworks ⇗](/docs/web.md) -* [Pretty Printing ⇗](/docs/pretty.md) -* [Extreme Mode ⇗](/docs/extreme.md) -* [Ecosystem ⇗](/docs/ecosystem.md) -* [Legacy](/docs/legacy.md) -* [Help ⇗](/docs/help.md) - -## Install - -``` -$ npm install pino -``` - -## Usage - -```js -const logger = require('pino')() - -logger.info('hello world') - -const child = logger.child({ a: 'property' }) -child.info('hello child!') -``` - -This produces: - -``` -{"level":30,"time":1531171074631,"msg":"hello world","pid":657,"hostname":"Davids-MBP-3.fritz.box","v":1} -{"level":30,"time":1531171082399,"msg":"hello child!","pid":657,"hostname":"Davids-MBP-3.fritz.box","a":"property","v":1} -``` - -For using Pino with a web framework see: - -* [Pino with Fastify](docs/web.md#fastify) -* [Pino with Express](docs/web.md#express) -* [Pino with Hapi](docs/web.md#hapi) -* [Pino with Restify](docs/web.md#restify) -* [Pino with Koa](docs/web.md#koa) -* [Pino with Node core `http`](docs/web.md#http) -* [Pino with Nest](docs/web.md#nest) - - - -## Essentials - -### Development Formatting - -The [`pino-pretty`](https://github.com/pinojs/pino-pretty) module can be used to -format logs during development: - -![pretty demo](pretty-demo.png) - -### Transports & Log Processing - -Due to Node's single-threaded event-loop, it's highly recommended that sending, -alert triggering, reformatting and all forms of log processing -is conducted in a separate process. In Pino parlance we call all log processors -"transports", and recommend that the transports be run as separate -processes, piping the stdout of the application to the stdin of the transport. - -For more details see our [Transports⇗](docs/transports.md) document. - -### Low overhead - -Using minimum resources for logging is very important. Log messages -tend to get added over time and this can lead to a throttling effect -on applications – such as reduced requests per second. - -In many cases, Pino is over 5x faster than alternatives. - -See the [Benchmarks](docs/benchmarks.md) document for comparisons. - - -## The Team - -### Matteo Collina - - - - - - - -### David Mark Clements - - - - - - - -### James Sumners - - - - - - - -### Thomas Watson Steen - - - - - - - -## Communication - -### Chat on Gitter - - - -### Chat on IRC - -You'll find an active group of Pino users in the #pinojs channel on Freenode, including some of the contributors to this project. - -## Contributing - -Pino is an **OPEN Open Source Project**. This means that: - -> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. - -See the [CONTRIBUTING.md](https://github.com/pinojs/pino/blob/master/CONTRIBUTING.md) file for more details. - - -## Acknowledgements - -This project was kindly sponsored by [nearForm](http://nearform.com). - -Logo and identity designed by Cosmic Fox Design: https://www.behance.net/cosmicfox. - -## License - -Licensed under [MIT](./LICENSE). - -[elasticsearch]: https://www.elastic.co/products/elasticsearch -[kibana]: https://www.elastic.co/products/kibana diff --git a/node_modules/pino/bin.js b/node_modules/pino/bin.js deleted file mode 100755 index 939b117..0000000 --- a/node_modules/pino/bin.js +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env node -console.error( - '`pino` cli has been removed. Use `pino-pretty` cli instead.\n' + - '\nSee: https://github.com/pinojs/pino-pretty' -) -process.exit(1) diff --git a/node_modules/pino/browser.js b/node_modules/pino/browser.js deleted file mode 100644 index da8d9cc..0000000 --- a/node_modules/pino/browser.js +++ /dev/null @@ -1,325 +0,0 @@ -'use strict' - -var format = require('quick-format-unescaped') - -module.exports = pino - -var _console = pfGlobalThisOrFallback().console || {} -var stdSerializers = { - mapHttpRequest: mock, - mapHttpResponse: mock, - wrapRequestSerializer: passthrough, - wrapResponseSerializer: passthrough, - wrapErrorSerializer: passthrough, - req: mock, - res: mock, - err: asErrValue -} - -function pino (opts) { - opts = opts || {} - opts.browser = opts.browser || {} - - var transmit = opts.browser.transmit - if (transmit && typeof transmit.send !== 'function') { throw Error('pino: transmit option must have a send function') } - - var proto = opts.browser.write || _console - if (opts.browser.write) opts.browser.asObject = true - var serializers = opts.serializers || {} - var serialize = Array.isArray(opts.browser.serialize) - ? opts.browser.serialize.filter(function (k) { - return k !== '!stdSerializers.err' - }) - : opts.browser.serialize === true ? Object.keys(serializers) : false - var stdErrSerialize = opts.browser.serialize - - if ( - Array.isArray(opts.browser.serialize) && - opts.browser.serialize.indexOf('!stdSerializers.err') > -1 - ) stdErrSerialize = false - - var levels = ['error', 'fatal', 'warn', 'info', 'debug', 'trace'] - - if (typeof proto === 'function') { - proto.error = proto.fatal = proto.warn = - proto.info = proto.debug = proto.trace = proto - } - if (opts.enabled === false) opts.level = 'silent' - var level = opts.level || 'info' - var logger = Object.create(proto) - if (!logger.log) logger.log = noop - - Object.defineProperty(logger, 'levelVal', { - get: getLevelVal - }) - Object.defineProperty(logger, 'level', { - get: getLevel, - set: setLevel - }) - - var setOpts = { - transmit: transmit, - serialize: serialize, - asObject: opts.browser.asObject, - levels: levels - } - logger.levels = pino.levels - logger.level = level - - logger.setMaxListeners = logger.getMaxListeners = - logger.emit = logger.addListener = logger.on = - logger.prependListener = logger.once = - logger.prependOnceListener = logger.removeListener = - logger.removeAllListeners = logger.listeners = - logger.listenerCount = logger.eventNames = - logger.write = logger.flush = noop - logger.serializers = serializers - logger._serialize = serialize - logger._stdErrSerialize = stdErrSerialize - logger.child = child - - if (transmit) logger._logEvent = createLogEventShape() - - function getLevelVal () { - return this.level === 'silent' - ? Infinity - : this.levels.values[this.level] - } - - function getLevel () { - return this._level - } - function setLevel (level) { - if (level !== 'silent' && !this.levels.values[level]) { - throw Error('unknown level ' + level) - } - this._level = level - - set(setOpts, logger, 'error', 'log') // <-- must stay first - set(setOpts, logger, 'fatal', 'error') - set(setOpts, logger, 'warn', 'error') - set(setOpts, logger, 'info', 'log') - set(setOpts, logger, 'debug', 'log') - set(setOpts, logger, 'trace', 'log') - } - - function child (bindings) { - if (!bindings) { - throw new Error('missing bindings for child Pino') - } - var bindingsSerializers = bindings.serializers - if (serialize && bindingsSerializers) { - var childSerializers = Object.assign({}, serializers, bindingsSerializers) - var childSerialize = opts.browser.serialize === true - ? Object.keys(childSerializers) - : serialize - delete bindings.serializers - applySerializers([bindings], childSerialize, childSerializers, this._stdErrSerialize) - } - function Child (parent) { - this._childLevel = (parent._childLevel | 0) + 1 - this.error = bind(parent, bindings, 'error') - this.fatal = bind(parent, bindings, 'fatal') - this.warn = bind(parent, bindings, 'warn') - this.info = bind(parent, bindings, 'info') - this.debug = bind(parent, bindings, 'debug') - this.trace = bind(parent, bindings, 'trace') - if (childSerializers) { - this.serializers = childSerializers - this._serialize = childSerialize - } - if (transmit) { - this._logEvent = createLogEventShape( - [].concat(parent._logEvent.bindings, bindings) - ) - } - } - Child.prototype = this - return new Child(this) - } - return logger -} - -pino.LOG_VERSION = 1 - -pino.levels = { - values: { - fatal: 60, - error: 50, - warn: 40, - info: 30, - debug: 20, - trace: 10 - }, - labels: { - 10: 'trace', - 20: 'debug', - 30: 'info', - 40: 'warn', - 50: 'error', - 60: 'fatal' - } -} - -pino.stdSerializers = stdSerializers - -function set (opts, logger, level, fallback) { - var proto = Object.getPrototypeOf(logger) - logger[level] = logger.levelVal > logger.levels.values[level] ? noop - : (proto[level] ? proto[level] : (_console[level] || _console[fallback] || noop)) - - wrap(opts, logger, level) -} - -function wrap (opts, logger, level) { - if (!opts.transmit && logger[level] === noop) return - - logger[level] = (function (write) { - return function LOG () { - var ts = Date.now() - var args = new Array(arguments.length) - var proto = (Object.getPrototypeOf && Object.getPrototypeOf(this) === _console) ? _console : this - for (var i = 0; i < args.length; i++) args[i] = arguments[i] - - if (opts.serialize && !opts.asObject) { - applySerializers(args, this._serialize, this.serializers, this._stdErrSerialize) - } - if (opts.asObject) write.call(proto, asObject(this, level, args, ts)) - else write.apply(proto, args) - - if (opts.transmit) { - var transmitLevel = opts.transmit.level || logger.level - var transmitValue = pino.levels.values[transmitLevel] - var methodValue = pino.levels.values[level] - if (methodValue < transmitValue) return - transmit(this, { - ts: ts, - methodLevel: level, - methodValue: methodValue, - transmitLevel: transmitLevel, - transmitValue: pino.levels.values[opts.transmit.level || logger.level], - send: opts.transmit.send, - val: logger.levelVal - }, args) - } - } - })(logger[level]) -} - -function asObject (logger, level, args, ts) { - if (logger._serialize) applySerializers(args, logger._serialize, logger.serializers, logger._stdErrSerialize) - var argsCloned = args.slice() - var msg = argsCloned[0] - var o = { time: ts, level: pino.levels.values[level] } - var lvl = (logger._childLevel | 0) + 1 - if (lvl < 1) lvl = 1 - // deliberate, catching objects, arrays - if (msg !== null && typeof msg === 'object') { - while (lvl-- && typeof argsCloned[0] === 'object') { - Object.assign(o, argsCloned.shift()) - } - msg = argsCloned.length ? format(argsCloned.shift(), argsCloned) : undefined - } else if (typeof msg === 'string') msg = format(argsCloned.shift(), argsCloned) - if (msg !== undefined) o.msg = msg - return o -} - -function applySerializers (args, serialize, serializers, stdErrSerialize) { - for (var i in args) { - if (stdErrSerialize && args[i] instanceof Error) { - args[i] = pino.stdSerializers.err(args[i]) - } else if (typeof args[i] === 'object' && !Array.isArray(args[i])) { - for (var k in args[i]) { - if (serialize && serialize.indexOf(k) > -1 && k in serializers) { - args[i][k] = serializers[k](args[i][k]) - } - } - } - } -} - -function bind (parent, bindings, level) { - return function () { - var args = new Array(1 + arguments.length) - args[0] = bindings - for (var i = 1; i < args.length; i++) { - args[i] = arguments[i - 1] - } - return parent[level].apply(this, args) - } -} - -function transmit (logger, opts, args) { - var send = opts.send - var ts = opts.ts - var methodLevel = opts.methodLevel - var methodValue = opts.methodValue - var val = opts.val - var bindings = logger._logEvent.bindings - - applySerializers( - args, - logger._serialize || Object.keys(logger.serializers), - logger.serializers, - logger._stdErrSerialize === undefined ? true : logger._stdErrSerialize - ) - logger._logEvent.ts = ts - logger._logEvent.messages = args.filter(function (arg) { - // bindings can only be objects, so reference equality check via indexOf is fine - return bindings.indexOf(arg) === -1 - }) - - logger._logEvent.level.label = methodLevel - logger._logEvent.level.value = methodValue - - send(methodLevel, logger._logEvent, val) - - logger._logEvent = createLogEventShape(bindings) -} - -function createLogEventShape (bindings) { - return { - ts: 0, - messages: [], - bindings: bindings || [], - level: { label: '', value: 0 } - } -} - -function asErrValue (err) { - var obj = { - type: err.constructor.name, - msg: err.message, - stack: err.stack - } - for (var key in err) { - if (obj[key] === undefined) { - obj[key] = err[key] - } - } - return obj -} - -function mock () { return {} } -function passthrough (a) { return a } -function noop () {} - -/* eslint-disable */ -/* istanbul ignore next */ -function pfGlobalThisOrFallback () { - function defd (o) { return typeof o !== 'undefined' && o } - try { - if (typeof globalThis !== 'undefined') return globalThis - Object.defineProperty(Object.prototype, 'globalThis', { - get: function () { - delete Object.prototype.globalThis - return (this.globalThis = this) - }, - configurable: true - }) - return globalThis - } catch (e) { - return defd(self) || defd(window) || defd(this) || {} - } -} -/* eslint-enable */ diff --git a/node_modules/pino/docs/api.md b/node_modules/pino/docs/api.md deleted file mode 100644 index bbd57dd..0000000 --- a/node_modules/pino/docs/api.md +++ /dev/null @@ -1,868 +0,0 @@ -# API - -* [pino() => logger](#export) - * [options](#options) - * [destination](#destination) - * [destination\[Symbol.for('pino.metadata')\]](#metadata) -* [Logger Instance](#logger) - * [logger.trace()](#trace) - * [logger.debug()](#debug) - * [logger.info()](#info) - * [logger.warn()](#warn) - * [logger.error()](#error) - * [logger.fatal()](#fatal) - * [logger.child()](#child) - * [logger.bindings()](#bindings) - * [logger.flush()](#flush) - * [logger.level](#level) - * [logger.isLevelEnabled()](#islevelenabled) - * [logger.levels](#levels) - * [logger\[Symbol.for('pino.serializers')\]](#serializers) - * [Event: 'level-change'](#level-change) - * [logger.version](#version) - * [logger.LOG_VERSION](#log_version) -* [Statics](#statics) - * [pino.destination()](#pino-destination) - * [pino.extreme()](#pino-extreme) - * [pino.final()](#pino-final) - * [pino.stdSerializers](#pino-stdserializers) - * [pino.stdTimeFunctions](#pino-stdtimefunctions) - * [pino.symbols](#pino-symbols) - * [pino.version](#pino-version) - * [pino.LOG_VERSION](#pino-LOG_VERSION) - - -## `pino([options], [destination]) => logger` - -The exported `pino` function takes two optional arguments, -[`options`](#options) and [`destination`](#destination) and -returns a [logger instance](#logger). - - -### `options` (Object) - -#### `name` (String) - -Default: `undefined` - -The name of the logger. When set adds a `name` field to every JSON line logged. - -#### `level` (String) - -Default: `'info'` - -One of `'fatal'`, `'error'`, `'warn'`, `'info`', `'debug'`, `'trace'` or `'silent'`. - -Additional levels can be added to the instance via the `customLevels` option. - -* See [`customLevels` option](#opt-customlevels) - - -#### `customLevels` (Object) - -Default: `undefined` - -Use this option to define additional logging levels. -The keys of the object correspond the namespace of the log level, -and the values should be the numerical value of the level. - -```js -const logger = pino({ - customLevels: { - foo: 35 - } -}) -logger.foo('hi') -``` - - -#### `useOnlyCustomLevels` (Boolean) - -Default: `false` - -Use this option to only use defined `customLevels` and omit Pino's levels. -Logger's default `level` must be changed to a value in `customLevels` in order to use `useOnlyCustomLevels` -Warning: this option may not be supported by downstream transports. - -```js -const logger = pino({ - customLevels: { - foo: 35 - }, - useOnlyCustomLevels: true, - level: 'foo' -}) -logger.foo('hi') -logger.info('hello') // Will throw an error saying info in not found in logger object -``` - -#### `mixin` (Function): - -Default: `undefined` - -If provided, the `mixin` function is called each time one of the active -logging methods is called. The function must synchronously return an -object. The properties of the returned object will be added to the -logged JSON. - -```js -let n = 0 -const logger = pino({ - mixin () { - return { line: ++n } - } -}) -logger.info('hello') -// {"level":30,"time":1573664685466,"pid":78742,"hostname":"x","line":1,"msg":"hello","v":1} -logger.info('world') -// {"level":30,"time":1573664685469,"pid":78742,"hostname":"x","line":2,"msg":"world","v":1} -``` - -#### `redact` (Array | Object): - -Default: `undefined` - -As an array, the `redact` option specifies paths that should -have their values redacted from any log output. - -Each path must be a string using a syntax which corresponds to JavaScript dot and bracket notation. - -If an object is supplied, three options can be specified: - * `paths` (array): Required. An array of paths. See [redaction - Path Syntax ⇗](/docs/redaction.md#paths) for specifics. - * `censor` (String|Function|Undefined): Optional. When supplied as a String the `censor` option will overwrite keys which are to be redacted. When set to `undefined` the the key will be removed entirely from the object. - The `censor` option may also be a mapping function. The (synchronous) mapping function is called with the unredacted value. The value returned from the mapping function becomes the applied censor value. Default: `'[Redacted]'` - value synchronously. - Default: `'[Redacted]'` - * `remove` (Boolean): Optional. Instead of censoring the value, remove both the key and the value. Default: `false` - -**WARNING**: Never allow user input to define redacted paths. - -* See the [redaction ⇗](/docs/redaction.md) documentation. -* See [fast-redact#caveat ⇗](http://github.com/davidmarkclements/fast-redact#caveat) - - -#### `serializers` (Object) - -Default: `{err: pino.stdSerializers.err}` - -An object containing functions for custom serialization of objects. -These functions should return an JSONifiable object and they -should never throw. When logging an object, each top-level property -matching the exact key of a serializer will be serialized using the defined serializer. - -* See [pino.stdSerializers](#pino-stdserializers) - -##### `serializers[Symbol.for('pino.*')]` (Function) - -Default: `undefined` - -The `serializers` object may contain a key which is the global symbol: `Symbol.for('pino.*')`. -This will act upon the complete log object rather than corresponding to a particular key. - -#### `base` (Object) - -Default: `{pid: process.pid, hostname: os.hostname}` - -Key-value object added as child logger to each log line. - -Set to `null` to avoid adding `pid`, `hostname` and `name` properties to each log. - -#### `enabled` (Boolean) - -Default: `true` - -Set to `false` to disable logging. - -#### `crlf` (Boolean) - -Default: `false` - -Set to `true` to logs newline delimited JSON with `\r\n` instead of `\n`. - - -#### `timestamp` (Boolean | Function) - -Default: `true` - -Enables or disables the inclusion of a timestamp in the -log message. If a function is supplied, it must synchronously return a JSON string -representation of the time, e.g. `,"time":1493426328206` (which is the default). - -If set to `false`, no timestamp will be included in the output. -See [stdTimeFunctions](#pino-stdtimefunctions) for a set of available functions -for passing in as a value for this option. - -**Caution**: attempting to format time in-process will significantly impact logging performance. - - -#### `messageKey` (String) - -Default: `'msg'` - -The string key for the 'message' in the JSON object. - - -#### `nestedKey` (String) - -Default: `null` - -If there's a chance that objects being logged have properties that conflict with those from pino itself (`level`, `timestamp`, `v`, `pid`, etc) -and duplicate keys in your log records are undesirable, pino can be configured with a `nestedKey` option that causes any `object`s that are logged -to be placed under a key whose name is the value of `nestedKey`. - -This way, when searching something like Kibana for values, one can consistently search under the configured `nestedKey` value instead of the root log record keys. - -For example, -```js -const logger = require('pino')({ - nestedKey: 'payload' -}) - -const thing = { level: 'hi', time: 'never', foo: 'bar'} // has pino-conflicting properties! -logger.info(thing) - -// logs the following: -// {"level":30,"time":1578357790020,"pid":91736,"hostname":"x","payload":{"level":"hi","time":"never","foo":"bar"},"v":1} -``` -In this way, logged objects' properties don't conflict with pino's standard logging properties, -and searching for logged objects can start from a consistent path. - - -#### `prettyPrint` (Boolean | Object) - -Default: `false` - -Enables pretty printing log logs. This is intended for non-production -configurations. This may be set to a configuration object as outlined in the -[`pino-pretty` documentation](https://github.com/pinojs/pino-pretty). - -The options object may additionally contain a `prettifier` property to define -which prettifier module to use. When not present, `prettifier` defaults to -`'pino-pretty'`. Regardless of the value, the specified prettifier module -must be installed as a separate dependency: - -```sh -npm install pino-pretty -``` - - -#### `useLevelLabels` (Boolean) - -Default: `false` - -Enables printing of level labels instead of level values in the printed logs. -Warning: this option may not be supported by downstream transports. - - -#### `changeLevelName` (String) - DEPRECATED -Use `levelKey` instead. This will be removed in v7. - - -#### `levelKey` (String) - -Default: `'level'` - -Changes the property `level` to any string value you pass in: -```js -const logger = pino({ - levelKey: 'priority' -}) -logger.info('hello world') -// {"priority":30,"time":1531257112193,"msg":"hello world","pid":55956,"hostname":"x","v":1} -``` - -#### `browser` (Object) - -Browser only, may have `asObject` and `write` keys. This option is separately -documented in the [Browser API ⇗](/docs/browser.md) documentation. - -* See [Browser API ⇗](/docs/browser.md) - - -### `destination` (SonicBoom | WritableStream | String) - -Default: `pino.destination(1)` (STDOUT) - -The `destination` parameter, at a minimum must be an object with a `write` method. -An ordinary Node.js `stream` can be passed as the destination (such as the result -of `fs.createWriteStream`) but for peak log writing performance it is strongly -recommended to use `pino.destination` or `pino.extreme` to create the destination stream. - -```js -// pino.destination(1) by default -const stdoutLogger = require('pino')() - -// destination param may be in first position when no options: -const fileLogger = require('pino')( pino.destination('/log/path')) - -// use the stderr file handle to log to stderr: -const opts = {name: 'my-logger'} -const stderrLogger = require('pino')(opts, pino.destination(2)) - -// automatic wrapping in pino.destination -const fileLogger = require('pino')('/log/path') -``` - -However, there are some special instances where `pino.destination` is not used as the default: - -+ When something, e.g a process manager, has monkey-patched `process.stdout.write`. - -In these cases `process.stdout` is used instead. - -* See [`pino.destination`](#pino-destination) -* See [`pino.extreme`](#pino-extreme) - - -#### `destination[Symbol.for('pino.metadata')]` - -Default: `false` - -Using the global symbol `Symbol.for('pino.metadata')` as a key on the `destination` parameter and -setting the key it to `true`, indicates that the following properties should be -set on the `destination` object after each log line is written: - -* the last logging level as `destination.lastLevel` -* the last logging message as `destination.lastMsg` -* the last logging object as `destination.lastObj` -* the last time as `destination.lastTime`, which will be the partial string returned - by the time function. -* the last logger instance as `destination.lastLogger` (to support child - loggers) - -For a full reference for using `Symbol.for('pino.metadata')`, see the [`pino-multi-stream` ⇗](https://github.com/pinojs/pino-multi-stream) -module. - -The following is a succinct usage example: - -```js -const dest = pino.destination('/dev/null') -dest[Symbol.for('pino.metadata')] = true -const logger = pino(dest) -logger.info({a: 1}, 'hi') -const { lastMsg, lastLevel, lastObj, lastTime} = dest -console.log( - 'Logged message "%s" at level %d with object %o at time %s', - lastMsg, lastLevel, lastObj, lastTime -) // Logged message "hi" at level 30 with object { a: 1 } at time 1531590545089 -``` - -* See [`pino-multi-stream` ⇗](https://github.com/pinojs/pino-multi-stream) - - -## Logger Instance - -The logger instance is the object returned by the main exported -[`pino`](#export) function. - -The primary purpose of the logger instance is to provide logging methods. - -The default logging methods are `trace`, `debug`, `info`, `warn`, `error`, and `fatal`. - -Each logging method has the following signature: -`([mergingObject], [message], [...interpolationValues])`. - -The parameters are explained below using the `logger.info` method but the same applies to all logging methods. - -### Logging Method Parameters - - -#### `mergingObject` (Object) - -An object can optionally be supplied as the first parameter. Each enumerable key and value -of the `mergingObject` is copied in to the JSON log line. - -```js -logger.info({MIX: {IN: true}}) -// {"level":30,"time":1531254555820,"pid":55956,"hostname":"x","MIX":{"IN":true},"v":1} -``` - - -#### `message` (String) - -A `message` string can optionally be supplied as the first parameter, or -as the second parameter after supplying a `mergingObject`. - -By default, the contents of the `message` parameter will be merged into the -JSON log line under the `msg` key: - -```js -logger.info('hello world') -// {"level":30,"time":1531257112193,"msg":"hello world","pid":55956,"hostname":"x","v":1} -``` - -The `message` parameter takes precedence over the `mergedObject`. -That is, if a `mergedObject` contains a `msg` property, and a `message` parameter -is supplied in addition, the `msg` property in the output log will be the value of -the `message` parameter not the value of the `msg` property on the `mergedObject`. - -The `messageKey` option can be used at instantiation time to change the namespace -from `msg` to another string as preferred. - -The `message` string may contain a printf style string with support for -the following placeholders: - -* `%s` – string placeholder -* `%d` – digit placeholder -* `%O`, `%o` and `%j` – object placeholder - -Values supplied as additional arguments to the logger method will -then be interpolated accordingly. - -* See [`messageKey` pino option](#opt-messagekey) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -#### `...interpolationValues` (Any) - -All arguments supplied after `message` are serialized and interpolated according -to any supplied printf-style placeholders (`%s`, `%d`, `%o`|`%O`|`%j`) -or else concatenated together with the `message` string to form the final -output `msg` value for the JSON log line. - -```js -logger.info('hello', 'world') -// {"level":30,"time":1531257618044,"msg":"hello world","pid":55956,"hostname":"x","v":1} -``` - -```js -logger.info('hello', {worldly: 1}) -// {"level":30,"time":1531257797727,"msg":"hello {\"worldly\":1}","pid":55956,"hostname":"x","v":1} -``` - -```js -logger.info('%o hello', {worldly: 1}) -// {"level":30,"time":1531257826880,"msg":"{\"worldly\":1} hello","pid":55956,"hostname":"x","v":1} -``` - -* See [`message` log method parameter](#message) - - -### `logger.trace([mergingObject], [message], [...interpolationValues])` - -Write a `'trace'` level log, if the configured [`level`](#level) allows for it. - -* See [`mergingObject` log method parameter](#mergingobject) -* See [`message` log method parameter](#message) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -### `logger.debug([mergingObject], [message], [...interpolationValues])` - -Write a `'debug'` level log, if the configured `level` allows for it. - -* See [`mergingObject` log method parameter](#mergingobject) -* See [`message` log method parameter](#message) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -### `logger.info([mergingObject], [message], [...interpolationValues])` - -Write an `'info'` level log, if the configured `level` allows for it. - -* See [`mergingObject` log method parameter](#mergingobject) -* See [`message` log method parameter](#message) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -### `logger.warn([mergingObject], [message], [...interpolationValues])` - -Write a `'warn'` level log, if the configured `level` allows for it. - -* See [`mergingObject` log method parameter](#mergingobject) -* See [`message` log method parameter](#message) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -### `logger.error([mergingObject], [message], [...interpolationValues])` - -Write a `'error'` level log, if the configured `level` allows for it. - -* See [`mergingObject` log method parameter](#mergingobject) -* See [`message` log method parameter](#message) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - -### `logger.fatal([mergingObject], [message], [...interpolationValues])` - -Write a `'fatal'` level log, if the configured `level` allows for it. - -Since `'fatal'` level messages are intended to be logged just prior to the process exiting the `fatal` -method will always sync flush the destination. -Therefore it's important not to misuse `fatal` since -it will cause performance overhead if used for any -other purpose than writing final log messages before -the process crashes or exits. - -* See [`mergingObject` log method parameter](#mergingobject) -* See [`message` log method parameter](#message) -* See [`...interpolationValues` log method parameter](#interpolationvalues) - - - -### `logger.child(bindings) => logger` - -The `logger.child` method allows for the creation of stateful loggers, -where key-value pairs can be pinned to a logger causing them to be output -on every log line. - -Child loggers use the same output stream as the parent and inherit -the current log level of the parent at the time they are spawned. - -The log level of a child is mutable. It can be set independently -of the parent either by setting the [`level`](#level) accessor after creating -the child logger or using the reserved [`bindings.level`](#bindingslevel-string) key. - -#### `bindings` (Object) - -An object of key-value pairs to include in every log line output -via the returned child logger. - -```js -const child = logger.child({ MIX: {IN: 'always'} }) -child.info('hello') -// {"level":30,"time":1531258616689,"msg":"hello","pid":64849,"hostname":"x","MIX":{"IN":"always"},"v":1} -child.info('child!') -// {"level":30,"time":1531258617401,"msg":"child!","pid":64849,"hostname":"x","MIX":{"IN":"always"},"v":1} -``` - -The `bindings` object may contain any key except for reserved configuration keys `level` and `serializers`. - -##### `bindings.level` (String) - -If a `level` property is present in the `bindings` object passed to `logger.child` -it will override the child logger level. - -```js -const logger = pino() -logger.debug('nope') // will not log, since default level is info -const child = logger.child({foo: 'bar', level: 'debug'}) -child.debug('debug!') // will log as the `level` property set the level to debug -``` - -##### `bindings.serializers` (Object) - -Child loggers inherit the [serializers](#opt-serializers) from the parent logger. - -Setting the `serializers` key of the `bindings` object will override -any configured parent serializers. - -```js -const logger = require('pino')() -logger.info({test: 'will appear'}) -// {"level":30,"time":1531259759482,"pid":67930,"hostname":"x","test":"will appear","v":1} -const child = logger.child({serializers: {test: () => `child-only serializer`}}) -child.info({test: 'will be overwritten'}) -// {"level":30,"time":1531259784008,"pid":67930,"hostname":"x","test":"child-only serializer","v":1} -``` - -* See [`serializers` option](#opt-serializers) -* See [pino.stdSerializers](#pino-stdSerializers) - - -### `logger.bindings()` - -Returns an object containing all the current bindings, cloned from the ones passed in via `logger.child()`. -```js -const child = logger.child({ foo: 'bar' }) -console.log(child.bindings()) -// { foo: 'bar' } -const anotherChild = child.child({ MIX: { IN: 'always' } }) -console.log(anotherChild.bindings()) -// { foo: 'bar', MIX: { IN: 'always' } } -``` - - -### `logger.flush()` - -Flushes the content of the buffer when using a `pino.extreme` destination. - -This is an asynchronous, fire and forget, operation. - -The use case is primarily for Extreme mode logging, which may hold up to -4KiB of logs. The `logger.flush` method can be used to flush the logs -on an long interval, say ten seconds. Such a strategy can provide an -optimium balance between extremely efficient logging at high demand periods -and safer logging at low demand periods. - -* See [`pino.extreme`](#pino-extreme) -* See [`destination` parameter](#destination) -* See [Extreme mode ⇗](/docs/extreme.md) - - -### `logger.level` (String) [Getter/Setter] - -Set this property to the desired logging level. - -The core levels and their values are as follows: - -| | | | | | | | | -|:-----------|-------|-------|------|------|-------|-------|---------:| -| **Level:** | trace | debug | info | warn | error | fatal | silent | -| **Value:** | 10 | 20 | 30 | 40 | 50 | 60 | Infinity | - -The logging level is a *minimum* level based on the associated value of that level. - -For instance if `logger.level` is `info` *(30)* then `info` *(30)*, `warn` *(40)*, `error` *(50)* and `fatal` *(60)* log methods will be enabled but the `trace` *(10)* and `debug` *(20)* methods, being less than 30, will not. - -The `silent` logging level is a specialized level which will disable all logging, -there is no `silent` log method. - - -### `logger.isLevelEnabled(level)` - -A utility method for determining if a given log level will write to the destination. - -#### `level` (String) - -The given level to check against: - -```js -if (logger.isLevelEnabled('debug')) logger.debug('conditional log') -``` - -#### `levelLabel` (String) - -Defines the method name of the new level. - -* See [`logger.level`](#level) - -#### `levelValue` (Number) - -Defines the associated minimum threshold value for the level, and -therefore where it sits in order of priority among other levels. - -* See [`logger.level`](#level) - - -### `logger.levelVal` (Number) - -Supplies the integer value for the current logging level. - -```js -if (logger.levelVal === 30) { - console.log('logger level is `info`') -} -``` - - -### `logger.levels` (Object) - -Levels are mapped to values to determine the minimum threshold that a -logging method should be enabled at (see [`logger.level`](#level)). - -The `logger.levels` property holds the mappings between levels and values, -and vice versa. - -```sh -$ node -p "require('pino')().levels" -``` - -```js -{ labels: - { '10': 'trace', - '20': 'debug', - '30': 'info', - '40': 'warn', - '50': 'error', - '60': 'fatal' }, - values: - { fatal: 60, error: 50, warn: 40, info: 30, debug: 20, trace: 10 } } -``` - -* See [`logger.level`](#level) - - -### logger\[Symbol.for('pino.serializers')\] - -Returns the serializers as applied to the current logger instance. If a child logger did not -register it's own serializer upon instantiation the serializers of the parent will be returned. - - -### Event: 'level-change' - -The logger instance is also an [`EventEmitter ⇗`](https://nodejs.org/dist/latest/docs/api/events.html#events_class_eventemitter) - -A listener function can be attached to a logger via the `level-change` event - -The listener is passed four arguments: - -* `levelLabel` – the new level string, e.g `trace` -* `levelValue` – the new level number, e.g `10` -* `previousLevelLabel` – the prior level string, e.g `info` -* `previousLevelValue` – the prior level numbebr, e.g `30` - -```js -const logger = require('pino')() -logger.on('level-change', (lvl, val, prevLvl, prevVal) => { - console.log('%s (%d) was changed to %s (%d)', lvl, val, prevLvl, prevVal) -}) -logger.level = 'trace' // trigger event -``` - - -### `logger.version` (String) - -Exposes the Pino package version. Also available on the exported `pino` function. - -* See [`pino.version`](#pino-version) - - -### `logger.LOG_VERSION` (Number) - -Holds the current log format version as output in the `v` property of each log record. -Also available on the exported `pino` function. - -* See [`pino.LOG_VERSION`](#pino-LOG_VERSION) - -## Statics - - -### `pino.destination([target]) => SonicBoom` - -Create a Pino Destination instance: a stream-like object with -significantly more throughput (over 30%) than a standard Node.js stream. - -```js -const pino = require('pino') -const logger = pino(pino.destination('./my-file')) -const logger2 = pino(pino.destination()) -``` - -The `pino.destination` method may be passed a file path or a numerical file descriptor. -By default, `pino.destination` will use `process.stdout.fd` (1) as the file descriptor. - -`pino.destination` is implemented on [`sonic-boom` ⇗](https://github.com/mcollina/sonic-boom). - -A `pino.destination` instance can also be used to reopen closed files -(for example, for some log rotation scenarios), see [Reopening log files](/docs/help.md#reopening). - -* See [`destination` parameter](#destination) -* See [`sonic-boom` ⇗](https://github.com/mcollina/sonic-boom) -* See [Reopening log files](/docs/help.md#reopening) - - -### `pino.extreme([target]) => SonicBoom` - -Create an extreme mode destination. This yields an additional 60% performance boost. -There are trade-offs that should be understood before usage. - -```js -const pino = require('pino') -const logger = pino(pino.extreme('./my-file')) -const logger2 = pino(pino.extreme()) -``` - -The `pino.extreme` method may be passed a file path or a numerical file descriptor. -By default, `pino.extreme` will use `process.stdout.fd` (1) as the file descriptor. - -`pino.extreme` is implemented with the [`sonic-boom` ⇗](https://github.com/mcollina/sonic-boom) -module. - -A `pino.extreme` instance can also be used to reopen closed files -(for example, for some log rotation scenarios), see [Reopening log files](/docs/help.md#reopening). - -On AWS Lambda we recommend to call `extreme.flushSync()` at the end -of each function execution to avoid losing data. - -* See [`destination` parameter](#destination) -* See [`sonic-boom` ⇗](https://github.com/mcollina/sonic-boom) -* See [Extreme mode ⇗](/docs/extreme.md) -* See [Reopening log files](/docs/help.md#reopening) - - - -### `pino.final(logger, [handler]) => Function | FinalLogger` - -The `pino.final` method can be used to acquire a final logger instance -or create an exit listener function. - -The `finalLogger` is a specialist logger that synchronously flushes -on every write. This is important to guarantee final log writes, -both when using `pino.extreme` target. - -Since final log writes cannot be guaranteed with normal Node.js streams, -if the `destination` parameter of the `logger` supplied to `pino.final` -is a Node.js stream `pino.final` will throw. - -The use of `pino.final` with `pino.destination` is not needed, as -`pino.destination` writes things synchronously. - -#### `pino.final(logger, handler) => Function` - -In this case the `pino.final` method supplies an exit listener function that can be -supplied to process exit events such as `exit`, `uncaughtException`, -`SIGHUP` and so on. - -The exit listener function will call the supplied `handler` function -with an error object (or else `null`), a `finalLogger` instance followed -by any additional arguments the `handler` may be called with. - -```js -process.on('uncaughtException', pino.final(logger, (err, finalLogger) => { - finalLogger.error(err, 'uncaughtException') - process.exit(1) -})) -``` - -#### `pino.final(logger) => FinalLogger` - -In this case the `pino.final` method returns a finalLogger instance. - -```js -var finalLogger = pino.final(logger) -finalLogger.info('exiting...') -``` - -* See [`destination` parameter](#destination) -* See [Exit logging help](/docs/help.md#exit-logging) -* See [Extreme mode ⇗](/docs/extreme.md) -* See [Log loss prevention ⇗](/docs/extreme.md#log-loss-prevention) - - -### `pino.stdSerializers` (Object) - -The `pino.stdSerializers` object provides functions for serializing objects common to many projects. The standard serializers are directly imported from [pino-std-serializers](https://github.com/pinojs/pino-std-serializers). - -* See [pino-std-serializers ⇗](https://github.com/pinojs/pino-std-serializers) - - -### `pino.stdTimeFunctions` (Object) - -The [`timestamp`](#opt-timestamp) option can accept a function which determines the -`timestamp` value in a log line. - -The `pino.stdTimeFunctions` object provides a very small set of common functions for generating the -`timestamp` property. These consist of the following - -* `pino.stdTimeFunctions.epochTime`: Milliseconds since Unix epoch (Default) -* `pino.stdTimeFunctions.unixTime`: Seconds since Unix epoch -* `pino.stdTimeFunctions.nullTime`: Clears timestamp property (Used when `timestamp: false`) -* `pino.stdTimeFunctions.isoTime`: ISO 8601-formatted time in UTC - -* See [`timestamp` option](#opt-timestamp) - - -### `pino.symbols` (Object) - -For integration purposes with ecosystem and third party libraries `pino.symbols` -exposes the symbols used to hold non-public state and methods on the logger instance. - -Access to the symbols allows logger state to be adjusted, and methods to be overridden or -proxied for performant integration where necessary. - -The `pino.symbols` object is intended for library implementers and shouldn't be utilized -for general use. - - -### `pino.version` (String) - -Exposes the Pino package version. Also available on the logger instance. - -* See [`logger.version`](#version) - - -### `pino.LOG_VERSION` (Number) - -Holds the current log format version as output in the `v` property of each log record. Also available on the logger instance. - -* See [`logger.LOG_VERSION`](#log_version) diff --git a/node_modules/pino/docs/benchmarks.md b/node_modules/pino/docs/benchmarks.md deleted file mode 100644 index 4f508a4..0000000 --- a/node_modules/pino/docs/benchmarks.md +++ /dev/null @@ -1,58 +0,0 @@ -# Benchmarks - -`pino.info('hello world')`: - -``` -BASIC benchmark averages -Bunyan average: 549.042ms -Winston average: 467.873ms -Bole average: 201.529ms -Debug average: 253.724ms -LogLevel average: 282.653ms -Pino average: 188.956ms -PinoExtreme average: 108.809ms -``` - -`pino.info({'hello': 'world'})`: - -``` -OBJECT benchmark averages -BunyanObj average: 564.363ms -WinstonObj average: 464.824ms -BoleObj average: 230.220ms -LogLevelObject average: 474.857ms -PinoObj average: 201.442ms -PinoUnsafeObj average: 202.687ms -PinoExtremeObj average: 108.689ms -PinoUnsafeExtremeObj average: 106.718ms -``` - -`pino.info(aBigDeeplyNestedObject)`: - -``` -DEEPOBJECT benchmark averages -BunyanDeepObj average: 5293.279ms -WinstonDeepObj average: 9020.292ms -BoleDeepObj average: 9169.043ms -LogLevelDeepObj average: 15260.917ms -PinoDeepObj average: 8467.807ms -PinoUnsafeDeepObj average: 6159.227ms -PinoExtremeDeepObj average: 8354.557ms -PinoUnsafeExtremeDeepObj average: 6214.073ms -``` - -`pino.info('hello %s %j %d', 'world', {obj: true}, 4, {another: 'obj'})`: - -``` -BunyanInterpolateExtra average: 778.408ms -WinstonInterpolateExtra average: 627.956ms -BoleInterpolateExtra average: 429.757ms -PinoInterpolateExtra average: 316.043ms -PinoUnsafeInterpolateExtra average: 316.809ms -PinoExtremeInterpolateExtra average: 218.468ms -PinoUnsafeExtremeInterpolateExtra average: 215.040ms -``` - -For a fair comparison, [LogLevel](http://npm.im/loglevel) was extended -to include a timestamp and [bole](http://npm.im/bole) had -`fastTime` mode switched on. diff --git a/node_modules/pino/docs/browser.md b/node_modules/pino/docs/browser.md deleted file mode 100644 index ae357b0..0000000 --- a/node_modules/pino/docs/browser.md +++ /dev/null @@ -1,199 +0,0 @@ -# Browser API - -Pino is compatible with [`browserify`](http://npm.im/browserify) for browser side usage: - -This can be useful with isomorphic/universal JavaScript code. - -By default, in the browser, -`pino` uses corresponding [Log4j](https://en.wikipedia.org/wiki/Log4j) `console` methods (`console.error`, `console.warn`, `console.info`, `console.debug`, `console.trace`) and uses `console.error` for any `fatal` level logs. - -## Options - -Pino can be passed a `browser` object in the options object, -which can have the following properties: - -### `asObject` (Boolean) - -```js -const pino = require('pino')({browser: {asObject: true}}) -``` - -The `asObject` option will create a pino-like log object instead of -passing all arguments to a console method, for instance: - -```js -pino.info('hi') // creates and logs {msg: 'hi', level: 30, time: } -``` - -When `write` is set, `asObject` will always be `true`. - -### `write` (Function | Object) - -Instead of passing log messages to `console.log` they can be passed to -a supplied function. - -If `write` is set to a single function, all logging objects are passed -to this function. - -```js -const pino = require('pino')({ - browser: { - write: (o) => { - // do something with o - } - } -}) -``` - -If `write` is an object, it can have methods that correspond to the -levels. When a message is logged at a given level, the corresponding -method is called. If a method isn't present, the logging falls back -to using the `console`. - - -```js -const pino = require('pino')({ - browser: { - write: { - info: function (o) { - //process info log object - }, - error: function (o) { - //process error log object - } - } - } -}) -``` - -### `serialize`: (Boolean | Array) - -The serializers provided to `pino` are ignored by default in the browser, including -the standard serializers provided with Pino. Since the default destination for log -messages is the console, values such as `Error` objects are enhanced for inspection, -which they otherwise wouldn't be if the Error serializer was enabled. - -We can turn all serializers on, - -```js -const pino = require('pino')({ - browser: { - serialize: true - } -}) -``` - -Or we can selectively enable them via an array: - -```js -const pino = require('pino')({ - serializers: { - custom: myCustomSerializer, - another: anotherSerializer - }, - browser: { - serialize: ['custom'] - } -}) -// following will apply myCustomSerializer to the custom property, -// but will not apply anotherSerializer to another key -pino.info({custom: 'a', another: 'b'}) -``` - -When `serialize` is `true` the standard error serializer is also enabled (see https://github.com/pinojs/pino/blob/master/docs/api.md#stdSerializers). -This is a global serializer which will apply to any `Error` objects passed to the logger methods. - -If `serialize` is an array the standard error serializer is also automatically enabled, it can -be explicitly disabled by including a string in the serialize array: `!stdSerializers.err`, like so: - -```js -const pino = require('pino')({ - serializers: { - custom: myCustomSerializer, - another: anotherSerializer - }, - browser: { - serialize: ['!stdSerializers.err', 'custom'] //will not serialize Errors, will serialize `custom` keys - } -}) -``` - -The `serialize` array also applies to any child logger serializers (see https://github.com/pinojs/pino/blob/master/docs/api.md#discussion-2 -for how to set child-bound serializers). - -Unlike server pino the serializers apply to every object passed to the logger method, -if the `asObject` option is `true`, this results in the serializers applying to the -first object (as in server pino). - -For more info on serializers see https://github.com/pinojs/pino/blob/master/docs/api.md#parameters. - -### `transmit` (Object) - -An object with `send` and `level` properties. - -The `transmit.level` property specifies the minimum level (inclusive) of when the `send` function -should be called, if not supplied the `send` function be called based on the main logging `level` -(set via `options.level`, defaulting to `info`). - -The `transmit` object must have a `send` function which will be called after -writing the log message. The `send` function is passed the level of the log -message and a `logEvent` object. - -The `logEvent` object is a data structure representing a log message, it represents -the arguments passed to a logger statement, the level -at which they were logged and the hierarchy of child bindings. - -The `logEvent` format is structured like so: - -```js -{ - ts = Number, - messages = Array, - bindings = Array, - level: { label = String, value = Number} -} -``` - -The `ts` property is a unix epoch timestamp in milliseconds, the time is taken from the moment the -logger method is called. - -The `messages` array is all arguments passed to logger method, (for instance `logger.info('a', 'b', 'c')` -would result in `messages` array `['a', 'b', 'c']`). - -The `bindings` array represents each child logger (if any), and the relevant bindings. -For instance given `logger.child({a: 1}).child({b: 2}).info({c: 3})`, the bindings array -would hold `[{a: 1}, {b: 2}]` and the `messages` array would be `[{c: 3}]`. The `bindings` -are ordered according to their position in the child logger hierarchy, with the lowest index -being the top of the hierarchy. - -By default serializers are not applied to log output in the browser, but they will *always* be -applied to `messages` and `bindings` in the `logEvent` object. This allows us to ensure a consistent -format for all values between server and client. - -The `level` holds the label (for instance `info`), and the corresponding numerical value -(for instance `30`). This could be important in cases where client side level values and -labels differ from server side. - -The point of the `send` function is to remotely record log messages: - -```js -const pino = require('pino')({ - browser: { - transmit: { - level: 'warn', - send: function (level, logEvent) { - if (level === 'warn') { - // maybe send the logEvent to a separate endpoint - // or maybe analyse the messages further before sending - } - // we could also use the `logEvent.level.value` property to determine - // numerical value - if (logEvent.level.value >= 50) { // covers error and fatal - - // send the logEvent somewhere - } - } - } - } -}) -``` diff --git a/node_modules/pino/docs/child-loggers.md b/node_modules/pino/docs/child-loggers.md deleted file mode 100644 index c664c85..0000000 --- a/node_modules/pino/docs/child-loggers.md +++ /dev/null @@ -1,95 +0,0 @@ -# Child loggers - -Let's assume we want to have `"module":"foo"` added to every log within a -module `foo.js`. - -To accomplish this, simply use a child logger: - -```js -'use strict' -// imports a pino logger instance of `require('pino')()` -const parentLogger = require('./lib/logger') -const log = parentLogger.child({module: 'foo'}) - -function doSomething () { - log.info('doSomething invoked') -} - -module.exports = { - doSomething -} -``` - -## Cost of child logging - -Child logger creation is fast: - -``` -benchBunyanCreation*10000: 564.514ms -benchBoleCreation*10000: 283.276ms -benchPinoCreation*10000: 258.745ms -benchPinoExtremeCreation*10000: 150.506ms -``` - -Logging through a child logger has little performance penalty: - -``` -benchBunyanChild*10000: 556.275ms -benchBoleChild*10000: 288.124ms -benchPinoChild*10000: 231.695ms -benchPinoExtremeChild*10000: 122.117ms -``` - -Logging via the child logger of a child logger also has negligible overhead: - -``` -benchBunyanChildChild*10000: 559.082ms -benchPinoChildChild*10000: 229.264ms -benchPinoExtremeChildChild*10000: 127.753ms -``` - -## Duplicate keys caveat - -It's possible for naming conflicts to arise between child loggers and -children of child loggers. - -This isn't as bad as it sounds, even if the same keys between -parent and child loggers are used, Pino resolves the conflict in the sanest way. - -For example, consider the following: - -```js -const pino = require('pino') -pino(pino.destination('./my-log')) - .child({a: 'property'}) - .child({a: 'prop'}) - .info('howdy') -``` - -```sh -$ cat my-log -{"pid":95469,"hostname":"MacBook-Pro-3.home","level":30,"msg":"howdy","time":1459534114473,"a":"property","a":"prop","v":1} -``` - -Notice how there's two key's named `a` in the JSON output. The sub-childs properties -appear after the parent child properties. - -At some point the logs will most likely be processed (for instance with a [transport](transports.md)), -and this generally involves parsing. `JSON.parse` will return an object where the conflicting -namespace holds the final value assigned to it: - -```sh -$ cat my-log | node -e "process.stdin.once('data', (line) => console.log(JSON.stringify(JSON.parse(line))))" -{"pid":95469,"hostname":"MacBook-Pro-3.home","level":30,"msg":"howdy","time":"2016-04-01T18:08:34.473Z","a":"prop","v":1} -``` - -Ultimately the conflict is resolved by taking the last value, which aligns with Bunyans child logging -behavior. - -There may be cases where this edge case becomes problematic if a JSON parser with alternative behavior -is used to process the logs. It's recommended to be conscious of namespace conflicts with child loggers, -in light of an expected log processing approach. - -One of Pino's performance tricks is to avoid building objects and stringifying -them, so we're building strings instead. This is why duplicate keys between -parents and children will end up in log output. diff --git a/node_modules/pino/docs/ecosystem.md b/node_modules/pino/docs/ecosystem.md deleted file mode 100644 index 29db61a..0000000 --- a/node_modules/pino/docs/ecosystem.md +++ /dev/null @@ -1,72 +0,0 @@ -# Pino Ecosystem - -This is a list of ecosystem modules that integrate with `pino`. - -Modules listed under [Core](#core) are maintained by the Pino team. Modules -listed under [Community](#community) are maintained by independent community -members. - -Please send a PR to add new modules! - - -## Core - -+ [`express-pino-logger`](https://github.com/pinojs/express-pino-logger): use -Pino to log requests within [express](https://expressjs.com/). -+ [`koa-pino-logger`](https://github.com/pinojs/koa-pino-logger): use Pino to -log requests within [Koa](http://koajs.com/). -+ [`pino-arborsculpture`](https://github.com/pinojs/pino-arborsculpture): change -log levels at runtime. -+ [`pino-caller`](https://github.com/pinojs/pino-caller): add callsite to the log line. -+ [`pino-clf`](https://github.com/pinojs/pino-clf): reformat Pino logs into -Common Log Format. -+ [`pino-debug`](https://github.com/pinojs/pino-debug): use Pino to interpret -[`debug`](https://npm.im/debug) logs. -+ [`pino-elasticsearch`](https://github.com/pinojs/pino-elasticsearch): send -Pino logs to an Elasticsearch instance. -+ [`pino-eventhub`](https://github.com/pinojs/pino-eventhub): send Pino logs -to an [Event Hub](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-what-is-event-hubs). -+ [`pino-filter`](https://github.com/pinojs/pino-filter): filter Pino logs in -the same fashion as the [`debug`](https://npm.im/debug) module. -+ [`pino-gelf`](https://github.com/pinojs/pino-gelf): reformat Pino logs into -GELF format for Graylog. -+ [`pino-hapi`](https://github.com/pinojs/hapi-pino): use Pino as the logger -for [Hapi](https://hapijs.com/). -+ [`pino-http`](https://github.com/pinojs/pino-http): easily use Pino to log -requests with the core `http` module. -+ [`pino-http-print`](https://github.com/pinojs/pino-http-print): reformat Pino -logs into traditional [HTTPD](https://httpd.apache.org/) style request logs. -+ [`pino-multi-stream`](https://github.com/pinojs/pino-multi-stream): send -logs to multiple destination streams (slow!). -+ [`pino-mongodb`](https://github.com/pinojs/pino-mongodb): store Pino logs -in a MongoDB database. -+ [`pino-noir`](https://github.com/pinojs/pino-noir): redact sensitive information -in logs. -+ [`pino-pretty`](https://github.com/pinojs/pino-pretty): basic prettifier to -make log lines human readable. -+ [`pino-socket`](https://github.com/pinojs/pino-socket): send logs to TCP or UDP -destinations. -+ [`pino-std-serializers`](https://github.com/pinojs/pino-std-serializers): the -core object serializers used within Pino. -+ [`pino-syslog`](https://github.com/pinojs/pino-syslog): reformat Pino logs -to standard syslog format. -+ [`pino-tee`](https://github.com/pinojs/pino-tee): pipe Pino logs into files -based upon log levels. -+ [`pino-toke`](https://github.com/pinojs/pino-toke): reformat Pino logs -according to a given format string. -+ [`restify-pino-logger`](https://github.com/pinojs/restify-pino-logger): use -Pino to log requests within [restify](http://restify.com/). -+ [`rill-pino-logger`](https://github.com/pinojs/rill-pino-logger): use Pino as -the logger for the [Rill framework](https://rill.site/). - - -## Community - -+ [`pino-colada`](https://github.com/lrlna/pino-colada): cute ndjson formatter for pino. -+ [`pino-fluentd`](https://github.com/davidedantonio/pino-fluentd): send Pino logs to Elasticsearch, -MongoDB and many [others](https://www.fluentd.org/dataoutputs) via Fluentd. -+ [`pino-pretty-min`](https://github.com/unjello/pino-pretty-min): a minimal -prettifier inspired by the [logrus](https://github.com/sirupsen/logrus) logger. -+ [`pino-rotating-file`](https://github.com/homeaway/pino-rotating-file): a hapi-pino log transport for splitting logs into separate, automatically rotating files. -+ [`cls-proxify`](https://github.com/keenondrums/cls-proxify): integration of pino and [CLS](https://github.com/jeff-lewis/cls-hooked). Useful for creating dynamically configured child loggers (e.g. with added trace ID) for each request. - diff --git a/node_modules/pino/docs/extreme.md b/node_modules/pino/docs/extreme.md deleted file mode 100644 index 791be39..0000000 --- a/node_modules/pino/docs/extreme.md +++ /dev/null @@ -1,95 +0,0 @@ -# Extreme Mode - -In essence, extreme mode enables even faster performance by Pino. - -In Pino's standard mode of operation log messages are directly written to the -output stream as the messages are generated. Extreme mode works by buffering -log messages and writing them in larger chunks. - -## Caveats - -This has a couple of important caveats: - -* 4KB of spare RAM will be needed for logging -* As opposed to the default mode, there is not a one-to-one relationship between - calls to logging methods (e.g. `logger.info`) and writes to a log file -* There is a possibility of the most recently buffered log messages being lost - (up to 4KB of logs) - * For instance, a power cut will mean up to 4KB of buffered logs will be lost - -So in summary, only use extreme mode when performing an extreme amount of -logging and it is acceptable to potentially lose the most recent logs. - -* Pino will register handlers for the following process events/signals so that - Pino can flush the extreme mode buffer: - - + `beforeExit` - + `exit` - + `uncaughtException` - + `SIGHUP` - + `SIGINT` - + `SIGQUIT` - + `SIGTERM` - - In all of these cases, except `SIGHUP`, the process is in a state that it - *must* terminate. Thus, if an `onTerminated` function isn't registered when - constructing a Pino instance (see [pino#constructor](api.md#constructor)), - then Pino will invoke `process.exit(0)` when no error has occurred, or - `process.exit(1)` otherwise. If an `onTerminated` function is supplied, it - is the responsibility of the `onTerminated` function to manually exit the process. - - In the case of `SIGHUP`, we will look to see if any other handlers are - registered for the event. If not, we will proceed as we do with all other - signals. If there are more handlers registered than just our own, we will - simply flush the extreme mode buffer. - -## Usage - -The `pino.extreme()` method will provide an Extreme Mode destination. - -```js -const pino = require('pino') -const dest = pino.extreme() // logs to stdout with no args -const logger = pino(dest) -``` - - -## Log loss prevention - -The following strategy can be used to minimize log loss: - -```js -const pino = require('pino') -const dest = pino.extreme() // no arguments -const logger = pino(dest) - -// asynchronously flush every 10 seconds to keep the buffer empty -// in periods of low activity -setInterval(function () { - logger.flush() -}, 10000).unref() - -// use pino.final to create a special logger that -// guarantees final tick writes -const handler = pino.final(logger, (err, finalLogger, evt) => { - finalLogger.info(`${evt} caught`) - if (err) finalLogger.error(err, 'error caused exit') - process.exit(err ? 1 : 0) -}) -// catch all the ways node might exit -process.on('beforeExit', () => handler(null, 'beforeExit')) -process.on('exit', () => handler(null, 'exit')) -process.on('uncaughtException', (err) => handler(err, 'uncaughtException')) -process.on('SIGINT', () => handler(null, 'SIGINT')) -process.on('SIGQUIT', () => handler(null, 'SIGQUIT')) -process.on('SIGTERM', () => handler(null, 'SIGTERM')) -``` - -An extreme destination is an instance of -[`SonicBoom`](https://github.com/mcollina/sonic-boom) with `4096` -buffering. - - -* See [`pino.extreme` api](/docs/api.md#pino-extreme) -* See [`pino.final` api](/docs/api.md#pino-final) -* See [`destination` parameter](/docs/api.md#destination) diff --git a/node_modules/pino/docs/help.md b/node_modules/pino/docs/help.md deleted file mode 100644 index db9f1cb..0000000 --- a/node_modules/pino/docs/help.md +++ /dev/null @@ -1,215 +0,0 @@ -# Help - -* [Exit logging](#exit-logging) -* [Log rotation](#rotate) -* [Reopening log files](#reopening) -* [Saving to multiple files](#multiple) -* [Log filtering](#filter-logs) -* [Transports and systemd](#transport-systemd) -* [Duplicate keys](#dupe-keys) -* [Log levels as labels instead of numbers](#level-string) -* [Pino with `debug`](#debug) -* [Unicode and Windows terminal](#windows) - - -## Exit logging - -When a Node process crashes from uncaught exception, exits due to a signal, -or exits of it's own accord we may want to write some final logs – particularly -in cases of error. - -Writing to a Node.js stream on exit is not necessarily guaranteed, and naively writing -to an Extreme Mode logger on exit will definitely lead to lost logs. - -To write logs in an exit handler, create the handler with [`pino.final`](/docs/api.md#pino-final): - -```js -process.on('uncaughtException', pino.final(logger, (err, finalLogger) => { - finalLogger.error(err, 'uncaughtException') - process.exit(1) -})) - -process.on('unhandledRejection', pino.final(logger, (err, finalLogger) => { - finalLogger.error(err, 'unhandledRejection') - process.exit(1) -})) -``` - -The `finalLogger` is a special logger instance that will synchronously and reliably -flush every log line. This is important in exit handlers, since no more asynchronous -activity may be scheduled. - - -## Log rotation - -Use a separate tool for log rotation: -We recommend [logrotate](https://github.com/logrotate/logrotate). -Consider we output our logs to `/var/log/myapp.log` like so: - -``` -$ node server.js > /var/log/myapp.log -``` - -We would rotate our log files with logrotate, by adding the following to `/etc/logrotate.d/myapp`: - -``` -/var/log/myapp.log { - su root - daily - rotate 7 - delaycompress - compress - notifempty - missingok - copytruncate -} -``` - -The `copytruncate` configuration has a very slight possibility of lost log lines due -to a gap between copying and truncating - the truncate may occur after additional lines -have been written. To perform log rotation without `copytruncate`, see the [Reopening log files](#reopening) -help. - - -## Reopening log files - -In cases where a log rotation tool doesn't offer a copy-truncate capabilities, -or where using them is deemed inappropriate `pino.destination` and `pino.extreme` -destinations are able to reopen file paths after a file has been moved away. - -One way to use this is to set up a `SIGUSR2` or `SIGHUP` signal handler that -reopens the log file destination, making sure to write the process PID out -somewhere so the log rotation tool knows where to send the signal. - -```js -// write the process pid to a well known location for later -const fs = require('fs') -fs.writeFileSync('/var/run/myapp.pid', process.pid) - -const dest = pino.destination('/log/file') // pino.extreme will also work -const logger = require('pino')(dest) -process.on('SIGHUP', () => dest.reopen()) -``` - -The log rotation tool can then be configured to send this signal to the process -after a log rotation event has occurred. - -Given a similar scenario as in the [Log rotation](#rotate) section a basic -`logrotate` config that aligns with this strategy would look similar to the following: - -``` -/var/log/myapp.log { - su root - daily - rotate 7 - delaycompress - compress - notifempty - missingok - postrotate - kill -HUP `cat /var/run/myapp.pid` - endscript -} -``` - - -## Saving to multiple files - -Let's assume we want to store all error messages to a separate log file. - -Install [pino-tee](http://npm.im/pino-tee) with: - -```bash -npm i pino-tee -g -``` - -The following writes the log output of `app.js` to `./all-logs`, while -writing only warnings and errors to `./warn-log: - -```bash -node app.js | pino-tee warn ./warn-logs > ./all-logs -``` - - -## Log Filtering -The Pino philosophy advocates common, pre-existing, system utilities. - -Some recommendations in line with this philosophy are: - -1. Use [`grep`](https://linux.die.net/man/1/grep): - ```sh - $ # View all "INFO" level logs - $ node app.js | grep '"level":30' - ``` -1. Use [`jq`](https://stedolan.github.io/jq/): - ```sh - $ # View all "ERROR" level logs - $ node app.js | jq 'select(.level == 50)' - ``` - - -## Transports and systemd -`systemd` makes it complicated to use pipes in services. One method for overcoming -this challenge is to use a subshell: - -``` -ExecStart=/bin/sh -c '/path/to/node app.js | pino-transport' -``` - - -## How Pino handles duplicate keys - -Duplicate keys are possibly when a child logger logs an object with a key that -collides with a key in the child loggers bindings. - -See the [child logger duplicate keys caveat](/docs/child-loggers.md#duplicate-keys-caveat) -for information on this is handled. - - -## Log levels as labels instead of numbers -Pino log lines are meant to be parseable. Thus, Pino's default mode of operation -is to print the level value instead of the string name. However, while it is -possible to set the `useLevelLabels` option, we recommend using one of these -options instead if you are able: - -1. If the only change desired is the name then a transport can be used. One such -transport is [`pino-text-level-transport`](https://npm.im/pino-text-level-transport). -1. Use a prettifier like [`pino-pretty`](https://npm.im/pino-pretty) to make -the logs human friendly. - - -## Pino with `debug` - -The popular [`debug`](http://npm.im/debug) is used in many modules across the ecosystem. - -The [`pino-debug`](http://github.com/pinojs/pino-debug) module -can capture calls to `debug` loggers and run them -through `pino` instead. This results in a 10x (20x in extreme mode) -performance improvement - even though `pino-debug` is logging additional -data and wrapping it in JSON. - -To quickly enable this install [`pino-debug`](http://github.com/pinojs/pino-debug) -and preload it with the `-r` flag, enabling any `debug` logs with the -`DEBUG` environment variable: - -```sh -$ npm i pino-debug -$ DEBUG=* node -r pino-debug app.js -``` - -[`pino-debug`](http://github.com/pinojs/pino-debug) also offers fine grain control to map specific `debug` -namespaces to `pino` log levels. See [`pino-debug`](http://github.com/pinojs/pino-debug) -for more. - - -## Unicode and Windows terminal - -Pino uses [sonic-boom](https://github.com/mcollina/sonic-boom) to speed -up logging. Internally, it uses [`fs.write`](https://nodejs.org/dist/latest-v10.x/docs/api/fs.html#fs_fs_write_fd_string_position_encoding_callback) to write log lines directly to a file -descriptor. On Windows, unicode output is not handled properly in the -terminal (both `cmd.exe` and powershell), and as such the output could -be visualized incorrectly if the log lines include utf8 characters. It -is possible to configure the terminal to visualize those characters -correctly with the use of [`chcp`](https://ss64.com/nt/chcp.html) by -executing in the terminal `chcp 65001`. This is a known limitation of -Node.js. diff --git a/node_modules/pino/docs/legacy.md b/node_modules/pino/docs/legacy.md deleted file mode 100644 index 9471725..0000000 --- a/node_modules/pino/docs/legacy.md +++ /dev/null @@ -1,167 +0,0 @@ -# Legacy - -## Legacy Node Support - -### Node v4 - -Node v4 is supported on the [Pino v4](#pino-v4-documentation) line. - -### Node v0.10-v0.12 - -Node v0.10 or Node v0.12 is supported on the [Pino v2](#pino-v2-documentation) line. - -## Documentation - -### Pino v4 Documentation - - - -### Pino v3 Documentation - - - -### Pino v2 Documentation - - - -## Migration - -### Pino v4 to to Pino v5 - -#### Logging Destination - -In Pino v4 the destination could be set by passing a stream as the -second parameter to the exported `pino` function. This is still the -case in v5. However it's strongly recommended to use `pino.destination` -which will write logs ~30% faster. - -##### v4 - -```js -const stdoutLogger = require('pino')() -const stderrLogger = require('pino')(process.stderr) -const fileLogger = require('pino')(fs.createWriteStream('/log/path')) -``` - -##### v5 - -```js -const stdoutLogger = require('pino')() // pino.destination by default -const stderrLogger = require('pino')(pino.destination(2)) -const fileLogger = require('pino')(pino.destination('/log/path')) -``` - -Note: This is not a breaking change, `WritableStream` instances are still -supported, but are slower than `pino.destination` which -uses the high speed [`sonic-boom` ⇗](https://github.com/mcollina/sonic-boom) library. - -* See [`destination` parameter](/docs/api.md#destination) - -#### Extreme Mode - -The `extreme` setting does not exist as an option in Pino v5, instead use -a `pino.extreme` destination. - -##### v4 - -```js -const stdoutLogger = require('pino')({extreme: true}) -const stderrLogger = require('pino')({extreme: true}, process.stderr) -const fileLogger = require('pino')({extreme: true}, fs.createWriteStream('/log/path')) -``` - -##### v5 - -```js -const stdoutLogger = require('pino')(pino.extreme()) -const stderrLogger = require('pino')(pino.extreme(2)) -const fileLogger = require('pino')(pino.extreme('/log/path')) -``` - -* See [pino.extreme](/docs/api.md#pino-extreme) -* See [Extreme mode ⇗](/docs/extreme.md) - - -#### Pino CLI is now pino-pretty CLI - -The Pino CLI is provided with Pino v4 for basic log prettification. - -From Pino v5 the CLI is installed separately with `pino-pretty`. - -##### v4 -```sh -$ npm install -g pino -$ node app.js | pino -``` - -##### v5 -```sh -$ npm install -g pino-pretty -$ node app.js | pino-pretty -``` - -* See [Pretty Printing documentation](/docs/pretty.md) - -#### Programmatic Pretty Printing - -The [`pino.pretty()`](https://github.com/pinojs/pino/blob/v4.x.x/docs/API.md#prettyoptions) -method has also been removed from Pino v5. - -##### v4 - -```js -var pino = require('pino') -var pretty = pino.pretty() -pretty.pipe(process.stdout) -``` - -##### v5 - -Instead use the `prettyPrint` option (also available in v4): - -```js -const logger = require('pino')({ - prettyPrint: process.env.NODE_ENV !== 'production' -}) -``` - -In v5 the `pretty-print` module must be installed to use the `prettyPrint` option: - -```sh -npm install --save-dev pino-pretty -``` - -* See [prettyPrint option](/docs/api.md#prettyPrint) -* See [Pretty Printing documentation](/docs/pretty.md) - -#### Slowtime - -In Pino v4 a `slowtime` option was supplied, which allowed for full ISO dates -in the timestamps instead of milliseconds since the Epoch. In Pino v5 this -has been completely removed, along with the `pino.stdTimeFunctions.slowTime` -function. In order to achieve the equivalent in v5, a custom -time function should be supplied: - -##### v4 - -```js -const pino = require('pino') -const logger = pino({slowtime: true}) -// following avoids deprecation warning in v4: -const loggerAlt = pino({timestamp: pino.stdTimeFunctions.slowTime}) -``` - -##### v5 - -```js -const logger = require('pino')({ - timestamp: () => ',"time":"' + (new Date()).toISOString() + '"' -}) -``` - -The practice of creating ISO dates in-process for logging purposes is strongly -recommended against. Instead consider post-processing the logs or using a transport -to convert the timestamps. - - -* See [timestamp option](/docs/api.md#timestamp) diff --git a/node_modules/pino/docs/pretty.md b/node_modules/pino/docs/pretty.md deleted file mode 100644 index bd90ebb..0000000 --- a/node_modules/pino/docs/pretty.md +++ /dev/null @@ -1,93 +0,0 @@ -# Pretty Printing - -By default, Pino log lines are newline delimited JSON (NDJSON). This is perfect -for production usage and long term storage. It's not so great for development -environments. Thus, Pino logs can be prettified by using a Pino prettifier -module like [`pino-pretty`][pp]: - -```sh -$ cat app.log | pino-pretty -``` - -For almost all situations, this is the recommended way to prettify logs. The -programmatic API, described in the next section, is primarily for integration -purposes with other CLI based prettifiers. - -## Prettifier API - -Pino prettifier modules are extra modules that provide a CLI for parsing NDJSON -log lines piped via `stdin` and expose an API which conforms to the Pino -[metadata streams](api.md#metadata) API. - -The API requires modules provide a factory function which returns a prettifier -function. This prettifier function must accept either a string of NDJSON or -a Pino log object. A psuedo-example of such a prettifier is: - -The uninitialized Pino instance is passed as `this` into prettifier factory function, -so it can be accessed via closure by the returned prettifier function. - -```js -module.exports = function myPrettifier (options) { - // `this` is bound to the pino instance - // Deal with whatever options are supplied. - return function prettifier (inputData) { - let logObject - if (typeof inputData === 'string') { - const parsedData = someJsonParser(inputData) - logObject = (isPinoLog(parsedData)) ? parsedData : undefined - } else if (isObject(inputData) && isPinoLog(inputData)) { - logObject = inputData - } - if (!logObject) return inputData - // implement prettification - } - - function isObject (input) { - return Object.prototype.toString.apply(input) === '[object Object]' - } - - function isPinoLog (log) { - return log && (log.hasOwnProperty('v') && log.v === 1) - } -} -``` - -The reference implementation of such a module is the [`pino-pretty`][pp] module. -To learn more about creating a custom prettifier module, refer to the -`pino-pretty` source code. - -Note: if the prettifier returns `undefined`, instead of a formatted line, nothing -will be written to the destination stream. - -### API Example - -> #### NOTE: -> For general usage, it is highly recommended that logs are piped into -> the prettifier instead. Prettified logs are not easily parsed and cannot -> be easily investigated at a later date. - -1. Install a prettifier module as a separate dependency, e.g. `npm install pino-pretty`. -1. Instantiate the logger with pretty printing enabled: - ```js - const pino = require('pino') - const log = pino({ - prettyPrint: { - levelFirst: true - }, - prettifier: require('pino-pretty') - }) - ``` - Note: the default prettifier module is `pino-pretty`, so the preceding - example could be: - ```js - const pino = require('pino') - const log = pino({ - prettyPrint: { - levelFirst: true - } - }) - ``` - See the [`pino-pretty` documentation][pp] for more information on the options - that can be passed via `prettyPrint`. - - [pp]: https://github.com/pinojs/pino-pretty diff --git a/node_modules/pino/docs/redaction.md b/node_modules/pino/docs/redaction.md deleted file mode 100644 index ea87531..0000000 --- a/node_modules/pino/docs/redaction.md +++ /dev/null @@ -1,133 +0,0 @@ -# Redaction - -> Redaction is not supported in the browser [#670](https://github.com/pinojs/pino/issues/670) - -To redact sensitive information, supply paths to keys that hold sensitive data -using the `redact` option: - -```js -const logger = require('.')({ - redact: ['key', 'path.to.key', 'stuff.thats[*].secret'] -}) - -logger.info({ - key: 'will be redacted', - path: { - to: {key: 'sensitive', another: 'thing'} - }, - stuff: { - thats: [ - {secret: 'will be redacted', logme: 'will be logged'}, - {secret: 'as will this', logme: 'as will this'} - ] - } -}) -``` - -This will output: - -```JSON -{"level":30,"time":1527777350011,"pid":3186,"hostname":"Davids-MacBook-Pro-3.local","key":"[Redacted]","path":{"to":{"key":"[Redacted]","another":"thing"}},"stuff":{"thats":[{"secret":"[Redacted]","logme":"will be logged"},{"secret":"[Redacted]","logme":"as will this"}]},"v":1} -``` - -The `redact` option can take an array (as shown in the above example) or -an object. This allows control over *how* information is redacted. - -For instance, setting the censor: - -```js -const logger = require('.')({ - redact: { - paths: ['key', 'path.to.key', 'stuff.thats[*].secret'], - censor: '**GDPR COMPLIANT**' - } -}) - -logger.info({ - key: 'will be redacted', - path: { - to: {key: 'sensitive', another: 'thing'} - }, - stuff: { - thats: [ - {secret: 'will be redacted', logme: 'will be logged'}, - {secret: 'as will this', logme: 'as will this'} - ] - } -}) -``` - -This will output: - -```JSON -{"level":30,"time":1527778563934,"pid":3847,"hostname":"Davids-MacBook-Pro-3.local","key":"**GDPR COMPLIANT**","path":{"to":{"key":"**GDPR COMPLIANT**","another":"thing"}},"stuff":{"thats":[{"secret":"**GDPR COMPLIANT**","logme":"will be logged"},{"secret":"**GDPR COMPLIANT**","logme":"as will this"}]},"v":1} -``` - -The `redact.remove` option also allows for the key and value to be removed from output: - -```js -const logger = require('.')({ - redact: { - paths: ['key', 'path.to.key', 'stuff.thats[*].secret'], - remove: true - } -}) - -logger.info({ - key: 'will be redacted', - path: { - to: {key: 'sensitive', another: 'thing'} - }, - stuff: { - thats: [ - {secret: 'will be redacted', logme: 'will be logged'}, - {secret: 'as will this', logme: 'as will this'} - ] - } -}) -``` - -This will output - -```JSON -{"level":30,"time":1527782356751,"pid":5758,"hostname":"Davids-MacBook-Pro-3.local","path":{"to":{"another":"thing"}},"stuff":{"thats":[{"logme":"will be logged"},{"logme":"as will this"}]},"v":1} -``` - -See [pino options in API](/docs/api.md#redact-array-object) for `redact` API details. - - -## Path Syntax - -The syntax for paths supplied to the `redact` option conform to the syntax in path lookups -in standard EcmaScript, with two additions: - -* paths may start with bracket notation -* paths may contain the asterisk `*` to denote a wildcard - -By way of example, the following are all valid paths: - -* `a.b.c` -* `a["b-c"].d` -* `["a-b"].c` -* `a.b.*` -* `a[*].b` - -## Overhead - -Pino's redaction functionality is built on top of [`fast-redact`](http://github.com/davidmarkclements/fast-redact) -which adds about 2% overhead to `JSON.stringify` when using paths without wildcards. - -When used with pino logger with a single redacted path, any overhead is within noise - -a way to deterministically measure it's effect has not been found. This is because its not a bottleneck. - -However, wildcard redaction does carry a non-trivial cost relative to explicitly declaring the keys -(50% in a case where four keys are redacted across two objects). See -the [`fast-redact` benchmarks](https://github.com/davidmarkclements/fast-redact#benchmarks) for details. - -## Safety - -The `redact` option is intended as an initialization time configuration option. -It's extremely important that path strings do not originate from user input. -The `fast-redact` module uses a VM context to syntax check the paths, user input -should never be combined with such an approach. See the [`fast-redact` Caveat](https://github.com/davidmarkclements/fast-redact#caveat) -and the [`fast-redact` Approach](https://github.com/davidmarkclements/fast-redact#approach) for in-depth information. diff --git a/node_modules/pino/docs/transports.md b/node_modules/pino/docs/transports.md deleted file mode 100644 index 73cb439..0000000 --- a/node_modules/pino/docs/transports.md +++ /dev/null @@ -1,387 +0,0 @@ -# Transports - -A "transport" for Pino is supplementary tool which consumes Pino logs. - -Consider the following example: - -```js -const split = require('split2') -const pump = require('pump') -const through = require('through2') - -const myTransport = through.obj(function (chunk, enc, cb) { - // do the necessary - console.log(chunk) - cb() -}) - -pump(process.stdin, split(JSON.parse), myTransport) -``` - -The above defines our "transport" as the file `my-transport-process.js`. - -Logs can now be consumed using shell piping: - -```sh -node my-app-which-logs-stuff-to-stdout.js | node my-transport-process.js -``` - -Ideally, a transport should consume logs in a separate process to the application, -Using transports in the same process causes unnecessary load and slows down -Node's single threaded event loop. - -## In-process transports - -> **Pino *does not* natively support in-process transports.** - -Pino does not support in-process transports because Node processes are -single threaded processes (ignoring some technical details). Given this -restriction, one of the methods Pino employs to achieve its speed is to -purposefully offload the handling of logs, and their ultimate destination, to -external processes so that the threading capabilities of the OS can be -used (or other CPUs). - -One consequence of this methodology is that "error" logs do not get written to -`stderr`. However, since Pino logs are in a parseable format, it is possible to -use tools like [pino-tee][pino-tee] or [jq][jq] to work with the logs. For -example, to view only logs marked as "error" logs: - -``` -$ node an-app.js | jq 'select(.level == 50)' -``` - -In short, the way Pino generates logs: - -1. Reduces the impact of logging on an application to the absolute minimum. -2. Gives greater flexibility in how logs are processed and stored. - -Given all of the above, Pino recommends out-of-process log processing. - -However, it is possible to wrap Pino and perform processing in-process. -For an example of this, see [pino-multi-stream][pinoms]. - -[pino-tee]: https://npm.im/pino-tee -[jq]: https://stedolan.github.io/jq/ -[pinoms]: https://npm.im/pino-multi-stream - -## Known Transports - -PR's to this document are welcome for any new transports! - -+ [pino-applicationinsights](#pino-applicationinsights) -+ [pino-azuretable](#pino-azuretable) -+ [pino-cloudwatch](#pino-cloudwatch) -+ [pino-couch](#pino-couch) -+ [pino-datadog](#pino-datadog) -+ [pino-elasticsearch](#pino-elasticsearch) -+ [pino-mq](#pino-mq) -+ [pino-mysql](#pino-mysql) -+ [pino-papertrail](#pino-papertrail) -+ [pino-redis](#pino-redis) -+ [pino-sentry](#pino-sentry) -+ [pino-socket](#pino-socket) -+ [pino-stackdriver](#pino-stackdriver) -+ [pino-syslog](#pino-syslog) -+ [pino-websocket](#pino-websocket) -+ [pino-http-send](#pino-http-send) - - -### pino-applicationinsights -The [pino-applicationinsights](https://www.npmjs.com/package/pino-applicationinsights) module is a transport that will forward logs to [Azure Application Insights](https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview). - -Given an application `foo` that logs via pino, you would use `pino-applicationinsights` like so: - -``` sh -$ node foo | pino-applicationinsights --key blablabla -``` - -For full documentation of command line switches read [readme](https://github.com/ovhemert/pino-applicationinsights#readme) - - -### pino-azuretable -The [pino-azuretable](https://www.npmjs.com/package/pino-azuretable) module is a transport that will forward logs to the [Azure Table Storage](https://azure.microsoft.com/en-us/services/storage/tables/). - -Given an application `foo` that logs via pino, you would use `pino-azuretable` like so: - -``` sh -$ node foo | pino-azuretable --account storageaccount --key blablabla -``` - -For full documentation of command line switches read [readme](https://github.com/ovhemert/pino-azuretable#readme) - - -### pino-cloudwatch - -[pino-cloudwatch][pino-cloudwatch] is a transport that buffers and forwards logs to [Amazon CloudWatch][]. - -```sh -$ node app.js | pino-cloudwatch --group my-log-group -``` - -[pino-cloudwatch]: https://github.com/dbhowell/pino-cloudwatch -[Amazon CloudWatch]: https://aws.amazon.com/cloudwatch/ - - -### pino-couch - -[pino-couch][pino-couch] uploads each log line as a [CouchDB][CouchDB] document. - -```sh -$ node app.js | pino-couch -U https://couch-server -d mylogs -``` - -[pino-couch]: https://github.com/IBM/pino-couch -[CouchDB]: https://couchdb.apache.org - - -### pino-datadog -The [pino-datadog](https://www.npmjs.com/package/pino-datadog) module is a transport that will forward logs to [DataDog](https://www.datadoghq.com/) through it's API. - -Given an application `foo` that logs via pino, you would use `pino-datadog` like so: - -``` sh -$ node foo | pino-datadog --key blablabla -``` - -For full documentation of command line switches read [readme](https://github.com/ovhemert/pino-datadog#readme) - - -### pino-elasticsearch - -[pino-elasticsearch][pino-elasticsearch] uploads the log lines in bulk -to [Elasticsearch][elasticsearch], to be displayed in [Kibana][kibana]. - -It is extremely simple to use and setup - -```sh -$ node app.js | pino-elasticsearch -``` - -Assuming Elasticsearch is running on localhost. - -To connect to an external elasticsearch instance (recommended for production): - -* Check that `network.host` is defined in the `elasticsearch.yml` configuration file. See [elasticsearch Network Settings documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#common-network-settings) for more details. -* Launch: - -```sh -$ node app.js | pino-elasticsearch --node http://192.168.1.42:9200 -``` - -Assuming Elasticsearch is running on `192.168.1.42`. - -To connect to AWS Elasticsearch: - -```sh -$ node app.js | pino-elasticsearch --node https://es-url.us-east-1.es.amazonaws.com --es-version 6 -``` - -Then [create an index pattern](https://www.elastic.co/guide/en/kibana/current/setup.html) on `'pino'` (the default index key for `pino-elasticsearch`) on the Kibana instance. - -[pino-elasticsearch]: https://github.com/pinojs/pino-elasticsearch -[elasticsearch]: https://www.elastic.co/products/elasticsearch -[kibana]: https://www.elastic.co/products/kibana - - -### pino-mq - -The `pino-mq` transport will take all messages received on `process.stdin` and send them over a message bus using JSON serialization. - -This useful for: - -* moving backpressure from application to broker -* transforming messages pressure to another component - -``` -node app.js | pino-mq -u "amqp://guest:guest@localhost/" -q "pino-logs" -``` - -Alternatively a configuration file can be used: - -``` -node app.js | pino-mq -c pino-mq.json -``` - -A base configuration file can be initialized with: - -``` -pino-mq -g -``` - -For full documentation of command line switches and configuration see [the `pino-mq` readme](https://github.com/itavy/pino-mq#readme) - - -### pino-papertrail -pino-papertrail is a transport that will forward logs to the [papertrail](https://papertrailapp.com) log service through an UDPv4 socket. - -Given an application `foo` that logs via pino, and a papertrail destination that collects logs on port UDP `12345` on address `bar.papertrailapp.com`, you would use `pino-papertrail` -like so: - -``` -node yourapp.js | pino-papertrail --host bar.papertrailapp.com --port 12345 --appname foo -``` - - -for full documentation of command line switches read [readme](https://github.com/ovhemert/pino-papertrail#readme) - - -### pino-mysql - -[pino-mysql][pino-mysql] loads pino logs into [MySQL][MySQL] and [MariaDB][MariaDB]. - -```sh -$ node app.js | pino-mysql -c db-configuration.json -``` - -`pino-mysql` can extract and save log fields into corresponding database field -and/or save the entire log stream as a [JSON Data Type][JSONDT]. - -For full documentation and command line switches read the [readme][pino-mysql]. - -[pino-mysql]: https://www.npmjs.com/package/pino-mysql -[MySQL]: https://www.mysql.com/ -[MariaDB]: https://mariadb.org/ -[JSONDT]: https://dev.mysql.com/doc/refman/8.0/en/json.html - - -### pino-redis - -[pino-redis][pino-redis] loads pino logs into [Redis][Redis]. - -```sh -$ node app.js | pino-redis -U redis://username:password@localhost:6379 -``` - -[pino-redis]: https://github.com/buianhthang/pino-redis -[Redis]: https://redis.io/ - - -### pino-sentry - -[pino-sentry][pino-sentry] loads pino logs into [Sentry][Sentry]. - -```sh -$ node app.js | pino-sentry --dsn=https://******@sentry.io/12345 -``` - -For full documentation of command line switches see the [pino-sentry readme](https://github.com/aandrewww/pino-sentry/blob/master/README.md) - -[pino-sentry]: https://www.npmjs.com/package/pino-sentry -[Sentry]: https://sentry.io/ - - -### pino-socket - -[pino-socket][pino-socket] is a transport that will forward logs to a IPv4 -UDP or TCP socket. - -As an example, use `socat` to fake a listener: - -```sh -$ socat -v udp4-recvfrom:6000,fork exec:'/bin/cat' -``` - -Then run an application that uses `pino` for logging: - -```sh -$ node app.js | pino-socket -p 6000 -``` - -Logs from the application should be observed on both consoles. - -[pino-socket]: https://www.npmjs.com/package/pino-socket - -#### Logstash - -The [pino-socket][pino-socket] module can also be used to upload logs to -[Logstash][logstash] via: - -``` -$ node app.js | pino-socket -a 127.0.0.1 -p 5000 -m tcp -``` - -Assuming logstash is running on the same host and configured as -follows: - -``` -input { - tcp { - port => 5000 - } -} - -filter { - json { - source => "message" - } -} - -output { - elasticsearch { - hosts => "127.0.0.1:9200" - } -} -``` - -See to learn -how to setup [Kibana][kibana]. - -For Docker users, see -https://github.com/deviantony/docker-elk to setup an ELK stack. - - -### pino-stackdriver -The [pino-stackdriver](https://www.npmjs.com/package/pino-stackdriver) module is a transport that will forward logs to the [Google Stackdriver](https://cloud.google.com/logging/) log service through it's API. - -Given an application `foo` that logs via pino, a stackdriver log project `bar` and credentials in the file `/credentials.json`, you would use `pino-stackdriver` -like so: - -``` sh -$ node foo | pino-stackdriver --project bar --credentials /credentials.json -``` - -For full documentation of command line switches read [readme](https://github.com/ovhemert/pino-stackdriver#readme) - - -### pino-syslog - -[pino-syslog][pino-syslog] is a transforming transport that converts -`pino` NDJSON logs to [RFC3164][rfc3164] compatible log messages. The `pino-syslog` module does not -forward the logs anywhere, it merely re-writes the messages to `stdout`. But -when used in combination with `pino-socket` the log messages can be relayed to a syslog server: - -```sh -$ node app.js | pino-syslog | pino-socket -a syslog.example.com -``` - -Example output for the "hello world" log: - -``` -<134>Apr 1 16:44:58 MacBook-Pro-3 none[94473]: {"pid":94473,"hostname":"MacBook-Pro-3","level":30,"msg":"hello world","time":1459529098958,"v":1} -``` - -[pino-syslog]: https://www.npmjs.com/package/pino-syslog -[rfc3164]: https://tools.ietf.org/html/rfc3164 -[logstash]: https://www.elastic.co/products/logstash - - - -### pino-websocket - -[pino-websocket](https://www.npmjs.com/package/@abeai/pino-websocket) is a transport that will forward each log line to a websocket server. - -```sh -$ node app.js | pino-websocket -a my-websocket-server.example.com -p 3004 -``` - -For full documentation of command line switches read [readme](https://github.com/abeai/pino-webscoket#README) - - -### pino-http-send - -[pino-http-send](https://npmjs.com/package/pino-http-send) is a configurable and low overhead -transport that will batch logs and send to a specified URL. - -```console -$ node app.js | pino-http-send -u http://localhost:8080/logs -``` diff --git a/node_modules/pino/docs/web.md b/node_modules/pino/docs/web.md deleted file mode 100644 index b8f9890..0000000 --- a/node_modules/pino/docs/web.md +++ /dev/null @@ -1,230 +0,0 @@ -# Web Frameworks - -Since HTTP logging is a primary use case, Pino has first class support for the Node.js -web framework ecosystem. - -+ [Pino with Fastify](#fastify) -+ [Pino with Express](#express) -+ [Pino with Hapi](#hapi) -+ [Pino with Restify](#restify) -+ [Pino with Koa](#koa) -+ [Pino with Node core `http`](#http) -+ [Pino with Nest](#nest) - - -## Pino with Fastify - -The Fastify web framework comes bundled with Pino by default, simply set Fastify's -`logger` option to `true` and use `request.log` or `reply.log` for log messages that correspond -to each individual request: - -```js -const fastify = require('fastify')({ - logger: true -}) -fastify.get('/', async (request, reply) => { - request.log.info('something') - return { hello: 'world' } -}) -``` - -The `logger` option can also be set to an object, which will be passed through directly -as the [`pino` options object](/docs/api.md#options-object). - -See the [fastify documentation](https://www.fastify.io/docs/latest/Logging/) for more information. - - -## Pino with Express - -```sh -npm install express-pino-logger -``` - -```js -const app = require('express')() -const pino = require('express-pino-logger')() - -app.use(pino) - -app.get('/', function (req, res) { - req.log.info('something') - res.send('hello world') -}) - -app.listen(3000) -``` - -See the [express-pino-logger readme](http://npm.im/express-pino-logger) for more info. - - -## Pino with Hapi - -```sh -npm install hapi-pino -``` - -```js -'use strict' - -require('make-promises-safe') - -const Hapi = require('hapi') - -async function start () { - // Create a server with a host and port - const server = Hapi.server({ - host: 'localhost', - port: 3000 - }) - - // Add the route - server.route({ - method: 'GET', - path: '/', - handler: async function (request, h) { - // request.log is HAPI standard way of logging - request.log(['a', 'b'], 'Request into hello world') - - // a pino instance can also be used, which will be faster - request.logger.info('In handler %s', request.path) - - return 'hello world' - } - }) - - await server.register({ - plugin: require('.'), - options: { - prettyPrint: process.env.NODE_ENV !== 'production' - } - }) - - // also as a decorated API - server.logger().info('another way for accessing it') - - // and through Hapi standard logging system - server.log(['subsystem'], 'third way for accessing it') - - await server.start() - - return server -} - -start().catch((err) => { - console.log(err) - process.exit(1) -}) -``` - -See the [hapi-pino readme](http://npm.im/hapi-pino) for more info. - - -## Pino with Restify - -```sh -npm install restify-pino-logger -``` - -```js -const server = require('restify').createServer({name: 'server'}) -const pino = require('restify-pino-logger')() - -server.use(pino) - -server.get('/', function (req, res) { - req.log.info('something') - res.send('hello world') -}) - -server.listen(3000) -``` - -See the [restify-pino-logger readme](http://npm.im/restify-pino-logger) for more info. - - -## Pino with Koa - -### Koa - -```sh -npm install koa-pino-logger -``` - -```js -const Koa = require('koa') -const app = new Koa() -const pino = require('koa-pino-logger')() - -app.use(pino) - -app.use((ctx) => { - ctx.log.info('something else') - ctx.body = 'hello world' -}) - -app.listen(3000) -``` - -See the [koa-pino-logger readme](https://github.com/pinojs/koa-pino-logger) for more info. - - -## Pino with Node core `http` - -```sh -npm install pino-http -``` - -```js -const http = require('http') -const server = http.createServer(handle) -const logger = require('pino-http')() - -function handle (req, res) { - logger(req, res) - req.log.info('something else') - res.end('hello world') -} - -server.listen(3000) -``` - -See the [pino-http readme](http://npm.im/pino-http) for more info. - - - -## Pino with Nest - -```sh -npm install nestjs-pino -``` - -```ts -import { NestFactory } from '@nestjs/core' -import { Controller, Get, Module } from '@nestjs/common' -import { LoggerModule, Logger } from 'nestjs-pino' - -@Controller() -export class AppController { - constructor(private readonly logger: Logger) {} - - @Get() - getHello() { - this.logger.log('something') - return `Hello world` - } -} - -@Module({ - controllers: [AppController], - imports: [LoggerModule.forRoot()] -}) -class MyModule {} - -async function bootstrap() { - const app = await NestFactory.create(MyModule) - await app.listen(3000) -} -bootstrap() -``` - -See the [nestjs-pino readme](http://npm.im/nestjs-pino) for more info. diff --git a/node_modules/pino/example.js b/node_modules/pino/example.js deleted file mode 100644 index 5e39692..0000000 --- a/node_modules/pino/example.js +++ /dev/null @@ -1,35 +0,0 @@ -'use strict' - -const pino = require('./')() - -pino.info('hello world') -pino.error('this is at error level') -pino.info('the answer is %d', 42) -pino.info({ obj: 42 }, 'hello world') -pino.info({ obj: 42, b: 2 }, 'hello world') -pino.info({ nested: { obj: 42 } }, 'nested') -setImmediate(() => { - pino.info('after setImmediate') -}) -pino.error(new Error('an error')) - -const child = pino.child({ a: 'property' }) -child.info('hello child!') - -const childsChild = child.child({ another: 'property' }) -childsChild.info('hello baby..') - -pino.debug('this should be mute') - -pino.level = 'trace' - -pino.debug('this is a debug statement') - -pino.child({ another: 'property' }).debug('this is a debug statement via child') -pino.trace('this is a trace statement') - -pino.debug('this is a "debug" statement with "') - -pino.info(new Error('kaboom')) - -pino.info(new Error('kaboom'), 'with', 'a', 'message') diff --git a/node_modules/pino/lib/levels.js b/node_modules/pino/lib/levels.js deleted file mode 100644 index 0f60f7b..0000000 --- a/node_modules/pino/lib/levels.js +++ /dev/null @@ -1,183 +0,0 @@ -'use strict' -const flatstr = require('flatstr') -const { - lsCacheSym, - levelValSym, - useLevelLabelsSym, - levelKeySym, - useOnlyCustomLevelsSym, - streamSym -} = require('./symbols') -const { noop, genLog } = require('./tools') - -const levels = { - trace: 10, - debug: 20, - info: 30, - warn: 40, - error: 50, - fatal: 60 -} -const logFatal = genLog(levels.fatal) -const levelMethods = { - fatal (...args) { - const stream = this[streamSym] - logFatal.call(this, ...args) - if (typeof stream.flushSync === 'function') { - try { - stream.flushSync() - } catch (e) { - // https://github.com/pinojs/pino/pull/740#discussion_r346788313 - } - } - }, - error: genLog(levels.error), - warn: genLog(levels.warn), - info: genLog(levels.info), - debug: genLog(levels.debug), - trace: genLog(levels.trace) -} - -const nums = Object.keys(levels).reduce((o, k) => { - o[levels[k]] = k - return o -}, {}) - -const initialLsCache = Object.keys(nums).reduce((o, k) => { - o[k] = flatstr('{"level":' + Number(k)) - return o -}, {}) - -function genLsCache (instance) { - const levelName = instance[levelKeySym] - instance[lsCacheSym] = Object.keys(instance.levels.labels).reduce((o, k) => { - o[k] = instance[useLevelLabelsSym] - ? `{"${levelName}":"${instance.levels.labels[k]}"` - : flatstr(`{"${levelName}":` + Number(k)) - return o - }, Object.assign({}, instance[lsCacheSym])) - return instance -} - -function isStandardLevel (level, useOnlyCustomLevels) { - if (useOnlyCustomLevels) { - return false - } - - switch (level) { - case 'fatal': - case 'error': - case 'warn': - case 'info': - case 'debug': - case 'trace': - return true - default: - return false - } -} - -function setLevel (level) { - const { labels, values } = this.levels - if (typeof level === 'number') { - if (labels[level] === undefined) throw Error('unknown level value' + level) - level = labels[level] - } - if (values[level] === undefined) throw Error('unknown level ' + level) - const preLevelVal = this[levelValSym] - const levelVal = this[levelValSym] = values[level] - const useOnlyCustomLevelsVal = this[useOnlyCustomLevelsSym] - - for (var key in values) { - if (levelVal > values[key]) { - this[key] = noop - continue - } - this[key] = isStandardLevel(key, useOnlyCustomLevelsVal) ? levelMethods[key] : genLog(values[key]) - } - - this.emit( - 'level-change', - level, - levelVal, - labels[preLevelVal], - preLevelVal - ) -} - -function getLevel (level) { - const { levels, levelVal } = this - return levels.labels[levelVal] -} - -function isLevelEnabled (logLevel) { - const { values } = this.levels - const logLevelVal = values[logLevel] - return logLevelVal !== undefined && (logLevelVal >= this[levelValSym]) -} - -function mappings (customLevels = null, useOnlyCustomLevels = false) { - const customNums = customLevels ? Object.keys(customLevels).reduce((o, k) => { - o[customLevels[k]] = k - return o - }, {}) : null - - const labels = Object.assign( - Object.create(Object.prototype, { Infinity: { value: 'silent' } }), - useOnlyCustomLevels ? null : nums, - customNums - ) - const values = Object.assign( - Object.create(Object.prototype, { silent: { value: Infinity } }), - useOnlyCustomLevels ? null : levels, - customLevels - ) - return { labels, values } -} - -function assertDefaultLevelFound (defaultLevel, customLevels, useOnlyCustomLevels) { - if (typeof defaultLevel === 'number') { - const values = [].concat( - Object.keys(customLevels || {}).map(key => customLevels[key]), - useOnlyCustomLevels ? [] : Object.keys(nums).map(level => +level), - Infinity - ) - if (!values.includes(defaultLevel)) { - throw Error(`default level:${defaultLevel} must be included in custom levels`) - } - return - } - - const labels = Object.assign( - Object.create(Object.prototype, { silent: { value: Infinity } }), - useOnlyCustomLevels ? null : levels, - customLevels - ) - if (!(defaultLevel in labels)) { - throw Error(`default level:${defaultLevel} must be included in custom levels`) - } -} - -function assertNoLevelCollisions (levels, customLevels) { - const { labels, values } = levels - for (const k in customLevels) { - if (k in values) { - throw Error('levels cannot be overridden') - } - if (customLevels[k] in labels) { - throw Error('pre-existing level values cannot be used for new levels') - } - } -} - -module.exports = { - initialLsCache, - genLsCache, - levelMethods, - getLevel, - setLevel, - isLevelEnabled, - mappings, - assertNoLevelCollisions, - assertDefaultLevelFound -} diff --git a/node_modules/pino/lib/meta.js b/node_modules/pino/lib/meta.js deleted file mode 100644 index 21a43e9..0000000 --- a/node_modules/pino/lib/meta.js +++ /dev/null @@ -1,7 +0,0 @@ -'use strict' - -const { version } = require('../package.json') - -const LOG_VERSION = 1 - -module.exports = { version, LOG_VERSION } diff --git a/node_modules/pino/lib/proto.js b/node_modules/pino/lib/proto.js deleted file mode 100644 index 5099727..0000000 --- a/node_modules/pino/lib/proto.js +++ /dev/null @@ -1,167 +0,0 @@ -'use strict' - -/* eslint no-prototype-builtins: 0 */ - -const { EventEmitter } = require('events') -const SonicBoom = require('sonic-boom') -const flatstr = require('flatstr') -const { - lsCacheSym, - levelValSym, - setLevelSym, - getLevelSym, - chindingsSym, - mixinSym, - asJsonSym, - messageKeySym, - writeSym, - timeSym, - timeSliceIndexSym, - streamSym, - serializersSym, - useOnlyCustomLevelsSym, - needsMetadataGsym -} = require('./symbols') -const { - getLevel, - setLevel, - isLevelEnabled, - mappings, - initialLsCache, - genLsCache, - assertNoLevelCollisions -} = require('./levels') -const { - asChindings, - asJson -} = require('./tools') -const { - version, - LOG_VERSION -} = require('./meta') - -// note: use of class is satirical -// https://github.com/pinojs/pino/pull/433#pullrequestreview-127703127 -const constructor = class Pino {} -const prototype = { - constructor, - child, - bindings, - setBindings, - flush, - isLevelEnabled, - version, - get level () { return this[getLevelSym]() }, - set level (lvl) { return this[setLevelSym](lvl) }, - get levelVal () { return this[levelValSym] }, - set levelVal (n) { throw Error('levelVal is read-only') }, - [lsCacheSym]: initialLsCache, - [writeSym]: write, - [asJsonSym]: asJson, - [getLevelSym]: getLevel, - [setLevelSym]: setLevel, - LOG_VERSION -} - -Object.setPrototypeOf(prototype, EventEmitter.prototype) - -module.exports = prototype - -function child (bindings) { - const { level } = this - const serializers = this[serializersSym] - const chindings = asChindings(this, bindings) - const instance = Object.create(this) - if (bindings.hasOwnProperty('serializers') === true) { - instance[serializersSym] = Object.create(null) - - for (var k in serializers) { - instance[serializersSym][k] = serializers[k] - } - const parentSymbols = Object.getOwnPropertySymbols(serializers) - for (var i = 0; i < parentSymbols.length; i++) { - const ks = parentSymbols[i] - instance[serializersSym][ks] = serializers[ks] - } - - for (var bk in bindings.serializers) { - instance[serializersSym][bk] = bindings.serializers[bk] - } - const bindingsSymbols = Object.getOwnPropertySymbols(bindings.serializers) - for (var bi = 0; bi < bindingsSymbols.length; bi++) { - const bks = bindingsSymbols[bi] - instance[serializersSym][bks] = bindings.serializers[bks] - } - } else instance[serializersSym] = serializers - if (bindings.hasOwnProperty('customLevels') === true) { - assertNoLevelCollisions(this.levels, bindings.customLevels) - instance.levels = mappings(bindings.customLevels, instance[useOnlyCustomLevelsSym]) - genLsCache(instance) - } - instance[chindingsSym] = chindings - const childLevel = bindings.level || level - instance[setLevelSym](childLevel) - - return instance -} - -function bindings () { - const chindings = this[chindingsSym] - var chindingsJson = `{${chindings.substr(1)}}` // at least contains ,"pid":7068,"hostname":"myMac" - var bindingsFromJson = JSON.parse(chindingsJson) - delete bindingsFromJson.pid - delete bindingsFromJson.hostname - return bindingsFromJson -} - -function setBindings (newBindings) { - const chindings = asChindings(this, newBindings) - this[chindingsSym] = chindings -} - -function write (_obj, msg, num) { - const t = this[timeSym]() - const messageKey = this[messageKeySym] - const mixin = this[mixinSym] - const objError = _obj instanceof Error - var obj - - if (_obj === undefined || _obj === null) { - obj = mixin ? mixin() : {} - obj[messageKey] = msg - } else { - obj = Object.assign(mixin ? mixin() : {}, _obj) - if (msg) { - obj[messageKey] = msg - } else if (objError) { - obj[messageKey] = _obj.message - } - - if (objError) { - obj.stack = _obj.stack - if (!obj.type) { - obj.type = 'Error' - } - } - } - - const s = this[asJsonSym](obj, num, t) - - const stream = this[streamSym] - if (stream[needsMetadataGsym] === true) { - stream.lastLevel = num - // TODO remove in the next major release, - // it is not needed anymore - stream.lastMsg = msg - stream.lastObj = obj - stream.lastTime = t.slice(this[timeSliceIndexSym]) - stream.lastLogger = this // for child loggers - } - if (stream instanceof SonicBoom) stream.write(s) - else stream.write(flatstr(s)) -} - -function flush () { - const stream = this[streamSym] - if ('flush' in stream) stream.flush() -} diff --git a/node_modules/pino/lib/redaction.js b/node_modules/pino/lib/redaction.js deleted file mode 100644 index c1dd721..0000000 --- a/node_modules/pino/lib/redaction.js +++ /dev/null @@ -1,104 +0,0 @@ -'use strict' - -const fastRedact = require('fast-redact') -const { redactFmtSym, wildcardFirstSym } = require('./symbols') -const { rx, validator } = fastRedact - -const validate = validator({ - ERR_PATHS_MUST_BE_STRINGS: () => 'pino – redacted paths must be strings', - ERR_INVALID_PATH: (s) => `pino – redact paths array contains an invalid path (${s})` -}) - -const CENSOR = '[Redacted]' -const strict = false // TODO should this be configurable? - -function redaction (opts, serialize) { - const { paths, censor } = handle(opts) - - const shape = paths.reduce((o, str) => { - rx.lastIndex = 0 - const first = rx.exec(str) - const next = rx.exec(str) - - // ns is the top-level path segment, brackets + quoting removed. - let ns = first[1] !== undefined - ? first[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/, '$1') - : first[0] - - if (ns === '*') { - ns = wildcardFirstSym - } - - // top level key: - if (next === null) { - o[ns] = null - return o - } - - // path with at least two segments: - // if ns is already redacted at the top level, ignore lower level redactions - if (o[ns] === null) { - return o - } - - const { index } = next - const nextPath = `${str.substr(index, str.length - 1)}` - - o[ns] = o[ns] || [] - - // shape is a mix of paths beginning with literal values and wildcard - // paths [ "a.b.c", "*.b.z" ] should reduce to a shape of - // { "a": [ "b.c", "b.z" ], *: [ "b.z" ] } - // note: "b.z" is in both "a" and * arrays because "a" matches the wildcard. - // (* entry has wildcardFirstSym as key) - if (ns !== wildcardFirstSym && o[ns].length === 0) { - // first time ns's get all '*' redactions so far - o[ns].push(...(o[wildcardFirstSym] || [])) - } - - if (ns === wildcardFirstSym) { - // new * path gets added to all previously registered literal ns's. - Object.keys(o).forEach(function (k) { - if (o[k]) { - o[k].push(nextPath) - } - }) - } - - o[ns].push(nextPath) - return o - }, {}) - - // the redactor assigned to the format symbol key - // provides top level redaction for instances where - // an object is interpolated into the msg string - const result = { - [redactFmtSym]: fastRedact({ paths, censor, serialize, strict }) - } - - const topCensor = (...args) => - typeof censor === 'function' ? serialize(censor(...args)) : serialize(censor) - - return [...Object.keys(shape), ...Object.getOwnPropertySymbols(shape)].reduce((o, k) => { - // top level key: - if (shape[k] === null) o[k] = topCensor - else o[k] = fastRedact({ paths: shape[k], censor, serialize, strict }) - return o - }, result) -} - -function handle (opts) { - if (Array.isArray(opts)) { - opts = { paths: opts, censor: CENSOR } - validate(opts) - return opts - } - var { paths, censor = CENSOR, remove } = opts - if (Array.isArray(paths) === false) { throw Error('pino – redact must contain an array of strings') } - if (remove === true) censor = undefined - validate({ paths, censor }) - - return { paths, censor } -} - -module.exports = redaction diff --git a/node_modules/pino/lib/symbols.js b/node_modules/pino/lib/symbols.js deleted file mode 100644 index 13d3662..0000000 --- a/node_modules/pino/lib/symbols.js +++ /dev/null @@ -1,64 +0,0 @@ -'use strict' - -const setLevelSym = Symbol('pino.setLevel') -const getLevelSym = Symbol('pino.getLevel') -const levelValSym = Symbol('pino.levelVal') -const useLevelLabelsSym = Symbol('pino.useLevelLabels') -const levelKeySym = Symbol('pino.levelKey') -const useOnlyCustomLevelsSym = Symbol('pino.useOnlyCustomLevels') -const mixinSym = Symbol('pino.mixin') - -const lsCacheSym = Symbol('pino.lsCache') -const chindingsSym = Symbol('pino.chindings') -const parsedChindingsSym = Symbol('pino.parsedChindings') - -const asJsonSym = Symbol('pino.asJson') -const writeSym = Symbol('pino.write') -const redactFmtSym = Symbol('pino.redactFmt') - -const timeSym = Symbol('pino.time') -const timeSliceIndexSym = Symbol('pino.timeSliceIndex') -const streamSym = Symbol('pino.stream') -const stringifySym = Symbol('pino.stringify') -const stringifiersSym = Symbol('pino.stringifiers') -const endSym = Symbol('pino.end') -const formatOptsSym = Symbol('pino.formatOpts') -const messageKeySym = Symbol('pino.messageKey') -const nestedKeySym = Symbol('pino.nestedKey') - -const wildcardFirstSym = Symbol('pino.wildcardFirst') - -// public symbols, no need to use the same pino -// version for these -const serializersSym = Symbol.for('pino.serializers') -const wildcardGsym = Symbol.for('pino.*') -const needsMetadataGsym = Symbol.for('pino.metadata') - -module.exports = { - setLevelSym, - getLevelSym, - levelValSym, - useLevelLabelsSym, - mixinSym, - lsCacheSym, - chindingsSym, - parsedChindingsSym, - asJsonSym, - writeSym, - serializersSym, - redactFmtSym, - timeSym, - timeSliceIndexSym, - streamSym, - stringifySym, - stringifiersSym, - endSym, - formatOptsSym, - messageKeySym, - nestedKeySym, - wildcardFirstSym, - levelKeySym, - wildcardGsym, - needsMetadataGsym, - useOnlyCustomLevelsSym -} diff --git a/node_modules/pino/lib/time.js b/node_modules/pino/lib/time.js deleted file mode 100644 index 420a028..0000000 --- a/node_modules/pino/lib/time.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const nullTime = () => '' - -const epochTime = () => `,"time":${Date.now()}` - -const unixTime = () => `,"time":${Math.round(Date.now() / 1000.0)}` - -const isoTime = () => `,"time":"${new Date(Date.now()).toISOString()}"` // using Date.now() for testability - -module.exports = { nullTime, epochTime, unixTime, isoTime } diff --git a/node_modules/pino/lib/tools.js b/node_modules/pino/lib/tools.js deleted file mode 100644 index 22aa0d3..0000000 --- a/node_modules/pino/lib/tools.js +++ /dev/null @@ -1,386 +0,0 @@ -'use strict' - -/* eslint no-prototype-builtins: 0 */ - -const format = require('quick-format-unescaped') -const { mapHttpRequest, mapHttpResponse } = require('pino-std-serializers') -const SonicBoom = require('sonic-boom') -const stringifySafe = require('fast-safe-stringify') -const { - lsCacheSym, - chindingsSym, - parsedChindingsSym, - writeSym, - serializersSym, - formatOptsSym, - endSym, - stringifiersSym, - stringifySym, - wildcardFirstSym, - needsMetadataGsym, - wildcardGsym, - redactFmtSym, - streamSym, - nestedKeySym -} = require('./symbols') - -function noop () {} - -function genLog (z) { - return function LOG (o, ...n) { - if (typeof o === 'object' && o !== null) { - if (o.method && o.headers && o.socket) { - o = mapHttpRequest(o) - } else if (typeof o.setHeader === 'function') { - o = mapHttpResponse(o) - } - if (this[nestedKeySym]) o = { [this[nestedKeySym]]: o } - this[writeSym](o, format(null, n, this[formatOptsSym]), z) - } else this[writeSym](null, format(o, n, this[formatOptsSym]), z) - } -} - -// magically escape strings for json -// relying on their charCodeAt -// everything below 32 needs JSON.stringify() -// 34 and 92 happens all the time, so we -// have a fast case for them -function asString (str) { - var result = '' - var last = 0 - var found = false - var point = 255 - const l = str.length - if (l > 100) { - return JSON.stringify(str) - } - for (var i = 0; i < l && point >= 32; i++) { - point = str.charCodeAt(i) - if (point === 34 || point === 92) { - result += str.slice(last, i) + '\\' - last = i - found = true - } - } - if (!found) { - result = str - } else { - result += str.slice(last) - } - return point < 32 ? JSON.stringify(str) : '"' + result + '"' -} - -function asJson (obj, num, time) { - const stringify = this[stringifySym] - const stringifiers = this[stringifiersSym] - const end = this[endSym] - const chindings = this[chindingsSym] - const serializers = this[serializersSym] - var data = this[lsCacheSym][num] + time - - // we need the child bindings added to the output first so instance logged - // objects can take precedence when JSON.parse-ing the resulting log line - data = data + chindings - - var value - var notHasOwnProperty = obj.hasOwnProperty === undefined - if (serializers[wildcardGsym]) { - obj = serializers[wildcardGsym](obj) - } - const wildcardStringifier = stringifiers[wildcardFirstSym] - for (var key in obj) { - value = obj[key] - if ((notHasOwnProperty || obj.hasOwnProperty(key)) && value !== undefined) { - value = serializers[key] ? serializers[key](value) : value - - const stringifier = stringifiers[key] || wildcardStringifier - - switch (typeof value) { - case 'undefined': - case 'function': - continue - case 'number': - /* eslint no-fallthrough: "off" */ - if (Number.isFinite(value) === false) { - value = null - } - // this case explicity falls through to the next one - case 'boolean': - if (stringifier) value = stringifier(value) - break - case 'string': - value = (stringifier || asString)(value) - break - default: - value = (stringifier || stringify)(value) - } - if (value === undefined) continue - data += ',"' + key + '":' + value - } - } - - return data + end -} - -function asChindings (instance, bindings) { - if (!bindings) { - throw Error('missing bindings for child Pino') - } - var key - var value - var data = instance[chindingsSym] - const stringify = instance[stringifySym] - const stringifiers = instance[stringifiersSym] - const serializers = instance[serializersSym] - if (serializers[wildcardGsym]) { - bindings = serializers[wildcardGsym](bindings) - } - for (key in bindings) { - value = bindings[key] - const valid = key !== 'level' && - key !== 'serializers' && - key !== 'customLevels' && - bindings.hasOwnProperty(key) && - value !== undefined - if (valid === true) { - value = serializers[key] ? serializers[key](value) : value - value = (stringifiers[key] || stringify)(value) - if (value === undefined) continue - data += ',"' + key + '":' + value - } - } - return data -} - -function getPrettyStream (opts, prettifier, dest, instance) { - if (prettifier && typeof prettifier === 'function') { - prettifier = prettifier.bind(instance) - return prettifierMetaWrapper(prettifier(opts), dest) - } - try { - var prettyFactory = require('pino-pretty') - prettyFactory.asMetaWrapper = prettifierMetaWrapper - return prettifierMetaWrapper(prettyFactory(opts), dest) - } catch (e) { - throw Error('Missing `pino-pretty` module: `pino-pretty` must be installed separately') - } -} - -function prettifierMetaWrapper (pretty, dest) { - var warned = false - return { - [needsMetadataGsym]: true, - lastLevel: 0, - lastMsg: null, - lastObj: null, - lastLogger: null, - flushSync () { - if (warned) { - return - } - warned = true - setMetadataProps(dest, this) - dest.write(pretty(Object.assign({ - level: 40, // warn - msg: 'pino.final with prettyPrint does not support flushing', - time: Date.now() - }, this.chindings()))) - }, - chindings () { - const lastLogger = this.lastLogger - var chindings = null - - // protection against flushSync being called before logging - // anything - if (!lastLogger) { - return null - } - - if (lastLogger.hasOwnProperty(parsedChindingsSym)) { - chindings = lastLogger[parsedChindingsSym] - } else { - chindings = JSON.parse('{"v":1' + lastLogger[chindingsSym] + '}') - lastLogger[parsedChindingsSym] = chindings - } - - return chindings - }, - write (chunk) { - const lastLogger = this.lastLogger - const chindings = this.chindings() - - var time = this.lastTime - - if (time.match(/^\d+/)) { - time = parseInt(time) - } - - var lastObj = this.lastObj - var errorProps = null - - const obj = Object.assign({ - level: this.lastLevel, - time - }, chindings, lastObj, errorProps) - - const serializers = lastLogger[serializersSym] - const keys = Object.keys(serializers) - var key - - for (var i = 0; i < keys.length; i++) { - key = keys[i] - if (obj[key] !== undefined) { - obj[key] = serializers[key](obj[key]) - } - } - - const stringifiers = lastLogger[stringifiersSym] - const redact = stringifiers[redactFmtSym] - - const formatted = pretty(typeof redact === 'function' ? redact(obj) : obj) - if (formatted === undefined) return - - setMetadataProps(dest, this) - dest.write(formatted) - } - } -} - -function hasBeenTampered (stream) { - return stream.write !== stream.constructor.prototype.write -} - -function buildSafeSonicBoom (dest, buffer = 0, sync = true) { - const stream = new SonicBoom(dest, buffer, sync) - stream.on('error', filterBrokenPipe) - return stream - - function filterBrokenPipe (err) { - // TODO verify on Windows - if (err.code === 'EPIPE') { - // If we get EPIPE, we should stop logging here - // however we have no control to the consumer of - // SonicBoom, so we just overwrite the write method - stream.write = noop - stream.end = noop - stream.flushSync = noop - stream.destroy = noop - return - } - stream.removeListener('error', filterBrokenPipe) - stream.emit('error', err) - } -} - -function createArgsNormalizer (defaultOptions) { - return function normalizeArgs (instance, opts = {}, stream) { - // support stream as a string - if (typeof opts === 'string') { - stream = buildSafeSonicBoom(opts) - opts = {} - } else if (typeof stream === 'string') { - stream = buildSafeSonicBoom(stream) - } else if (opts instanceof SonicBoom || opts.writable || opts._writableState) { - stream = opts - opts = null - } - opts = Object.assign({}, defaultOptions, opts) - if ('extreme' in opts) { - throw Error('The extreme option has been removed, use pino.extreme instead') - } - if ('onTerminated' in opts) { - throw Error('The onTerminated option has been removed, use pino.final instead') - } - if ('changeLevelName' in opts) { - process.emitWarning( - 'The changeLevelName option is deprecated and will be removed in v7. Use levelKey instead.', - { code: 'changeLevelName_deprecation' } - ) - opts.levelKey = opts.changeLevelName - delete opts.changeLevelName - } - const { enabled, prettyPrint, prettifier, messageKey } = opts - if (enabled === false) opts.level = 'silent' - stream = stream || process.stdout - if (stream === process.stdout && stream.fd >= 0 && !hasBeenTampered(stream)) { - stream = buildSafeSonicBoom(stream.fd) - } - if (prettyPrint) { - const prettyOpts = Object.assign({ messageKey }, prettyPrint) - stream = getPrettyStream(prettyOpts, prettifier, stream, instance) - } - return { opts, stream } - } -} - -function final (logger, handler) { - if (typeof logger === 'undefined' || typeof logger.child !== 'function') { - throw Error('expected a pino logger instance') - } - const hasHandler = (typeof handler !== 'undefined') - if (hasHandler && typeof handler !== 'function') { - throw Error('if supplied, the handler parameter should be a function') - } - const stream = logger[streamSym] - if (typeof stream.flushSync !== 'function') { - throw Error('final requires a stream that has a flushSync method, such as pino.destination and pino.extreme') - } - - const finalLogger = new Proxy(logger, { - get: (logger, key) => { - if (key in logger.levels.values) { - return (...args) => { - logger[key](...args) - stream.flushSync() - } - } - return logger[key] - } - }) - - if (!hasHandler) { - return finalLogger - } - - return (err = null, ...args) => { - try { - stream.flushSync() - } catch (e) { - // it's too late to wait for the stream to be ready - // because this is a final tick scenario. - // in practice there shouldn't be a situation where it isn't - // however, swallow the error just in case (and for easier testing) - } - return handler(err, finalLogger, ...args) - } -} - -function stringify (obj) { - try { - return JSON.stringify(obj) - } catch (_) { - return stringifySafe(obj) - } -} - -function setMetadataProps (dest, that) { - if (dest[needsMetadataGsym] === true) { - dest.lastLevel = that.lastLevel - dest.lastMsg = that.lastMsg - dest.lastObj = that.lastObj - dest.lastTime = that.lastTime - dest.lastLogger = that.lastLogger - } -} - -module.exports = { - noop, - buildSafeSonicBoom, - getPrettyStream, - asChindings, - asJson, - genLog, - createArgsNormalizer, - final, - stringify -} diff --git a/node_modules/pino/package.json b/node_modules/pino/package.json deleted file mode 100644 index 4e4db58..0000000 --- a/node_modules/pino/package.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "_from": "pino@5.17.0", - "_id": "pino@5.17.0", - "_inBundle": false, - "_integrity": "sha512-LqrqmRcJz8etUjyV0ddqB6OTUutCgQULPFg2b4dtijRHUsucaAdBgSUW58vY6RFSX+NT8963F+q0tM6lNwGShA==", - "_location": "/pino", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "pino@5.17.0", - "name": "pino", - "escapedName": "pino", - "rawSpec": "5.17.0", - "saveSpec": null, - "fetchSpec": "5.17.0" - }, - "_requiredBy": [ - "/docker-hub-utils" - ], - "_resolved": "https://registry.npmjs.org/pino/-/pino-5.17.0.tgz", - "_shasum": "b9def314e82402154f89a25d76a31f20ca84b4c8", - "_spec": "pino@5.17.0", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/docker-hub-utils", - "author": { - "name": "Matteo Collina", - "email": "hello@matteocollina.com" - }, - "bin": { - "pino": "bin.js" - }, - "browser": "./browser.js", - "bugs": { - "url": "https://github.com/pinojs/pino/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "David Mark Clements", - "email": "huperekchuno@googlemail.com" - }, - { - "name": "James Sumners", - "email": "james.sumners@gmail.com" - }, - { - "name": "Thomas Watson Steen", - "email": "w@tson.dk", - "url": "https://twitter.com/wa7son" - } - ], - "dependencies": { - "fast-redact": "^2.0.0", - "fast-safe-stringify": "^2.0.7", - "flatstr": "^1.0.12", - "pino-std-serializers": "^2.4.2", - "quick-format-unescaped": "^3.0.3", - "sonic-boom": "^0.7.5" - }, - "deprecated": false, - "description": "super fast, all natural json logger", - "devDependencies": { - "airtap": "2.0.2", - "benchmark": "^2.1.4", - "bole": "^3.0.2", - "bunyan": "^1.8.12", - "cross-env": "^5.2.1", - "docsify-cli": "^4.2.1", - "execa": "^1.0.0", - "fastbench": "^1.0.1", - "flush-write-stream": "^2.0.0", - "import-fresh": "^3.0.0", - "log": "^5.0.0", - "loglevel": "^1.6.4", - "pino-pretty": "^2.6.1", - "pre-commit": "^1.2.2", - "proxyquire": "^2.1.3", - "pump": "^3.0.0", - "qodaa": "^1.0.1", - "semver": "^6.3.0", - "snazzy": "^8.0.0", - "split2": "^3.1.1", - "standard": "^14.2.0", - "steed": "^1.1.3", - "tap": "^12.7.0", - "tape": "^4.11.0", - "through2": "^3.0.1", - "winston": "^3.2.1" - }, - "files": [ - "pino.js", - "bin.js", - "browser.js", - "pretty.js", - "usage.txt", - "test", - "docs", - "example.js", - "lib" - ], - "homepage": "http://getpino.io", - "keywords": [ - "fast", - "logger", - "stream", - "json" - ], - "license": "MIT", - "main": "pino.js", - "name": "pino", - "precommit": "test", - "repository": { - "type": "git", - "url": "git+https://github.com/pinojs/pino.git" - }, - "scripts": { - "bench": "node benchmarks/utils/runbench all", - "bench-basic": "node benchmarks/utils/runbench basic", - "bench-child": "node benchmarks/utils/runbench child", - "bench-child-child": "node benchmarks/utils/runbench child-child", - "bench-child-creation": "node benchmarks/utils/runbench child-creation", - "bench-deep-object": "node benchmarks/utils/runbench deep-object", - "bench-longs-tring": "node benchmarks/utils/runbench long-string", - "bench-multi-arg": "node benchmarks/utils/runbench multi-arg", - "bench-object": "node benchmarks/utils/runbench object", - "browser-test": "airtap --local 8080 test/browser*test.js", - "ci": "standard | snazzy && cross-env TAP_TIMEOUT=480000 NODE_OPTIONS=\"--no-warnings -r qodaa\" tap --no-esm -j 4 --100 test/*test.js", - "cov-ci": "cross-env TAP_TIMEOUT=480000 NODE_OPTIONS=\"--no-warnings -r qodaa\" tap --no-esm -j 4 --100 --coverage-report=lcov test/*test.js", - "cov-ui": "cross-env NODE_OPTIONS=\"--no-warnings -r qodaa\" tap --no-esm -j 4 --coverage-report=html test/*test.js", - "docs": "docsify serve", - "test": "standard | snazzy && cross-env NODE_OPTIONS=\"--no-warnings -r qodaa\" tap --no-esm -j 4 --no-cov test/*test.js", - "update-bench-doc": "node benchmarks/utils/generate-benchmark-doc > docs/benchmarks.md" - }, - "version": "5.17.0" -} diff --git a/node_modules/pino/pino.js b/node_modules/pino/pino.js deleted file mode 100644 index 4138069..0000000 --- a/node_modules/pino/pino.js +++ /dev/null @@ -1,144 +0,0 @@ -'use strict' -const os = require('os') -const stdSerializers = require('pino-std-serializers') -const redaction = require('./lib/redaction') -const time = require('./lib/time') -const proto = require('./lib/proto') -const symbols = require('./lib/symbols') -const { assertDefaultLevelFound, mappings, genLsCache } = require('./lib/levels') -const { - createArgsNormalizer, - asChindings, - final, - stringify, - buildSafeSonicBoom -} = require('./lib/tools') -const { version, LOG_VERSION } = require('./lib/meta') -const { - chindingsSym, - redactFmtSym, - serializersSym, - timeSym, - timeSliceIndexSym, - streamSym, - stringifySym, - stringifiersSym, - setLevelSym, - endSym, - formatOptsSym, - messageKeySym, - nestedKeySym, - useLevelLabelsSym, - levelKeySym, - mixinSym, - useOnlyCustomLevelsSym -} = symbols -const { epochTime, nullTime } = time -const { pid } = process -const hostname = os.hostname() -const defaultErrorSerializer = stdSerializers.err -const defaultOptions = { - level: 'info', - useLevelLabels: false, - messageKey: 'msg', - nestedKey: null, - enabled: true, - prettyPrint: false, - base: { pid, hostname }, - serializers: Object.assign(Object.create(null), { - err: defaultErrorSerializer - }), - timestamp: epochTime, - name: undefined, - redact: null, - customLevels: null, - levelKey: 'level', - useOnlyCustomLevels: false -} - -const normalize = createArgsNormalizer(defaultOptions) - -const serializers = Object.assign(Object.create(null), stdSerializers) - -function pino (...args) { - const instance = {} - const { opts, stream } = normalize(instance, ...args) - const { - redact, - crlf, - serializers, - timestamp, - messageKey, - nestedKey, - base, - name, - level, - customLevels, - useLevelLabels, - levelKey, - mixin, - useOnlyCustomLevels - } = opts - - const stringifiers = redact ? redaction(redact, stringify) : {} - const formatOpts = redact - ? { stringify: stringifiers[redactFmtSym] } - : { stringify } - const end = ',"v":' + LOG_VERSION + '}' + (crlf ? '\r\n' : '\n') - const coreChindings = asChindings.bind(null, { - [chindingsSym]: '', - [serializersSym]: serializers, - [stringifiersSym]: stringifiers, - [stringifySym]: stringify - }) - const chindings = base === null ? '' : (name === undefined) - ? coreChindings(base) : coreChindings(Object.assign({}, base, { name })) - const time = (timestamp instanceof Function) - ? timestamp : (timestamp ? epochTime : nullTime) - const timeSliceIndex = time().indexOf(':') + 1 - - if (useOnlyCustomLevels && !customLevels) throw Error('customLevels is required if useOnlyCustomLevels is set true') - if (mixin && typeof mixin !== 'function') throw Error(`Unknown mixin type "${typeof mixin}" - expected "function"`) - - assertDefaultLevelFound(level, customLevels, useOnlyCustomLevels) - const levels = mappings(customLevels, useOnlyCustomLevels) - - Object.assign(instance, { - levels, - [useLevelLabelsSym]: useLevelLabels, - [levelKeySym]: levelKey, - [useOnlyCustomLevelsSym]: useOnlyCustomLevels, - [streamSym]: stream, - [timeSym]: time, - [timeSliceIndexSym]: timeSliceIndex, - [stringifySym]: stringify, - [stringifiersSym]: stringifiers, - [endSym]: end, - [formatOptsSym]: formatOpts, - [messageKeySym]: messageKey, - [nestedKeySym]: nestedKey, - [serializersSym]: serializers, - [mixinSym]: mixin, - [chindingsSym]: chindings - }) - Object.setPrototypeOf(instance, proto) - - if (customLevels || useLevelLabels || levelKey !== defaultOptions.levelKey) genLsCache(instance) - - instance[setLevelSym](level) - - return instance -} - -pino.extreme = (dest = process.stdout.fd) => buildSafeSonicBoom(dest, 4096, false) -pino.destination = (dest = process.stdout.fd) => buildSafeSonicBoom(dest, 0, true) - -pino.final = final -pino.levels = mappings() -pino.stdSerializers = serializers -pino.stdTimeFunctions = Object.assign({}, time) -pino.symbols = symbols -pino.version = version -pino.LOG_VERSION = LOG_VERSION - -module.exports = pino diff --git a/node_modules/pino/test/basic.test.js b/node_modules/pino/test/basic.test.js deleted file mode 100644 index eeb91b6..0000000 --- a/node_modules/pino/test/basic.test.js +++ /dev/null @@ -1,702 +0,0 @@ -'use strict' -const os = require('os') -const { join } = require('path') -const { readFileSync, existsSync, statSync } = require('fs') -const { test } = require('tap') -const { sink, check, once } = require('./helper') -const pino = require('../') -const { version } = require('../package.json') -const { pid } = process -const hostname = os.hostname() -const watchFileCreated = (filename) => new Promise((resolve, reject) => { - const TIMEOUT = 800 - const INTERVAL = 100 - const threshold = TIMEOUT / INTERVAL - let counter = 0 - const interval = setInterval(() => { - // On some CI runs file is created but not filled - if (existsSync(filename) && statSync(filename).size !== 0) { - clearInterval(interval) - resolve() - } else if (counter <= threshold) { - counter++ - } else { - clearInterval(interval) - reject(new Error(`${filename} was not created.`)) - } - }, INTERVAL) -}) - -test('pino version is exposed on export', async ({ is }) => { - is(pino.version, version) -}) - -test('pino version is exposed on instance', async ({ is }) => { - const instance = pino() - is(instance.version, version) -}) - -test('child instance exposes pino version', async ({ is }) => { - const child = pino().child({ foo: 'bar' }) - is(child.version, version) -}) - -test('bindings are exposed on every instance', async ({ same }) => { - const instance = pino() - same(instance.bindings(), {}) -}) - -test('bindings contain the name and the child bindings', async ({ same }) => { - const instance = pino({ name: 'basicTest', level: 'info' }).child({ foo: 'bar' }).child({ a: 2 }) - same(instance.bindings(), { name: 'basicTest', foo: 'bar', a: 2 }) -}) - -test('set bindings on instance', async ({ same }) => { - const instance = pino({ name: 'basicTest', level: 'info' }) - instance.setBindings({ foo: 'bar' }) - same(instance.bindings(), { name: 'basicTest', foo: 'bar' }) -}) - -test('newly set bindings overwrite old bindings', async ({ same }) => { - const instance = pino({ name: 'basicTest', level: 'info', base: { foo: 'bar' } }) - instance.setBindings({ foo: 'baz' }) - same(instance.bindings(), { name: 'basicTest', foo: 'baz' }) -}) - -test('set bindings on child instance', async ({ same }) => { - const child = pino({ name: 'basicTest', level: 'info' }).child({}) - child.setBindings({ foo: 'bar' }) - same(child.bindings(), { name: 'basicTest', foo: 'bar' }) -}) - -test('child should have bindings set by parent', async ({ same }) => { - const instance = pino({ name: 'basicTest', level: 'info' }) - instance.setBindings({ foo: 'bar' }) - const child = instance.child({}) - same(child.bindings(), { name: 'basicTest', foo: 'bar' }) -}) - -test('child should not share bindings of parent set after child creation', async ({ same }) => { - const instance = pino({ name: 'basicTest', level: 'info' }) - const child = instance.child({}) - instance.setBindings({ foo: 'bar' }) - same(instance.bindings(), { name: 'basicTest', foo: 'bar' }) - same(child.bindings(), { name: 'basicTest' }) -}) - -function levelTest (name, level) { - test(`${name} logs as ${level}`, async ({ is }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - instance[name]('hello world') - check(is, await once(stream, 'data'), level, 'hello world') - }) - - test(`passing objects at level ${name}`, async ({ is, same }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - const obj = { hello: 'world' } - instance[name](obj) - - const result = await once(stream, 'data') - is(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - is(result.pid, pid) - is(result.hostname, hostname) - is(result.level, level) - is(result.hello, 'world') - is(result.v, 1) - same(Object.keys(obj), ['hello']) - }) - - test(`passing an object and a string at level ${name}`, async ({ is, same }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - const obj = { hello: 'world' } - instance[name](obj, 'a string') - const result = await once(stream, 'data') - is(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: level, - msg: 'a string', - hello: 'world', - v: 1 - }) - same(Object.keys(obj), ['hello']) - }) - - test(`overriding object key by string at level ${name}`, async ({ is, same }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - instance[name]({ hello: 'world', msg: 'object' }, 'string') - const result = await once(stream, 'data') - is(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: level, - msg: 'string', - hello: 'world', - v: 1 - }) - }) - - test(`formatting logs as ${name}`, async ({ is }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - instance[name]('hello %d', 42) - const result = await once(stream, 'data') - check(is, result, level, 'hello 42') - }) - - test(`formatting a symbol at level ${name}`, async ({ is }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - - const sym = Symbol('foo') - instance[name]('hello', sym) - - const result = await once(stream, 'data') - - check(is, result, level, 'hello Symbol(foo)') - }) - - test(`passing error with a serializer at level ${name}`, async ({ is, same }) => { - const stream = sink() - const err = new Error('myerror') - const instance = pino({ - serializers: { - err: pino.stdSerializers.err - } - }, stream) - instance.level = name - instance[name]({ err }) - const result = await once(stream, 'data') - is(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: level, - err: { - type: 'Error', - message: err.message, - stack: err.stack - }, - v: 1 - }) - }) - - test(`child logger for level ${name}`, async ({ is, same }) => { - const stream = sink() - const instance = pino(stream) - instance.level = name - const child = instance.child({ hello: 'world' }) - child[name]('hello world') - const result = await once(stream, 'data') - is(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: level, - msg: 'hello world', - hello: 'world', - v: 1 - }) - }) -} - -levelTest('fatal', 60) -levelTest('error', 50) -levelTest('warn', 40) -levelTest('info', 30) -levelTest('debug', 20) -levelTest('trace', 10) - -test('serializers can return undefined to strip field', async ({ is }) => { - const stream = sink() - const instance = pino({ - serializers: { - test () { return undefined } - } - }, stream) - - instance.info({ test: 'sensitive info' }) - const result = await once(stream, 'data') - is('test' in result, false) -}) - -test('does not explode with a circular ref', async ({ doesNotThrow }) => { - const stream = sink() - const instance = pino(stream) - const b = {} - const a = { - hello: b - } - b.a = a // circular ref - doesNotThrow(() => instance.info(a)) -}) - -test('set the name', async ({ is, same }) => { - const stream = sink() - const instance = pino({ - name: 'hello' - }, stream) - instance.fatal('this is fatal') - const result = await once(stream, 'data') - is(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 60, - name: 'hello', - msg: 'this is fatal', - v: 1 - }) -}) - -test('set the messageKey', async ({ is, same }) => { - const stream = sink() - const message = 'hello world' - const messageKey = 'fooMessage' - const instance = pino({ - messageKey - }, stream) - instance.info(message) - const result = await once(stream, 'data') - is(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - fooMessage: message, - v: 1 - }) -}) - -test('set the nestedKey', async ({ is, same }) => { - const stream = sink() - const object = { hello: 'world' } - const nestedKey = 'stuff' - const instance = pino({ - nestedKey - }, stream) - instance.info(object) - const result = await once(stream, 'data') - is(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - stuff: object, - v: 1 - }) -}) - -test('set undefined properties', async ({ is, same }) => { - const stream = sink() - const instance = pino(stream) - instance.info({ hello: 'world', property: undefined }) - const result = await once(stream, 'data') - is(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - hello: 'world', - v: 1 - }) -}) - -test('prototype properties are not logged', async ({ is }) => { - const stream = sink() - const instance = pino(stream) - instance.info(Object.create({ hello: 'world' })) - const { hello } = await once(stream, 'data') - is(hello, undefined) -}) - -test('set the base', async ({ is, same }) => { - const stream = sink() - const instance = pino({ - base: { - a: 'b' - } - }, stream) - - instance.fatal('this is fatal') - const result = await once(stream, 'data') - is(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - a: 'b', - level: 60, - msg: 'this is fatal', - v: 1 - }) -}) - -test('set the base to null', async ({ is, same }) => { - const stream = sink() - const instance = pino({ - base: null - }, stream) - instance.fatal('this is fatal') - const result = await once(stream, 'data') - is(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - level: 60, - msg: 'this is fatal', - v: 1 - }) -}) - -test('set the base to null and use a serializer', async ({ is, same }) => { - const stream = sink() - const instance = pino({ - base: null, - serializers: { - [Symbol.for('pino.*')]: (input) => { - return Object.assign({}, input, { additionalMessage: 'using pino' }) - } - } - }, stream) - instance.fatal('this is fatal too') - const result = await once(stream, 'data') - is(new Date(result.time) <= new Date(), true, 'time is greater than Date.now()') - delete result.time - same(result, { - level: 60, - msg: 'this is fatal too', - additionalMessage: 'using pino', - v: 1 - }) -}) - -test('throw if creating child without bindings', async ({ throws }) => { - const stream = sink() - const instance = pino(stream) - throws(() => instance.child()) -}) - -test('correctly escapes msg strings with stray double quote at end', async ({ same }) => { - const stream = sink() - const instance = pino({ - name: 'hello' - }, stream) - - instance.fatal('this contains "') - const result = await once(stream, 'data') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 60, - name: 'hello', - msg: 'this contains "', - v: 1 - }) -}) - -test('correctly escape msg strings with unclosed double quote', async ({ same }) => { - const stream = sink() - const instance = pino({ - name: 'hello' - }, stream) - instance.fatal('" this contains') - const result = await once(stream, 'data') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 60, - name: 'hello', - msg: '" this contains', - v: 1 - }) -}) - -// https://github.com/pinojs/pino/issues/139 -test('object and format string', async ({ same }) => { - const stream = sink() - const instance = pino(stream) - instance.info({}, 'foo %s', 'bar') - - const result = await once(stream, 'data') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - msg: 'foo bar', - v: 1 - }) -}) - -test('object and format string property', async ({ same }) => { - const stream = sink() - const instance = pino(stream) - instance.info({ answer: 42 }, 'foo %s', 'bar') - const result = await once(stream, 'data') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - msg: 'foo bar', - answer: 42, - v: 1 - }) -}) - -test('correctly strip undefined when returned from toJSON', async ({ is }) => { - const stream = sink() - const instance = pino({ - test: 'this' - }, stream) - instance.fatal({ test: { toJSON () { return undefined } } }) - const result = await once(stream, 'data') - is('test' in result, false) -}) - -test('correctly supports stderr', async ({ same }) => { - // stderr inherits from Stream, rather than Writable - const dest = { - writable: true, - write (result) { - result = JSON.parse(result) - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 60, - msg: 'a message', - v: 1 - }) - } - } - const instance = pino(dest) - instance.fatal('a message') -}) - -test('normalize number to string', async ({ same }) => { - const stream = sink() - const instance = pino(stream) - instance.info(1) - const result = await once(stream, 'data') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - msg: '1', - v: 1 - }) -}) - -test('normalize number to string with an object', async ({ same }) => { - const stream = sink() - const instance = pino(stream) - instance.info({ answer: 42 }, 1) - const result = await once(stream, 'data') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - msg: '1', - answer: 42, - v: 1 - }) -}) - -test('handles objects with null prototype', async ({ same }) => { - const stream = sink() - const instance = pino(stream) - const o = Object.create(null) - o.test = 'test' - instance.info(o) - const result = await once(stream, 'data') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - test: 'test', - v: 1 - }) -}) - -test('pino.destination', async ({ same }) => { - const tmp = join( - os.tmpdir(), - '_' + Math.random().toString(36).substr(2, 9) - ) - const instance = pino(pino.destination(tmp)) - instance.info('hello') - await watchFileCreated(tmp) - const result = JSON.parse(readFileSync(tmp).toString()) - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - msg: 'hello', - v: 1 - }) -}) - -test('auto pino.destination with a string', async ({ same }) => { - const tmp = join( - os.tmpdir(), - '_' + Math.random().toString(36).substr(2, 9) - ) - const instance = pino(tmp) - instance.info('hello') - await watchFileCreated(tmp) - const result = JSON.parse(readFileSync(tmp).toString()) - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - msg: 'hello', - v: 1 - }) -}) - -test('auto pino.destination with a string as second argument', async ({ same }) => { - const tmp = join( - os.tmpdir(), - '_' + Math.random().toString(36).substr(2, 9) - ) - const instance = pino(null, tmp) - instance.info('hello') - await watchFileCreated(tmp) - const result = JSON.parse(readFileSync(tmp).toString()) - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - msg: 'hello', - v: 1 - }) -}) - -test('does not override opts with a string as second argument', async ({ same }) => { - const tmp = join( - os.tmpdir(), - '_' + Math.random().toString(36).substr(2, 9) - ) - const instance = pino({ - timestamp: () => ',"time":"none"' - }, tmp) - instance.info('hello') - await watchFileCreated(tmp) - const result = JSON.parse(readFileSync(tmp).toString()) - same(result, { - pid: pid, - hostname: hostname, - level: 30, - time: 'none', - msg: 'hello', - v: 1 - }) -}) - -// https://github.com/pinojs/pino/issues/222 -test('children with same names render in correct order', async ({ is }) => { - const stream = sink() - const root = pino(stream) - root.child({ a: 1 }).child({ a: 2 }).info({ a: 3 }) - const { a } = await once(stream, 'data') - is(a, 3, 'last logged object takes precedence') -}) - -// https://github.com/pinojs/pino/pull/251 - use this.stringify -test('use `fast-safe-stringify` to avoid circular dependencies', async ({ deepEqual }) => { - const stream = sink() - const root = pino(stream) - // circular depth - const obj = {} - obj.a = obj - root.info(obj) - const { a } = await once(stream, 'data') - deepEqual(a, { a: '[Circular]' }) -}) - -test('fast-safe-stringify must be used when interpolating', async (t) => { - const stream = sink() - const instance = pino(stream) - - const o = { a: { b: {} } } - o.a.b.c = o.a.b - instance.info('test', o) - - const { msg } = await once(stream, 'data') - t.is(msg, 'test {"a":{"b":{"c":"[Circular]"}}}') -}) - -test('throws when setting useOnlyCustomLevels without customLevels', async ({ is, throws }) => { - throws(() => { - pino({ - useOnlyCustomLevels: true - }) - }) - try { - pino({ - useOnlyCustomLevels: true - }) - } catch ({ message }) { - is(message, 'customLevels is required if useOnlyCustomLevels is set true') - } -}) - -test('correctly log Infinity', async (t) => { - const stream = sink() - const instance = pino(stream) - - const o = { num: Infinity } - instance.info(o) - - const { num } = await once(stream, 'data') - t.is(num, null) -}) - -test('correctly log -Infinity', async (t) => { - const stream = sink() - const instance = pino(stream) - - const o = { num: -Infinity } - instance.info(o) - - const { num } = await once(stream, 'data') - t.is(num, null) -}) - -test('correctly log NaN', async (t) => { - const stream = sink() - const instance = pino(stream) - - const o = { num: NaN } - instance.info(o) - - const { num } = await once(stream, 'data') - t.is(num, null) -}) diff --git a/node_modules/pino/test/broken-pipe.test.js b/node_modules/pino/test/broken-pipe.test.js deleted file mode 100644 index 0454cee..0000000 --- a/node_modules/pino/test/broken-pipe.test.js +++ /dev/null @@ -1,42 +0,0 @@ -'use strict' - -const t = require('tap') -const { join } = require('path') -const { fork } = require('child_process') -const { once } = require('./helper') -const pino = require('..') - -function test (file) { - file = join('fixtures', 'broken-pipe', file) - t.test(file, { parallel: true }, async ({ is }) => { - const child = fork(join(__dirname, file), { silent: true }) - child.stdout.destroy() - - child.stderr.pipe(process.stdout) - - const res = await once(child, 'close') - is(res, 0) // process exits successfully - }) -} - -t.jobs = 42 - -test('basic.js') -test('destination.js') -test('extreme.js') - -t.test('let error pass through', ({ is, plan }) => { - plan(3) - const stream = pino.destination() - - // side effect of the pino constructor is that it will set an - // event handler for error - pino(stream) - - process.nextTick(() => stream.emit('error', new Error('kaboom'))) - process.nextTick(() => stream.emit('error', new Error('kaboom'))) - - stream.on('error', (err) => { - is(err.message, 'kaboom') - }) -}) diff --git a/node_modules/pino/test/browser-levels.test.js b/node_modules/pino/test/browser-levels.test.js deleted file mode 100644 index 6a2a988..0000000 --- a/node_modules/pino/test/browser-levels.test.js +++ /dev/null @@ -1,218 +0,0 @@ -'use strict' -const test = require('tape') -const pino = require('../browser') - -test('set the level by string', ({ end, same, is }) => { - const expected = [ - { - level: 50, - msg: 'this is an error' - }, - { - level: 60, - msg: 'this is fatal' - } - ] - const instance = pino({ - browser: { - write (actual) { - checkLogObjects(is, same, actual, expected.shift()) - } - } - }) - - instance.level = 'error' - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - - end() -}) - -test('set the level by string. init with silent', ({ end, same, is }) => { - const expected = [ - { - level: 50, - msg: 'this is an error' - }, - { - level: 60, - msg: 'this is fatal' - } - ] - const instance = pino({ - level: 'silent', - browser: { - write (actual) { - checkLogObjects(is, same, actual, expected.shift()) - } - } - }) - - instance.level = 'error' - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - - end() -}) - -test('set the level by string. init with silent and transmit', ({ end, same, is }) => { - const expected = [ - { - level: 50, - msg: 'this is an error' - }, - { - level: 60, - msg: 'this is fatal' - } - ] - const instance = pino({ - level: 'silent', - browser: { - write (actual) { - checkLogObjects(is, same, actual, expected.shift()) - } - }, - transmit: { - send () {} - } - }) - - instance.level = 'error' - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - - end() -}) - -test('set the level via constructor', ({ end, same, is }) => { - const expected = [ - { - level: 50, - msg: 'this is an error' - }, - { - level: 60, - msg: 'this is fatal' - } - ] - const instance = pino({ - level: 'error', - browser: { - write (actual) { - checkLogObjects(is, same, actual, expected.shift()) - } - } - }) - - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - - end() -}) - -test('the wrong level throws', ({ end, throws }) => { - const instance = pino() - throws(() => { - instance.level = 'kaboom' - }) - end() -}) - -test('the wrong level by number throws', ({ end, throws }) => { - const instance = pino() - throws(() => { - instance.levelVal = 55 - }) - end() -}) - -test('exposes level string mappings', ({ end, is }) => { - is(pino.levels.values.error, 50) - end() -}) - -test('exposes level number mappings', ({ end, is }) => { - is(pino.levels.labels[50], 'error') - end() -}) - -test('returns level integer', ({ end, is }) => { - const instance = pino({ level: 'error' }) - is(instance.levelVal, 50) - end() -}) - -test('silent level via constructor', ({ end, fail }) => { - const instance = pino({ - level: 'silent', - browser: { - write () { - fail('no data should be logged') - } - } - }) - - Object.keys(pino.levels.values).forEach((level) => { - instance[level]('hello world') - }) - - end() -}) - -test('silent level by string', ({ end, fail }) => { - const instance = pino({ - browser: { - write () { - fail('no data should be logged') - } - } - }) - - instance.level = 'silent' - - Object.keys(pino.levels.values).forEach((level) => { - instance[level]('hello world') - }) - - end() -}) - -test('exposed levels', ({ end, same }) => { - same(Object.keys(pino.levels.values), [ - 'fatal', - 'error', - 'warn', - 'info', - 'debug', - 'trace' - ]) - end() -}) - -test('exposed labels', ({ end, same }) => { - same(Object.keys(pino.levels.labels), [ - '10', - '20', - '30', - '40', - '50', - '60' - ]) - end() -}) - -function checkLogObjects (is, same, actual, expected) { - is(actual.time <= Date.now(), true, 'time is greater than Date.now()') - - const actualCopy = Object.assign({}, actual) - const expectedCopy = Object.assign({}, expected) - delete actualCopy.time - delete expectedCopy.time - - same(actualCopy, expectedCopy) -} diff --git a/node_modules/pino/test/browser-serializers.test.js b/node_modules/pino/test/browser-serializers.test.js deleted file mode 100644 index 6ed78d5..0000000 --- a/node_modules/pino/test/browser-serializers.test.js +++ /dev/null @@ -1,327 +0,0 @@ -'use strict' -// eslint-disable-next-line -if (typeof $1 !== 'undefined') $1 = arguments.callee.caller.arguments[0] - -const test = require('tape') -const fresh = require('import-fresh') -const pino = require('../browser') - -const parentSerializers = { - test: () => 'parent' -} - -const childSerializers = { - test: () => 'child' -} - -test('serializers override values', ({ end, is }) => { - const parent = pino({ - serializers: parentSerializers, - browser: { - serialize: true, - write (o) { - is(o.test, 'parent') - end() - } - } - }) - - parent.fatal({ test: 'test' }) -}) - -test('without the serialize option, serializers do not override values', ({ end, is }) => { - const parent = pino({ - serializers: parentSerializers, - browser: { - write (o) { - is(o.test, 'test') - end() - } - } - }) - - parent.fatal({ test: 'test' }) -}) - -if (process.title !== 'browser') { - test('if serialize option is true, standard error serializer is auto enabled', ({ end, same }) => { - const err = Error('test') - err.code = 'test' - err.type = 'Error' // get that cov - const expect = pino.stdSerializers.err(err) - - const consoleError = console.error - console.error = function (err) { - same(err, expect) - } - - const logger = fresh('../browser')({ - browser: { serialize: true } - }) - - console.error = consoleError - - logger.fatal(err) - end() - }) - - test('if serialize option is array, standard error serializer is auto enabled', ({ end, same }) => { - const err = Error('test') - err.code = 'test' - const expect = pino.stdSerializers.err(err) - - const consoleError = console.error - console.error = function (err) { - same(err, expect) - } - - const logger = fresh('../browser', require)({ - browser: { serialize: [] } - }) - - console.error = consoleError - - logger.fatal(err) - end() - }) - - test('if serialize option is array containing !stdSerializers.err, standard error serializer is disabled', ({ end, is }) => { - const err = Error('test') - err.code = 'test' - const expect = err - - const consoleError = console.error - console.error = function (err) { - is(err, expect) - } - - const logger = fresh('../browser', require)({ - browser: { serialize: ['!stdSerializers.err'] } - }) - - console.error = consoleError - - logger.fatal(err) - end() - }) - - test('in browser, serializers apply to all objects', ({ end, is }) => { - const consoleError = console.error - console.error = function (test, test2, test3, test4, test5) { - is(test.key, 'serialized') - is(test2.key2, 'serialized2') - is(test5.key3, 'serialized3') - } - - const logger = fresh('../browser', require)({ - serializers: { - key: () => 'serialized', - key2: () => 'serialized2', - key3: () => 'serialized3' - }, - browser: { serialize: true } - }) - - console.error = consoleError - - logger.fatal({ key: 'test' }, { key2: 'test' }, 'str should skip', [{ foo: 'array should skip' }], { key3: 'test' }) - end() - }) - - test('serialize can be an array of selected serializers', ({ end, is }) => { - const consoleError = console.error - console.error = function (test, test2, test3, test4, test5) { - is(test.key, 'test') - is(test2.key2, 'serialized2') - is(test5.key3, 'test') - } - - const logger = fresh('../browser', require)({ - serializers: { - key: () => 'serialized', - key2: () => 'serialized2', - key3: () => 'serialized3' - }, - browser: { serialize: ['key2'] } - }) - - console.error = consoleError - - logger.fatal({ key: 'test' }, { key2: 'test' }, 'str should skip', [{ foo: 'array should skip' }], { key3: 'test' }) - end() - }) - - test('serialize filter applies to child loggers', ({ end, is }) => { - const consoleError = console.error - console.error = function (binding, test, test2, test3, test4, test5) { - is(test.key, 'test') - is(test2.key2, 'serialized2') - is(test5.key3, 'test') - } - - const logger = fresh('../browser', require)({ - browser: { serialize: ['key2'] } - }) - - console.error = consoleError - - logger.child({ - aBinding: 'test', - serializers: { - key: () => 'serialized', - key2: () => 'serialized2', - key3: () => 'serialized3' - } - }).fatal({ key: 'test' }, { key2: 'test' }, 'str should skip', [{ foo: 'array should skip' }], { key3: 'test' }) - end() - }) - - test('parent serializers apply to child bindings', ({ end, is }) => { - const consoleError = console.error - console.error = function (binding) { - is(binding.key, 'serialized') - } - - const logger = fresh('../browser', require)({ - serializers: { - key: () => 'serialized' - }, - browser: { serialize: true } - }) - - console.error = consoleError - - logger.child({ key: 'test' }).fatal({ test: 'test' }) - end() - }) - - test('child serializers apply to child bindings', ({ end, is }) => { - const consoleError = console.error - console.error = function (binding) { - is(binding.key, 'serialized') - } - - const logger = fresh('../browser', require)({ - browser: { serialize: true } - }) - - console.error = consoleError - - logger.child({ - key: 'test', - serializers: { - key: () => 'serialized' - } - }).fatal({ test: 'test' }) - end() - }) -} - -test('child does not overwrite parent serializers', ({ end, is }) => { - var c = 0 - const parent = pino({ - serializers: parentSerializers, - browser: { - serialize: true, - write (o) { - c++ - if (c === 1) is(o.test, 'parent') - if (c === 2) { - is(o.test, 'child') - end() - } - } - } - }) - const child = parent.child({ serializers: childSerializers }) - - parent.fatal({ test: 'test' }) - child.fatal({ test: 'test' }) -}) - -test('children inherit parent serializers', ({ end, is }) => { - const parent = pino({ - serializers: parentSerializers, - browser: { - serialize: true, - write (o) { - is(o.test, 'parent') - } - } - }) - - const child = parent.child({ a: 'property' }) - child.fatal({ test: 'test' }) - end() -}) - -test('children serializers get called', ({ end, is }) => { - const parent = pino({ - test: 'this', - browser: { - serialize: true, - write (o) { - is(o.test, 'child') - } - } - }) - - const child = parent.child({ a: 'property', serializers: childSerializers }) - - child.fatal({ test: 'test' }) - end() -}) - -test('children serializers get called when inherited from parent', ({ end, is }) => { - const parent = pino({ - test: 'this', - serializers: parentSerializers, - browser: { - serialize: true, - write: (o) => { - is(o.test, 'pass') - } - } - }) - - const child = parent.child({ serializers: { test: () => 'pass' } }) - - child.fatal({ test: 'fail' }) - end() -}) - -test('non overriden serializers are available in the children', ({ end, is }) => { - const pSerializers = { - onlyParent: () => 'parent', - shared: () => 'parent' - } - - const cSerializers = { - shared: () => 'child', - onlyChild: () => 'child' - } - - var c = 0 - - const parent = pino({ - serializers: pSerializers, - browser: { - serialize: true, - write (o) { - c++ - if (c === 1) is(o.shared, 'child') - if (c === 2) is(o.onlyParent, 'parent') - if (c === 3) is(o.onlyChild, 'child') - if (c === 4) is(o.onlyChild, 'test') - } - } - }) - - const child = parent.child({ serializers: cSerializers }) - - child.fatal({ shared: 'test' }) - child.fatal({ onlyParent: 'test' }) - child.fatal({ onlyChild: 'test' }) - parent.fatal({ onlyChild: 'test' }) - end() -}) diff --git a/node_modules/pino/test/browser-transmit.test.js b/node_modules/pino/test/browser-transmit.test.js deleted file mode 100644 index 8490276..0000000 --- a/node_modules/pino/test/browser-transmit.test.js +++ /dev/null @@ -1,349 +0,0 @@ -'use strict' -const test = require('tape') -const pino = require('../browser') - -function noop () {} - -test('throws if transmit object does not have send function', ({ end, throws }) => { - throws(() => { - pino({ browser: { transmit: {} } }) - }) - - throws(() => { - pino({ browser: { transmit: { send: 'not a func' } } }) - }) - - end() -}) - -test('calls send function after write', ({ end, is }) => { - var c = 0 - const logger = pino({ - browser: { - write: () => { - c++ - }, - transmit: { - send () { is(c, 1) } - } - } - }) - - logger.fatal({ test: 'test' }) - end() -}) - -test('passes send function the logged level', ({ end, is }) => { - const logger = pino({ - browser: { - write () {}, - transmit: { - send (level) { - is(level, 'fatal') - } - } - } - }) - - logger.fatal({ test: 'test' }) - end() -}) - -test('passes send function message strings in logEvent object when asObject is not set', ({ end, same, is }) => { - const logger = pino({ - browser: { - write: noop, - transmit: { - send (level, { messages }) { - is(messages[0], 'test') - is(messages[1], 'another test') - } - } - } - }) - - logger.fatal('test', 'another test') - - end() -}) - -test('passes send function message objects in logEvent object when asObject is not set', ({ end, same, is }) => { - const logger = pino({ - browser: { - write: noop, - transmit: { - send (level, { messages }) { - same(messages[0], { test: 'test' }) - is(messages[1], 'another test') - } - } - } - }) - - logger.fatal({ test: 'test' }, 'another test') - - end() -}) - -test('passes send function message strings in logEvent object when asObject is set', ({ end, same, is }) => { - const logger = pino({ - browser: { - asObject: true, - write: noop, - transmit: { - send (level, { messages }) { - is(messages[0], 'test') - is(messages[1], 'another test') - } - } - } - }) - - logger.fatal('test', 'another test') - - end() -}) - -test('passes send function message objects in logEvent object when asObject is set', ({ end, same, is }) => { - const logger = pino({ - browser: { - asObject: true, - write: noop, - transmit: { - send (level, { messages }) { - same(messages[0], { test: 'test' }) - is(messages[1], 'another test') - } - } - } - }) - - logger.fatal({ test: 'test' }, 'another test') - - end() -}) - -test('supplies a timestamp (ts) in logEvent object which is exactly the same as the `time` property in asObject mode', ({ end, is }) => { - var expected - const logger = pino({ - browser: { - asObject: true, // implict because `write`, but just to be explicit - write (o) { - expected = o.time - }, - transmit: { - send (level, logEvent) { - is(logEvent.ts, expected) - } - } - } - }) - - logger.fatal('test') - end() -}) - -test('passes send function child bindings via logEvent object', ({ end, same, is }) => { - const logger = pino({ - browser: { - write: noop, - transmit: { - send (level, logEvent) { - const messages = logEvent.messages - const bindings = logEvent.bindings - same(bindings[0], { first: 'binding' }) - same(bindings[1], { second: 'binding2' }) - same(messages[0], { test: 'test' }) - is(messages[1], 'another test') - } - } - } - }) - - logger - .child({ first: 'binding' }) - .child({ second: 'binding2' }) - .fatal({ test: 'test' }, 'another test') - end() -}) - -test('passes send function level:{label, value} via logEvent object', ({ end, is }) => { - const logger = pino({ - browser: { - write: noop, - transmit: { - send (level, logEvent) { - const label = logEvent.level.label - const value = logEvent.level.value - - is(label, 'fatal') - is(value, 60) - } - } - } - }) - - logger.fatal({ test: 'test' }, 'another test') - end() -}) - -test('calls send function according to transmit.level', ({ end, is }) => { - var c = 0 - const logger = pino({ - browser: { - write: noop, - transmit: { - level: 'error', - send (level) { - c++ - if (c === 1) is(level, 'error') - if (c === 2) is(level, 'fatal') - } - } - } - }) - logger.warn('ignored') - logger.error('test') - logger.fatal('test') - end() -}) - -test('transmit.level defaults to logger level', ({ end, is }) => { - var c = 0 - const logger = pino({ - level: 'error', - browser: { - write: noop, - transmit: { - send (level) { - c++ - if (c === 1) is(level, 'error') - if (c === 2) is(level, 'fatal') - } - } - } - }) - logger.warn('ignored') - logger.error('test') - logger.fatal('test') - end() -}) - -test('transmit.level is effective even if lower than logger level', ({ end, is }) => { - var c = 0 - const logger = pino({ - level: 'error', - browser: { - write: noop, - transmit: { - level: 'info', - send (level) { - c++ - if (c === 1) is(level, 'warn') - if (c === 2) is(level, 'error') - if (c === 3) is(level, 'fatal') - } - } - } - }) - logger.warn('ignored') - logger.error('test') - logger.fatal('test') - end() -}) - -test('applies all serializers to messages and bindings (serialize:false - default)', ({ end, same, is }) => { - const logger = pino({ - serializers: { - first: () => 'first', - second: () => 'second', - test: () => 'serialize it' - }, - browser: { - write: noop, - transmit: { - send (level, logEvent) { - const messages = logEvent.messages - const bindings = logEvent.bindings - same(bindings[0], { first: 'first' }) - same(bindings[1], { second: 'second' }) - same(messages[0], { test: 'serialize it' }) - is(messages[1].type, 'Error') - } - } - } - }) - - logger - .child({ first: 'binding' }) - .child({ second: 'binding2' }) - .fatal({ test: 'test' }, Error()) - end() -}) - -test('applies all serializers to messages and bindings (serialize:true)', ({ end, same, is }) => { - const logger = pino({ - serializers: { - first: () => 'first', - second: () => 'second', - test: () => 'serialize it' - }, - browser: { - serialize: true, - write: noop, - transmit: { - send (level, logEvent) { - const messages = logEvent.messages - const bindings = logEvent.bindings - same(bindings[0], { first: 'first' }) - same(bindings[1], { second: 'second' }) - same(messages[0], { test: 'serialize it' }) - is(messages[1].type, 'Error') - } - } - } - }) - - logger - .child({ first: 'binding' }) - .child({ second: 'binding2' }) - .fatal({ test: 'test' }, Error()) - end() -}) - -test('extracts correct bindings and raw messages over multiple transmits', ({ end, same, is }) => { - var messages = null - var bindings = null - - const logger = pino({ - browser: { - write: noop, - transmit: { - send (level, logEvent) { - messages = logEvent.messages - bindings = logEvent.bindings - } - } - } - }) - - const child = logger.child({ child: true }) - const grandchild = child.child({ grandchild: true }) - - logger.fatal({ test: 'parent:test1' }) - logger.fatal({ test: 'parent:test2' }) - same([], bindings) - same([{ test: 'parent:test2' }], messages) - - child.fatal({ test: 'child:test1' }) - child.fatal({ test: 'child:test2' }) - same([{ child: true }], bindings) - same([{ test: 'child:test2' }], messages) - - grandchild.fatal({ test: 'grandchild:test1' }) - grandchild.fatal({ test: 'grandchild:test2' }) - same([{ child: true }, { grandchild: true }], bindings) - same([{ test: 'grandchild:test2' }], messages) - - end() -}) diff --git a/node_modules/pino/test/browser.test.js b/node_modules/pino/test/browser.test.js deleted file mode 100644 index 76caba3..0000000 --- a/node_modules/pino/test/browser.test.js +++ /dev/null @@ -1,553 +0,0 @@ -'use strict' -const test = require('tape') -const fresh = require('import-fresh') -const pinoStdSerializers = require('pino-std-serializers') -const pino = require('../browser') - -levelTest('fatal') -levelTest('error') -levelTest('warn') -levelTest('info') -levelTest('debug') -levelTest('trace') - -test('silent level', ({ end, fail, pass }) => { - const instance = pino({ - level: 'silent', - browser: { write: fail } - }) - instance.info('test') - const child = instance.child({ test: 'test' }) - child.info('msg-test') - // use setTimeout because setImmediate isn't supported in most browsers - setTimeout(() => { - pass() - end() - }, 0) -}) - -test('enabled false', ({ end, fail, pass }) => { - const instance = pino({ - enabled: false, - browser: { write: fail } - }) - instance.info('test') - const child = instance.child({ test: 'test' }) - child.info('msg-test') - // use setTimeout because setImmediate isn't supported in most browsers - setTimeout(() => { - pass() - end() - }, 0) -}) - -test('throw if creating child without bindings', ({ end, throws }) => { - const instance = pino() - throws(() => instance.child()) - end() -}) - -test('stubs write, flush and ee methods on instance', ({ end, ok, is }) => { - const instance = pino() - - ok(isFunc(instance.setMaxListeners)) - ok(isFunc(instance.getMaxListeners)) - ok(isFunc(instance.emit)) - ok(isFunc(instance.addListener)) - ok(isFunc(instance.on)) - ok(isFunc(instance.prependListener)) - ok(isFunc(instance.once)) - ok(isFunc(instance.prependOnceListener)) - ok(isFunc(instance.removeListener)) - ok(isFunc(instance.removeAllListeners)) - ok(isFunc(instance.listeners)) - ok(isFunc(instance.listenerCount)) - ok(isFunc(instance.eventNames)) - ok(isFunc(instance.write)) - ok(isFunc(instance.flush)) - - is(instance.on(), undefined) - - end() -}) - -test('exposes levels object', ({ end, same }) => { - same(pino.levels, { - values: { - fatal: 60, - error: 50, - warn: 40, - info: 30, - debug: 20, - trace: 10 - }, - labels: { - 10: 'trace', - 20: 'debug', - 30: 'info', - 40: 'warn', - 50: 'error', - 60: 'fatal' - } - }) - - end() -}) - -test('exposes LOG_VERSION', ({ end, is }) => { - is(pino.LOG_VERSION, 1) - - end() -}) - -test('exposes faux stdSerializers', ({ end, ok, same }) => { - ok(pino.stdSerializers) - // make sure faux stdSerializers match pino-std-serializers - for (const serializer in pinoStdSerializers) { - ok(pino.stdSerializers[serializer], `pino.stdSerializers.${serializer}`) - } - // confirm faux methods return empty objects - same(pino.stdSerializers.req(), {}) - same(pino.stdSerializers.mapHttpRequest(), {}) - same(pino.stdSerializers.mapHttpResponse(), {}) - same(pino.stdSerializers.res(), {}) - // confirm wrapping function is a passthrough - const noChange = { foo: 'bar', fuz: 42 } - same(pino.stdSerializers.wrapRequestSerializer(noChange), noChange) - same(pino.stdSerializers.wrapResponseSerializer(noChange), noChange) - end() -}) - -test('exposes err stdSerializer', ({ end, ok }) => { - ok(pino.stdSerializers.err) - ok(pino.stdSerializers.err(Error())) - end() -}) - -consoleMethodTest('error') -consoleMethodTest('fatal', 'error') -consoleMethodTest('warn') -consoleMethodTest('info') -consoleMethodTest('debug') -consoleMethodTest('trace') -absentConsoleMethodTest('error', 'log') -absentConsoleMethodTest('warn', 'error') -absentConsoleMethodTest('info', 'log') -absentConsoleMethodTest('debug', 'log') -absentConsoleMethodTest('trace', 'log') - -// do not run this with airtap -if (process.title !== 'browser') { - test('in absence of console, log methods become noops', ({ end, ok }) => { - var console = global.console - delete global.console - const instance = fresh('../browser')() - global.console = console - ok(fnName(instance.log).match(/noop/)) - ok(fnName(instance.fatal).match(/noop/)) - ok(fnName(instance.error).match(/noop/)) - ok(fnName(instance.warn).match(/noop/)) - ok(fnName(instance.info).match(/noop/)) - ok(fnName(instance.debug).match(/noop/)) - ok(fnName(instance.trace).match(/noop/)) - end() - }) -} - -test('opts.browser.asObject logs pino-like object to console', ({ end, ok, is }) => { - var info = console.info - console.info = function (o) { - is(o.level, 30) - is(o.msg, 'test') - ok(o.time) - console.info = info - } - const instance = require('../browser')({ - browser: { - asObject: true - } - }) - - instance.info('test') - end() -}) - -test('opts.browser.write func log single string', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: function (o) { - is(o.level, 30) - is(o.msg, 'test') - ok(o.time) - } - } - }) - instance.info('test') - - end() -}) - -test('opts.browser.write func string joining', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: function (o) { - is(o.level, 30) - is(o.msg, 'test test2 test3') - ok(o.time) - } - } - }) - instance.info('test', 'test2', 'test3') - - end() -}) - -test('opts.browser.write func string joining when asObject is true', ({ end, ok, is }) => { - const instance = pino({ - browser: { - asObject: true, - write: function (o) { - is(o.level, 30) - is(o.msg, 'test test2 test3') - ok(o.time) - } - } - }) - instance.info('test', 'test2', 'test3') - - end() -}) - -test('opts.browser.write func string joining when asObject is true', ({ end, ok, is }) => { - const instance = pino({ - browser: { - asObject: true, - write: function (o) { - is(o.level, 30) - is(o.msg, 'test test2 test3') - ok(o.time) - } - } - }) - instance.info('test', 'test2', 'test3') - - end() -}) - -test('opts.browser.write func string object joining', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: function (o) { - is(o.level, 30) - is(o.msg, 'test {"test":"test2"} {"test":"test3"}') - ok(o.time) - } - } - }) - instance.info('test', { test: 'test2' }, { test: 'test3' }) - - end() -}) - -test('opts.browser.write func string object joining when asObject is true', ({ end, ok, is }) => { - const instance = pino({ - browser: { - asObject: true, - write: function (o) { - is(o.level, 30) - is(o.msg, 'test {"test":"test2"} {"test":"test3"}') - ok(o.time) - } - } - }) - instance.info('test', { test: 'test2' }, { test: 'test3' }) - - end() -}) - -test('opts.browser.write func string interpolation', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: function (o) { - is(o.level, 30) - is(o.msg, 'test2 test ({"test":"test3"})') - ok(o.time) - } - } - }) - instance.info('%s test (%j)', 'test2', { test: 'test3' }) - - end() -}) - -test('opts.browser.write func number', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: function (o) { - is(o.level, 30) - is(o.msg, 1) - ok(o.time) - } - } - }) - instance.info(1) - - end() -}) - -test('opts.browser.write func log single object', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: function (o) { - is(o.level, 30) - is(o.test, 'test') - ok(o.time) - } - } - }) - instance.info({ test: 'test' }) - - end() -}) - -test('opts.browser.write obj writes to methods corresponding to level', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write: { - error: function (o) { - is(o.level, 50) - is(o.test, 'test') - ok(o.time) - } - } - } - }) - instance.error({ test: 'test' }) - - end() -}) - -test('opts.browser.asObject/write supports child loggers', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write (o) { - is(o.level, 30) - is(o.test, 'test') - is(o.msg, 'msg-test') - ok(o.time) - } - } - }) - const child = instance.child({ test: 'test' }) - child.info('msg-test') - - end() -}) - -test('opts.browser.asObject/write supports child child loggers', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write (o) { - is(o.level, 30) - is(o.test, 'test') - is(o.foo, 'bar') - is(o.msg, 'msg-test') - ok(o.time) - } - } - }) - const child = instance.child({ test: 'test' }).child({ foo: 'bar' }) - child.info('msg-test') - - end() -}) - -test('opts.browser.asObject/write supports child child child loggers', ({ end, ok, is }) => { - const instance = pino({ - browser: { - write (o) { - is(o.level, 30) - is(o.test, 'test') - is(o.foo, 'bar') - is(o.baz, 'bop') - is(o.msg, 'msg-test') - ok(o.time) - } - } - }) - const child = instance.child({ test: 'test' }).child({ foo: 'bar' }).child({ baz: 'bop' }) - child.info('msg-test') - - end() -}) - -test('opts.browser.asObject defensively mitigates naughty numbers', ({ end, pass }) => { - const instance = pino({ - browser: { asObject: true, write: () => {} } - }) - const child = instance.child({ test: 'test' }) - child._childLevel = -10 - child.info('test') - pass() // if we reached here, there was no infinite loop, so, .. pass. - - end() -}) - -test('opts.browser.write obj falls back to console where a method is not supplied', ({ end, ok, is }) => { - var info = console.info - console.info = (o) => { - is(o.level, 30) - is(o.msg, 'test') - ok(o.time) - console.info = info - } - const instance = require('../browser')({ - browser: { - write: { - error (o) { - is(o.level, 50) - is(o.test, 'test') - ok(o.time) - } - } - } - }) - instance.error({ test: 'test' }) - instance.info('test') - - end() -}) - -function levelTest (name) { - test(name + ' logs', ({ end, is }) => { - var msg = 'hello world' - sink(name, (args) => { - is(args[0], msg) - end() - }) - pino({ level: name })[name](msg) - }) - - test('passing objects at level ' + name, ({ end, is }) => { - var msg = { hello: 'world' } - sink(name, (args) => { - is(args[0], msg) - end() - }) - pino({ level: name })[name](msg) - }) - - test('passing an object and a string at level ' + name, ({ end, is }) => { - var a = { hello: 'world' } - var b = 'a string' - sink(name, (args) => { - is(args[0], a) - is(args[1], b) - end() - }) - pino({ level: name })[name](a, b) - }) - - test('formatting logs as ' + name, ({ end, is }) => { - sink(name, (args) => { - is(args[0], 'hello %d') - is(args[1], 42) - end() - }) - pino({ level: name })[name]('hello %d', 42) - }) - - test('passing error at level ' + name, ({ end, is }) => { - var err = new Error('myerror') - sink(name, (args) => { - is(args[0], err) - end() - }) - pino({ level: name })[name](err) - }) - - test('passing error with a serializer at level ' + name, ({ end, is }) => { - // in browser - should have no effect (should not crash) - var err = new Error('myerror') - sink(name, (args) => { - is(args[0].err, err) - end() - }) - const instance = pino({ - level: name, - serializers: { - err: pino.stdSerializers.err - } - }) - instance[name]({ err: err }) - }) - - test('child logger for level ' + name, ({ end, is }) => { - var msg = 'hello world' - var parent = { hello: 'world' } - sink(name, (args) => { - is(args[0], parent) - is(args[1], msg) - end() - }) - const instance = pino({ level: name }) - const child = instance.child(parent) - child[name](msg) - }) - - test('child-child logger for level ' + name, ({ end, is }) => { - var msg = 'hello world' - var grandParent = { hello: 'world' } - var parent = { hello: 'you' } - sink(name, (args) => { - is(args[0], grandParent) - is(args[1], parent) - is(args[2], msg) - end() - }) - const instance = pino({ level: name }) - const child = instance.child(grandParent).child(parent) - child[name](msg) - }) -} - -function consoleMethodTest (level, method) { - if (!method) method = level - test('pino().' + level + ' uses console.' + method, ({ end, is }) => { - sink(method, (args) => { - is(args[0], 'test') - end() - }) - const instance = require('../browser')({ level: level }) - instance[level]('test') - }) -} - -function absentConsoleMethodTest (method, fallback) { - test('in absence of console.' + method + ', console.' + fallback + ' is used', ({ end, is }) => { - var fn = console[method] - console[method] = undefined - sink(fallback, function (args) { - is(args[0], 'test') - end() - console[method] = fn - }) - const instance = require('../browser')({ level: method }) - instance[method]('test') - }) -} - -function isFunc (fn) { return typeof fn === 'function' } -function fnName (fn) { - var rx = /^\s*function\s*([^(]*)/i - var match = rx.exec(fn) - return match && match[1] -} -function sink (method, fn) { - if (method === 'fatal') method = 'error' - var orig = console[method] - console[method] = function () { - console[method] = orig - fn(Array.prototype.slice.call(arguments)) - } -} diff --git a/node_modules/pino/test/crlf.test.js b/node_modules/pino/test/crlf.test.js deleted file mode 100644 index 8186fbe..0000000 --- a/node_modules/pino/test/crlf.test.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict' - -const { test } = require('tap') -const writer = require('flush-write-stream') -const pino = require('../') - -function capture () { - const ws = writer((chunk, enc, cb) => { - ws.data += chunk.toString() - cb() - }) - ws.data = '' - return ws -} - -test('pino uses LF by default', async ({ ok }) => { - const stream = capture() - const logger = pino(stream) - logger.info('foo') - logger.error('bar') - ok(/foo[^\r\n]+\n[^\r\n]+bar[^\r\n]+\n/.test(stream.data)) -}) - -test('pino can log CRLF', async ({ ok }) => { - const stream = capture() - const logger = pino({ - crlf: true - }, stream) - logger.info('foo') - logger.error('bar') - ok(/foo[^\n]+\r\n[^\n]+bar[^\n]+\r\n/.test(stream.data)) -}) diff --git a/node_modules/pino/test/custom-levels.test.js b/node_modules/pino/test/custom-levels.test.js deleted file mode 100644 index b7d19c3..0000000 --- a/node_modules/pino/test/custom-levels.test.js +++ /dev/null @@ -1,308 +0,0 @@ -'use strict' - -/* eslint no-prototype-builtins: 0 */ - -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -test('adds additional levels', async ({ is }) => { - const stream = sink() - const logger = pino({ - customLevels: { - foo: 35, - bar: 45 - } - }, stream) - - logger.foo('test') - const { level } = await once(stream, 'data') - is(level, 35) -}) - -test('custom levels does not override default levels', async ({ is }) => { - const stream = sink() - const logger = pino({ - customLevels: { - foo: 35 - } - }, stream) - - logger.info('test') - const { level } = await once(stream, 'data') - is(level, 30) -}) - -test('default levels can be redefined using custom levels', async ({ is }) => { - const stream = sink() - const logger = pino({ - customLevels: { - info: 35, - debug: 45 - }, - useOnlyCustomLevels: true - }, stream) - - is(logger.hasOwnProperty('info'), true) - - logger.info('test') - const { level } = await once(stream, 'data') - is(level, 35) -}) - -test('custom levels overrides default level label if use useOnlyCustomLevels', async ({ is }) => { - const stream = sink() - const logger = pino({ - customLevels: { - foo: 35 - }, - useOnlyCustomLevels: true, - level: 'foo' - }, stream) - - is(logger.hasOwnProperty('info'), false) -}) - -test('custom levels overrides default level value if use useOnlyCustomLevels', async ({ is }) => { - const stream = sink() - const logger = pino({ - customLevels: { - foo: 35 - }, - useOnlyCustomLevels: true, - level: 35 - }, stream) - - is(logger.hasOwnProperty('info'), false) -}) - -test('custom levels are inherited by children', async ({ is }) => { - const stream = sink() - const logger = pino({ - customLevels: { - foo: 35 - } - }, stream) - - logger.child({ childMsg: 'ok' }).foo('test') - const { msg, childMsg, level } = await once(stream, 'data') - is(level, 35) - is(childMsg, 'ok') - is(msg, 'test') -}) - -test('custom levels can be specified on child bindings', async ({ is }) => { - const stream = sink() - const logger = pino(stream).child({ - customLevels: { - foo: 35 - }, - childMsg: 'ok' - }) - - logger.foo('test') - const { msg, childMsg, level } = await once(stream, 'data') - is(level, 35) - is(childMsg, 'ok') - is(msg, 'test') -}) - -test('customLevels property child bindings does not get logged', async ({ is }) => { - const stream = sink() - const logger = pino(stream).child({ - customLevels: { - foo: 35 - }, - childMsg: 'ok' - }) - - logger.foo('test') - const { customLevels } = await once(stream, 'data') - is(customLevels, undefined) -}) - -test('throws when specifying pre-existing parent labels via child bindings', async ({ is, throws }) => { - const stream = sink() - throws(() => pino({ - customLevels: { - foo: 35 - } - }, stream).child({ - customLevels: { - foo: 45 - } - }) - ) - try { - pino({ - customLevels: { - foo: 35 - } - }, stream).child({ - customLevels: { - foo: 45 - } - }) - } catch ({ message }) { - is(message, 'levels cannot be overridden') - } -}) - -test('throws when specifying pre-existing parent values via child bindings', async ({ is, throws }) => { - const stream = sink() - throws(() => pino({ - customLevels: { - foo: 35 - } - }, stream).child({ - customLevels: { - bar: 35 - } - }) - ) - try { - pino({ - customLevels: { - foo: 35 - } - }, stream).child({ - customLevels: { - bar: 35 - } - }) - } catch ({ message }) { - is(message, 'pre-existing level values cannot be used for new levels') - } -}) - -test('throws when specifying core values via child bindings', async ({ is, throws }) => { - const stream = sink() - throws(() => pino(stream).child({ - customLevels: { - foo: 30 - } - }) - ) - try { - pino(stream).child({ - customLevels: { - foo: 30 - } - }) - } catch ({ message }) { - is(message, 'pre-existing level values cannot be used for new levels') - } -}) - -test('throws when useOnlyCustomLevels is set true without customLevels', async ({ is, throws }) => { - const stream = sink() - throws(() => pino({ - useOnlyCustomLevels: true - }, stream) - ) - try { - pino({ - useOnlyCustomLevels: true - }, stream) - } catch ({ message }) { - is(message, 'customLevels is required if useOnlyCustomLevels is set true') - } -}) - -test('custom level on one instance does not affect other instances', async ({ is }) => { - pino({ - customLevels: { - foo: 37 - } - }) - is(typeof pino().foo, 'undefined') -}) - -test('setting level below or at custom level will successfully log', async ({ is }) => { - const stream = sink() - const instance = pino({ customLevels: { foo: 35 } }, stream) - instance.level = 'foo' - instance.info('nope') - instance.foo('bar') - const { msg } = await once(stream, 'data') - is(msg, 'bar') -}) - -test('custom level below level threshold will not log', async ({ is }) => { - const stream = sink() - const instance = pino({ customLevels: { foo: 15 } }, stream) - instance.level = 'info' - instance.info('bar') - instance.foo('nope') - const { msg } = await once(stream, 'data') - is(msg, 'bar') -}) - -test('does not share custom level state across siblings', async ({ doesNotThrow }) => { - const stream = sink() - const logger = pino(stream) - logger.child({ - customLevels: { foo: 35 } - }) - doesNotThrow(() => { - logger.child({ - customLevels: { foo: 35 } - }) - }) -}) - -test('custom level does not affect levelKey', async ({ is }) => { - const stream = sink() - const logger = pino({ - customLevels: { - foo: 35, - bar: 45 - }, - levelKey: 'priority' - }, stream) - - logger.foo('test') - const { priority } = await once(stream, 'data') - is(priority, 35) -}) - -test('custom levels accesible in prettifier function', async ({ plan, same }) => { - plan(1) - const logger = pino({ - prettyPrint: true, - prettifier: function prettifierFactory () { - const instance = this - return function () { - same(instance.levels, { - labels: { - 10: 'trace', - 20: 'debug', - 30: 'info', - 35: 'foo', - 40: 'warn', - 45: 'bar', - 50: 'error', - 60: 'fatal' - }, - values: { - trace: 10, - debug: 20, - info: 30, - warn: 40, - error: 50, - fatal: 60, - foo: 35, - bar: 45 - } - }) - } - }, - customLevels: { - foo: 35, - bar: 45 - }, - changeLevelName: 'priority' - }) - - logger.foo('test') -}) diff --git a/node_modules/pino/test/error.test.js b/node_modules/pino/test/error.test.js deleted file mode 100644 index ea7c04c..0000000 --- a/node_modules/pino/test/error.test.js +++ /dev/null @@ -1,179 +0,0 @@ -'use strict' - -/* eslint no-prototype-builtins: 0 */ - -const os = require('os') -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -const { pid } = process -const hostname = os.hostname() -const level = 50 -const name = 'error' - -test('err is serialized with additional properties set on the Error object', async ({ ok, same }) => { - const stream = sink() - const err = Object.assign(new Error('myerror'), { foo: 'bar' }) - const instance = pino(stream) - instance.level = name - instance[name](err) - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: level, - type: 'Error', - msg: err.message, - stack: err.stack, - foo: err.foo, - v: 1 - }) -}) - -test('type should be retained, even if type is a property', async ({ ok, same }) => { - const stream = sink() - const err = Object.assign(new Error('myerror'), { type: 'bar' }) - const instance = pino(stream) - instance.level = name - instance[name](err) - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: level, - type: 'bar', - msg: err.message, - stack: err.stack, - v: 1 - }) -}) - -test('type, message and stack should be first level properties', async ({ ok, same }) => { - const stream = sink() - const err = Object.assign(new Error('foo'), { foo: 'bar' }) - const instance = pino(stream) - instance.level = name - instance[name](err) - - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: level, - type: 'Error', - msg: err.message, - stack: err.stack, - foo: err.foo, - v: 1 - }) -}) - -test('err serializer', async ({ ok, same }) => { - const stream = sink() - const err = Object.assign(new Error('myerror'), { foo: 'bar' }) - const instance = pino({ - serializers: { - err: pino.stdSerializers.err - } - }, stream) - - instance.level = name - instance[name]({ err }) - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: level, - err: { - type: 'Error', - message: err.message, - stack: err.stack, - foo: err.foo - }, - v: 1 - }) -}) - -test('an error with statusCode property is not confused for a http response', async ({ ok, same }) => { - const stream = sink() - const err = Object.assign(new Error('StatusCodeErr'), { statusCode: 500 }) - const instance = pino(stream) - - instance.level = name - instance[name](err) - const result = await once(stream, 'data') - - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: level, - type: 'Error', - msg: err.message, - stack: err.stack, - statusCode: err.statusCode, - v: 1 - }) -}) - -test('stack is omitted if it is not set on err', t => { - t.plan(2) - var err = new Error('myerror') - delete err.stack - var instance = pino(sink(function (chunk, enc, cb) { - t.ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - t.equal(chunk.hasOwnProperty('stack'), false) - cb() - })) - - instance.level = name - instance[name](err) -}) - -test('stack is rendered as any other property if it\'s not a string', t => { - t.plan(3) - var err = new Error('myerror') - err.stack = null - var instance = pino(sink(function (chunk, enc, cb) { - t.ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - t.equal(chunk.hasOwnProperty('stack'), true) - t.equal(chunk.stack, null) - cb() - })) - - instance.level = name - instance[name](err) -}) - -test('correctly ignores toString on errors', async ({ same }) => { - const err = new Error('myerror') - err.toString = () => undefined - const stream = sink() - const instance = pino({ - test: 'this' - }, stream) - instance.fatal(err) - const result = await once(stream, 'data') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 60, - type: 'Error', - msg: err.message, - stack: err.stack, - v: 1 - }) -}) diff --git a/node_modules/pino/test/escaping.test.js b/node_modules/pino/test/escaping.test.js deleted file mode 100644 index 3edf683..0000000 --- a/node_modules/pino/test/escaping.test.js +++ /dev/null @@ -1,93 +0,0 @@ -'use strict' - -const os = require('os') -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -const { pid } = process -const hostname = os.hostname() - -function testEscape (ch, key) { - test('correctly escape ' + ch, async ({ same }) => { - const stream = sink() - const instance = pino({ - name: 'hello' - }, stream) - instance.fatal('this contains ' + key) - const result = await once(stream, 'data') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 60, - name: 'hello', - msg: 'this contains ' + key, - v: 1 - }) - }) -} - -testEscape('\\n', '\n') -testEscape('\\/', '/') -testEscape('\\\\', '\\') -testEscape('\\r', '\r') -testEscape('\\t', '\t') -testEscape('\\b', '\b') - -const toEscape = [ - '\u0000', // NUL Null character - '\u0001', // SOH Start of Heading - '\u0002', // STX Start of Text - '\u0003', // ETX End-of-text character - '\u0004', // EOT End-of-transmission character - '\u0005', // ENQ Enquiry character - '\u0006', // ACK Acknowledge character - '\u0007', // BEL Bell character - '\u0008', // BS Backspace - '\u0009', // HT Horizontal tab - '\u000A', // LF Line feed - '\u000B', // VT Vertical tab - '\u000C', // FF Form feed - '\u000D', // CR Carriage return - '\u000E', // SO Shift Out - '\u000F', // SI Shift In - '\u0010', // DLE Data Link Escape - '\u0011', // DC1 Device Control 1 - '\u0012', // DC2 Device Control 2 - '\u0013', // DC3 Device Control 3 - '\u0014', // DC4 Device Control 4 - '\u0015', // NAK Negative-acknowledge character - '\u0016', // SYN Synchronous Idle - '\u0017', // ETB End of Transmission Block - '\u0018', // CAN Cancel character - '\u0019', // EM End of Medium - '\u001A', // SUB Substitute character - '\u001B', // ESC Escape character - '\u001C', // FS File Separator - '\u001D', // GS Group Separator - '\u001E', // RS Record Separator - '\u001F' // US Unit Separator -] - -toEscape.forEach((key) => { - testEscape(JSON.stringify(key), key) -}) - -test('correctly escape `hello \\u001F world \\n \\u0022`', async ({ same }) => { - const stream = sink() - const instance = pino({ - name: 'hello' - }, stream) - instance.fatal('hello \u001F world \n \u0022') - const result = await once(stream, 'data') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 60, - name: 'hello', - msg: 'hello \u001F world \n \u0022', - v: 1 - }) -}) diff --git a/node_modules/pino/test/exit.test.js b/node_modules/pino/test/exit.test.js deleted file mode 100644 index fe7542a..0000000 --- a/node_modules/pino/test/exit.test.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict' - -const { test } = require('tap') -const { join } = require('path') -const execa = require('execa') -const writer = require('flush-write-stream') -const { once } = require('./helper') - -// https://github.com/pinojs/pino/issues/542 -test('pino.destination log everything when calling process.exit(0)', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'destination-exit.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - - await once(child, 'close') - - isNot(actual.match(/hello/), null) - isNot(actual.match(/world/), null) -}) - -test('pino.extreme does not log everything when calling process.exit(0)', async ({ is }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'extreme-exit.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - - await once(child, 'close') - - is(actual.match(/hello/), null) - is(actual.match(/world/), null) -}) - -test('pino.extreme logs everything when calling flushSync', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'extreme-flush-exit.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - - await once(child, 'close') - - isNot(actual.match(/hello/), null) - isNot(actual.match(/world/), null) -}) diff --git a/node_modules/pino/test/extreme.test.js b/node_modules/pino/test/extreme.test.js deleted file mode 100644 index 7145d45..0000000 --- a/node_modules/pino/test/extreme.test.js +++ /dev/null @@ -1,125 +0,0 @@ -'use strict' - -const os = require('os') -const { createWriteStream } = require('fs') -const { join } = require('path') -const { test } = require('tap') -const { fork } = require('child_process') -const writer = require('flush-write-stream') -const { once, getPathToNull } = require('./helper') - -test('extreme mode', async ({ is, teardown }) => { - const now = Date.now - const hostname = os.hostname - const proc = process - global.process = { - __proto__: process, - pid: 123456 - } - Date.now = () => 1459875739796 - os.hostname = () => 'abcdefghijklmnopqr' - delete require.cache[require.resolve('../')] - const pino = require('../') - var expected = '' - var actual = '' - const normal = pino(writer((s, enc, cb) => { - expected += s - cb() - })) - - const dest = createWriteStream(getPathToNull()) - dest.write = (s) => { - actual += s - } - const extreme = pino(dest) - - var i = 44 - while (i--) { - normal.info('h') - extreme.info('h') - } - - var expected2 = expected.split('\n')[0] - var actual2 = '' - - const child = fork(join(__dirname, '/fixtures/extreme.js'), { silent: true }) - child.stdout.pipe(writer((s, enc, cb) => { - actual2 += s - cb() - })) - await once(child, 'close') - is(actual, expected) - is(actual2.trim(), expected2) - - teardown(() => { - os.hostname = hostname - Date.now = now - global.process = proc - }) -}) - -test('extreme mode with child', async ({ is, teardown }) => { - const now = Date.now - const hostname = os.hostname - const proc = process - global.process = { - __proto__: process, - pid: 123456 - } - Date.now = function () { - return 1459875739796 - } - os.hostname = function () { - return 'abcdefghijklmnopqr' - } - delete require.cache[require.resolve('../')] - const pino = require('../') - var expected = '' - var actual = '' - const normal = pino(writer((s, enc, cb) => { - expected += s - cb() - })).child({ hello: 'world' }) - - const dest = createWriteStream(getPathToNull()) - dest.write = function (s) { actual += s } - const extreme = pino(dest).child({ hello: 'world' }) - - var i = 500 - while (i--) { - normal.info('h') - extreme.info('h') - } - - extreme.flush() - - var expected2 = expected.split('\n')[0] - var actual2 = '' - - const child = fork(join(__dirname, '/fixtures/extreme-child.js'), { silent: true }) - child.stdout.pipe(writer((s, enc, cb) => { - actual2 += s - cb() - })) - await once(child, 'close') - is(actual, expected) - is(actual2.trim(), expected2) - - teardown(() => { - os.hostname = hostname - Date.now = now - global.process = proc - }) -}) - -test('throw an error if extreme is passed', async ({ throws }) => { - const pino = require('..') - throws(() => { - pino({ extreme: true }) - }) -}) - -test('flush does nothing without extreme mode', async () => { - var instance = require('..')() - instance.flush() -}) diff --git a/node_modules/pino/test/final.test.js b/node_modules/pino/test/final.test.js deleted file mode 100644 index b5d6d0d..0000000 --- a/node_modules/pino/test/final.test.js +++ /dev/null @@ -1,182 +0,0 @@ -'use strict' -const pino = require('..') -const fs = require('fs') -const { test } = require('tap') -const { sleep, getPathToNull } = require('./helper') - -test('replaces onTerminated option', async ({ throws }) => { - throws(() => { - pino({ - onTerminated: () => {} - }) - }, Error('The onTerminated option has been removed, use pino.final instead')) -}) - -test('throws if not supplied a logger instance', async ({ throws }) => { - throws(() => { - pino.final() - }, Error('expected a pino logger instance')) -}) - -test('throws if the supplied handler is not a function', async ({ throws }) => { - throws(() => { - pino.final(pino(), 'dummy') - }, Error('if supplied, the handler parameter should be a function')) -}) - -test('throws if not supplied logger with pino.extreme instance', async ({ throws, doesNotThrow }) => { - throws(() => { - pino.final(pino(fs.createWriteStream(getPathToNull())), () => {}) - }, Error('final requires a stream that has a flushSync method, such as pino.destination and pino.extreme')) - - doesNotThrow(() => { - pino.final(pino(pino.extreme()), () => {}) - }) - - doesNotThrow(() => { - pino.final(pino(pino.extreme()), () => {}) - }) -}) - -test('returns an exit listener function', async ({ is }) => { - is(typeof pino.final(pino(pino.extreme()), () => {}), 'function') -}) - -test('listener function immediately sync flushes when fired', async ({ pass, fail }) => { - const dest = pino.extreme(getPathToNull()) - var passed = false - dest.flushSync = () => { - passed = true - pass('flushSync called') - } - pino.final(pino(dest), () => {})() - await sleep(10) - if (passed === false) fail('flushSync not called') -}) - -test('listener function immediately sync flushes when fired (pino.destination)', async ({ pass, fail }) => { - const dest = pino.destination(getPathToNull()) - var passed = false - dest.flushSync = () => { - passed = true - pass('flushSync called') - } - pino.final(pino(dest), () => {})() - await sleep(10) - if (passed === false) fail('flushSync not called') -}) - -test('swallows the non-ready error', async ({ doesNotThrow }) => { - const dest = pino.extreme(getPathToNull()) - doesNotThrow(() => { - pino.final(pino(dest), () => {})() - }) -}) - -test('listener function triggers handler function parameter', async ({ pass, fail }) => { - const dest = pino.extreme(getPathToNull()) - var passed = false - pino.final(pino(dest), () => { - passed = true - pass('handler function triggered') - })() - await sleep(10) - if (passed === false) fail('handler function not triggered') -}) - -test('passes any error to the handler', async ({ is }) => { - const dest = pino.extreme(getPathToNull()) - pino.final(pino(dest), (err) => { - is(err.message, 'test') - })(Error('test')) -}) - -test('passes a specialized final logger instance', async ({ is, isNot, error }) => { - const dest = pino.extreme(getPathToNull()) - const logger = pino(dest) - pino.final(logger, (err, finalLogger) => { - error(err) - is(typeof finalLogger.trace, 'function') - is(typeof finalLogger.debug, 'function') - is(typeof finalLogger.info, 'function') - is(typeof finalLogger.warn, 'function') - is(typeof finalLogger.error, 'function') - is(typeof finalLogger.fatal, 'function') - - isNot(finalLogger.trace, logger.trace) - isNot(finalLogger.debug, logger.debug) - isNot(finalLogger.info, logger.info) - isNot(finalLogger.warn, logger.warn) - isNot(finalLogger.error, logger.error) - isNot(finalLogger.fatal, logger.fatal) - - is(finalLogger.child, logger.child) - is(finalLogger.levels, logger.levels) - })() -}) - -test('returns a specialized final logger instance if no handler is passed', async ({ is, isNot }) => { - const dest = pino.extreme(getPathToNull()) - const logger = pino(dest) - const finalLogger = pino.final(logger) - is(typeof finalLogger.trace, 'function') - is(typeof finalLogger.debug, 'function') - is(typeof finalLogger.info, 'function') - is(typeof finalLogger.warn, 'function') - is(typeof finalLogger.error, 'function') - is(typeof finalLogger.fatal, 'function') - - isNot(finalLogger.trace, logger.trace) - isNot(finalLogger.debug, logger.debug) - isNot(finalLogger.info, logger.info) - isNot(finalLogger.warn, logger.warn) - isNot(finalLogger.error, logger.error) - isNot(finalLogger.fatal, logger.fatal) - - is(finalLogger.child, logger.child) - is(finalLogger.levels, logger.levels) -}) - -test('final logger instances synchronously flush after a log method call', async ({ pass, fail, error }) => { - const dest = pino.extreme(getPathToNull()) - const logger = pino(dest) - var passed = false - var count = 0 - dest.flushSync = () => { - count++ - if (count === 2) { - passed = true - pass('flushSync called') - } - } - pino.final(logger, (err, finalLogger) => { - error(err) - finalLogger.info('hello') - })() - await sleep(10) - if (passed === false) fail('flushSync not called') -}) - -test('also instruments custom log methods', async ({ pass, fail, error }) => { - const dest = pino.extreme(getPathToNull()) - const logger = pino({ - customLevels: { - foo: 35 - } - }, dest) - var passed = false - var count = 0 - dest.flushSync = () => { - count++ - if (count === 2) { - passed = true - pass('flushSync called') - } - } - pino.final(logger, (err, finalLogger) => { - error(err) - finalLogger.foo('hello') - })() - await sleep(10) - if (passed === false) fail('flushSync not called') -}) diff --git a/node_modules/pino/test/fixtures/broken-pipe/basic.js b/node_modules/pino/test/fixtures/broken-pipe/basic.js deleted file mode 100644 index def7cd0..0000000 --- a/node_modules/pino/test/fixtures/broken-pipe/basic.js +++ /dev/null @@ -1,9 +0,0 @@ -'use strict' - -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } - -const pino = require('../../..')() - -pino.info('hello world') diff --git a/node_modules/pino/test/fixtures/broken-pipe/destination.js b/node_modules/pino/test/fixtures/broken-pipe/destination.js deleted file mode 100644 index 15a8102..0000000 --- a/node_modules/pino/test/fixtures/broken-pipe/destination.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict' - -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } - -const pino = require('../../..') -const logger = pino(pino.destination()) - -logger.info('hello world') diff --git a/node_modules/pino/test/fixtures/broken-pipe/extreme.js b/node_modules/pino/test/fixtures/broken-pipe/extreme.js deleted file mode 100644 index 27a624b..0000000 --- a/node_modules/pino/test/fixtures/broken-pipe/extreme.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } - -const pino = require('../../..') -const logger = pino(pino.extreme()) - -for (let i = 0; i < 1000; i++) { - logger.info('hello world') -} diff --git a/node_modules/pino/test/fixtures/destination-exit.js b/node_modules/pino/test/fixtures/destination-exit.js deleted file mode 100644 index c14ab07..0000000 --- a/node_modules/pino/test/fixtures/destination-exit.js +++ /dev/null @@ -1,8 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../')) -var logger = pino({}, pino.destination(1)) -logger.info('hello') -logger.info('world') -process.exit(0) diff --git a/node_modules/pino/test/fixtures/extreme-child.js b/node_modules/pino/test/fixtures/extreme-child.js deleted file mode 100644 index 81528ab..0000000 --- a/node_modules/pino/test/fixtures/extreme-child.js +++ /dev/null @@ -1,6 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../')) -var extreme = pino(pino.extreme()).child({ hello: 'world' }) -pino.final(extreme, (_, logger) => logger.info('h'))() diff --git a/node_modules/pino/test/fixtures/extreme-exit.js b/node_modules/pino/test/fixtures/extreme-exit.js deleted file mode 100644 index a90cc67..0000000 --- a/node_modules/pino/test/fixtures/extreme-exit.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../')) -var dest = pino.extreme(1) -var logger = pino({}, dest) -logger.info('hello') -logger.info('world') -process.exit(0) diff --git a/node_modules/pino/test/fixtures/extreme-flush-exit.js b/node_modules/pino/test/fixtures/extreme-flush-exit.js deleted file mode 100644 index 3abf7e0..0000000 --- a/node_modules/pino/test/fixtures/extreme-flush-exit.js +++ /dev/null @@ -1,10 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../')) -var dest = pino.extreme(1) -var logger = pino({}, dest) -logger.info('hello') -logger.info('world') -dest.flushSync() -process.exit(0) diff --git a/node_modules/pino/test/fixtures/extreme.js b/node_modules/pino/test/fixtures/extreme.js deleted file mode 100644 index 20b2a6c..0000000 --- a/node_modules/pino/test/fixtures/extreme.js +++ /dev/null @@ -1,6 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../')) -var extreme = pino(pino.extreme()) -pino.final(extreme, (_, logger) => logger.info('h'))() diff --git a/node_modules/pino/test/fixtures/pretty/basic.js b/node_modules/pino/test/fixtures/pretty/basic.js deleted file mode 100644 index 5ad1798..0000000 --- a/node_modules/pino/test/fixtures/pretty/basic.js +++ /dev/null @@ -1,6 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ prettyPrint: true }) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/child.js b/node_modules/pino/test/fixtures/pretty/child.js deleted file mode 100644 index ed4d90c..0000000 --- a/node_modules/pino/test/fixtures/pretty/child.js +++ /dev/null @@ -1,8 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ prettyPrint: true }).child({ a: 1 }) -log.info('h') -log.child({ b: 2 }).info('h3') -setTimeout(() => log.info('h2'), 200) diff --git a/node_modules/pino/test/fixtures/pretty/custom-time-label.js b/node_modules/pino/test/fixtures/pretty/custom-time-label.js deleted file mode 100644 index 4384034..0000000 --- a/node_modules/pino/test/fixtures/pretty/custom-time-label.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ - timestamp: () => ',"custom-time-label":"test"', - prettyPrint: true -}) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/custom-time.js b/node_modules/pino/test/fixtures/pretty/custom-time.js deleted file mode 100644 index 092632b..0000000 --- a/node_modules/pino/test/fixtures/pretty/custom-time.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ - timestamp: () => ',"time":"test"', - prettyPrint: true -}) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/dateformat.js b/node_modules/pino/test/fixtures/pretty/dateformat.js deleted file mode 100644 index 6697fc3..0000000 --- a/node_modules/pino/test/fixtures/pretty/dateformat.js +++ /dev/null @@ -1,10 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ - prettyPrint: { - translateTime: true - } -}) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/error-props.js b/node_modules/pino/test/fixtures/pretty/error-props.js deleted file mode 100644 index 32812cf..0000000 --- a/node_modules/pino/test/fixtures/pretty/error-props.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ - prettyPrint: { errorProps: 'code,errno' } -}) -var err = Object.assign(new Error('kaboom'), { code: 'ENOENT', errno: 1 }) -log.error(err) diff --git a/node_modules/pino/test/fixtures/pretty/error.js b/node_modules/pino/test/fixtures/pretty/error.js deleted file mode 100644 index 309976d..0000000 --- a/node_modules/pino/test/fixtures/pretty/error.js +++ /dev/null @@ -1,7 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ prettyPrint: true }) -log.error(new Error('kaboom')) -log.error(new Error('kaboom'), 'with', 'a', 'message') diff --git a/node_modules/pino/test/fixtures/pretty/final-no-log-before.js b/node_modules/pino/test/fixtures/pretty/final-no-log-before.js deleted file mode 100644 index 7735042..0000000 --- a/node_modules/pino/test/fixtures/pretty/final-no-log-before.js +++ /dev/null @@ -1,8 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ prettyPrint: true }) -process.once('beforeExit', pino.final(log, (_, logger) => { - logger.info('beforeExit') -})) diff --git a/node_modules/pino/test/fixtures/pretty/final-return.js b/node_modules/pino/test/fixtures/pretty/final-return.js deleted file mode 100644 index d2146ea..0000000 --- a/node_modules/pino/test/fixtures/pretty/final-return.js +++ /dev/null @@ -1,7 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ prettyPrint: true }) -log.info('h') -pino.final(log).info('after') diff --git a/node_modules/pino/test/fixtures/pretty/final.js b/node_modules/pino/test/fixtures/pretty/final.js deleted file mode 100644 index 1bf07c1..0000000 --- a/node_modules/pino/test/fixtures/pretty/final.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ prettyPrint: true }) -log.info('h') -process.once('beforeExit', pino.final(log, (_, logger) => { - logger.info('beforeExit') -})) diff --git a/node_modules/pino/test/fixtures/pretty/level-first.js b/node_modules/pino/test/fixtures/pretty/level-first.js deleted file mode 100644 index e1c9e44..0000000 --- a/node_modules/pino/test/fixtures/pretty/level-first.js +++ /dev/null @@ -1,6 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ prettyPrint: { levelFirst: true } }) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/no-time.js b/node_modules/pino/test/fixtures/pretty/no-time.js deleted file mode 100644 index 7e0bfbe..0000000 --- a/node_modules/pino/test/fixtures/pretty/no-time.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ - timestamp: false, - prettyPrint: true -}) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/obj-msg-prop.js b/node_modules/pino/test/fixtures/pretty/obj-msg-prop.js deleted file mode 100644 index 0869dae..0000000 --- a/node_modules/pino/test/fixtures/pretty/obj-msg-prop.js +++ /dev/null @@ -1,6 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ prettyPrint: true }) -log.info({ msg: 'hello' }) diff --git a/node_modules/pino/test/fixtures/pretty/pretty-factory.js b/node_modules/pino/test/fixtures/pretty/pretty-factory.js deleted file mode 100644 index c0428ae..0000000 --- a/node_modules/pino/test/fixtures/pretty/pretty-factory.js +++ /dev/null @@ -1,6 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ prettyPrint: { levelFirst: true }, prettifier: require('pino-pretty') }) -log.info('h') diff --git a/node_modules/pino/test/fixtures/pretty/redact.js b/node_modules/pino/test/fixtures/pretty/redact.js deleted file mode 100644 index 05c0c8a..0000000 --- a/node_modules/pino/test/fixtures/pretty/redact.js +++ /dev/null @@ -1,9 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ - prettyPrint: true, - redact: ['foo.an'] -}) -log.info({ foo: { an: 'object' } }, 'h') diff --git a/node_modules/pino/test/fixtures/pretty/serializers.js b/node_modules/pino/test/fixtures/pretty/serializers.js deleted file mode 100644 index fcdb211..0000000 --- a/node_modules/pino/test/fixtures/pretty/serializers.js +++ /dev/null @@ -1,17 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ - prettyPrint: true, - serializers: { - foo (obj) { - if (obj.an !== 'object') { - throw new Error('kaboom') - } - - return 'bar' - } - } -}) -log.info({ foo: { an: 'object' } }, 'h') diff --git a/node_modules/pino/test/fixtures/pretty/skipped-output.js b/node_modules/pino/test/fixtures/pretty/skipped-output.js deleted file mode 100644 index 048905a..0000000 --- a/node_modules/pino/test/fixtures/pretty/skipped-output.js +++ /dev/null @@ -1,13 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('./../../../')) -var log = pino({ - prettyPrint: true, - prettifier: function () { - return function () { - return undefined - } - } -}) -log.info('h') diff --git a/node_modules/pino/test/fixtures/stdout-hack-protection.js b/node_modules/pino/test/fixtures/stdout-hack-protection.js deleted file mode 100644 index bd52f8d..0000000 --- a/node_modules/pino/test/fixtures/stdout-hack-protection.js +++ /dev/null @@ -1,11 +0,0 @@ -global.process = { __proto__: process, pid: 123456 } - -const write = process.stdout.write.bind(process.stdout) -process.stdout.write = function (chunk) { - write('hack ' + chunk) -} - -Date.now = function () { return 1459875739796 } -require('os').hostname = function () { return 'abcdefghijklmnopqr' } -var pino = require(require.resolve('../../'))() -pino.info('me') diff --git a/node_modules/pino/test/helper.js b/node_modules/pino/test/helper.js deleted file mode 100644 index 1074099..0000000 --- a/node_modules/pino/test/helper.js +++ /dev/null @@ -1,55 +0,0 @@ -'use strict' - -const os = require('os') -const writer = require('flush-write-stream') -const split = require('split2') -const pid = process.pid -const hostname = os.hostname() -const v = 1 - -const isWin = process.platform === 'win32' - -function getPathToNull () { - return isWin ? '\\\\.\\NUL' : '/dev/null' -} - -function once (emitter, name) { - return new Promise((resolve, reject) => { - if (name !== 'error') emitter.once('error', reject) - emitter.once(name, (...args) => { - emitter.removeListener('error', reject) - resolve(...args) - }) - }) -} - -function sink (func) { - const result = split((data) => { - try { - return JSON.parse(data) - } catch (err) { - console.log(err) - console.log(data) - } - }) - if (func) result.pipe(writer.obj(func)) - return result -} - -function check (is, chunk, level, msg) { - is(new Date(chunk.time) <= new Date(), true, 'time is greater than Date.now()') - delete chunk.time - is(chunk.pid, pid) - is(chunk.hostname, hostname) - is(chunk.level, level) - is(chunk.msg, msg) - is(chunk.v, v) -} - -function sleep (ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms) - }) -} - -module.exports = { getPathToNull, sink, check, once, sleep } diff --git a/node_modules/pino/test/http.test.js b/node_modules/pino/test/http.test.js deleted file mode 100644 index 1c2023e..0000000 --- a/node_modules/pino/test/http.test.js +++ /dev/null @@ -1,247 +0,0 @@ -'use strict' - -const http = require('http') -const os = require('os') -const semver = require('semver') -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -const { pid } = process -const hostname = os.hostname() - -test('http request support', async ({ ok, same, error, teardown }) => { - var originalReq - const instance = pino(sink((chunk, enc) => { - ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - same(chunk, { - pid: pid, - hostname: hostname, - level: 30, - msg: 'my request', - v: 1, - req: { - method: originalReq.method, - url: originalReq.url, - headers: originalReq.headers, - remoteAddress: originalReq.connection.remoteAddress, - remotePort: originalReq.connection.remotePort - } - }) - })) - - const server = http.createServer((req, res) => { - originalReq = req - instance.info(req, 'my request') - res.end('hello') - }) - server.unref() - server.listen() - const err = await once(server, 'listening') - error(err) - const res = await once(http.get('http://localhost:' + server.address().port), 'response') - res.resume() - server.close() -}) - -test('http request support via serializer', async ({ ok, same, error, teardown }) => { - var originalReq - const instance = pino({ - serializers: { - req: pino.stdSerializers.req - } - }, sink((chunk, enc) => { - ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - same(chunk, { - pid: pid, - hostname: hostname, - level: 30, - msg: 'my request', - v: 1, - req: { - method: originalReq.method, - url: originalReq.url, - headers: originalReq.headers, - remoteAddress: originalReq.connection.remoteAddress, - remotePort: originalReq.connection.remotePort - } - }) - })) - - const server = http.createServer(function (req, res) { - originalReq = req - instance.info({ req: req }, 'my request') - res.end('hello') - }) - server.unref() - server.listen() - const err = await once(server, 'listening') - error(err) - - const res = await once(http.get('http://localhost:' + server.address().port), 'response') - res.resume() - server.close() -}) - -test('http request support via serializer without request connection', async ({ ok, same, error, teardown }) => { - var originalReq - const instance = pino({ - serializers: { - req: pino.stdSerializers.req - } - }, sink((chunk, enc) => { - ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - const expected = { - pid: pid, - hostname: hostname, - level: 30, - msg: 'my request', - v: 1, - req: { - method: originalReq.method, - url: originalReq.url, - headers: originalReq.headers - } - } - if (semver.gte(process.version, '13.0.0')) { - expected.req.remoteAddress = originalReq.connection.remoteAddress - expected.req.remotePort = originalReq.connection.remotePort - } - same(chunk, expected) - })) - - const server = http.createServer(function (req, res) { - originalReq = req - delete req.connection - instance.info({ req: req }, 'my request') - res.end('hello') - }) - server.unref() - server.listen() - const err = await once(server, 'listening') - error(err) - - const res = await once(http.get('http://localhost:' + server.address().port), 'response') - res.resume() - server.close() -}) - -test('http response support', async ({ ok, same, error, teardown }) => { - var originalRes - const instance = pino(sink((chunk, enc) => { - ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - same(chunk, { - pid: pid, - hostname: hostname, - level: 30, - msg: 'my response', - v: 1, - res: { - statusCode: originalRes.statusCode, - headers: originalRes._headers - } - }) - })) - - const server = http.createServer(function (req, res) { - originalRes = res - res.end('hello') - instance.info(res, 'my response') - }) - server.unref() - server.listen() - const err = await once(server, 'listening') - - error(err) - - const res = await once(http.get('http://localhost:' + server.address().port), 'response') - res.resume() - server.close() -}) - -test('http response support via a serializer', async ({ ok, same, error, teardown }) => { - const instance = pino({ - serializers: { - res: pino.stdSerializers.res - } - }, sink((chunk, enc) => { - ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - same(chunk, { - pid: pid, - hostname: hostname, - level: 30, - msg: 'my response', - v: 1, - res: { - statusCode: 200, - headers: { - 'x-single': 'y', - 'x-multi': [1, 2] - } - } - }) - })) - - const server = http.createServer(function (req, res) { - res.setHeader('x-single', 'y') - res.setHeader('x-multi', [1, 2]) - res.end('hello') - instance.info({ res: res }, 'my response') - }) - - server.unref() - server.listen() - const err = await once(server, 'listening') - error(err) - - const res = await once(http.get('http://localhost:' + server.address().port), 'response') - res.resume() - server.close() -}) - -test('http request support via serializer in a child', async ({ ok, same, error, teardown }) => { - var originalReq - const instance = pino({ - serializers: { - req: pino.stdSerializers.req - } - }, sink((chunk, enc) => { - ok(new Date(chunk.time) <= new Date(), 'time is greater than Date.now()') - delete chunk.time - same(chunk, { - pid: pid, - hostname: hostname, - level: 30, - msg: 'my request', - v: 1, - req: { - method: originalReq.method, - url: originalReq.url, - headers: originalReq.headers, - remoteAddress: originalReq.connection.remoteAddress, - remotePort: originalReq.connection.remotePort - } - }) - })) - - const server = http.createServer(function (req, res) { - originalReq = req - const child = instance.child({ req: req }) - child.info('my request') - res.end('hello') - }) - - server.unref() - server.listen() - const err = await once(server, 'listening') - error(err) - - const res = await once(http.get('http://localhost:' + server.address().port), 'response') - res.resume() - server.close() -}) diff --git a/node_modules/pino/test/is-level-enabled.test.js b/node_modules/pino/test/is-level-enabled.test.js deleted file mode 100644 index d8cd2da..0000000 --- a/node_modules/pino/test/is-level-enabled.test.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict' - -const { test } = require('tap') -const pino = require('../') - -test('can check if current level enabled', async ({ is }) => { - const log = pino({ level: 'debug' }) - is(true, log.isLevelEnabled('debug')) -}) - -test('can check if level enabled after level set', async ({ is }) => { - const log = pino() - is(false, log.isLevelEnabled('debug')) - log.level = 'debug' - is(true, log.isLevelEnabled('debug')) -}) - -test('can check if higher level enabled', async ({ is }) => { - const log = pino({ level: 'debug' }) - is(true, log.isLevelEnabled('error')) -}) - -test('can check if lower level is disabled', async ({ is }) => { - const log = pino({ level: 'error' }) - is(false, log.isLevelEnabled('trace')) -}) - -test('can check if child has current level enabled', async ({ is }) => { - const log = pino().child({ level: 'debug' }) - is(true, log.isLevelEnabled('debug')) - is(true, log.isLevelEnabled('error')) - is(false, log.isLevelEnabled('trace')) -}) - -test('can check if custom level is enabled', async ({ is }) => { - const log = pino({ - customLevels: { foo: 35 }, - level: 'debug' - }) - is(true, log.isLevelEnabled('foo')) - is(true, log.isLevelEnabled('error')) - is(false, log.isLevelEnabled('trace')) -}) diff --git a/node_modules/pino/test/levels.test.js b/node_modules/pino/test/levels.test.js deleted file mode 100644 index db5f321..0000000 --- a/node_modules/pino/test/levels.test.js +++ /dev/null @@ -1,441 +0,0 @@ -'use strict' - -const { test } = require('tap') -const { sink, once, check } = require('./helper') -const pino = require('../') - -test('set the level by string', async ({ is }) => { - const expected = [{ - level: 50, - msg: 'this is an error' - }, { - level: 60, - msg: 'this is fatal' - }] - const stream = sink() - const instance = pino(stream) - instance.level = 'error' - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - const result = await once(stream, 'data') - const current = expected.shift() - check(is, result, current.level, current.msg) -}) - -test('the wrong level throws', async ({ throws }) => { - const instance = pino() - throws(() => { - instance.level = 'kaboom' - }) -}) - -test('set the level by number', async ({ is }) => { - const expected = [{ - level: 50, - msg: 'this is an error' - }, { - level: 60, - msg: 'this is fatal' - }] - const stream = sink() - const instance = pino(stream) - - instance.level = 50 - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - const result = await once(stream, 'data') - const current = expected.shift() - check(is, result, current.level, current.msg) -}) - -test('exposes level string mappings', async ({ is }) => { - is(pino.levels.values.error, 50) -}) - -test('exposes level number mappings', async ({ is }) => { - is(pino.levels.labels[50], 'error') -}) - -test('returns level integer', async ({ is }) => { - const instance = pino({ level: 'error' }) - is(instance.levelVal, 50) -}) - -test('child returns level integer', async ({ is }) => { - const parent = pino({ level: 'error' }) - const child = parent.child({ foo: 'bar' }) - is(child.levelVal, 50) -}) - -test('set the level via exported pino function', async ({ is }) => { - const expected = [{ - level: 50, - msg: 'this is an error' - }, { - level: 60, - msg: 'this is fatal' - }] - const stream = sink() - const instance = pino({ level: 'error' }, stream) - - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') - const result = await once(stream, 'data') - const current = expected.shift() - check(is, result, current.level, current.msg) -}) - -test('level-change event', async ({ is }) => { - const instance = pino() - function handle (lvl, val, prevLvl, prevVal) { - is(lvl, 'trace') - is(val, 10) - is(prevLvl, 'info') - is(prevVal, 30) - } - instance.on('level-change', handle) - instance.level = 'trace' - instance.removeListener('level-change', handle) - instance.level = 'info' - - var count = 0 - - const l1 = () => count++ - const l2 = () => count++ - const l3 = () => count++ - instance.on('level-change', l1) - instance.on('level-change', l2) - instance.on('level-change', l3) - - instance.level = 'trace' - instance.removeListener('level-change', l3) - instance.level = 'fatal' - instance.removeListener('level-change', l1) - instance.level = 'debug' - instance.removeListener('level-change', l2) - instance.level = 'info' - - is(count, 6) -}) - -test('enable', async ({ fail }) => { - const instance = pino({ - level: 'trace', - enabled: false - }, sink((result, enc) => { - fail('no data should be logged') - })) - - Object.keys(pino.levels.values).forEach((level) => { - instance[level]('hello world') - }) -}) - -test('silent level', async ({ fail }) => { - const instance = pino({ - level: 'silent' - }, sink((result, enc) => { - fail('no data should be logged') - })) - - Object.keys(pino.levels.values).forEach((level) => { - instance[level]('hello world') - }) -}) - -test('set silent via Infinity', async ({ fail }) => { - const instance = pino({ - level: Infinity - }, sink((result, enc) => { - fail('no data should be logged') - })) - - Object.keys(pino.levels.values).forEach((level) => { - instance[level]('hello world') - }) -}) - -test('exposed levels', async ({ same }) => { - same(Object.keys(pino.levels.values), [ - 'trace', - 'debug', - 'info', - 'warn', - 'error', - 'fatal' - ]) -}) - -test('exposed labels', async ({ same }) => { - same(Object.keys(pino.levels.labels), [ - '10', - '20', - '30', - '40', - '50', - '60' - ]) -}) - -test('setting level in child', async ({ is }) => { - const expected = [{ - level: 50, - msg: 'this is an error' - }, { - level: 60, - msg: 'this is fatal' - }] - const instance = pino(sink((result, enc, cb) => { - const current = expected.shift() - check(is, result, current.level, current.msg) - cb() - })).child({ level: 30 }) - - instance.level = 'error' - instance.info('hello world') - instance.error('this is an error') - instance.fatal('this is fatal') -}) - -test('setting level by assigning a number to level', async ({ is }) => { - const instance = pino() - is(instance.levelVal, 30) - is(instance.level, 'info') - instance.level = 50 - is(instance.levelVal, 50) - is(instance.level, 'error') -}) - -test('setting level by number to unknown value results in a throw', async ({ throws }) => { - const instance = pino() - throws(() => { instance.level = 973 }) -}) - -test('setting level by assigning a known label to level', async ({ is }) => { - const instance = pino() - is(instance.levelVal, 30) - is(instance.level, 'info') - instance.level = 'error' - is(instance.levelVal, 50) - is(instance.level, 'error') -}) - -test('levelVal is read only', async ({ throws }) => { - const instance = pino() - throws(() => { instance.levelVal = 20 }) -}) - -test('produces labels when told to', async ({ is }) => { - const expected = [{ - level: 'info', - msg: 'hello world' - }] - const instance = pino({ useLevelLabels: true }, sink((result, enc, cb) => { - const current = expected.shift() - check(is, result, current.level, current.msg) - cb() - })) - - instance.info('hello world') -}) - -test('resets levels from labels to numbers', async ({ is }) => { - const expected = [{ - level: 30, - msg: 'hello world' - }] - pino({ useLevelLabels: true }) - const instance = pino({ useLevelLabels: false }, sink((result, enc, cb) => { - const current = expected.shift() - check(is, result, current.level, current.msg) - cb() - })) - - instance.info('hello world') -}) - -test('aliases changeLevelName to levelKey', async ({ is }) => { - const instance = pino({ changeLevelName: 'priority' }, sink((result, enc, cb) => { - is(result.priority, 30) - cb() - })) - - instance.info('hello world') -}) - -test('changes label naming when told to', async ({ is }) => { - const expected = [{ - priority: 30, - msg: 'hello world' - }] - const instance = pino({ levelKey: 'priority' }, sink((result, enc, cb) => { - const current = expected.shift() - is(result.priority, current.priority) - is(result.msg, current.msg) - cb() - })) - - instance.info('hello world') -}) - -test('children produce labels when told to', async ({ is }) => { - const expected = [ - { - level: 'info', - msg: 'child 1' - }, - { - level: 'info', - msg: 'child 2' - } - ] - const instance = pino({ useLevelLabels: true }, sink((result, enc, cb) => { - const current = expected.shift() - check(is, result, current.level, current.msg) - cb() - })) - - const child1 = instance.child({ name: 'child1' }) - const child2 = child1.child({ name: 'child2' }) - - child1.info('child 1') - child2.info('child 2') -}) - -test('produces labels for custom levels', async ({ is }) => { - const expected = [ - { - level: 'info', - msg: 'hello world' - }, - { - level: 'foo', - msg: 'foobar' - } - ] - const opts = { - useLevelLabels: true, - customLevels: { - foo: 35 - } - } - const instance = pino(opts, sink((result, enc, cb) => { - const current = expected.shift() - check(is, result, current.level, current.msg) - cb() - })) - - instance.info('hello world') - instance.foo('foobar') -}) - -test('setting levelKey does not affect labels when told to', async ({ is }) => { - const instance = pino( - { - useLevelLabels: true, - levelKey: 'priority' - }, - sink((result, enc, cb) => { - is(result.priority, 'info') - cb() - }) - ) - - instance.info('hello world') -}) - -test('throws when creating a default label that does not exist in logger levels', async ({ is, throws }) => { - const defaultLevel = 'foo' - throws(() => { - pino({ - customLevels: { - bar: 5 - }, - level: defaultLevel - }) - }) - try { - pino({ - level: defaultLevel - }) - } catch ({ message }) { - is(message, `default level:${defaultLevel} must be included in custom levels`) - } -}) - -test('throws when creating a default value that does not exist in logger levels', async ({ is, throws }) => { - const defaultLevel = 15 - throws(() => { - pino({ - customLevels: { - bar: 5 - }, - level: defaultLevel - }) - }) - try { - pino({ - level: defaultLevel - }) - } catch ({ message }) { - is(message, `default level:${defaultLevel} must be included in custom levels`) - } -}) - -test('throws when creating a default value that does not exist in logger levels', async ({ is, throws }) => { - throws(() => { - pino({ - customLevels: { - foo: 5 - }, - useOnlyCustomLevels: true - }) - }) - try { - pino({ - customLevels: { - foo: 5 - }, - useOnlyCustomLevels: true - }) - } catch ({ message }) { - is(message, 'default level:info must be included in custom levels') - } -}) - -test('passes when creating a default value that exists in logger levels', async ({ is, throws }) => { - pino({ - level: 30 - }) -}) - -test('fatal method sync-flushes the destination if sync flushing is available', async ({ pass, doesNotThrow, plan }) => { - plan(2) - const stream = sink() - stream.flushSync = () => { - pass('destination flushed') - } - const instance = pino(stream) - instance.fatal('this is fatal') - await once(stream, 'data') - doesNotThrow(() => { - stream.flushSync = undefined - instance.fatal('this is fatal') - }) -}) - -test('fatal method should call async when sync-flushing fails', ({ equal, fail, doesNotThrow, plan }) => { - plan(2) - const messages = [ - 'this is fatal 1' - ] - const stream = sink((result) => equal(result.msg, messages.shift())) - stream.flushSync = () => { throw new Error('Error') } - stream.flush = () => fail('flush should be called') - - const instance = pino(stream) - doesNotThrow(() => instance.fatal(messages[0])) -}) diff --git a/node_modules/pino/test/metadata.test.js b/node_modules/pino/test/metadata.test.js deleted file mode 100644 index d902d3c..0000000 --- a/node_modules/pino/test/metadata.test.js +++ /dev/null @@ -1,110 +0,0 @@ -'use strict' - -const os = require('os') -const { test } = require('tap') -const pino = require('../') - -const { pid } = process -const hostname = os.hostname() - -test('metadata works', async ({ ok, same, is }) => { - const now = Date.now() - const instance = pino({}, { - [Symbol.for('pino.metadata')]: true, - write (chunk) { - is(instance, this.lastLogger) - is(30, this.lastLevel) - is('a msg', this.lastMsg) - ok(Number(this.lastTime) >= now) - same(this.lastObj, { hello: 'world', msg: 'a msg' }) - const result = JSON.parse(chunk) - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - hello: 'world', - msg: 'a msg', - v: 1 - }) - } - }) - - instance.info({ hello: 'world' }, 'a msg') -}) - -test('child loggers works', async ({ ok, same, is }) => { - const instance = pino({}, { - [Symbol.for('pino.metadata')]: true, - write (chunk) { - is(child, this.lastLogger) - is(30, this.lastLevel) - is('a msg', this.lastMsg) - same(this.lastObj, { from: 'child', msg: 'a msg' }) - const result = JSON.parse(chunk) - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - hello: 'world', - from: 'child', - msg: 'a msg', - v: 1 - }) - } - }) - - const child = instance.child({ hello: 'world' }) - child.info({ from: 'child' }, 'a msg') -}) - -test('without object', async ({ ok, same, is }) => { - const instance = pino({}, { - [Symbol.for('pino.metadata')]: true, - write (chunk) { - is(instance, this.lastLogger) - is(30, this.lastLevel) - is('a msg', this.lastMsg) - same({ msg: 'a msg' }, this.lastObj) - const result = JSON.parse(chunk) - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - msg: 'a msg', - v: 1 - }) - } - }) - - instance.info('a msg') -}) - -test('without msg', async ({ ok, same, is }) => { - const instance = pino({}, { - [Symbol.for('pino.metadata')]: true, - write (chunk) { - is(instance, this.lastLogger) - is(30, this.lastLevel) - is(undefined, this.lastMsg) - same({ hello: 'world' }, this.lastObj) - const result = JSON.parse(chunk) - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid: pid, - hostname: hostname, - level: 30, - hello: 'world', - v: 1 - }) - } - }) - - instance.info({ hello: 'world' }) -}) diff --git a/node_modules/pino/test/mixin.test.js b/node_modules/pino/test/mixin.test.js deleted file mode 100644 index 057d766..0000000 --- a/node_modules/pino/test/mixin.test.js +++ /dev/null @@ -1,106 +0,0 @@ -'use strict' - -const os = require('os') -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -const { pid } = process -const hostname = os.hostname() -const level = 50 -const name = 'error' - -test('mixin object is included', async ({ ok, same }) => { - let n = 0 - const stream = sink() - const instance = pino({ - mixin () { - return { hello: ++n } - } - }, stream) - instance.level = name - instance[name]('test') - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - msg: 'test', - hello: 1, - v: 1 - }) -}) - -test('mixin object is new every time', async ({ plan, ok, same }) => { - plan(6) - - let n = 0 - const stream = sink() - const instance = pino({ - mixin () { - return { hello: n } - } - }, stream) - instance.level = name - - while (++n < 4) { - const msg = `test #${n}` - stream.pause() - instance[name](msg) - stream.resume() - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - msg, - hello: n, - v: 1 - }) - } -}) - -test('mixin object is not called if below log level', async ({ ok }) => { - const stream = sink() - const instance = pino({ - mixin () { - ok(false, 'should not call mixin function') - } - }, stream) - instance.level = 'error' - instance.info('test') -}) - -test('mixin object + logged object', async ({ ok, same }) => { - const stream = sink() - const instance = pino({ - mixin () { - return { foo: 1, bar: 2 } - } - }, stream) - instance.level = name - instance[name]({ bar: 3, baz: 4 }) - const result = await once(stream, 'data') - ok(new Date(result.time) <= new Date(), 'time is greater than Date.now()') - delete result.time - same(result, { - pid, - hostname, - level, - foo: 1, - bar: 3, - baz: 4, - v: 1 - }) -}) - -test('mixin not a function', async ({ throws }) => { - const stream = sink() - throws(function () { - pino({ mixin: 'not a function' }, stream) - }) -}) diff --git a/node_modules/pino/test/pretty.test.js b/node_modules/pino/test/pretty.test.js deleted file mode 100644 index 4017d0c..0000000 --- a/node_modules/pino/test/pretty.test.js +++ /dev/null @@ -1,312 +0,0 @@ -'use strict' - -const { Writable } = require('stream') -const { test } = require('tap') -const { join } = require('path') -const execa = require('execa') -const writer = require('flush-write-stream') -const { once } = require('./helper') -const pino = require('../') -const tap = require('tap') - -const isWin = process.platform === 'win32' -if (isWin) { - tap.comment('Skipping pretty printing tests on Windows as colour codes are different and tests fail') - process.exit(0) -} - -test('can be enabled via exported pino function', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'basic.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): h/), null) -}) - -test('can be enabled via exported pino function with pretty configuration', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'level-first.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/^INFO.*h/), null) -}) - -test('can be enabled via exported pino function with prettifier', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'pretty-factory.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - - await once(child, 'close') - isNot(actual.match(/^INFO.*h/), null) -}) - -test('does not throw error when enabled with stream specified', async ({ doesNotThrow }) => { - doesNotThrow(() => pino({ prettyPrint: true }, process.stdout)) -}) - -test('throws when prettyPrint is true but pino-pretty module is not installed', async ({ throws, is }) => { - // pino pretty *is* installed, and probably also cached, so rather than - // messing with the filesystem the simplest way to generate a not found - // error is to simulate it: - const prettyFactory = require('pino-pretty') - require.cache[require.resolve('pino-pretty')].exports = () => { - throw Error('Cannot find module \'pino-pretty\'') - } - throws(() => pino({ prettyPrint: true })) - try { pino({ prettyPrint: true }) } catch ({ message }) { - is(message, 'Missing `pino-pretty` module: `pino-pretty` must be installed separately') - } - - require.cache[require.resolve('pino-pretty')].exports = prettyFactory -}) - -test('can send pretty print to custom stream', async ({ is }) => { - const dest = new Writable({ - objectMode: true, - write (formatted, enc) { - is(/^INFO.*foo\n$/.test(formatted), true) - } - }) - - const log = pino({ - prettifier: require('pino-pretty'), - prettyPrint: { - levelFirst: true, - colorize: false - } - }, dest) - log.info('foo') -}) - -test('ignores `undefined` from prettifier', async ({ is }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'skipped-output.js')]) - - child.stdout.pipe(writer((s, enc) => { - actual += s - })) - - await once(child, 'close') - is(actual, '') -}) - -test('parses and outputs chindings', async ({ is, isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'child.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): h/), null) - isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): h2/), null) - isNot(actual.match(/a: 1/), null) - isNot(actual.match(/b: 2/), null) - is(actual.match(/a: 1/g).length, 3) -}) - -test('applies serializers', async ({ is, isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'serializers.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): h/), null) - isNot(actual.match(/foo: "bar"/), null) -}) - -test('applies redaction rules', async ({ is, isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'redact.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): h/), null) - isNot(actual.match(/\[Redacted\]/), null) - is(actual.match(/object/), null) -}) - -test('dateformat', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'dateformat.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): h/), null) -}) - -test('without timestamp', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'no-time.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.slice(2), '[]') -}) - -test('with custom timestamp', async ({ is }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'custom-time.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - is(actual.slice(0, 8), '["test"]') -}) - -test('with custom timestamp label', async ({ is }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'custom-time-label.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - is(actual.slice(0, 8), '["test"]') -}) - -test('errors', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'error.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): kaboom/), null) - isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): with a message/), null) - isNot(actual.match(/.*error\.js.*/), null) -}) - -test('errors with props', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'error-props.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): kaboom/), null) - isNot(actual.match(/code: ENOENT/), null) - isNot(actual.match(/errno: 1/), null) - isNot(actual.match(/.*error-props\.js.*/), null) -}) - -test('final works with pretty', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'final.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/WARN\s+\(123456 on abcdefghijklmnopqr\): pino.final with prettyPrint does not support flushing/), null) - isNot(actual.match(/INFO\s+\(123456 on abcdefghijklmnopqr\): beforeExit/), null) -}) - -test('final works when returning a logger', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'final-return.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/WARN\s+\(123456 on abcdefghijklmnopqr\): pino.final with prettyPrint does not support flushing/), null) - isNot(actual.match(/INFO\s+\(123456 on abcdefghijklmnopqr\): after/), null) -}) - -test('final works without prior logging', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'final-no-log-before.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/WARN\s+: pino.final with prettyPrint does not support flushing/), null) - isNot(actual.match(/INFO\s+\(123456 on abcdefghijklmnopqr\): beforeExit/), null) -}) - -test('works as expected with an object with the msg prop', async ({ isNot }) => { - var actual = '' - const child = execa(process.argv[0], [join(__dirname, 'fixtures', 'pretty', 'obj-msg-prop.js')]) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/\(123456 on abcdefghijklmnopqr\): hello/), null) -}) - -test('should not lose stream metadata for streams with `needsMetadataGsym` flag', async ({ isNot }) => { - const dest = new Writable({ - objectMode: true, - write () { - isNot(typeof this.lastLevel === 'undefined', true) - isNot(typeof this.lastMsg === 'undefined', true) - isNot(typeof this.lastObj === 'undefined', true) - isNot(typeof this.lastTime === 'undefined', true) - isNot(typeof this.lastLogger === 'undefined', true) - } - }) - - dest[pino.symbols.needsMetadataGsym] = true - - const log = pino({ - prettyPrint: true - }, dest) - log.info('foo') -}) - -test('should not add stream metadata for streams without `needsMetadataGsym` flag', async ({ is }) => { - const dest = new Writable({ - objectMode: true, - write () { - is(typeof this.lastLevel === 'undefined', true) - is(typeof this.lastMsg === 'undefined', true) - is(typeof this.lastObj === 'undefined', true) - is(typeof this.lastTime === 'undefined', true) - is(typeof this.lastLogger === 'undefined', true) - } - }) - - const log = pino({ - prettyPrint: true - }, dest) - log.info('foo') -}) diff --git a/node_modules/pino/test/redact.test.js b/node_modules/pino/test/redact.test.js deleted file mode 100644 index be27cc1..0000000 --- a/node_modules/pino/test/redact.test.js +++ /dev/null @@ -1,713 +0,0 @@ -'use strict' - -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -test('redact option – throws if not array', async ({ throws }) => { - throws(() => { - pino({ redact: 'req.headers.cookie' }) - }) -}) - -test('redact option – throws if array does not only contain strings', async ({ throws }) => { - throws(() => { - pino({ redact: ['req.headers.cookie', {}] }) - }) -}) - -test('redact option – throws if array contains an invalid path', async ({ throws }) => { - throws(() => { - pino({ redact: ['req,headers.cookie'] }) - }) -}) - -test('redact.paths option – throws if not array', async ({ throws }) => { - throws(() => { - pino({ redact: { paths: 'req.headers.cookie' } }) - }) -}) - -test('redact.paths option – throws if array does not only contain strings', async ({ throws }) => { - throws(() => { - pino({ redact: { paths: ['req.headers.cookie', {}] } }) - }) -}) - -test('redact.paths option – throws if array contains an invalid path', async ({ throws }) => { - throws(() => { - pino({ redact: { paths: ['req,headers.cookie'] } }) - }) -}) - -test('redact option – top level key', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['key'] }, stream) - instance.info({ - key: { redact: 'me' } - }) - const { key } = await once(stream, 'data') - is(key, '[Redacted]') -}) - -test('redact option – top level key next level key', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['key', 'key.foo'] }, stream) - instance.info({ - key: { redact: 'me' } - }) - const { key } = await once(stream, 'data') - is(key, '[Redacted]') -}) - -test('redact option – next level key then top level key', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['key.foo', 'key'] }, stream) - instance.info({ - key: { redact: 'me' } - }) - const { key } = await once(stream, 'data') - is(key, '[Redacted]') -}) - -test('redact option – object', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['req.headers.cookie'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is(req.headers.cookie, '[Redacted]') -}) - -test('redact option – child object', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['req.headers.cookie'] }, stream) - instance.child({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }).info('message completed') - const { req } = await once(stream, 'data') - is(req.headers.cookie, '[Redacted]') -}) - -test('redact option – interpolated object', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['req.headers.cookie'] }, stream) - - instance.info('test', { - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { msg } = await once(stream, 'data') - is(JSON.parse(msg.replace(/test /, '')).req.headers.cookie, '[Redacted]') -}) - -test('redact.paths option – object', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'] } }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is(req.headers.cookie, '[Redacted]') -}) - -test('redact.paths option – child object', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'] } }, stream) - instance.child({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }).info('message completed') - const { req } = await once(stream, 'data') - is(req.headers.cookie, '[Redacted]') -}) - -test('redact.paths option – interpolated object', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'] } }, stream) - - instance.info('test', { - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { msg } = await once(stream, 'data') - is(JSON.parse(msg.replace(/test /, '')).req.headers.cookie, '[Redacted]') -}) - -test('redact.censor option – sets the redact value', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'], censor: 'test' } }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is(req.headers.cookie, 'test') -}) - -test('redact.remove option – removes both key and value', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'], remove: true } }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is('cookie' in req.headers, false) -}) - -test('redact.remove – top level key - object value', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['key'], remove: true } }, stream) - instance.info({ - key: { redact: 'me' } - }) - const o = await once(stream, 'data') - is('key' in o, false) -}) - -test('redact.remove – top level key - number value', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['key'], remove: true } }, stream) - instance.info({ - key: 1 - }) - const o = await once(stream, 'data') - is('key' in o, false) -}) - -test('redact.remove – top level key - boolean value', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['key'], remove: true } }, stream) - instance.info({ - key: false - }) - const o = await once(stream, 'data') - is('key' in o, false) -}) - -test('redact.remove – top level key in child logger', async ({ is }) => { - const stream = sink() - const opts = { redact: { paths: ['key'], remove: true } } - const instance = pino(opts, stream).child({ key: { redact: 'me' } }) - instance.info('test') - const o = await once(stream, 'data') - is('key' in o, false) -}) - -test('redact.paths preserves original object values after the log write', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['req.headers.cookie'] }, stream) - const obj = { - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - } - instance.info(obj) - const o = await once(stream, 'data') - is(o.req.headers.cookie, '[Redacted]') - is(obj.req.headers.cookie, 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;') -}) - -test('redact.paths preserves original object values after the log write', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'] } }, stream) - const obj = { - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - } - instance.info(obj) - const o = await once(stream, 'data') - is(o.req.headers.cookie, '[Redacted]') - is(obj.req.headers.cookie, 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;') -}) - -test('redact.censor preserves original object values after the log write', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'], censor: 'test' } }, stream) - const obj = { - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - } - instance.info(obj) - const o = await once(stream, 'data') - is(o.req.headers.cookie, 'test') - is(obj.req.headers.cookie, 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;') -}) - -test('redact.remove preserves original object values after the log write', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: { paths: ['req.headers.cookie'], remove: true } }, stream) - const obj = { - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - } - instance.info(obj) - const o = await once(stream, 'data') - is('cookie' in o.req.headers, false) - is('cookie' in obj.req.headers, true) -}) - -test('redact – supports last position wildcard paths', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['req.headers.*'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is(req.headers.cookie, '[Redacted]') - is(req.headers.host, '[Redacted]') - is(req.headers.connection, '[Redacted]') -}) - -test('redact – supports first position wildcard paths', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['*.headers'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is(req.headers, '[Redacted]') -}) - -test('redact – supports first position wildcards before other paths', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['*.headers.cookie', 'req.id'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is(req.headers.cookie, '[Redacted]') - is(req.id, '[Redacted]') -}) - -test('redact – supports first position wildcards after other paths', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['req.id', '*.headers.cookie'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is(req.headers.cookie, '[Redacted]') - is(req.id, '[Redacted]') -}) - -test('redact – supports first position wildcards after top level keys', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['key', '*.headers.cookie'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is(req.headers.cookie, '[Redacted]') -}) - -test('redact – supports top level wildcard', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['*'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is(req, '[Redacted]') -}) - -test('redact – supports top level wildcard with a censor function', async ({ is }) => { - const stream = sink() - const instance = pino({ - redact: { - paths: ['*'], - censor: () => '[Redacted]' - } - }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is(req, '[Redacted]') -}) - -test('redact – supports top level wildcard and leading wildcard', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['*', '*.req'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is(req, '[Redacted]') -}) - -test('redact – supports intermediate wildcard paths', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['req.*.cookie'] }, stream) - instance.info({ - req: { - id: 7915, - method: 'GET', - url: '/', - headers: { - host: 'localhost:3000', - connection: 'keep-alive', - cookie: 'SESSID=298zf09hf012fh2; csrftoken=u32t4o3tb3gg43; _gat=1;' - }, - remoteAddress: '::ffff:127.0.0.1', - remotePort: 58022 - } - }) - const { req } = await once(stream, 'data') - is(req.headers.cookie, '[Redacted]') -}) - -test('redacts numbers at the top level', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['id'] }, stream) - const obj = { - id: 7915 - } - instance.info(obj) - const o = await once(stream, 'data') - is(o.id, '[Redacted]') -}) - -test('redacts booleans at the top level', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['maybe'] }, stream) - const obj = { - maybe: true - } - instance.info(obj) - const o = await once(stream, 'data') - is(o.maybe, '[Redacted]') -}) - -test('redacts strings at the top level', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['s'] }, stream) - const obj = { - s: 's' - } - instance.info(obj) - const o = await once(stream, 'data') - is(o.s, '[Redacted]') -}) - -test('does not redact primitives if not objects', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['a.b'] }, stream) - const obj = { - a: 42 - } - instance.info(obj) - const o = await once(stream, 'data') - is(o.a, 42) -}) - -test('redacts null at the top level', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['n'] }, stream) - const obj = { - n: null - } - instance.info(obj) - const o = await once(stream, 'data') - is(o.n, '[Redacted]') -}) - -test('supports bracket notation', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['a["b.b"]'] }, stream) - const obj = { - a: { 'b.b': 'c' } - } - instance.info(obj) - const o = await once(stream, 'data') - is(o.a['b.b'], '[Redacted]') -}) - -test('supports bracket notation with further nesting', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['a["b.b"].c'] }, stream) - const obj = { - a: { 'b.b': { c: 'd' } } - } - instance.info(obj) - const o = await once(stream, 'data') - is(o.a['b.b'].c, '[Redacted]') -}) - -test('supports bracket notation with empty string as path segment', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['a[""].c'] }, stream) - const obj = { - a: { '': { c: 'd' } } - } - instance.info(obj) - const o = await once(stream, 'data') - is(o.a[''].c, '[Redacted]') -}) - -test('supports leading bracket notation (single quote)', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['[\'a.a\'].b'] }, stream) - const obj = { - 'a.a': { b: 'c' } - } - instance.info(obj) - const o = await once(stream, 'data') - is(o['a.a'].b, '[Redacted]') -}) - -test('supports leading bracket notation (double quote)', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['["a.a"].b'] }, stream) - const obj = { - 'a.a': { b: 'c' } - } - instance.info(obj) - const o = await once(stream, 'data') - is(o['a.a'].b, '[Redacted]') -}) - -test('supports leading bracket notation (backtick quote)', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['[`a.a`].b'] }, stream) - const obj = { - 'a.a': { b: 'c' } - } - instance.info(obj) - const o = await once(stream, 'data') - is(o['a.a'].b, '[Redacted]') -}) - -test('supports leading bracket notation (single-segment path)', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['[`a.a`]'] }, stream) - const obj = { - 'a.a': { b: 'c' } - } - instance.info(obj) - const o = await once(stream, 'data') - is(o['a.a'], '[Redacted]') -}) - -test('supports leading bracket notation (single-segment path, wilcard)', async ({ is }) => { - const stream = sink() - const instance = pino({ redact: ['[*]'] }, stream) - const obj = { - 'a.a': { b: 'c' } - } - instance.info(obj) - const o = await once(stream, 'data') - is(o['a.a'], '[Redacted]') -}) diff --git a/node_modules/pino/test/serializers.test.js b/node_modules/pino/test/serializers.test.js deleted file mode 100644 index 70e8a6a..0000000 --- a/node_modules/pino/test/serializers.test.js +++ /dev/null @@ -1,245 +0,0 @@ -'use strict' -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -const parentSerializers = { - test: () => 'parent' -} - -const childSerializers = { - test: () => 'child' -} - -test('default err namespace error serializer', async ({ is }) => { - const stream = sink() - const parent = pino(stream) - - parent.info({ err: ReferenceError('test') }) - const o = await once(stream, 'data') - is(typeof o.err, 'object') - is(o.err.type, 'ReferenceError') - is(o.err.message, 'test') - is(typeof o.err.stack, 'string') -}) - -test('custom serializer overrides default err namespace error serializer', async ({ is }) => { - const stream = sink() - const parent = pino({ - serializers: { - err: (e) => ({ - t: e.constructor.name, - m: e.message, - s: e.stack - }) - } - }, stream) - - parent.info({ err: ReferenceError('test') }) - const o = await once(stream, 'data') - is(typeof o.err, 'object') - is(o.err.t, 'ReferenceError') - is(o.err.m, 'test') - is(typeof o.err.s, 'string') -}) - -test('null overrides default err namespace error serializer', async ({ is }) => { - const stream = sink() - const parent = pino({ serializers: { err: null } }, stream) - - parent.info({ err: ReferenceError('test') }) - const o = await once(stream, 'data') - is(typeof o.err, 'object') - is(typeof o.err.type, 'undefined') - is(typeof o.err.message, 'undefined') - is(typeof o.err.stack, 'undefined') -}) - -test('undefined overrides default err namespace error serializer', async ({ is }) => { - const stream = sink() - const parent = pino({ serializers: { err: undefined } }, stream) - - parent.info({ err: ReferenceError('test') }) - const o = await once(stream, 'data') - is(typeof o.err, 'object') - is(typeof o.err.type, 'undefined') - is(typeof o.err.message, 'undefined') - is(typeof o.err.stack, 'undefined') -}) - -test('serializers override values', async ({ is }) => { - const stream = sink() - const parent = pino({ serializers: parentSerializers }, stream) - parent.child({ serializers: childSerializers }) - - parent.fatal({ test: 'test' }) - const o = await once(stream, 'data') - is(o.test, 'parent') -}) - -test('child does not overwrite parent serializers', async ({ is }) => { - const stream = sink() - const parent = pino({ serializers: parentSerializers }, stream) - const child = parent.child({ serializers: childSerializers }) - - parent.fatal({ test: 'test' }) - - const o = once(stream, 'data') - is((await o).test, 'parent') - const o2 = once(stream, 'data') - child.fatal({ test: 'test' }) - is((await o2).test, 'child') -}) - -test('Symbol.for(\'pino.serializers\')', async ({ is, isNot }) => { - const stream = sink() - const parent = pino({ serializers: parentSerializers }, stream) - const child = parent.child({ a: 'property' }) - - is(parent[Symbol.for('pino.serializers')], parentSerializers) - is(child[Symbol.for('pino.serializers')], parentSerializers) - - const child2 = parent.child({ - serializers: { - a - } - }) - - function a () { - return 'hello' - } - - isNot(child2[Symbol.for('pino.serializers')], parentSerializers) - is(child2[Symbol.for('pino.serializers')].a, a) - is(child2[Symbol.for('pino.serializers')].test, parentSerializers.test) -}) - -test('children inherit parent serializers', async ({ is }) => { - const stream = sink() - const parent = pino({ serializers: parentSerializers }, stream) - - const child = parent.child({ a: 'property' }) - child.fatal({ test: 'test' }) - const o = await once(stream, 'data') - is(o.test, 'parent') -}) - -test('children inherit parent Symbol serializers', async ({ is, isNot }) => { - const stream = sink() - const symbolSerializers = { - [Symbol.for('pino.*')]: parentSerializers.test - } - const parent = pino({ serializers: symbolSerializers }, stream) - - is(parent[Symbol.for('pino.serializers')], symbolSerializers) - - const child = parent.child({ - serializers: { - [Symbol.for('a')]: a, - a - } - }) - - function a () { - return 'hello' - } - - isNot(child[Symbol.for('pino.serializers')], symbolSerializers) - is(child[Symbol.for('pino.serializers')].a, a) - is(child[Symbol.for('pino.serializers')][Symbol.for('a')], a) - is(child[Symbol.for('pino.serializers')][Symbol.for('pino.*')], parentSerializers.test) -}) - -test('children serializers get called', async ({ is }) => { - const stream = sink() - const parent = pino({ - test: 'this' - }, stream) - - const child = parent.child({ a: 'property', serializers: childSerializers }) - - child.fatal({ test: 'test' }) - const o = await once(stream, 'data') - is(o.test, 'child') -}) - -test('children serializers get called when inherited from parent', async ({ is }) => { - const stream = sink() - const parent = pino({ - test: 'this', - serializers: parentSerializers - }, stream) - - const child = parent.child({ serializers: { test: function () { return 'pass' } } }) - - child.fatal({ test: 'fail' }) - const o = await once(stream, 'data') - is(o.test, 'pass') -}) - -test('non-overridden serializers are available in the children', async ({ is }) => { - const stream = sink() - const pSerializers = { - onlyParent: function () { return 'parent' }, - shared: function () { return 'parent' } - } - - const cSerializers = { - shared: function () { return 'child' }, - onlyChild: function () { return 'child' } - } - - const parent = pino({ serializers: pSerializers }, stream) - - const child = parent.child({ serializers: cSerializers }) - - const o = once(stream, 'data') - child.fatal({ shared: 'test' }) - is((await o).shared, 'child') - const o2 = once(stream, 'data') - child.fatal({ onlyParent: 'test' }) - is((await o2).onlyParent, 'parent') - const o3 = once(stream, 'data') - child.fatal({ onlyChild: 'test' }) - is((await o3).onlyChild, 'child') - const o4 = once(stream, 'data') - parent.fatal({ onlyChild: 'test' }) - is((await o4).onlyChild, 'test') -}) - -test('Symbol.for(\'pino.*\') serializer', async ({ notSame, is, isNot }) => { - const stream = sink() - const globalSerializer = { - [Symbol.for('pino.*')]: function (obj) { - if (obj.lionel === 'richie') { - return { hello: 'is', it: 'me', you: 'are', looking: 'for' } - } - return { lionel: 'richie' } - } - } - - const logger = pino({ serializers: globalSerializer }, stream) - - const o = once(stream, 'data') - logger.info({ hello: 'is', it: 'me', you: 'are', looking: 'for' }) - is((await o).lionel, 'richie') - isNot((await o).hello, 'is') - isNot((await o).it, 'me') - isNot((await o).you, 'are') - isNot((await o).looking, 'for') - - const o2 = once(stream, 'data') - logger.info({ lionel: 'richie' }) - is((await o2).lionel, 'richie') - is((await o2).hello, 'is') - is((await o2).it, 'me') - is((await o2).you, 'are') - is((await o2).looking, 'for') - - const o3 = once(stream, 'data') - logger.info('message') - is((await o3).lionel, 'richie') - is('pid' in (await o3), false) - is('hostname' in (await o3), false) - notSame(await o3, ['pid', 'hostname']) -}) diff --git a/node_modules/pino/test/stdout-protection.test.js b/node_modules/pino/test/stdout-protection.test.js deleted file mode 100644 index 1a97785..0000000 --- a/node_modules/pino/test/stdout-protection.test.js +++ /dev/null @@ -1,19 +0,0 @@ -'use strict' - -const { test } = require('tap') -const { join } = require('path') -const { fork } = require('child_process') -const { once } = require('./helper') -const writer = require('flush-write-stream') - -test('do not use SonicBoom is someone tampered with process.stdout.write', async ({ isNot }) => { - var actual = '' - const child = fork(join(__dirname, 'fixtures', 'stdout-hack-protection.js'), { silent: true }) - - child.stdout.pipe(writer((s, enc, cb) => { - actual += s - cb() - })) - await once(child, 'close') - isNot(actual.match(/^hack/), null) -}) diff --git a/node_modules/pino/test/timestamp.test.js b/node_modules/pino/test/timestamp.test.js deleted file mode 100644 index 87bdc09..0000000 --- a/node_modules/pino/test/timestamp.test.js +++ /dev/null @@ -1,121 +0,0 @@ -'use strict' - -/* eslint no-prototype-builtins: 0 */ - -const { test } = require('tap') -const { sink, once } = require('./helper') -const pino = require('../') - -test('pino exposes standard time functions', async ({ ok }) => { - ok(pino.stdTimeFunctions) - ok(pino.stdTimeFunctions.epochTime) - ok(pino.stdTimeFunctions.unixTime) - ok(pino.stdTimeFunctions.nullTime) - ok(pino.stdTimeFunctions.isoTime) -}) - -test('pino accepts external time functions', async ({ is }) => { - const opts = { - timestamp: () => ',"time":"none"' - } - const stream = sink() - const instance = pino(opts, stream) - instance.info('foobar') - const result = await once(stream, 'data') - is(result.hasOwnProperty('time'), true) - is(result.time, 'none') -}) - -test('pino accepts external time functions with custom label', async ({ is }) => { - const opts = { - timestamp: () => ',"custom-time-label":"none"' - } - const stream = sink() - const instance = pino(opts, stream) - instance.info('foobar') - const result = await once(stream, 'data') - is(result.hasOwnProperty('custom-time-label'), true) - is(result['custom-time-label'], 'none') -}) - -test('inserts timestamp by default', async ({ ok, is }) => { - const stream = sink() - const instance = pino(stream) - instance.info('foobar') - const result = await once(stream, 'data') - is(result.hasOwnProperty('time'), true) - ok(new Date(result.time) <= new Date(), 'time is greater than timestamp') - is(result.msg, 'foobar') -}) - -test('omits timestamp when timestamp option is false', async ({ is }) => { - const stream = sink() - const instance = pino({ timestamp: false }, stream) - instance.info('foobar') - const result = await once(stream, 'data') - is(result.hasOwnProperty('time'), false) - is(result.msg, 'foobar') -}) - -test('inserts timestamp when timestamp option is true', async ({ ok, is }) => { - const stream = sink() - const instance = pino({ timestamp: true }, stream) - instance.info('foobar') - const result = await once(stream, 'data') - is(result.hasOwnProperty('time'), true) - ok(new Date(result.time) <= new Date(), 'time is greater than timestamp') - is(result.msg, 'foobar') -}) - -test('child inserts timestamp by default', async ({ ok, is }) => { - const stream = sink() - const logger = pino(stream) - const instance = logger.child({ component: 'child' }) - instance.info('foobar') - const result = await once(stream, 'data') - is(result.hasOwnProperty('time'), true) - ok(new Date(result.time) <= new Date(), 'time is greater than timestamp') - is(result.msg, 'foobar') -}) - -test('child omits timestamp with option', async ({ is }) => { - const stream = sink() - const logger = pino({ timestamp: false }, stream) - const instance = logger.child({ component: 'child' }) - instance.info('foobar') - const result = await once(stream, 'data') - is(result.hasOwnProperty('time'), false) - is(result.msg, 'foobar') -}) - -test('pino.stdTimeFunctions.unixTime returns seconds based timestamps', async ({ is }) => { - const opts = { - timestamp: pino.stdTimeFunctions.unixTime - } - const stream = sink() - const instance = pino(opts, stream) - const now = Date.now - Date.now = () => 1531069919686 - instance.info('foobar') - const result = await once(stream, 'data') - is(result.hasOwnProperty('time'), true) - is(result.time, 1531069920) - Date.now = now -}) - -test('pino.stdTimeFunctions.isoTime returns ISO 8601 timestamps', async ({ is }) => { - const opts = { - timestamp: pino.stdTimeFunctions.isoTime - } - const stream = sink() - const instance = pino(opts, stream) - const ms = 1531069919686 - const now = Date.now - Date.now = () => ms - const iso = new Date(ms).toISOString() - instance.info('foobar') - const result = await once(stream, 'data') - is(result.hasOwnProperty('time'), true) - is(result.time, iso) - Date.now = now -}) diff --git a/node_modules/quick-format-unescaped/.travis.yml b/node_modules/quick-format-unescaped/.travis.yml deleted file mode 100644 index bc7efad..0000000 --- a/node_modules/quick-format-unescaped/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -sudo: false -node_js: - - 6 - - 8 - - 10 - - 11 -script: - - npm test diff --git a/node_modules/quick-format-unescaped/LICENSE b/node_modules/quick-format-unescaped/LICENSE deleted file mode 100644 index fc6d313..0000000 --- a/node_modules/quick-format-unescaped/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-2019 David Mark Clements - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/quick-format-unescaped/benchmark.js b/node_modules/quick-format-unescaped/benchmark.js deleted file mode 100644 index 73e3b4b..0000000 --- a/node_modules/quick-format-unescaped/benchmark.js +++ /dev/null @@ -1,24 +0,0 @@ -var bench = require('fastbench') -var utilFormat = require('util').format -var quickFormat = require('./') - -var run = bench([ - function util(cb) { - utilFormat('%s %j %d', 'a', {a: {x: 1}}, 1) - setImmediate(cb) - }, - function quick(cb) { - quickFormat('%s %j %d', 'a', [{a: {x: 1}}, 1], null) - setImmediate(cb) - }, - function utilWithTailObj(cb) { - utilFormat('hello %s %j %d', 'world', {obj: true}, 4, {another: 'obj'}) - setImmediate(cb) - }, - function quickWithTailObj(cb) { - quickFormat('hello %s %j %d', 'world', [{obj: true}, 4, {another: 'obj'}], null) - setImmediate(cb) - } -], 100000) - -run(run) diff --git a/node_modules/quick-format-unescaped/index.js b/node_modules/quick-format-unescaped/index.js deleted file mode 100644 index 9c081cc..0000000 --- a/node_modules/quick-format-unescaped/index.js +++ /dev/null @@ -1,105 +0,0 @@ -'use strict' -function tryStringify (o) { - try { return JSON.stringify(o) } catch(e) { return '"[Circular]"' } -} - -module.exports = format - -function format(f, args, opts) { - var ss = (opts && opts.stringify) || tryStringify - var offset = 1 - if (f === null) { - f = args[0] - offset = 0 - } - if (typeof f === 'object' && f !== null) { - var len = args.length + offset - if (len === 1) return f - var objects = new Array(len) - objects[0] = ss(f) - for (var index = 1; index < len; index++) { - objects[index] = ss(args[index]) - } - return objects.join(' ') - } - var argLen = args.length - if (argLen === 0) return f - var x = '' - var str = '' - var a = 1 - offset - var lastPos = 0 - var flen = (f && f.length) || 0 - for (var i = 0; i < flen;) { - if (f.charCodeAt(i) === 37 && i + 1 < flen) { - switch (f.charCodeAt(i + 1)) { - case 100: // 'd' - if (a >= argLen) - break - if (lastPos < i) - str += f.slice(lastPos, i) - if (args[a] == null) break - str += Number(args[a]) - lastPos = i = i + 2 - break - case 79: // 'O' - case 111: // 'o' - case 106: // 'j' - if (a >= argLen) - break - if (lastPos < i) - str += f.slice(lastPos, i) - if (args[a] === undefined) break - var type = typeof args[a] - if (type === 'string') { - str += '\'' + args[a] + '\'' - lastPos = i + 2 - i++ - break - } - if (type === 'function') { - str += args[a].name || '' - lastPos = i + 2 - i++ - break - } - str += ss(args[a]) - lastPos = i + 2 - i++ - break - case 115: // 's' - if (a >= argLen) - break - if (lastPos < i) - str += f.slice(lastPos, i) - str += String(args[a]) - lastPos = i + 2 - i++ - break - case 37: // '%' - if (lastPos < i) - str += f.slice(lastPos, i) - str += '%' - lastPos = i + 2 - i++ - break - } - ++a - } - ++i - } - if (lastPos === 0) - str = f - else if (lastPos < flen) { - str += f.slice(lastPos) - } - while (a < argLen) { - x = args[a++] - if (x === null || (typeof x !== 'object')) { - str += ' ' + String(x) - } else { - str += ' ' + ss(x) - } - } - - return str -} diff --git a/node_modules/quick-format-unescaped/package.json b/node_modules/quick-format-unescaped/package.json deleted file mode 100644 index e2192f2..0000000 --- a/node_modules/quick-format-unescaped/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "_from": "quick-format-unescaped@^3.0.3", - "_id": "quick-format-unescaped@3.0.3", - "_inBundle": false, - "_integrity": "sha512-dy1yjycmn9blucmJLXOfZDx1ikZJUi6E8bBZLnhPG5gBrVhHXx2xVyqqgKBubVNEXmx51dBACMHpoMQK/N/AXQ==", - "_location": "/quick-format-unescaped", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "quick-format-unescaped@^3.0.3", - "name": "quick-format-unescaped", - "escapedName": "quick-format-unescaped", - "rawSpec": "^3.0.3", - "saveSpec": null, - "fetchSpec": "^3.0.3" - }, - "_requiredBy": [ - "/pino" - ], - "_resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.3.tgz", - "_shasum": "fb3e468ac64c01d22305806c39f121ddac0d1fb9", - "_spec": "quick-format-unescaped@^3.0.3", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/pino", - "author": { - "name": "David Mark Clements" - }, - "bugs": { - "url": "https://github.com/davidmarkclements/quick-format/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Solves a problem with util.format", - "devDependencies": { - "fastbench": "^1.0.1" - }, - "directories": { - "test": "test" - }, - "homepage": "https://github.com/davidmarkclements/quick-format#readme", - "keywords": [], - "license": "MIT", - "main": "index.js", - "name": "quick-format-unescaped", - "repository": { - "type": "git", - "url": "git+https://github.com/davidmarkclements/quick-format.git" - }, - "scripts": { - "test": "node test" - }, - "version": "3.0.3" -} diff --git a/node_modules/quick-format-unescaped/readme.md b/node_modules/quick-format-unescaped/readme.md deleted file mode 100644 index 653ddd1..0000000 --- a/node_modules/quick-format-unescaped/readme.md +++ /dev/null @@ -1,66 +0,0 @@ -# quick-format-unescaped - -## unescaped ? - -Sometimes you want to embed the results of quick-format into another string, -and then escape the whole string. - -## usage - -```js -var format = require('quick-format-unescaped') -format('hello %s %j %d', ['world', [{obj: true}, 4, {another: 'obj'}]]) -``` - -## format(fmt, parameters, [options]) - -### fmt - -A `printf`-like format string. Example: `'hello %s %j %d'` - -### parameters - -Array of values to be inserted into the `format` string. Example: `['world', {obj:true}]` - -### options.stringify - -Passing an options object as the third parameter with a `stringify` will mean -any objects will be passed to the supplied function instead of an the -internal `tryStringify` function. This can be useful when using augmented -capability serializers such as [`fast-safe-stringify`](http://github.com/davidmarkclements/fast-safe-stringify) or [`fast-redact`](http://github.com/davidmarkclements/fast-redact). - -## caveats - -By default `quick-format-unescaped` uses `JSON.stringify` instead of `util.inspect`, this means functions *will not be serialized*. - -## Benchmarks - -### Node 8.11.2 - -``` -util*100000: 350.325ms -quick*100000: 268.141ms -utilWithTailObj*100000: 586.387ms -quickWithTailObj*100000: 280.200ms -util*100000: 325.735ms -quick*100000: 270.251ms -utilWithTailObj*100000: 492.270ms -quickWithTailObj*100000: 261.797ms -``` - -### Node 10.4.0 - -``` -util*100000: 301.035ms -quick*100000: 217.005ms -utilWithTailObj*100000: 404.778ms -quickWithTailObj*100000: 236.176ms -util*100000: 286.349ms -quick*100000: 214.646ms -utilWithTailObj*100000: 388.574ms -quickWithTailObj*100000: 226.036ms -``` - -## Acknowledgements - -Sponsored by [nearForm](http://www.nearform.com) diff --git a/node_modules/quick-format-unescaped/test/index.js b/node_modules/quick-format-unescaped/test/index.js deleted file mode 100644 index 76131ac..0000000 --- a/node_modules/quick-format-unescaped/test/index.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; -const assert = require('assert'); -const format = require('../'); - -// assert.equal(format([]), ''); -// assert.equal(format(['']), ''); -// assert.equal(format([[]]), '[]'); -// assert.equal(format([{}]), '{}'); -// assert.equal(format([null]), 'null'); -// assert.equal(format([true]), 'true'); -// assert.equal(format([false]), 'false'); -// assert.equal(format(['test']), 'test'); - -// // // CHECKME this is for console.log() compatibility - but is it *right*? -// assert.equal(format(['foo', 'bar', 'baz']), 'foo bar baz'); - -// ES6 Symbol handling -const symbol = Symbol('foo') -assert.equal(format(null, [symbol]), symbol); -assert.equal(format('foo', [symbol]), 'foo Symbol(foo)'); -assert.equal(format('%s', [symbol]), 'Symbol(foo)'); -assert.equal(format('%j', [symbol]), 'undefined'); -assert.throws(function() { - format(['%d', symbol]); -}, TypeError); - -assert.equal(format('%d', [42.0]), '42'); -assert.equal(format('%d', [42]), '42'); -assert.equal(format('%s', [42]), '42'); -assert.equal(format('%j', [42]), '42'); - -assert.equal(format('%d', [undefined]), '%d'); -assert.equal(format('%s', [undefined]), 'undefined'); -assert.equal(format('%j', [undefined]), '%j'); - - -assert.equal(format('%d', [null]), '%d'); -assert.equal(format('%s', [null]), 'null'); -assert.equal(format('%j', [null]), 'null'); - - -assert.equal(format('%d', ['42.0']), '42'); -assert.equal(format('%d', ['42']), '42'); -assert.equal(format('%s', ['42']), '42'); -// assert.equal(format('%j', ['42']), '"42"'); - -// assert.equal(format('%%s%s', ['foo']), '%sfoo'); - -assert.equal(format('%s', []), '%s'); -assert.equal(format('%s', [undefined]), 'undefined'); -assert.equal(format('%s', ['foo']), 'foo'); -assert.equal(format('%s', ['\"quoted\"']), '\"quoted\"'); -assert.equal(format('%j', [{ s: '\"quoted\"' }]), '{\"s\":\"\\"quoted\\"\"}'); -assert.equal(format('%s:%s', []), '%s:%s'); -assert.equal(format('%s:%s', [undefined]), 'undefined:%s'); -assert.equal(format('%s:%s', ['foo']), 'foo:%s'); -assert.equal(format('%s:%s', ['foo', 'bar']), 'foo:bar'); -assert.equal(format('%s:%s', ['foo', 'bar', 'baz']), 'foo:bar baz'); -assert.equal(format('%s%s', []), '%s%s'); -assert.equal(format('%s%s', [undefined]), 'undefined%s'); -assert.equal(format('%s%s', ['foo']), 'foo%s'); -assert.equal(format('%s%s', ['foo', 'bar']), 'foobar'); -assert.equal(format('%s%s', ['foo', 'bar', 'baz']), 'foobar baz'); - -assert.equal(format(null, ['foo', null, 'bar']), 'foo null bar'); -assert.equal(format(null, ['foo', undefined, 'bar']), 'foo undefined bar'); - -assert.equal(format(null, [null, 'foo']), 'null foo'); -assert.equal(format(null, [undefined, 'foo']), 'undefined foo'); - -// // assert.equal(format(['%%%s%%', 'hi']), '%hi%'); -// // assert.equal(format(['%%%s%%%%', 'hi']), '%hi%%'); - -// (function() { -// var o = {}; -// o.o = o; -// assert.equal(format(['%j', o]), '[Circular]'); -// })(); diff --git a/node_modules/quick-lru/index.d.ts b/node_modules/quick-lru/index.d.ts deleted file mode 100644 index c382e51..0000000 --- a/node_modules/quick-lru/index.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -declare namespace QuickLRU { - interface Options { - /** - The maximum number of items before evicting the least recently used items. - */ - readonly maxSize: number; - } -} - -declare class QuickLRU - implements Iterable<[KeyType, ValueType]> { - /** - The stored item count. - */ - readonly size: number; - - /** - Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29). - - The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop. - - @example - ``` - import QuickLRU = require('quick-lru'); - - const lru = new QuickLRU({maxSize: 1000}); - - lru.set('🦄', '🌈'); - - lru.has('🦄'); - //=> true - - lru.get('🦄'); - //=> '🌈' - ``` - */ - constructor(options: QuickLRU.Options); - - [Symbol.iterator](): IterableIterator<[KeyType, ValueType]>; - - /** - Set an item. - - @returns The list instance. - */ - set(key: KeyType, value: ValueType): this; - - /** - Get an item. - - @returns The stored item or `undefined`. - */ - get(key: KeyType): ValueType | undefined; - - /** - Check if an item exists. - */ - has(key: KeyType): boolean; - - /** - Get an item without marking it as recently used. - - @returns The stored item or `undefined`. - */ - peek(key: KeyType): ValueType | undefined; - - /** - Delete an item. - - @returns `true` if the item is removed or `false` if the item doesn't exist. - */ - delete(key: KeyType): boolean; - - /** - Delete all items. - */ - clear(): void; - - /** - Iterable for all the keys. - */ - keys(): IterableIterator; - - /** - Iterable for all the values. - */ - values(): IterableIterator; -} - -export = QuickLRU; diff --git a/node_modules/quick-lru/index.js b/node_modules/quick-lru/index.js deleted file mode 100644 index b7b1760..0000000 --- a/node_modules/quick-lru/index.js +++ /dev/null @@ -1,115 +0,0 @@ -'use strict'; - -class QuickLRU { - constructor(options = {}) { - if (!(options.maxSize && options.maxSize > 0)) { - throw new TypeError('`maxSize` must be a number greater than 0'); - } - - this.maxSize = options.maxSize; - this.cache = new Map(); - this.oldCache = new Map(); - this._size = 0; - } - - _set(key, value) { - this.cache.set(key, value); - this._size++; - - if (this._size >= this.maxSize) { - this._size = 0; - this.oldCache = this.cache; - this.cache = new Map(); - } - } - - get(key) { - if (this.cache.has(key)) { - return this.cache.get(key); - } - - if (this.oldCache.has(key)) { - const value = this.oldCache.get(key); - this.oldCache.delete(key); - this._set(key, value); - return value; - } - } - - set(key, value) { - if (this.cache.has(key)) { - this.cache.set(key, value); - } else { - this._set(key, value); - } - - return this; - } - - has(key) { - return this.cache.has(key) || this.oldCache.has(key); - } - - peek(key) { - if (this.cache.has(key)) { - return this.cache.get(key); - } - - if (this.oldCache.has(key)) { - return this.oldCache.get(key); - } - } - - delete(key) { - const deleted = this.cache.delete(key); - if (deleted) { - this._size--; - } - - return this.oldCache.delete(key) || deleted; - } - - clear() { - this.cache.clear(); - this.oldCache.clear(); - this._size = 0; - } - - * keys() { - for (const [key] of this) { - yield key; - } - } - - * values() { - for (const [, value] of this) { - yield value; - } - } - - * [Symbol.iterator]() { - for (const item of this.cache) { - yield item; - } - - for (const item of this.oldCache) { - const [key] = item; - if (!this.cache.has(key)) { - yield item; - } - } - } - - get size() { - let oldCacheSize = 0; - for (const key of this.oldCache.keys()) { - if (!this.cache.has(key)) { - oldCacheSize++; - } - } - - return this._size + oldCacheSize; - } -} - -module.exports = QuickLRU; diff --git a/node_modules/quick-lru/package.json b/node_modules/quick-lru/package.json deleted file mode 100644 index 8c17cae..0000000 --- a/node_modules/quick-lru/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "quick-lru@^4.0.1", - "_id": "quick-lru@4.0.1", - "_inBundle": false, - "_integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "_location": "/quick-lru", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "quick-lru@^4.0.1", - "name": "quick-lru", - "escapedName": "quick-lru", - "rawSpec": "^4.0.1", - "saveSpec": null, - "fetchSpec": "^4.0.1" - }, - "_requiredBy": [ - "/camelcase-keys" - ], - "_resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "_shasum": "5b8878f113a58217848c6482026c73e1ba57727f", - "_spec": "quick-lru@^4.0.1", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/camelcase-keys", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/quick-lru/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Simple \"Least Recently Used\" (LRU) cache", - "devDependencies": { - "ava": "^1.4.1", - "coveralls": "^3.0.3", - "nyc": "^14.1.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" - }, - "engines": { - "node": ">=8" - }, - "files": [ - "index.js", - "index.d.ts" - ], - "homepage": "https://github.com/sindresorhus/quick-lru#readme", - "keywords": [ - "lru", - "quick", - "cache", - "caching", - "least", - "recently", - "used", - "fast", - "map", - "hash", - "buffer" - ], - "license": "MIT", - "name": "quick-lru", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/quick-lru.git" - }, - "scripts": { - "test": "xo && nyc ava && tsd" - }, - "version": "4.0.1" -} diff --git a/node_modules/quick-lru/readme.md b/node_modules/quick-lru/readme.md deleted file mode 100644 index 2b87001..0000000 --- a/node_modules/quick-lru/readme.md +++ /dev/null @@ -1,93 +0,0 @@ -# quick-lru [![Build Status](https://travis-ci.org/sindresorhus/quick-lru.svg?branch=master)](https://travis-ci.org/sindresorhus/quick-lru) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/quick-lru/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/quick-lru?branch=master) - -> Simple ["Least Recently Used" (LRU) cache](https://en.m.wikipedia.org/wiki/Cache_replacement_policies#Least_Recently_Used_.28LRU.29) - -Useful when you need to cache something and limit memory usage. - -Inspired by the [`hashlru` algorithm](https://github.com/dominictarr/hashlru#algorithm), but instead uses [`Map`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map) to support keys of any type, not just strings, and values can be `undefined`. - - -## Install - -``` -$ npm install quick-lru -``` - - -## Usage - -```js -const QuickLRU = require('quick-lru'); - -const lru = new QuickLRU({maxSize: 1000}); - -lru.set('🦄', '🌈'); - -lru.has('🦄'); -//=> true - -lru.get('🦄'); -//=> '🌈' -``` - - -## API - -### new QuickLRU(options?) - -Returns a new instance. - -### options - -Type: `object` - -#### maxSize - -*Required*
-Type: `number` - -The maximum number of items before evicting the least recently used items. - -### Instance - -The instance is [`iterable`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Iteration_protocols) so you can use it directly in a [`for…of`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of) loop. - -Both `key` and `value` can be of any type. - -#### .set(key, value) - -Set an item. Returns the instance. - -#### .get(key) - -Get an item. - -#### .has(key) - -Check if an item exists. - -#### .peek(key) - -Get an item without marking it as recently used. - -#### .delete(key) - -Delete an item. - -Returns `true` if the item is removed or `false` if the item doesn't exist. - -#### .clear() - -Delete all items. - -#### .keys() - -Iterable for all the keys. - -#### .values() - -Iterable for all the values. - -#### .size - -The stored item count. diff --git a/node_modules/ramda/CHANGELOG.md b/node_modules/ramda/CHANGELOG.md deleted file mode 100644 index cf75f9a..0000000 --- a/node_modules/ramda/CHANGELOG.md +++ /dev/null @@ -1,6 +0,0 @@ -# Changelog - -See the [upgrade guides][1]. - - -[1]: https://github.com/ramda/ramda/issues?q=label%3A%22upgrade+guide%22 diff --git a/node_modules/ramda/README.md b/node_modules/ramda/README.md deleted file mode 100644 index c0f1042..0000000 --- a/node_modules/ramda/README.md +++ /dev/null @@ -1,248 +0,0 @@ -Ramda -============= - -A practical functional library for JavaScript programmers. - -[![Build Status](https://travis-ci.org/ramda/ramda.svg?branch=master)](https://travis-ci.org/ramda/ramda) -[![npm module](https://badge.fury.io/js/ramda.svg)](https://www.npmjs.org/package/ramda) -[![dependencies](https://david-dm.org/ramda/ramda.svg)](https://david-dm.org/ramda/ramda) -[![Gitter](https://badges.gitter.im/Join_Chat.svg)](https://gitter.im/ramda/ramda?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - - - -Why Ramda? ----------- - - - -There are already several excellent libraries with a functional flavor. Typically, they are meant to be general-purpose toolkits, suitable for working in multiple paradigms. Ramda has a more focused goal. We wanted a library designed specifically for a functional programming style, one that makes it easy to create functional pipelines, one that never mutates user data. - - - -What's Different? ------------------ - -The primary distinguishing features of Ramda are: - -* Ramda emphasizes a purer functional style. Immutability and side-effect free functions - are at the heart of its design philosophy. This can help you get the job done with simple, - elegant code. - -* Ramda functions are automatically curried. This allows you to easily build up new functions - from old ones simply by not supplying the final parameters. - -* The parameters to Ramda functions are arranged to make it convenient for currying. The data - to be operated on is generally supplied last. - -The last two points together make it very easy to build functions as sequences of simpler functions, each of which transforms the data and passes it along to the next. Ramda is designed to support this style of coding. - - - -Introductions -------------- - -* [Introducing Ramda](http://buzzdecafe.github.io/code/2014/05/16/introducing-ramda) by Buzz de Cafe -* [Why Ramda?](http://fr.umio.us/why-ramda/) by Scott Sauyet -* [Favoring Curry](http://fr.umio.us/favoring-curry/) by Scott Sauyet -* [Why Curry Helps](https://hughfdjackson.com/javascript/why-curry-helps/) by Hugh Jackson -* [Hey Underscore, You're Doing It Wrong!](https://www.youtube.com/watch?v=m3svKOdZijA&app=desktop) by Brian Lonsdorf -* [Thinking in Ramda](http://randycoulman.com/blog/categories/thinking-in-ramda) by Randy Coulman - - - -Philosophy ----------- -Using Ramda should feel much like just using JavaScript. -It is practical, functional JavaScript. We're not introducing -lambda expressions in strings, we're not borrowing consed -lists, we're not porting over all of the Clojure functions. - -Our basic data structures are plain JavaScript objects, and our -usual collections are JavaScript arrays. We also keep other -native features of JavaScript, such as functions as objects -with properties. - -Functional programming is in good part about immutable objects and -side-effect free functions. While Ramda does not *enforce* this, it -enables such style to be as frictionless as possible. - -We aim for an implementation both clean and elegant, but the API is king. -We sacrifice a great deal of implementation elegance for even a slightly -cleaner API. - -Last but not least, Ramda strives for performance. A reliable and quick -implementation wins over any notions of functional purity. - - - -Installation ------------- - -To use with node: - -```bash -$ npm install ramda -``` - -Then in the console: - -```javascript -const R = require('ramda'); -``` - -To use directly in the browser: - -```html - -``` - -or the minified version: - -```html - -``` - -or from a CDN, either cdnjs: - -```html - -``` - -or one of the below links from [jsDelivr](http://jsdelivr.com): - -```html - - - -``` - -(note that using `latest` is taking a significant risk that ramda API changes could break your code.) - -These script tags add the variable `R` on the browser's global scope. - -Or you can inject ramda into virtually any unsuspecting website using [the bookmarklet](https://github.com/ramda/ramda/blob/master/BOOKMARKLET.md). - -**Note for versions > 0.25** -Ramda versions > 0.25 don't have a default export. -So instead of `import R from 'ramda';`, one has to use `import * as R from 'ramda';` -Or better yet, import only the required functions via `import { functionName } from 'ramda';` - -### Build - -`npm run build` creates `es`, `src` directories and updates both __dist/ramda.js__ and __dist/ramda.min.js__ - -#### Partial Builds - -It is possible to build Ramda with a subset of the functionality to reduce its file size. Ramda's build system supports this with command line flags. For example if you're using `R.compose`, `R.reduce`, and `R.filter` you can create a partial build with: - - npm run --silent partial-build compose reduce filter > dist/ramda.custom.js - -This requires having Node/io.js installed and ramda's dependencies installed (just use `npm install` before running partial build). - - - -Documentation -------------- - -Please review the [API documentation](https://ramdajs.com/docs/). - -Also available is our [Cookbook](https://github.com/ramda/ramda/wiki/Cookbook) of functions built from Ramda that you may find useful. - - -The Name --------- - -Ok, so we like sheep. That's all. It's a short name, not already -taken. It could as easily have been `eweda`, but then we would be -forced to say _eweda lamb!_, and no one wants that. For non-English -speakers, lambs are baby sheep, ewes are female sheep, and rams are male -sheep. So perhaps ramda is a grown-up lambda... but probably not. - - - - -Running The Test Suite ----------------------- - -**Console:** - -To run the test suite from the console, you need to have `mocha` installed: - - npm install -g mocha - -Then from the root of the project, you can just call - - mocha - -Alternately, if you've installed the dependencies, via: - - npm install - -then you can run the tests (and get detailed output) by running: - - npm test - -**Browser:** - -You can use [testem](https://github.com/airportyh/testem) to -test across different browsers (or even headlessly), with livereloading of -tests. Install testem (`npm install -g testem`) and run `testem`. Open the -link provided in your browser and you will see the results in your terminal. - -If you have _PhantomJS_ installed, you can run `testem -l phantomjs` to run the -tests completely headlessly. - - -Usage ------------------ - -For `v0.25` and up, import the whole library or pick ES modules directly from the library: - -```js -import * as R from 'ramda' - -const {identity} = R -R.map(identity, [1, 2, 3]) -``` - -Destructuring imports from ramda *does not necessarily prevent importing the entire library*. You can manually cherry-pick methods like the following, which would only grab the parts necessary for `identity` to work: - -```js -import identity from 'ramda/src/identity' - -identity() -``` - -Manually cherry picking methods is cumbersome, however. Most bundlers like Webpack and Rollup offer tree-shaking as a way to drop unused Ramda code and reduce bundle size, but their performance varies, discussed [here](https://github.com/scabbiaza/ramda-webpack-tree-shaking-examples). Here is a summary of the optimal setup based on what technology you are using: - -1. Webpack + Babel - use [`babel-plugin-ramda`](https://github.com/megawac/babel-plugin-ramda) to automatically cherry pick methods. Discussion [here](https://www.andrewsouthpaw.com/ramda-webpack-and-tree-shaking/), example [here](https://github.com/AndrewSouthpaw/ramda-webpack-tree-shaking-examples/blob/master/07-webpack-babel-plugin-ramda/package.json) -1. Webpack only - use `UglifyJS` plugin for treeshaking along with the `ModuleConcatenationPlugin`. Discussion [here](https://github.com/ramda/ramda/issues/2355), with an example setup [here](https://github.com/scabbiaza/ramda-webpack-tree-shaking-examples/blob/master/06-webpack-scope-hoisted/webpack.config.js) -1. Rollup - does a fine job properly treeshaking, no special work needed; example [here](https://github.com/scabbiaza/ramda-webpack-tree-shaking-examples/blob/master/07-rollup-ramda-tree-shaking/rollup.config.js) - - -Typings ------------------ - -- [TypeScript](https://github.com/types/npm-ramda/) -- [Flow](https://github.com/flowtype/flow-typed/tree/master/definitions/npm/ramda_v0.x.x) - - - - -Translations ------------------ - -- [Chinese(中文)](http://ramda.cn/) -- [Ukrainian(Українська)](https://github.com/ivanzusko/ramda) -- [Portuguese(BR)](https://github.com/renansj/ramda) -- [Russian(Русский)](https://github.com/Guck111/ramda) - - - -Acknowledgements ------------------ - -Thanks to [J. C. Phillipps](http://www.jcphillipps.com) for the Ramda logo. -Ramda logo artwork © 2014 J. C. Phillipps. Licensed Creative Commons -[CC BY-NC-SA 3.0](http://creativecommons.org/licenses/by-nc-sa/3.0/). diff --git a/node_modules/ramda/dist/ramda.js b/node_modules/ramda/dist/ramda.js deleted file mode 100644 index d7d6065..0000000 --- a/node_modules/ramda/dist/ramda.js +++ /dev/null @@ -1,9716 +0,0 @@ -// Ramda v0.27.1 -// https://github.com/ramda/ramda -// (c) 2013-2020 Scott Sauyet, Michael Hurley, and David Chambers -// Ramda may be freely distributed under the MIT license. - -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (global = global || self, factory(global.R = {})); -}(this, function (exports) { 'use strict'; - - /** - * A function that always returns `false`. Any passed in parameters are ignored. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig * -> Boolean - * @param {*} - * @return {Boolean} - * @see R.T - * @example - * - * R.F(); //=> false - */ - var F = function() {return false;}; - - /** - * A function that always returns `true`. Any passed in parameters are ignored. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig * -> Boolean - * @param {*} - * @return {Boolean} - * @see R.F - * @example - * - * R.T(); //=> true - */ - var T = function() {return true;}; - - /** - * A special placeholder value used to specify "gaps" within curried functions, - * allowing partial application of any combination of arguments, regardless of - * their positions. - * - * If `g` is a curried ternary function and `_` is `R.__`, the following are - * equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2, _)(1, 3)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @name __ - * @constant - * @memberOf R - * @since v0.6.0 - * @category Function - * @example - * - * const greet = R.replace('{name}', R.__, 'Hello, {name}!'); - * greet('Alice'); //=> 'Hello, Alice!' - */ - var __ = {'@@functional/placeholder': true}; - - function _isPlaceholder(a) { - return a != null && - typeof a === 'object' && - a['@@functional/placeholder'] === true; - } - - /** - * Optimized internal one-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - function _curry1(fn) { - return function f1(a) { - if (arguments.length === 0 || _isPlaceholder(a)) { - return f1; - } else { - return fn.apply(this, arguments); - } - }; - } - - /** - * Optimized internal two-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - function _curry2(fn) { - return function f2(a, b) { - switch (arguments.length) { - case 0: - return f2; - case 1: - return _isPlaceholder(a) - ? f2 - : _curry1(function(_b) { return fn(a, _b); }); - default: - return _isPlaceholder(a) && _isPlaceholder(b) - ? f2 - : _isPlaceholder(a) - ? _curry1(function(_a) { return fn(_a, b); }) - : _isPlaceholder(b) - ? _curry1(function(_b) { return fn(a, _b); }) - : fn(a, b); - } - }; - } - - /** - * Adds two values. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a - * @param {Number} b - * @return {Number} - * @see R.subtract - * @example - * - * R.add(2, 3); //=> 5 - * R.add(7)(10); //=> 17 - */ - var add = _curry2(function add(a, b) { - return Number(a) + Number(b); - }); - - /** - * Private `concat` function to merge two array-like objects. - * - * @private - * @param {Array|Arguments} [set1=[]] An array-like object. - * @param {Array|Arguments} [set2=[]] An array-like object. - * @return {Array} A new, merged array. - * @example - * - * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] - */ - function _concat(set1, set2) { - set1 = set1 || []; - set2 = set2 || []; - var idx; - var len1 = set1.length; - var len2 = set2.length; - var result = []; - - idx = 0; - while (idx < len1) { - result[result.length] = set1[idx]; - idx += 1; - } - idx = 0; - while (idx < len2) { - result[result.length] = set2[idx]; - idx += 1; - } - return result; - } - - function _arity(n, fn) { - /* eslint-disable no-unused-vars */ - switch (n) { - case 0: return function() { return fn.apply(this, arguments); }; - case 1: return function(a0) { return fn.apply(this, arguments); }; - case 2: return function(a0, a1) { return fn.apply(this, arguments); }; - case 3: return function(a0, a1, a2) { return fn.apply(this, arguments); }; - case 4: return function(a0, a1, a2, a3) { return fn.apply(this, arguments); }; - case 5: return function(a0, a1, a2, a3, a4) { return fn.apply(this, arguments); }; - case 6: return function(a0, a1, a2, a3, a4, a5) { return fn.apply(this, arguments); }; - case 7: return function(a0, a1, a2, a3, a4, a5, a6) { return fn.apply(this, arguments); }; - case 8: return function(a0, a1, a2, a3, a4, a5, a6, a7) { return fn.apply(this, arguments); }; - case 9: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.apply(this, arguments); }; - case 10: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.apply(this, arguments); }; - default: throw new Error('First argument to _arity must be a non-negative integer no greater than ten'); - } - } - - /** - * Internal curryN function. - * - * @private - * @category Function - * @param {Number} length The arity of the curried function. - * @param {Array} received An array of arguments received thus far. - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - function _curryN(length, received, fn) { - return function() { - var combined = []; - var argsIdx = 0; - var left = length; - var combinedIdx = 0; - while (combinedIdx < received.length || argsIdx < arguments.length) { - var result; - if (combinedIdx < received.length && - (!_isPlaceholder(received[combinedIdx]) || - argsIdx >= arguments.length)) { - result = received[combinedIdx]; - } else { - result = arguments[argsIdx]; - argsIdx += 1; - } - combined[combinedIdx] = result; - if (!_isPlaceholder(result)) { - left -= 1; - } - combinedIdx += 1; - } - return left <= 0 - ? fn.apply(this, combined) - : _arity(left, _curryN(length, combined, fn)); - }; - } - - /** - * Returns a curried equivalent of the provided function, with the specified - * arity. The curried function has two unusual capabilities. First, its - * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the - * following are equivalent: - * - * - `g(1)(2)(3)` - * - `g(1)(2, 3)` - * - `g(1, 2)(3)` - * - `g(1, 2, 3)` - * - * Secondly, the special placeholder value [`R.__`](#__) may be used to specify - * "gaps", allowing partial application of any combination of arguments, - * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), - * the following are equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @func - * @memberOf R - * @since v0.5.0 - * @category Function - * @sig Number -> (* -> a) -> (* -> a) - * @param {Number} length The arity for the returned function. - * @param {Function} fn The function to curry. - * @return {Function} A new, curried function. - * @see R.curry - * @example - * - * const sumArgs = (...args) => R.sum(args); - * - * const curriedAddFourNumbers = R.curryN(4, sumArgs); - * const f = curriedAddFourNumbers(1, 2); - * const g = f(3); - * g(4); //=> 10 - */ - var curryN = _curry2(function curryN(length, fn) { - if (length === 1) { - return _curry1(fn); - } - return _arity(length, _curryN(length, [], fn)); - }); - - /** - * Creates a new list iteration function from an existing one by adding two new - * parameters to its callback function: the current index, and the entire list. - * - * This would turn, for instance, [`R.map`](#map) function into one that - * more closely resembles `Array.prototype.map`. Note that this will only work - * for functions in which the iteration callback function is the first - * parameter, and where the list is the last parameter. (This latter might be - * unimportant if the list parameter is not used.) - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Function - * @category List - * @sig ((a ... -> b) ... -> [a] -> *) -> ((a ..., Int, [a] -> b) ... -> [a] -> *) - * @param {Function} fn A list iteration function that does not pass index or list to its callback - * @return {Function} An altered list iteration function that passes (item, index, list) to its callback - * @example - * - * const mapIndexed = R.addIndex(R.map); - * mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']); - * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r'] - */ - var addIndex = _curry1(function addIndex(fn) { - return curryN(fn.length, function() { - var idx = 0; - var origFn = arguments[0]; - var list = arguments[arguments.length - 1]; - var args = Array.prototype.slice.call(arguments, 0); - args[0] = function() { - var result = origFn.apply(this, _concat(arguments, [idx, list])); - idx += 1; - return result; - }; - return fn.apply(this, args); - }); - }); - - /** - * Optimized internal three-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - function _curry3(fn) { - return function f3(a, b, c) { - switch (arguments.length) { - case 0: - return f3; - case 1: - return _isPlaceholder(a) - ? f3 - : _curry2(function(_b, _c) { return fn(a, _b, _c); }); - case 2: - return _isPlaceholder(a) && _isPlaceholder(b) - ? f3 - : _isPlaceholder(a) - ? _curry2(function(_a, _c) { return fn(_a, b, _c); }) - : _isPlaceholder(b) - ? _curry2(function(_b, _c) { return fn(a, _b, _c); }) - : _curry1(function(_c) { return fn(a, b, _c); }); - default: - return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) - ? f3 - : _isPlaceholder(a) && _isPlaceholder(b) - ? _curry2(function(_a, _b) { return fn(_a, _b, c); }) - : _isPlaceholder(a) && _isPlaceholder(c) - ? _curry2(function(_a, _c) { return fn(_a, b, _c); }) - : _isPlaceholder(b) && _isPlaceholder(c) - ? _curry2(function(_b, _c) { return fn(a, _b, _c); }) - : _isPlaceholder(a) - ? _curry1(function(_a) { return fn(_a, b, c); }) - : _isPlaceholder(b) - ? _curry1(function(_b) { return fn(a, _b, c); }) - : _isPlaceholder(c) - ? _curry1(function(_c) { return fn(a, b, _c); }) - : fn(a, b, c); - } - }; - } - - /** - * Applies a function to the value at the given index of an array, returning a - * new copy of the array with the element at the given index replaced with the - * result of the function application. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig Number -> (a -> a) -> [a] -> [a] - * @param {Number} idx The index. - * @param {Function} fn The function to apply. - * @param {Array|Arguments} list An array-like object whose value - * at the supplied index will be replaced. - * @return {Array} A copy of the supplied array-like object with - * the element at index `idx` replaced with the value - * returned by applying `fn` to the existing element. - * @see R.update - * @example - * - * R.adjust(1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'B', 'c', 'd'] - * R.adjust(-1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c', 'D'] - * @symb R.adjust(-1, f, [a, b]) = [a, f(b)] - * @symb R.adjust(0, f, [a, b]) = [f(a), b] - */ - var adjust = _curry3(function adjust(idx, fn, list) { - if (idx >= list.length || idx < -list.length) { - return list; - } - var start = idx < 0 ? list.length : 0; - var _idx = start + idx; - var _list = _concat(list); - _list[_idx] = fn(list[_idx]); - return _list; - }); - - /** - * Tests whether or not an object is an array. - * - * @private - * @param {*} val The object to test. - * @return {Boolean} `true` if `val` is an array, `false` otherwise. - * @example - * - * _isArray([]); //=> true - * _isArray(null); //=> false - * _isArray({}); //=> false - */ - var _isArray = Array.isArray || function _isArray(val) { - return (val != null && - val.length >= 0 && - Object.prototype.toString.call(val) === '[object Array]'); - }; - - function _isTransformer(obj) { - return obj != null && typeof obj['@@transducer/step'] === 'function'; - } - - /** - * Returns a function that dispatches with different strategies based on the - * object in list position (last argument). If it is an array, executes [fn]. - * Otherwise, if it has a function with one of the given method names, it will - * execute that function (functor case). Otherwise, if it is a transformer, - * uses transducer [xf] to return a new transformer (transducer case). - * Otherwise, it will default to executing [fn]. - * - * @private - * @param {Array} methodNames properties to check for a custom implementation - * @param {Function} xf transducer to initialize if object is transformer - * @param {Function} fn default ramda implementation - * @return {Function} A function that dispatches on object in list position - */ - function _dispatchable(methodNames, xf, fn) { - return function() { - if (arguments.length === 0) { - return fn(); - } - var args = Array.prototype.slice.call(arguments, 0); - var obj = args.pop(); - if (!_isArray(obj)) { - var idx = 0; - while (idx < methodNames.length) { - if (typeof obj[methodNames[idx]] === 'function') { - return obj[methodNames[idx]].apply(obj, args); - } - idx += 1; - } - if (_isTransformer(obj)) { - var transducer = xf.apply(null, args); - return transducer(obj); - } - } - return fn.apply(this, arguments); - }; - } - - function _reduced(x) { - return x && x['@@transducer/reduced'] ? x : - { - '@@transducer/value': x, - '@@transducer/reduced': true - }; - } - - var _xfBase = { - init: function() { - return this.xf['@@transducer/init'](); - }, - result: function(result) { - return this.xf['@@transducer/result'](result); - } - }; - - function XAll(f, xf) { - this.xf = xf; - this.f = f; - this.all = true; - } - XAll.prototype['@@transducer/init'] = _xfBase.init; - XAll.prototype['@@transducer/result'] = function(result) { - if (this.all) { - result = this.xf['@@transducer/step'](result, true); - } - return this.xf['@@transducer/result'](result); - }; - XAll.prototype['@@transducer/step'] = function(result, input) { - if (!this.f(input)) { - this.all = false; - result = _reduced(this.xf['@@transducer/step'](result, false)); - } - return result; - }; - - var _xall = _curry2(function _xall(f, xf) { return new XAll(f, xf); }); - - /** - * Returns `true` if all elements of the list match the predicate, `false` if - * there are any that don't. - * - * Dispatches to the `all` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is satisfied by every element, `false` - * otherwise. - * @see R.any, R.none, R.transduce - * @example - * - * const equals3 = R.equals(3); - * R.all(equals3)([3, 3, 3, 3]); //=> true - * R.all(equals3)([3, 3, 1, 3]); //=> false - */ - var all = _curry2(_dispatchable(['all'], _xall, function all(fn, list) { - var idx = 0; - while (idx < list.length) { - if (!fn(list[idx])) { - return false; - } - idx += 1; - } - return true; - })); - - /** - * Returns the larger of its two arguments. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> a - * @param {*} a - * @param {*} b - * @return {*} - * @see R.maxBy, R.min - * @example - * - * R.max(789, 123); //=> 789 - * R.max('a', 'b'); //=> 'b' - */ - var max = _curry2(function max(a, b) { return b > a ? b : a; }); - - function _map(fn, functor) { - var idx = 0; - var len = functor.length; - var result = Array(len); - while (idx < len) { - result[idx] = fn(functor[idx]); - idx += 1; - } - return result; - } - - function _isString(x) { - return Object.prototype.toString.call(x) === '[object String]'; - } - - /** - * Tests whether or not an object is similar to an array. - * - * @private - * @category Type - * @category List - * @sig * -> Boolean - * @param {*} x The object to test. - * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise. - * @example - * - * _isArrayLike([]); //=> true - * _isArrayLike(true); //=> false - * _isArrayLike({}); //=> false - * _isArrayLike({length: 10}); //=> false - * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true - */ - var _isArrayLike = _curry1(function isArrayLike(x) { - if (_isArray(x)) { return true; } - if (!x) { return false; } - if (typeof x !== 'object') { return false; } - if (_isString(x)) { return false; } - if (x.nodeType === 1) { return !!x.length; } - if (x.length === 0) { return true; } - if (x.length > 0) { - return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1); - } - return false; - }); - - function XWrap(fn) { - this.f = fn; - } - XWrap.prototype['@@transducer/init'] = function() { - throw new Error('init not implemented on XWrap'); - }; - XWrap.prototype['@@transducer/result'] = function(acc) { return acc; }; - XWrap.prototype['@@transducer/step'] = function(acc, x) { - return this.f(acc, x); - }; - - function _xwrap(fn) { return new XWrap(fn); } - - /** - * Creates a function that is bound to a context. - * Note: `R.bind` does not provide the additional argument-binding capabilities of - * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Function - * @category Object - * @sig (* -> *) -> {*} -> (* -> *) - * @param {Function} fn The function to bind to context - * @param {Object} thisObj The context to bind `fn` to - * @return {Function} A function that will execute in the context of `thisObj`. - * @see R.partial - * @example - * - * const log = R.bind(console.log, console); - * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3} - * // logs {a: 2} - * @symb R.bind(f, o)(a, b) = f.call(o, a, b) - */ - var bind = _curry2(function bind(fn, thisObj) { - return _arity(fn.length, function() { - return fn.apply(thisObj, arguments); - }); - }); - - function _arrayReduce(xf, acc, list) { - var idx = 0; - var len = list.length; - while (idx < len) { - acc = xf['@@transducer/step'](acc, list[idx]); - if (acc && acc['@@transducer/reduced']) { - acc = acc['@@transducer/value']; - break; - } - idx += 1; - } - return xf['@@transducer/result'](acc); - } - - function _iterableReduce(xf, acc, iter) { - var step = iter.next(); - while (!step.done) { - acc = xf['@@transducer/step'](acc, step.value); - if (acc && acc['@@transducer/reduced']) { - acc = acc['@@transducer/value']; - break; - } - step = iter.next(); - } - return xf['@@transducer/result'](acc); - } - - function _methodReduce(xf, acc, obj, methodName) { - return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc)); - } - - var symIterator = (typeof Symbol !== 'undefined') ? Symbol.iterator : '@@iterator'; - - function _reduce(fn, acc, list) { - if (typeof fn === 'function') { - fn = _xwrap(fn); - } - if (_isArrayLike(list)) { - return _arrayReduce(fn, acc, list); - } - if (typeof list['fantasy-land/reduce'] === 'function') { - return _methodReduce(fn, acc, list, 'fantasy-land/reduce'); - } - if (list[symIterator] != null) { - return _iterableReduce(fn, acc, list[symIterator]()); - } - if (typeof list.next === 'function') { - return _iterableReduce(fn, acc, list); - } - if (typeof list.reduce === 'function') { - return _methodReduce(fn, acc, list, 'reduce'); - } - - throw new TypeError('reduce: list must be array or iterable'); - } - - function XMap(f, xf) { - this.xf = xf; - this.f = f; - } - XMap.prototype['@@transducer/init'] = _xfBase.init; - XMap.prototype['@@transducer/result'] = _xfBase.result; - XMap.prototype['@@transducer/step'] = function(result, input) { - return this.xf['@@transducer/step'](result, this.f(input)); - }; - - var _xmap = _curry2(function _xmap(f, xf) { return new XMap(f, xf); }); - - function _has(prop, obj) { - return Object.prototype.hasOwnProperty.call(obj, prop); - } - - var toString = Object.prototype.toString; - var _isArguments = (function() { - return toString.call(arguments) === '[object Arguments]' ? - function _isArguments(x) { return toString.call(x) === '[object Arguments]'; } : - function _isArguments(x) { return _has('callee', x); }; - }()); - - // cover IE < 9 keys issues - var hasEnumBug = !({toString: null}).propertyIsEnumerable('toString'); - var nonEnumerableProps = [ - 'constructor', 'valueOf', 'isPrototypeOf', 'toString', - 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString' - ]; - // Safari bug - var hasArgsEnumBug = (function() { - return arguments.propertyIsEnumerable('length'); - }()); - - var contains = function contains(list, item) { - var idx = 0; - while (idx < list.length) { - if (list[idx] === item) { - return true; - } - idx += 1; - } - return false; - }; - - /** - * Returns a list containing the names of all the enumerable own properties of - * the supplied object. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> [k] - * @param {Object} obj The object to extract properties from - * @return {Array} An array of the object's own properties. - * @see R.keysIn, R.values - * @example - * - * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c'] - */ - var keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? - _curry1(function keys(obj) { - return Object(obj) !== obj ? [] : Object.keys(obj); - }) : - _curry1(function keys(obj) { - if (Object(obj) !== obj) { - return []; - } - var prop, nIdx; - var ks = []; - var checkArgsLength = hasArgsEnumBug && _isArguments(obj); - for (prop in obj) { - if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) { - ks[ks.length] = prop; - } - } - if (hasEnumBug) { - nIdx = nonEnumerableProps.length - 1; - while (nIdx >= 0) { - prop = nonEnumerableProps[nIdx]; - if (_has(prop, obj) && !contains(ks, prop)) { - ks[ks.length] = prop; - } - nIdx -= 1; - } - } - return ks; - }); - - /** - * Takes a function and - * a [functor](https://github.com/fantasyland/fantasy-land#functor), - * applies the function to each of the functor's values, and returns - * a functor of the same shape. - * - * Ramda provides suitable `map` implementations for `Array` and `Object`, - * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`. - * - * Dispatches to the `map` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * Also treats functions as functors and will compose them together. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Functor f => (a -> b) -> f a -> f b - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {Array} list The list to be iterated over. - * @return {Array} The new list. - * @see R.transduce, R.addIndex - * @example - * - * const double = x => x * 2; - * - * R.map(double, [1, 2, 3]); //=> [2, 4, 6] - * - * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6} - * @symb R.map(f, [a, b]) = [f(a), f(b)] - * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) } - * @symb R.map(f, functor_o) = functor_o.map(f) - */ - var map = _curry2(_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) { - switch (Object.prototype.toString.call(functor)) { - case '[object Function]': - return curryN(functor.length, function() { - return fn.call(this, functor.apply(this, arguments)); - }); - case '[object Object]': - return _reduce(function(acc, key) { - acc[key] = fn(functor[key]); - return acc; - }, {}, keys(functor)); - default: - return _map(fn, functor); - } - })); - - /** - * Determine if the passed argument is an integer. - * - * @private - * @param {*} n - * @category Type - * @return {Boolean} - */ - var _isInteger = Number.isInteger || function _isInteger(n) { - return (n << 0) === n; - }; - - /** - * Returns the nth element of the given list or string. If n is negative the - * element at index length + n is returned. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> a | Undefined - * @sig Number -> String -> String - * @param {Number} offset - * @param {*} list - * @return {*} - * @example - * - * const list = ['foo', 'bar', 'baz', 'quux']; - * R.nth(1, list); //=> 'bar' - * R.nth(-1, list); //=> 'quux' - * R.nth(-99, list); //=> undefined - * - * R.nth(2, 'abc'); //=> 'c' - * R.nth(3, 'abc'); //=> '' - * @symb R.nth(-1, [a, b, c]) = c - * @symb R.nth(0, [a, b, c]) = a - * @symb R.nth(1, [a, b, c]) = b - */ - var nth = _curry2(function nth(offset, list) { - var idx = offset < 0 ? list.length + offset : offset; - return _isString(list) ? list.charAt(idx) : list[idx]; - }); - - /** - * Retrieves the values at given paths of an object. - * - * @func - * @memberOf R - * @since v0.27.1 - * @category Object - * @typedefn Idx = [String | Int] - * @sig [Idx] -> {a} -> [a | Undefined] - * @param {Array} pathsArray The array of paths to be fetched. - * @param {Object} obj The object to retrieve the nested properties from. - * @return {Array} A list consisting of values at paths specified by "pathsArray". - * @see R.path - * @example - * - * R.paths([['a', 'b'], ['p', 0, 'q']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, 3] - * R.paths([['a', 'b'], ['p', 'r']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, undefined] - */ - var paths = _curry2(function paths(pathsArray, obj) { - return pathsArray.map(function(paths) { - var val = obj; - var idx = 0; - var p; - while (idx < paths.length) { - if (val == null) { - return; - } - p = paths[idx]; - val = _isInteger(p) ? nth(p, val) : val[p]; - idx += 1; - } - return val; - }); - }); - - /** - * Retrieve the value at a given path. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {a} -> a | Undefined - * @param {Array} path The path to use. - * @param {Object} obj The object to retrieve the nested property from. - * @return {*} The data at `path`. - * @see R.prop, R.nth - * @example - * - * R.path(['a', 'b'], {a: {b: 2}}); //=> 2 - * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined - * R.path(['a', 'b', 0], {a: {b: [1, 2, 3]}}); //=> 1 - * R.path(['a', 'b', -2], {a: {b: [1, 2, 3]}}); //=> 2 - */ - - var path = _curry2(function path(pathAr, obj) { - return paths([pathAr], obj)[0]; - }); - - /** - * Returns a function that when supplied an object returns the indicated - * property of that object, if it exists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @typedefn Idx = String | Int - * @sig Idx -> {s: a} -> a | Undefined - * @param {String|Number} p The property name or array index - * @param {Object} obj The object to query - * @return {*} The value at `obj.p`. - * @see R.path, R.nth - * @example - * - * R.prop('x', {x: 100}); //=> 100 - * R.prop('x', {}); //=> undefined - * R.prop(0, [100]); //=> 100 - * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4 - */ - - var prop = _curry2(function prop(p, obj) { return path([p], obj); }); - - /** - * Returns a new list by plucking the same named property off all objects in - * the list supplied. - * - * `pluck` will work on - * any [functor](https://github.com/fantasyland/fantasy-land#functor) in - * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Functor f => k -> f {k: v} -> f v - * @param {Number|String} key The key name to pluck off of each object. - * @param {Array} f The array or functor to consider. - * @return {Array} The list of values for the given key. - * @see R.props - * @example - * - * var getAges = R.pluck('age'); - * getAges([{name: 'fred', age: 29}, {name: 'wilma', age: 27}]); //=> [29, 27] - * - * R.pluck(0, [[1, 2], [3, 4]]); //=> [1, 3] - * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5} - * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5] - * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5] - */ - var pluck = _curry2(function pluck(p, list) { - return map(prop(p), list); - }); - - /** - * Returns a single item by iterating through the list, successively calling - * the iterator function and passing it an accumulator value and the current - * value from the array, and then passing the result to the next call. - * - * The iterator function receives two values: *(acc, value)*. It may use - * [`R.reduced`](#reduced) to shortcut the iteration. - * - * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function - * is *(value, acc)*. - * - * Note: `R.reduce` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.reduce` method. For more details - * on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description - * - * Dispatches to the `reduce` method of the third argument, if present. When - * doing so, it is up to the user to handle the [`R.reduced`](#reduced) - * shortcuting, as this is not implemented by `reduce`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, b) -> a) -> a -> [b] -> a - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduced, R.addIndex, R.reduceRight - * @example - * - * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10 - * // - -10 - * // / \ / \ - * // - 4 -6 4 - * // / \ / \ - * // - 3 ==> -3 3 - * // / \ / \ - * // - 2 -1 2 - * // / \ / \ - * // 0 1 0 1 - * - * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d) - */ - var reduce = _curry3(_reduce); - - /** - * Takes a list of predicates and returns a predicate that returns true for a - * given list of arguments if every one of the provided predicates is satisfied - * by those arguments. - * - * The function returned is a curried function whose arity matches that of the - * highest-arity predicate. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Logic - * @sig [(*... -> Boolean)] -> (*... -> Boolean) - * @param {Array} predicates An array of predicates to check - * @return {Function} The combined predicate - * @see R.anyPass - * @example - * - * const isQueen = R.propEq('rank', 'Q'); - * const isSpade = R.propEq('suit', '♠︎'); - * const isQueenOfSpades = R.allPass([isQueen, isSpade]); - * - * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false - * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true - */ - var allPass = _curry1(function allPass(preds) { - return curryN(reduce(max, 0, pluck('length', preds)), function() { - var idx = 0; - var len = preds.length; - while (idx < len) { - if (!preds[idx].apply(this, arguments)) { - return false; - } - idx += 1; - } - return true; - }); - }); - - /** - * Returns a function that always returns the given value. Note that for - * non-primitives the value returned is a reference to the original value. - * - * This function is known as `const`, `constant`, or `K` (for K combinator) in - * other languages and libraries. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig a -> (* -> a) - * @param {*} val The value to wrap in a function - * @return {Function} A Function :: * -> val. - * @example - * - * const t = R.always('Tee'); - * t(); //=> 'Tee' - */ - var always = _curry1(function always(val) { - return function() { - return val; - }; - }); - - /** - * Returns `true` if both arguments are `true`; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> b -> a | b - * @param {Any} a - * @param {Any} b - * @return {Any} the first argument if it is falsy, otherwise the second argument. - * @see R.both, R.xor - * @example - * - * R.and(true, true); //=> true - * R.and(true, false); //=> false - * R.and(false, true); //=> false - * R.and(false, false); //=> false - */ - var and = _curry2(function and(a, b) { - return a && b; - }); - - function XAny(f, xf) { - this.xf = xf; - this.f = f; - this.any = false; - } - XAny.prototype['@@transducer/init'] = _xfBase.init; - XAny.prototype['@@transducer/result'] = function(result) { - if (!this.any) { - result = this.xf['@@transducer/step'](result, false); - } - return this.xf['@@transducer/result'](result); - }; - XAny.prototype['@@transducer/step'] = function(result, input) { - if (this.f(input)) { - this.any = true; - result = _reduced(this.xf['@@transducer/step'](result, true)); - } - return result; - }; - - var _xany = _curry2(function _xany(f, xf) { return new XAny(f, xf); }); - - /** - * Returns `true` if at least one of the elements of the list match the predicate, - * `false` otherwise. - * - * Dispatches to the `any` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false` - * otherwise. - * @see R.all, R.none, R.transduce - * @example - * - * const lessThan0 = R.flip(R.lt)(0); - * const lessThan2 = R.flip(R.lt)(2); - * R.any(lessThan0)([1, 2]); //=> false - * R.any(lessThan2)([1, 2]); //=> true - */ - var any = _curry2(_dispatchable(['any'], _xany, function any(fn, list) { - var idx = 0; - while (idx < list.length) { - if (fn(list[idx])) { - return true; - } - idx += 1; - } - return false; - })); - - /** - * Takes a list of predicates and returns a predicate that returns true for a - * given list of arguments if at least one of the provided predicates is - * satisfied by those arguments. - * - * The function returned is a curried function whose arity matches that of the - * highest-arity predicate. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Logic - * @sig [(*... -> Boolean)] -> (*... -> Boolean) - * @param {Array} predicates An array of predicates to check - * @return {Function} The combined predicate - * @see R.allPass - * @example - * - * const isClub = R.propEq('suit', '♣'); - * const isSpade = R.propEq('suit', '♠'); - * const isBlackCard = R.anyPass([isClub, isSpade]); - * - * isBlackCard({rank: '10', suit: '♣'}); //=> true - * isBlackCard({rank: 'Q', suit: '♠'}); //=> true - * isBlackCard({rank: 'Q', suit: '♦'}); //=> false - */ - var anyPass = _curry1(function anyPass(preds) { - return curryN(reduce(max, 0, pluck('length', preds)), function() { - var idx = 0; - var len = preds.length; - while (idx < len) { - if (preds[idx].apply(this, arguments)) { - return true; - } - idx += 1; - } - return false; - }); - }); - - /** - * ap applies a list of functions to a list of values. - * - * Dispatches to the `ap` method of the second argument, if present. Also - * treats curried functions as applicatives. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig [a -> b] -> [a] -> [b] - * @sig Apply f => f (a -> b) -> f a -> f b - * @sig (r -> a -> b) -> (r -> a) -> (r -> b) - * @param {*} applyF - * @param {*} applyX - * @return {*} - * @example - * - * R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6] - * R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> ["tasty pizza", "tasty salad", "PIZZA", "SALAD"] - * - * // R.ap can also be used as S combinator - * // when only two functions are passed - * R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA' - * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)] - */ - var ap = _curry2(function ap(applyF, applyX) { - return ( - typeof applyX['fantasy-land/ap'] === 'function' - ? applyX['fantasy-land/ap'](applyF) - : typeof applyF.ap === 'function' - ? applyF.ap(applyX) - : typeof applyF === 'function' - ? function(x) { return applyF(x)(applyX(x)); } - : _reduce(function(acc, f) { return _concat(acc, map(f, applyX)); }, [], applyF) - ); - }); - - function _aperture(n, list) { - var idx = 0; - var limit = list.length - (n - 1); - var acc = new Array(limit >= 0 ? limit : 0); - while (idx < limit) { - acc[idx] = Array.prototype.slice.call(list, idx, idx + n); - idx += 1; - } - return acc; - } - - function XAperture(n, xf) { - this.xf = xf; - this.pos = 0; - this.full = false; - this.acc = new Array(n); - } - XAperture.prototype['@@transducer/init'] = _xfBase.init; - XAperture.prototype['@@transducer/result'] = function(result) { - this.acc = null; - return this.xf['@@transducer/result'](result); - }; - XAperture.prototype['@@transducer/step'] = function(result, input) { - this.store(input); - return this.full ? this.xf['@@transducer/step'](result, this.getCopy()) : result; - }; - XAperture.prototype.store = function(input) { - this.acc[this.pos] = input; - this.pos += 1; - if (this.pos === this.acc.length) { - this.pos = 0; - this.full = true; - } - }; - XAperture.prototype.getCopy = function() { - return _concat(Array.prototype.slice.call(this.acc, this.pos), - Array.prototype.slice.call(this.acc, 0, this.pos) - ); - }; - - var _xaperture = _curry2(function _xaperture(n, xf) { return new XAperture(n, xf); }); - - /** - * Returns a new list, composed of n-tuples of consecutive elements. If `n` is - * greater than the length of the list, an empty list is returned. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig Number -> [a] -> [[a]] - * @param {Number} n The size of the tuples to create - * @param {Array} list The list to split into `n`-length tuples - * @return {Array} The resulting list of `n`-length tuples - * @see R.transduce - * @example - * - * R.aperture(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [2, 3], [3, 4], [4, 5]] - * R.aperture(3, [1, 2, 3, 4, 5]); //=> [[1, 2, 3], [2, 3, 4], [3, 4, 5]] - * R.aperture(7, [1, 2, 3, 4, 5]); //=> [] - */ - var aperture = _curry2(_dispatchable([], _xaperture, _aperture)); - - /** - * Returns a new list containing the contents of the given list, followed by - * the given element. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} el The element to add to the end of the new list. - * @param {Array} list The list of elements to add a new item to. - * list. - * @return {Array} A new list containing the elements of the old list followed by `el`. - * @see R.prepend - * @example - * - * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests'] - * R.append('tests', []); //=> ['tests'] - * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']] - */ - var append = _curry2(function append(el, list) { - return _concat(list, [el]); - }); - - /** - * Applies function `fn` to the argument list `args`. This is useful for - * creating a fixed-arity function from a variadic function. `fn` should be a - * bound function if context is significant. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig (*... -> a) -> [*] -> a - * @param {Function} fn The function which will be called with `args` - * @param {Array} args The arguments to call `fn` with - * @return {*} result The result, equivalent to `fn(...args)` - * @see R.call, R.unapply - * @example - * - * const nums = [1, 2, 3, -99, 42, 6, 7]; - * R.apply(Math.max, nums); //=> 42 - * @symb R.apply(f, [a, b, c]) = f(a, b, c) - */ - var apply = _curry2(function apply(fn, args) { - return fn.apply(this, args); - }); - - /** - * Returns a list of all the enumerable own properties of the supplied object. - * Note that the order of the output array is not guaranteed across different - * JS platforms. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> [v] - * @param {Object} obj The object to extract values from - * @return {Array} An array of the values of the object's own properties. - * @see R.valuesIn, R.keys - * @example - * - * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3] - */ - var values = _curry1(function values(obj) { - var props = keys(obj); - var len = props.length; - var vals = []; - var idx = 0; - while (idx < len) { - vals[idx] = obj[props[idx]]; - idx += 1; - } - return vals; - }); - - // Use custom mapValues function to avoid issues with specs that include a "map" key and R.map - // delegating calls to .map - function mapValues(fn, obj) { - return keys(obj).reduce(function(acc, key) { - acc[key] = fn(obj[key]); - return acc; - }, {}); - } - - /** - * Given a spec object recursively mapping properties to functions, creates a - * function producing an object of the same structure, by mapping each property - * to the result of calling its associated function with the supplied arguments. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Function - * @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v}) - * @param {Object} spec an object recursively mapping properties to functions for - * producing the values for these properties. - * @return {Function} A function that returns an object of the same structure - * as `spec', with each property set to the value returned by calling its - * associated function with the supplied arguments. - * @see R.converge, R.juxt - * @example - * - * const getMetrics = R.applySpec({ - * sum: R.add, - * nested: { mul: R.multiply } - * }); - * getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } } - * @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } } - */ - var applySpec = _curry1(function applySpec(spec) { - spec = mapValues( - function(v) { return typeof v == 'function' ? v : applySpec(v); }, - spec - ); - - return curryN( - reduce(max, 0, pluck('length', values(spec))), - function() { - var args = arguments; - return mapValues(function(f) { return apply(f, args); }, spec); - }); - }); - - /** - * Takes a value and applies a function to it. - * - * This function is also known as the `thrush` combinator. - * - * @func - * @memberOf R - * @since v0.25.0 - * @category Function - * @sig a -> (a -> b) -> b - * @param {*} x The value - * @param {Function} f The function to apply - * @return {*} The result of applying `f` to `x` - * @example - * - * const t42 = R.applyTo(42); - * t42(R.identity); //=> 42 - * t42(R.add(1)); //=> 43 - */ - var applyTo = _curry2(function applyTo(x, f) { return f(x); }); - - /** - * Makes an ascending comparator function out of a function that returns a value - * that can be compared with `<` and `>`. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Function - * @sig Ord b => (a -> b) -> a -> a -> Number - * @param {Function} fn A function of arity one that returns a value that can be compared - * @param {*} a The first item to be compared. - * @param {*} b The second item to be compared. - * @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0` - * @see R.descend - * @example - * - * const byAge = R.ascend(R.prop('age')); - * const people = [ - * { name: 'Emma', age: 70 }, - * { name: 'Peter', age: 78 }, - * { name: 'Mikhail', age: 62 }, - * ]; - * const peopleByYoungestFirst = R.sort(byAge, people); - * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }] - */ - var ascend = _curry3(function ascend(fn, a, b) { - var aa = fn(a); - var bb = fn(b); - return aa < bb ? -1 : aa > bb ? 1 : 0; - }); - - /** - * Makes a shallow clone of an object, setting or overriding the specified - * property with the given value. Note that this copies and flattens prototype - * properties onto the new object as well. All non-primitive properties are - * copied by reference. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @sig String -> a -> {k: v} -> {k: v} - * @param {String} prop The property name to set - * @param {*} val The new value - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original except for the changed property. - * @see R.dissoc, R.pick - * @example - * - * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3} - */ - var assoc = _curry3(function assoc(prop, val, obj) { - var result = {}; - for (var p in obj) { - result[p] = obj[p]; - } - result[prop] = val; - return result; - }); - - /** - * Checks if the input value is `null` or `undefined`. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Type - * @sig * -> Boolean - * @param {*} x The value to test. - * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`. - * @example - * - * R.isNil(null); //=> true - * R.isNil(undefined); //=> true - * R.isNil(0); //=> false - * R.isNil([]); //=> false - */ - var isNil = _curry1(function isNil(x) { return x == null; }); - - /** - * Makes a shallow clone of an object, setting or overriding the nodes required - * to create the given path, and placing the specific value at the tail end of - * that path. Note that this copies and flattens prototype properties onto the - * new object as well. All non-primitive properties are copied by reference. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> a -> {a} -> {a} - * @param {Array} path the path to set - * @param {*} val The new value - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original except along the specified path. - * @see R.dissocPath - * @example - * - * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} - * - * // Any missing or non-object keys in path will be overridden - * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} - */ - var assocPath = _curry3(function assocPath(path, val, obj) { - if (path.length === 0) { - return val; - } - var idx = path[0]; - if (path.length > 1) { - var nextObj = (!isNil(obj) && _has(idx, obj)) ? obj[idx] : _isInteger(path[1]) ? [] : {}; - val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); - } - if (_isInteger(idx) && _isArray(obj)) { - var arr = [].concat(obj); - arr[idx] = val; - return arr; - } else { - return assoc(idx, val, obj); - } - }); - - /** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly `n` parameters. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig Number -> (* -> a) -> (* -> a) - * @param {Number} n The desired arity of the new function. - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity `n`. - * @see R.binary, R.unary - * @example - * - * const takesTwoArgs = (a, b) => [a, b]; - * - * takesTwoArgs.length; //=> 2 - * takesTwoArgs(1, 2); //=> [1, 2] - * - * const takesOneArg = R.nAry(1, takesTwoArgs); - * takesOneArg.length; //=> 1 - * // Only `n` arguments are passed to the wrapped function - * takesOneArg(1, 2); //=> [1, undefined] - * @symb R.nAry(0, f)(a, b) = f() - * @symb R.nAry(1, f)(a, b) = f(a) - * @symb R.nAry(2, f)(a, b) = f(a, b) - */ - var nAry = _curry2(function nAry(n, fn) { - switch (n) { - case 0: return function() {return fn.call(this);}; - case 1: return function(a0) {return fn.call(this, a0);}; - case 2: return function(a0, a1) {return fn.call(this, a0, a1);}; - case 3: return function(a0, a1, a2) {return fn.call(this, a0, a1, a2);}; - case 4: return function(a0, a1, a2, a3) {return fn.call(this, a0, a1, a2, a3);}; - case 5: return function(a0, a1, a2, a3, a4) {return fn.call(this, a0, a1, a2, a3, a4);}; - case 6: return function(a0, a1, a2, a3, a4, a5) {return fn.call(this, a0, a1, a2, a3, a4, a5);}; - case 7: return function(a0, a1, a2, a3, a4, a5, a6) {return fn.call(this, a0, a1, a2, a3, a4, a5, a6);}; - case 8: return function(a0, a1, a2, a3, a4, a5, a6, a7) {return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7);}; - case 9: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8) {return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8);}; - case 10: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9);}; - default: throw new Error('First argument to nAry must be a non-negative integer no greater than ten'); - } - }); - - /** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly 2 parameters. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Function - * @sig (* -> c) -> (a, b -> c) - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity 2. - * @see R.nAry, R.unary - * @example - * - * const takesThreeArgs = function(a, b, c) { - * return [a, b, c]; - * }; - * takesThreeArgs.length; //=> 3 - * takesThreeArgs(1, 2, 3); //=> [1, 2, 3] - * - * const takesTwoArgs = R.binary(takesThreeArgs); - * takesTwoArgs.length; //=> 2 - * // Only 2 arguments are passed to the wrapped function - * takesTwoArgs(1, 2, 3); //=> [1, 2, undefined] - * @symb R.binary(f)(a, b, c) = f(a, b) - */ - var binary = _curry1(function binary(fn) { - return nAry(2, fn); - }); - - function _isFunction(x) { - var type = Object.prototype.toString.call(x); - return type === '[object Function]' || - type === '[object AsyncFunction]' || - type === '[object GeneratorFunction]' || - type === '[object AsyncGeneratorFunction]'; - } - - /** - * "lifts" a function to be the specified arity, so that it may "map over" that - * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig Number -> (*... -> *) -> ([*]... -> [*]) - * @param {Function} fn The function to lift into higher context - * @return {Function} The lifted function. - * @see R.lift, R.ap - * @example - * - * const madd3 = R.liftN(3, (...args) => R.sum(args)); - * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] - */ - var liftN = _curry2(function liftN(arity, fn) { - var lifted = curryN(arity, fn); - return curryN(arity, function() { - return _reduce(ap, map(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1)); - }); - }); - - /** - * "lifts" a function of arity > 1 so that it may "map over" a list, Function or other - * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig (*... -> *) -> ([*]... -> [*]) - * @param {Function} fn The function to lift into higher context - * @return {Function} The lifted function. - * @see R.liftN - * @example - * - * const madd3 = R.lift((a, b, c) => a + b + c); - * - * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] - * - * const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e); - * - * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24] - */ - var lift = _curry1(function lift(fn) { - return liftN(fn.length, fn); - }); - - /** - * A function which calls the two provided functions and returns the `&&` - * of the results. - * It returns the result of the first function if it is false-y and the result - * of the second function otherwise. Note that this is short-circuited, - * meaning that the second function will not be invoked if the first returns a - * false-y value. - * - * In addition to functions, `R.both` also accepts any fantasy-land compatible - * applicative functor. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) - * @param {Function} f A predicate - * @param {Function} g Another predicate - * @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together. - * @see R.and - * @example - * - * const gt10 = R.gt(R.__, 10) - * const lt20 = R.lt(R.__, 20) - * const f = R.both(gt10, lt20); - * f(15); //=> true - * f(30); //=> false - * - * R.both(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(false) - * R.both([false, false, 'a'], [11]); //=> [false, false, 11] - */ - var both = _curry2(function both(f, g) { - return _isFunction(f) ? - function _both() { - return f.apply(this, arguments) && g.apply(this, arguments); - } : - lift(and)(f, g); - }); - - /** - * Returns a curried equivalent of the provided function. The curried function - * has two unusual capabilities. First, its arguments needn't be provided one - * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the - * following are equivalent: - * - * - `g(1)(2)(3)` - * - `g(1)(2, 3)` - * - `g(1, 2)(3)` - * - `g(1, 2, 3)` - * - * Secondly, the special placeholder value [`R.__`](#__) may be used to specify - * "gaps", allowing partial application of any combination of arguments, - * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), - * the following are equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (* -> a) -> (* -> a) - * @param {Function} fn The function to curry. - * @return {Function} A new, curried function. - * @see R.curryN, R.partial - * @example - * - * const addFourNumbers = (a, b, c, d) => a + b + c + d; - * - * const curriedAddFourNumbers = R.curry(addFourNumbers); - * const f = curriedAddFourNumbers(1, 2); - * const g = f(3); - * g(4); //=> 10 - */ - var curry = _curry1(function curry(fn) { - return curryN(fn.length, fn); - }); - - /** - * Returns the result of calling its first argument with the remaining - * arguments. This is occasionally useful as a converging function for - * [`R.converge`](#converge): the first branch can produce a function while the - * remaining branches produce values to be passed to that function as its - * arguments. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig (*... -> a),*... -> a - * @param {Function} fn The function to apply to the remaining arguments. - * @param {...*} args Any number of positional arguments. - * @return {*} - * @see R.apply - * @example - * - * R.call(R.add, 1, 2); //=> 3 - * - * const indentN = R.pipe(R.repeat(' '), - * R.join(''), - * R.replace(/^(?!$)/gm)); - * - * const format = R.converge(R.call, [ - * R.pipe(R.prop('indent'), indentN), - * R.prop('value') - * ]); - * - * format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n' - * @symb R.call(f, a, b) = f(a, b) - */ - var call = curry(function call(fn) { - return fn.apply(this, Array.prototype.slice.call(arguments, 1)); - }); - - /** - * `_makeFlat` is a helper function that returns a one-level or fully recursive - * function based on the flag passed in. - * - * @private - */ - function _makeFlat(recursive) { - return function flatt(list) { - var value, jlen, j; - var result = []; - var idx = 0; - var ilen = list.length; - - while (idx < ilen) { - if (_isArrayLike(list[idx])) { - value = recursive ? flatt(list[idx]) : list[idx]; - j = 0; - jlen = value.length; - while (j < jlen) { - result[result.length] = value[j]; - j += 1; - } - } else { - result[result.length] = list[idx]; - } - idx += 1; - } - return result; - }; - } - - function _forceReduced(x) { - return { - '@@transducer/value': x, - '@@transducer/reduced': true - }; - } - - var preservingReduced = function(xf) { - return { - '@@transducer/init': _xfBase.init, - '@@transducer/result': function(result) { - return xf['@@transducer/result'](result); - }, - '@@transducer/step': function(result, input) { - var ret = xf['@@transducer/step'](result, input); - return ret['@@transducer/reduced'] ? _forceReduced(ret) : ret; - } - }; - }; - - var _flatCat = function _xcat(xf) { - var rxf = preservingReduced(xf); - return { - '@@transducer/init': _xfBase.init, - '@@transducer/result': function(result) { - return rxf['@@transducer/result'](result); - }, - '@@transducer/step': function(result, input) { - return !_isArrayLike(input) ? _reduce(rxf, result, [input]) : _reduce(rxf, result, input); - } - }; - }; - - var _xchain = _curry2(function _xchain(f, xf) { - return map(f, _flatCat(xf)); - }); - - /** - * `chain` maps a function over a list and concatenates the results. `chain` - * is also known as `flatMap` in some libraries. - * - * Dispatches to the `chain` method of the second argument, if present, - * according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain). - * - * If second argument is a function, `chain(f, g)(x)` is equivalent to `f(g(x), x)`. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig Chain m => (a -> m b) -> m a -> m b - * @param {Function} fn The function to map with - * @param {Array} list The list to map over - * @return {Array} The result of flat-mapping `list` with `fn` - * @example - * - * const duplicate = n => [n, n]; - * R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3] - * - * R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1] - */ - var chain = _curry2(_dispatchable(['fantasy-land/chain', 'chain'], _xchain, function chain(fn, monad) { - if (typeof monad === 'function') { - return function(x) { return fn(monad(x))(x); }; - } - return _makeFlat(false)(map(fn, monad)); - })); - - /** - * Restricts a number to be within a range. - * - * Also works for other ordered types such as Strings and Dates. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Relation - * @sig Ord a => a -> a -> a -> a - * @param {Number} minimum The lower limit of the clamp (inclusive) - * @param {Number} maximum The upper limit of the clamp (inclusive) - * @param {Number} value Value to be clamped - * @return {Number} Returns `minimum` when `val < minimum`, `maximum` when `val > maximum`, returns `val` otherwise - * @example - * - * R.clamp(1, 10, -5) // => 1 - * R.clamp(1, 10, 15) // => 10 - * R.clamp(1, 10, 4) // => 4 - */ - var clamp = _curry3(function clamp(min, max, value) { - if (min > max) { - throw new Error('min must not be greater than max in clamp(min, max, value)'); - } - return value < min - ? min - : value > max - ? max - : value; - }); - - function _cloneRegExp(pattern) { - return new RegExp(pattern.source, (pattern.global ? 'g' : '') + - (pattern.ignoreCase ? 'i' : '') + - (pattern.multiline ? 'm' : '') + - (pattern.sticky ? 'y' : '') + - (pattern.unicode ? 'u' : '')); - } - - /** - * Gives a single-word string description of the (native) type of a value, - * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not - * attempt to distinguish user Object types any further, reporting them all as - * 'Object'. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Type - * @sig (* -> {*}) -> String - * @param {*} val The value to test - * @return {String} - * @example - * - * R.type({}); //=> "Object" - * R.type(1); //=> "Number" - * R.type(false); //=> "Boolean" - * R.type('s'); //=> "String" - * R.type(null); //=> "Null" - * R.type([]); //=> "Array" - * R.type(/[A-z]/); //=> "RegExp" - * R.type(() => {}); //=> "Function" - * R.type(undefined); //=> "Undefined" - */ - var type = _curry1(function type(val) { - return val === null - ? 'Null' - : val === undefined - ? 'Undefined' - : Object.prototype.toString.call(val).slice(8, -1); - }); - - /** - * Copies an object. - * - * @private - * @param {*} value The value to be copied - * @param {Array} refFrom Array containing the source references - * @param {Array} refTo Array containing the copied source references - * @param {Boolean} deep Whether or not to perform deep cloning. - * @return {*} The copied value. - */ - function _clone(value, refFrom, refTo, deep) { - var copy = function copy(copiedValue) { - var len = refFrom.length; - var idx = 0; - while (idx < len) { - if (value === refFrom[idx]) { - return refTo[idx]; - } - idx += 1; - } - refFrom[idx + 1] = value; - refTo[idx + 1] = copiedValue; - for (var key in value) { - copiedValue[key] = deep ? - _clone(value[key], refFrom, refTo, true) : value[key]; - } - return copiedValue; - }; - switch (type(value)) { - case 'Object': return copy({}); - case 'Array': return copy([]); - case 'Date': return new Date(value.valueOf()); - case 'RegExp': return _cloneRegExp(value); - default: return value; - } - } - - /** - * Creates a deep copy of the value which may contain (nested) `Array`s and - * `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are - * assigned by reference rather than copied - * - * Dispatches to a `clone` method if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {*} -> {*} - * @param {*} value The object or array to clone - * @return {*} A deeply cloned copy of `val` - * @example - * - * const objects = [{}, {}, {}]; - * const objectsClone = R.clone(objects); - * objects === objectsClone; //=> false - * objects[0] === objectsClone[0]; //=> false - */ - var clone = _curry1(function clone(value) { - return value != null && typeof value.clone === 'function' ? - value.clone() : - _clone(value, [], [], true); - }); - - /** - * Makes a comparator function out of a function that reports whether the first - * element is less than the second. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((a, b) -> Boolean) -> ((a, b) -> Number) - * @param {Function} pred A predicate function of arity two which will return `true` if the first argument - * is less than the second, `false` otherwise - * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0` - * @example - * - * const byAge = R.comparator((a, b) => a.age < b.age); - * const people = [ - * { name: 'Emma', age: 70 }, - * { name: 'Peter', age: 78 }, - * { name: 'Mikhail', age: 62 }, - * ]; - * const peopleByIncreasingAge = R.sort(byAge, people); - * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }] - */ - var comparator = _curry1(function comparator(pred) { - return function(a, b) { - return pred(a, b) ? -1 : pred(b, a) ? 1 : 0; - }; - }); - - /** - * A function that returns the `!` of its argument. It will return `true` when - * passed false-y value, and `false` when passed a truth-y one. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig * -> Boolean - * @param {*} a any value - * @return {Boolean} the logical inverse of passed argument. - * @see R.complement - * @example - * - * R.not(true); //=> false - * R.not(false); //=> true - * R.not(0); //=> true - * R.not(1); //=> false - */ - var not = _curry1(function not(a) { - return !a; - }); - - /** - * Takes a function `f` and returns a function `g` such that if called with the same arguments - * when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`. - * - * `R.complement` may be applied to any functor - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> *) -> (*... -> Boolean) - * @param {Function} f - * @return {Function} - * @see R.not - * @example - * - * const isNotNil = R.complement(R.isNil); - * isNil(null); //=> true - * isNotNil(null); //=> false - * isNil(7); //=> false - * isNotNil(7); //=> true - */ - var complement = lift(not); - - function _pipe(f, g) { - return function() { - return g.call(this, f.apply(this, arguments)); - }; - } - - /** - * This checks whether a function has a [methodname] function. If it isn't an - * array it will execute that function otherwise it will default to the ramda - * implementation. - * - * @private - * @param {Function} fn ramda implemtation - * @param {String} methodname property to check for a custom implementation - * @return {Object} Whatever the return value of the method is. - */ - function _checkForMethod(methodname, fn) { - return function() { - var length = arguments.length; - if (length === 0) { - return fn(); - } - var obj = arguments[length - 1]; - return (_isArray(obj) || typeof obj[methodname] !== 'function') ? - fn.apply(this, arguments) : - obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); - }; - } - - /** - * Returns the elements of the given list or string (or object with a `slice` - * method) from `fromIndex` (inclusive) to `toIndex` (exclusive). - * - * Dispatches to the `slice` method of the third argument, if present. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @sig Number -> Number -> String -> String - * @param {Number} fromIndex The start index (inclusive). - * @param {Number} toIndex The end index (exclusive). - * @param {*} list - * @return {*} - * @example - * - * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] - * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd'] - * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c'] - * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] - * R.slice(0, 3, 'ramda'); //=> 'ram' - */ - var slice = _curry3(_checkForMethod('slice', function slice(fromIndex, toIndex, list) { - return Array.prototype.slice.call(list, fromIndex, toIndex); - })); - - /** - * Returns all but the first element of the given list or string (or object - * with a `tail` method). - * - * Dispatches to the `slice` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.head, R.init, R.last - * @example - * - * R.tail([1, 2, 3]); //=> [2, 3] - * R.tail([1, 2]); //=> [2] - * R.tail([1]); //=> [] - * R.tail([]); //=> [] - * - * R.tail('abc'); //=> 'bc' - * R.tail('ab'); //=> 'b' - * R.tail('a'); //=> '' - * R.tail(''); //=> '' - */ - var tail = _curry1(_checkForMethod('tail', slice(1, Infinity))); - - /** - * Performs left-to-right function composition. The first argument may have - * any arity; the remaining arguments must be unary. - * - * In some libraries this function is named `sequence`. - * - * **Note:** The result of pipe is not automatically curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z) - * @param {...Function} functions - * @return {Function} - * @see R.compose - * @example - * - * const f = R.pipe(Math.pow, R.negate, R.inc); - * - * f(3, 4); // -(3^4) + 1 - * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b))) - */ - function pipe() { - if (arguments.length === 0) { - throw new Error('pipe requires at least one argument'); - } - return _arity( - arguments[0].length, - reduce(_pipe, arguments[0], tail(arguments)) - ); - } - - /** - * Returns a new list or string with the elements or characters in reverse - * order. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {Array|String} list - * @return {Array|String} - * @example - * - * R.reverse([1, 2, 3]); //=> [3, 2, 1] - * R.reverse([1, 2]); //=> [2, 1] - * R.reverse([1]); //=> [1] - * R.reverse([]); //=> [] - * - * R.reverse('abc'); //=> 'cba' - * R.reverse('ab'); //=> 'ba' - * R.reverse('a'); //=> 'a' - * R.reverse(''); //=> '' - */ - var reverse = _curry1(function reverse(list) { - return _isString(list) - ? list.split('').reverse().join('') - : Array.prototype.slice.call(list, 0).reverse(); - }); - - /** - * Performs right-to-left function composition. The last argument may have - * any arity; the remaining arguments must be unary. - * - * **Note:** The result of compose is not automatically curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.pipe - * @example - * - * const classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName - * const yellGreeting = R.compose(R.toUpper, classyGreeting); - * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND" - * - * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7 - * - * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b))) - */ - function compose() { - if (arguments.length === 0) { - throw new Error('compose requires at least one argument'); - } - return pipe.apply(this, reverse(arguments)); - } - - /** - * Returns the right-to-left Kleisli composition of the provided functions, - * each of which must return a value of a type supported by [`chain`](#chain). - * - * `R.composeK(h, g, f)` is equivalent to `R.compose(R.chain(h), R.chain(g), f)`. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Function - * @sig Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> (a -> m z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.pipeK - * @deprecated since v0.26.0 - * @example - * - * // get :: String -> Object -> Maybe * - * const get = R.curry((propName, obj) => Maybe(obj[propName])) - * - * // getStateCode :: Maybe String -> Maybe String - * const getStateCode = R.composeK( - * R.compose(Maybe.of, R.toUpper), - * get('state'), - * get('address'), - * get('user'), - * ); - * getStateCode({"user":{"address":{"state":"ny"}}}); //=> Maybe.Just("NY") - * getStateCode({}); //=> Maybe.Nothing() - * @symb R.composeK(f, g, h)(a) = R.chain(f, R.chain(g, h(a))) - */ - function composeK() { - if (arguments.length === 0) { - throw new Error('composeK requires at least one argument'); - } - var init = Array.prototype.slice.call(arguments); - var last = init.pop(); - return compose(compose.apply(this, map(chain, init)), last); - } - - function _pipeP(f, g) { - return function() { - var ctx = this; - return f.apply(ctx, arguments).then(function(x) { - return g.call(ctx, x); - }); - }; - } - - /** - * Performs left-to-right composition of one or more Promise-returning - * functions. The first argument may have any arity; the remaining arguments - * must be unary. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a -> Promise b), (b -> Promise c), ..., (y -> Promise z)) -> (a -> Promise z) - * @param {...Function} functions - * @return {Function} - * @see R.composeP - * @deprecated since v0.26.0 - * @example - * - * // followersForUser :: String -> Promise [User] - * const followersForUser = R.pipeP(db.getUserById, db.getFollowers); - */ - function pipeP() { - if (arguments.length === 0) { - throw new Error('pipeP requires at least one argument'); - } - return _arity( - arguments[0].length, - reduce(_pipeP, arguments[0], tail(arguments)) - ); - } - - /** - * Performs right-to-left composition of one or more Promise-returning - * functions. The last arguments may have any arity; the remaining - * arguments must be unary. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((y -> Promise z), (x -> Promise y), ..., (a -> Promise b)) -> (a -> Promise z) - * @param {...Function} functions The functions to compose - * @return {Function} - * @see R.pipeP - * @deprecated since v0.26.0 - * @example - * - * const db = { - * users: { - * JOE: { - * name: 'Joe', - * followers: ['STEVE', 'SUZY'] - * } - * } - * } - * - * // We'll pretend to do a db lookup which returns a promise - * const lookupUser = (userId) => Promise.resolve(db.users[userId]) - * const lookupFollowers = (user) => Promise.resolve(user.followers) - * lookupUser('JOE').then(lookupFollowers) - * - * // followersForUser :: String -> Promise [UserId] - * const followersForUser = R.composeP(lookupFollowers, lookupUser); - * followersForUser('JOE').then(followers => console.log('Followers:', followers)) - * // Followers: ["STEVE","SUZY"] - */ - function composeP() { - if (arguments.length === 0) { - throw new Error('composeP requires at least one argument'); - } - return pipeP.apply(this, reverse(arguments)); - } - - /** - * Returns the first element of the given list or string. In some libraries - * this function is named `first`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> a | Undefined - * @sig String -> String - * @param {Array|String} list - * @return {*} - * @see R.tail, R.init, R.last - * @example - * - * R.head(['fi', 'fo', 'fum']); //=> 'fi' - * R.head([]); //=> undefined - * - * R.head('abc'); //=> 'a' - * R.head(''); //=> '' - */ - var head = nth(0); - - function _identity(x) { return x; } - - /** - * A function that does nothing but return the parameter supplied to it. Good - * as a default or placeholder function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig a -> a - * @param {*} x The value to return. - * @return {*} The input value, `x`. - * @example - * - * R.identity(1); //=> 1 - * - * const obj = {}; - * R.identity(obj) === obj; //=> true - * @symb R.identity(a) = a - */ - var identity = _curry1(_identity); - - /** - * Performs left-to-right function composition using transforming function. The first argument may have - * any arity; the remaining arguments must be unary. - * - * **Note:** The result of pipeWith is not automatically curried. Transforming function is not used on the - * first argument. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig ((* -> *), [((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)]) -> ((a, b, ..., n) -> z) - * @param {...Function} functions - * @return {Function} - * @see R.composeWith, R.pipe - * @example - * - * const pipeWhileNotNil = R.pipeWith((f, res) => R.isNil(res) ? res : f(res)); - * const f = pipeWhileNotNil([Math.pow, R.negate, R.inc]) - * - * f(3, 4); // -(3^4) + 1 - * @symb R.pipeWith(f)([g, h, i])(...args) = f(i, f(h, g(...args))) - */ - var pipeWith = _curry2(function pipeWith(xf, list) { - if (list.length <= 0) { - return identity; - } - - var headList = head(list); - var tailList = tail(list); - - return _arity(headList.length, function() { - return _reduce( - function(result, f) { - return xf.call(this, f, result); - }, - headList.apply(this, arguments), - tailList - ); - }); - }); - - /** - * Performs right-to-left function composition using transforming function. The last argument may have - * any arity; the remaining arguments must be unary. - * - * **Note:** The result of compose is not automatically curried. Transforming function is not used on the - * last argument. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig ((* -> *), [(y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)]) -> ((a, b, ..., n) -> z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.compose, R.pipeWith - * @example - * - * const composeWhileNotNil = R.composeWith((f, res) => R.isNil(res) ? res : f(res)); - * - * composeWhileNotNil([R.inc, R.prop('age')])({age: 1}) //=> 2 - * composeWhileNotNil([R.inc, R.prop('age')])({}) //=> undefined - * - * @symb R.composeWith(f)([g, h, i])(...args) = f(g, f(h, i(...args))) - */ - var composeWith = _curry2(function composeWith(xf, list) { - return pipeWith.apply(this, [xf, reverse(list)]); - }); - - function _arrayFromIterator(iter) { - var list = []; - var next; - while (!(next = iter.next()).done) { - list.push(next.value); - } - return list; - } - - function _includesWith(pred, x, list) { - var idx = 0; - var len = list.length; - - while (idx < len) { - if (pred(x, list[idx])) { - return true; - } - idx += 1; - } - return false; - } - - function _functionName(f) { - // String(x => x) evaluates to "x => x", so the pattern may not match. - var match = String(f).match(/^function (\w*)/); - return match == null ? '' : match[1]; - } - - // Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - function _objectIs(a, b) { - // SameValue algorithm - if (a === b) { // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return a !== 0 || 1 / a === 1 / b; - } else { - // Step 6.a: NaN == NaN - return a !== a && b !== b; - } - } - - var _objectIs$1 = typeof Object.is === 'function' ? Object.is : _objectIs; - - /** - * private _uniqContentEquals function. - * That function is checking equality of 2 iterator contents with 2 assumptions - * - iterators lengths are the same - * - iterators values are unique - * - * false-positive result will be returned for comparision of, e.g. - * - [1,2,3] and [1,2,3,4] - * - [1,1,1] and [1,2,3] - * */ - - function _uniqContentEquals(aIterator, bIterator, stackA, stackB) { - var a = _arrayFromIterator(aIterator); - var b = _arrayFromIterator(bIterator); - - function eq(_a, _b) { - return _equals(_a, _b, stackA.slice(), stackB.slice()); - } - - // if *a* array contains any element that is not included in *b* - return !_includesWith(function(b, aItem) { - return !_includesWith(eq, aItem, b); - }, b, a); - } - - function _equals(a, b, stackA, stackB) { - if (_objectIs$1(a, b)) { - return true; - } - - var typeA = type(a); - - if (typeA !== type(b)) { - return false; - } - - if (a == null || b == null) { - return false; - } - - if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') { - return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && - typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a); - } - - if (typeof a.equals === 'function' || typeof b.equals === 'function') { - return typeof a.equals === 'function' && a.equals(b) && - typeof b.equals === 'function' && b.equals(a); - } - - switch (typeA) { - case 'Arguments': - case 'Array': - case 'Object': - if (typeof a.constructor === 'function' && - _functionName(a.constructor) === 'Promise') { - return a === b; - } - break; - case 'Boolean': - case 'Number': - case 'String': - if (!(typeof a === typeof b && _objectIs$1(a.valueOf(), b.valueOf()))) { - return false; - } - break; - case 'Date': - if (!_objectIs$1(a.valueOf(), b.valueOf())) { - return false; - } - break; - case 'Error': - return a.name === b.name && a.message === b.message; - case 'RegExp': - if (!(a.source === b.source && - a.global === b.global && - a.ignoreCase === b.ignoreCase && - a.multiline === b.multiline && - a.sticky === b.sticky && - a.unicode === b.unicode)) { - return false; - } - break; - } - - var idx = stackA.length - 1; - while (idx >= 0) { - if (stackA[idx] === a) { - return stackB[idx] === b; - } - idx -= 1; - } - - switch (typeA) { - case 'Map': - if (a.size !== b.size) { - return false; - } - - return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b])); - case 'Set': - if (a.size !== b.size) { - return false; - } - - return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b])); - case 'Arguments': - case 'Array': - case 'Object': - case 'Boolean': - case 'Number': - case 'String': - case 'Date': - case 'Error': - case 'RegExp': - case 'Int8Array': - case 'Uint8Array': - case 'Uint8ClampedArray': - case 'Int16Array': - case 'Uint16Array': - case 'Int32Array': - case 'Uint32Array': - case 'Float32Array': - case 'Float64Array': - case 'ArrayBuffer': - break; - default: - // Values of other types are only equal if identical. - return false; - } - - var keysA = keys(a); - if (keysA.length !== keys(b).length) { - return false; - } - - var extendedStackA = stackA.concat([a]); - var extendedStackB = stackB.concat([b]); - - idx = keysA.length - 1; - while (idx >= 0) { - var key = keysA[idx]; - if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) { - return false; - } - idx -= 1; - } - return true; - } - - /** - * Returns `true` if its arguments are equivalent, `false` otherwise. Handles - * cyclical data structures. - * - * Dispatches symmetrically to the `equals` methods of both arguments, if - * present. - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Relation - * @sig a -> b -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @example - * - * R.equals(1, 1); //=> true - * R.equals(1, '1'); //=> false - * R.equals([1, 2, 3], [1, 2, 3]); //=> true - * - * const a = {}; a.v = a; - * const b = {}; b.v = b; - * R.equals(a, b); //=> true - */ - var equals = _curry2(function equals(a, b) { - return _equals(a, b, [], []); - }); - - function _indexOf(list, a, idx) { - var inf, item; - // Array.prototype.indexOf doesn't exist below IE9 - if (typeof list.indexOf === 'function') { - switch (typeof a) { - case 'number': - if (a === 0) { - // manually crawl the list to distinguish between +0 and -0 - inf = 1 / a; - while (idx < list.length) { - item = list[idx]; - if (item === 0 && 1 / item === inf) { - return idx; - } - idx += 1; - } - return -1; - } else if (a !== a) { - // NaN - while (idx < list.length) { - item = list[idx]; - if (typeof item === 'number' && item !== item) { - return idx; - } - idx += 1; - } - return -1; - } - // non-zero numbers can utilise Set - return list.indexOf(a, idx); - - // all these types can utilise Set - case 'string': - case 'boolean': - case 'function': - case 'undefined': - return list.indexOf(a, idx); - - case 'object': - if (a === null) { - // null can utilise Set - return list.indexOf(a, idx); - } - } - } - // anything else not covered above, defer to R.equals - while (idx < list.length) { - if (equals(list[idx], a)) { - return idx; - } - idx += 1; - } - return -1; - } - - function _includes(a, list) { - return _indexOf(list, a, 0) >= 0; - } - - function _quote(s) { - var escaped = s - .replace(/\\/g, '\\\\') - .replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace - .replace(/\f/g, '\\f') - .replace(/\n/g, '\\n') - .replace(/\r/g, '\\r') - .replace(/\t/g, '\\t') - .replace(/\v/g, '\\v') - .replace(/\0/g, '\\0'); - - return '"' + escaped.replace(/"/g, '\\"') + '"'; - } - - /** - * Polyfill from . - */ - var pad = function pad(n) { return (n < 10 ? '0' : '') + n; }; - - var _toISOString = typeof Date.prototype.toISOString === 'function' ? - function _toISOString(d) { - return d.toISOString(); - } : - function _toISOString(d) { - return ( - d.getUTCFullYear() + '-' + - pad(d.getUTCMonth() + 1) + '-' + - pad(d.getUTCDate()) + 'T' + - pad(d.getUTCHours()) + ':' + - pad(d.getUTCMinutes()) + ':' + - pad(d.getUTCSeconds()) + '.' + - (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z' - ); - }; - - function _complement(f) { - return function() { - return !f.apply(this, arguments); - }; - } - - function _filter(fn, list) { - var idx = 0; - var len = list.length; - var result = []; - - while (idx < len) { - if (fn(list[idx])) { - result[result.length] = list[idx]; - } - idx += 1; - } - return result; - } - - function _isObject(x) { - return Object.prototype.toString.call(x) === '[object Object]'; - } - - function XFilter(f, xf) { - this.xf = xf; - this.f = f; - } - XFilter.prototype['@@transducer/init'] = _xfBase.init; - XFilter.prototype['@@transducer/result'] = _xfBase.result; - XFilter.prototype['@@transducer/step'] = function(result, input) { - return this.f(input) ? this.xf['@@transducer/step'](result, input) : result; - }; - - var _xfilter = _curry2(function _xfilter(f, xf) { return new XFilter(f, xf); }); - - /** - * Takes a predicate and a `Filterable`, and returns a new filterable of the - * same type containing the members of the given filterable which satisfy the - * given predicate. Filterable objects include plain objects or any object - * that has a filter method such as `Array`. - * - * Dispatches to the `filter` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> f a - * @param {Function} pred - * @param {Array} filterable - * @return {Array} Filterable - * @see R.reject, R.transduce, R.addIndex - * @example - * - * const isEven = n => n % 2 === 0; - * - * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4] - * - * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} - */ - var filter = _curry2(_dispatchable(['filter'], _xfilter, function(pred, filterable) { - return ( - _isObject(filterable) ? - _reduce(function(acc, key) { - if (pred(filterable[key])) { - acc[key] = filterable[key]; - } - return acc; - }, {}, keys(filterable)) : - // else - _filter(pred, filterable) - ); - })); - - /** - * The complement of [`filter`](#filter). - * - * Acts as a transducer if a transformer is given in list position. Filterable - * objects include plain objects or any object that has a filter method such - * as `Array`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> f a - * @param {Function} pred - * @param {Array} filterable - * @return {Array} - * @see R.filter, R.transduce, R.addIndex - * @example - * - * const isOdd = (n) => n % 2 === 1; - * - * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4] - * - * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} - */ - var reject = _curry2(function reject(pred, filterable) { - return filter(_complement(pred), filterable); - }); - - function _toString(x, seen) { - var recur = function recur(y) { - var xs = seen.concat([x]); - return _includes(y, xs) ? '' : _toString(y, xs); - }; - - // mapPairs :: (Object, [String]) -> [String] - var mapPairs = function(obj, keys$$1) { - return _map(function(k) { return _quote(k) + ': ' + recur(obj[k]); }, keys$$1.slice().sort()); - }; - - switch (Object.prototype.toString.call(x)) { - case '[object Arguments]': - return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))'; - case '[object Array]': - return '[' + _map(recur, x).concat(mapPairs(x, reject(function(k) { return /^\d+$/.test(k); }, keys(x)))).join(', ') + ']'; - case '[object Boolean]': - return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString(); - case '[object Date]': - return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')'; - case '[object Null]': - return 'null'; - case '[object Number]': - return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10); - case '[object String]': - return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x); - case '[object Undefined]': - return 'undefined'; - default: - if (typeof x.toString === 'function') { - var repr = x.toString(); - if (repr !== '[object Object]') { - return repr; - } - } - return '{' + mapPairs(x, keys(x)).join(', ') + '}'; - } - } - - /** - * Returns the string representation of the given value. `eval`'ing the output - * should result in a value equivalent to the input value. Many of the built-in - * `toString` methods do not satisfy this requirement. - * - * If the given value is an `[object Object]` with a `toString` method other - * than `Object.prototype.toString`, this method is invoked with no arguments - * to produce the return value. This means user-defined constructor functions - * can provide a suitable `toString` method. For example: - * - * function Point(x, y) { - * this.x = x; - * this.y = y; - * } - * - * Point.prototype.toString = function() { - * return 'new Point(' + this.x + ', ' + this.y + ')'; - * }; - * - * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)' - * - * @func - * @memberOf R - * @since v0.14.0 - * @category String - * @sig * -> String - * @param {*} val - * @return {String} - * @example - * - * R.toString(42); //=> '42' - * R.toString('abc'); //=> '"abc"' - * R.toString([1, 2, 3]); //=> '[1, 2, 3]' - * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}' - * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")' - */ - var toString$1 = _curry1(function toString(val) { return _toString(val, []); }); - - /** - * Returns the result of concatenating the given lists or strings. - * - * Note: `R.concat` expects both arguments to be of the same type, - * unlike the native `Array.prototype.concat` method. It will throw - * an error if you `concat` an Array with a non-Array value. - * - * Dispatches to the `concat` method of the first argument, if present. - * Can also concatenate two members of a [fantasy-land - * compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup). - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] -> [a] - * @sig String -> String -> String - * @param {Array|String} firstList The first list - * @param {Array|String} secondList The second list - * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of - * `secondList`. - * - * @example - * - * R.concat('ABC', 'DEF'); // 'ABCDEF' - * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] - * R.concat([], []); //=> [] - */ - var concat = _curry2(function concat(a, b) { - if (_isArray(a)) { - if (_isArray(b)) { - return a.concat(b); - } - throw new TypeError(toString$1(b) + ' is not an array'); - } - if (_isString(a)) { - if (_isString(b)) { - return a + b; - } - throw new TypeError(toString$1(b) + ' is not a string'); - } - if (a != null && _isFunction(a['fantasy-land/concat'])) { - return a['fantasy-land/concat'](b); - } - if (a != null && _isFunction(a.concat)) { - return a.concat(b); - } - throw new TypeError(toString$1(a) + ' does not have a method named "concat" or "fantasy-land/concat"'); - }); - - /** - * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic. - * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments - * to `fn` are applied to each of the predicates in turn until one returns a - * "truthy" value, at which point `fn` returns the result of applying its - * arguments to the corresponding transformer. If none of the predicates - * matches, `fn` returns undefined. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Logic - * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *) - * @param {Array} pairs A list of [predicate, transformer] - * @return {Function} - * @see R.ifElse, R.unless, R.when - * @example - * - * const fn = R.cond([ - * [R.equals(0), R.always('water freezes at 0°C')], - * [R.equals(100), R.always('water boils at 100°C')], - * [R.T, temp => 'nothing special happens at ' + temp + '°C'] - * ]); - * fn(0); //=> 'water freezes at 0°C' - * fn(50); //=> 'nothing special happens at 50°C' - * fn(100); //=> 'water boils at 100°C' - */ - var cond = _curry1(function cond(pairs) { - var arity = reduce( - max, - 0, - map(function(pair) { return pair[0].length; }, pairs) - ); - return _arity(arity, function() { - var idx = 0; - while (idx < pairs.length) { - if (pairs[idx][0].apply(this, arguments)) { - return pairs[idx][1].apply(this, arguments); - } - idx += 1; - } - }); - }); - - /** - * Wraps a constructor function inside a curried function that can be called - * with the same arguments and returns the same type. The arity of the function - * returned is specified to allow using variadic constructor functions. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Function - * @sig Number -> (* -> {*}) -> (* -> {*}) - * @param {Number} n The arity of the constructor function. - * @param {Function} Fn The constructor function to wrap. - * @return {Function} A wrapped, curried constructor function. - * @example - * - * // Variadic Constructor function - * function Salad() { - * this.ingredients = arguments; - * } - * - * Salad.prototype.recipe = function() { - * const instructions = R.map(ingredient => 'Add a dollop of ' + ingredient, this.ingredients); - * return R.join('\n', instructions); - * }; - * - * const ThreeLayerSalad = R.constructN(3, Salad); - * - * // Notice we no longer need the 'new' keyword, and the constructor is curried for 3 arguments. - * const salad = ThreeLayerSalad('Mayonnaise')('Potato Chips')('Ketchup'); - * - * console.log(salad.recipe()); - * // Add a dollop of Mayonnaise - * // Add a dollop of Potato Chips - * // Add a dollop of Ketchup - */ - var constructN = _curry2(function constructN(n, Fn) { - if (n > 10) { - throw new Error('Constructor with greater than ten arguments'); - } - if (n === 0) { - return function() { return new Fn(); }; - } - return curry(nAry(n, function($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) { - switch (arguments.length) { - case 1: return new Fn($0); - case 2: return new Fn($0, $1); - case 3: return new Fn($0, $1, $2); - case 4: return new Fn($0, $1, $2, $3); - case 5: return new Fn($0, $1, $2, $3, $4); - case 6: return new Fn($0, $1, $2, $3, $4, $5); - case 7: return new Fn($0, $1, $2, $3, $4, $5, $6); - case 8: return new Fn($0, $1, $2, $3, $4, $5, $6, $7); - case 9: return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8); - case 10: return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8, $9); - } - })); - }); - - /** - * Wraps a constructor function inside a curried function that can be called - * with the same arguments and returns the same type. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (* -> {*}) -> (* -> {*}) - * @param {Function} fn The constructor function to wrap. - * @return {Function} A wrapped, curried constructor function. - * @see R.invoker - * @example - * - * // Constructor function - * function Animal(kind) { - * this.kind = kind; - * }; - * Animal.prototype.sighting = function() { - * return "It's a " + this.kind + "!"; - * } - * - * const AnimalConstructor = R.construct(Animal) - * - * // Notice we no longer need the 'new' keyword: - * AnimalConstructor('Pig'); //=> {"kind": "Pig", "sighting": function (){...}}; - * - * const animalTypes = ["Lion", "Tiger", "Bear"]; - * const animalSighting = R.invoker(0, 'sighting'); - * const sightNewAnimal = R.compose(animalSighting, AnimalConstructor); - * R.map(sightNewAnimal, animalTypes); //=> ["It's a Lion!", "It's a Tiger!", "It's a Bear!"] - */ - var construct = _curry1(function construct(Fn) { - return constructN(Fn.length, Fn); - }); - - /** - * Returns `true` if the specified value is equal, in [`R.equals`](#equals) - * terms, to at least one element of the given list; `false` otherwise. - * Works also with strings. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Boolean - * @param {Object} a The item to compare against. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. - * @see R.includes - * @deprecated since v0.26.0 - * @example - * - * R.contains(3, [1, 2, 3]); //=> true - * R.contains(4, [1, 2, 3]); //=> false - * R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true - * R.contains([42], [[42]]); //=> true - * R.contains('ba', 'banana'); //=>true - */ - var contains$1 = _curry2(_includes); - - /** - * Accepts a converging function and a list of branching functions and returns - * a new function. The arity of the new function is the same as the arity of - * the longest branching function. When invoked, this new function is applied - * to some arguments, and each branching function is applied to those same - * arguments. The results of each branching function are passed as arguments - * to the converging function to produce the return value. - * - * @func - * @memberOf R - * @since v0.4.2 - * @category Function - * @sig ((x1, x2, ...) -> z) -> [((a, b, ...) -> x1), ((a, b, ...) -> x2), ...] -> (a -> b -> ... -> z) - * @param {Function} after A function. `after` will be invoked with the return values of - * `fn1` and `fn2` as its arguments. - * @param {Array} functions A list of functions. - * @return {Function} A new function. - * @see R.useWith - * @example - * - * const average = R.converge(R.divide, [R.sum, R.length]) - * average([1, 2, 3, 4, 5, 6, 7]) //=> 4 - * - * const strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower]) - * strangeConcat("Yodel") //=> "YODELyodel" - * - * @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b)) - */ - var converge = _curry2(function converge(after, fns) { - return curryN(reduce(max, 0, pluck('length', fns)), function() { - var args = arguments; - var context = this; - return after.apply(context, _map(function(fn) { - return fn.apply(context, args); - }, fns)); - }); - }); - - function XReduceBy(valueFn, valueAcc, keyFn, xf) { - this.valueFn = valueFn; - this.valueAcc = valueAcc; - this.keyFn = keyFn; - this.xf = xf; - this.inputs = {}; - } - XReduceBy.prototype['@@transducer/init'] = _xfBase.init; - XReduceBy.prototype['@@transducer/result'] = function(result) { - var key; - for (key in this.inputs) { - if (_has(key, this.inputs)) { - result = this.xf['@@transducer/step'](result, this.inputs[key]); - if (result['@@transducer/reduced']) { - result = result['@@transducer/value']; - break; - } - } - } - this.inputs = null; - return this.xf['@@transducer/result'](result); - }; - XReduceBy.prototype['@@transducer/step'] = function(result, input) { - var key = this.keyFn(input); - this.inputs[key] = this.inputs[key] || [key, this.valueAcc]; - this.inputs[key][1] = this.valueFn(this.inputs[key][1], input); - return result; - }; - - var _xreduceBy = _curryN(4, [], - function _xreduceBy(valueFn, valueAcc, keyFn, xf) { - return new XReduceBy(valueFn, valueAcc, keyFn, xf); - } - ); - - /** - * Groups the elements of the list according to the result of calling - * the String-returning function `keyFn` on each element and reduces the elements - * of each group to a single value via the reducer function `valueFn`. - * - * This function is basically a more general [`groupBy`](#groupBy) function. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category List - * @sig ((a, b) -> a) -> a -> (b -> String) -> [b] -> {String: a} - * @param {Function} valueFn The function that reduces the elements of each group to a single - * value. Receives two values, accumulator for a particular group and the current element. - * @param {*} acc The (initial) accumulator value for each group. - * @param {Function} keyFn The function that maps the list's element into a key. - * @param {Array} list The array to group. - * @return {Object} An object with the output of `keyFn` for keys, mapped to the output of - * `valueFn` for elements which produced that key when passed to `keyFn`. - * @see R.groupBy, R.reduce - * @example - * - * const groupNames = (acc, {name}) => acc.concat(name) - * const toGrade = ({score}) => - * score < 65 ? 'F' : - * score < 70 ? 'D' : - * score < 80 ? 'C' : - * score < 90 ? 'B' : 'A' - * - * var students = [ - * {name: 'Abby', score: 83}, - * {name: 'Bart', score: 62}, - * {name: 'Curt', score: 88}, - * {name: 'Dora', score: 92}, - * ] - * - * reduceBy(groupNames, [], toGrade, students) - * //=> {"A": ["Dora"], "B": ["Abby", "Curt"], "F": ["Bart"]} - */ - var reduceBy = _curryN(4, [], _dispatchable([], _xreduceBy, - function reduceBy(valueFn, valueAcc, keyFn, list) { - return _reduce(function(acc, elt) { - var key = keyFn(elt); - acc[key] = valueFn(_has(key, acc) ? acc[key] : _clone(valueAcc, [], [], false), elt); - return acc; - }, {}, list); - })); - - /** - * Counts the elements of a list according to how many match each value of a - * key generated by the supplied function. Returns an object mapping the keys - * produced by `fn` to the number of occurrences in the list. Note that all - * keys are coerced to strings because of how JavaScript objects work. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig (a -> String) -> [a] -> {*} - * @param {Function} fn The function used to map values to keys. - * @param {Array} list The list to count elements from. - * @return {Object} An object mapping keys to number of occurrences in the list. - * @example - * - * const numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2]; - * R.countBy(Math.floor)(numbers); //=> {'1': 3, '2': 2, '3': 1} - * - * const letters = ['a', 'b', 'A', 'a', 'B', 'c']; - * R.countBy(R.toLower)(letters); //=> {'a': 3, 'b': 2, 'c': 1} - */ - var countBy = reduceBy(function(acc, elem) { return acc + 1; }, 0); - - /** - * Decrements its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} n - 1 - * @see R.inc - * @example - * - * R.dec(42); //=> 41 - */ - var dec = add(-1); - - /** - * Returns the second argument if it is not `null`, `undefined` or `NaN`; - * otherwise the first argument is returned. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Logic - * @sig a -> b -> a | b - * @param {a} default The default value. - * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`. - * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value - * @example - * - * const defaultTo42 = R.defaultTo(42); - * - * defaultTo42(null); //=> 42 - * defaultTo42(undefined); //=> 42 - * defaultTo42(false); //=> false - * defaultTo42('Ramda'); //=> 'Ramda' - * // parseInt('string') results in NaN - * defaultTo42(parseInt('string')); //=> 42 - */ - var defaultTo = _curry2(function defaultTo(d, v) { - return v == null || v !== v ? d : v; - }); - - /** - * Makes a descending comparator function out of a function that returns a value - * that can be compared with `<` and `>`. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Function - * @sig Ord b => (a -> b) -> a -> a -> Number - * @param {Function} fn A function of arity one that returns a value that can be compared - * @param {*} a The first item to be compared. - * @param {*} b The second item to be compared. - * @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0` - * @see R.ascend - * @example - * - * const byAge = R.descend(R.prop('age')); - * const people = [ - * { name: 'Emma', age: 70 }, - * { name: 'Peter', age: 78 }, - * { name: 'Mikhail', age: 62 }, - * ]; - * const peopleByOldestFirst = R.sort(byAge, people); - * //=> [{ name: 'Peter', age: 78 }, { name: 'Emma', age: 70 }, { name: 'Mikhail', age: 62 }] - */ - var descend = _curry3(function descend(fn, a, b) { - var aa = fn(a); - var bb = fn(b); - return aa > bb ? -1 : aa < bb ? 1 : 0; - }); - - function _Set() { - /* globals Set */ - this._nativeSet = typeof Set === 'function' ? new Set() : null; - this._items = {}; - } - - // until we figure out why jsdoc chokes on this - // @param item The item to add to the Set - // @returns {boolean} true if the item did not exist prior, otherwise false - // - _Set.prototype.add = function(item) { - return !hasOrAdd(item, true, this); - }; - - // - // @param item The item to check for existence in the Set - // @returns {boolean} true if the item exists in the Set, otherwise false - // - _Set.prototype.has = function(item) { - return hasOrAdd(item, false, this); - }; - - // - // Combines the logic for checking whether an item is a member of the set and - // for adding a new item to the set. - // - // @param item The item to check or add to the Set instance. - // @param shouldAdd If true, the item will be added to the set if it doesn't - // already exist. - // @param set The set instance to check or add to. - // @return {boolean} true if the item already existed, otherwise false. - // - function hasOrAdd(item, shouldAdd, set) { - var type = typeof item; - var prevSize, newSize; - switch (type) { - case 'string': - case 'number': - // distinguish between +0 and -0 - if (item === 0 && 1 / item === -Infinity) { - if (set._items['-0']) { - return true; - } else { - if (shouldAdd) { - set._items['-0'] = true; - } - return false; - } - } - // these types can all utilise the native Set - if (set._nativeSet !== null) { - if (shouldAdd) { - prevSize = set._nativeSet.size; - set._nativeSet.add(item); - newSize = set._nativeSet.size; - return newSize === prevSize; - } else { - return set._nativeSet.has(item); - } - } else { - if (!(type in set._items)) { - if (shouldAdd) { - set._items[type] = {}; - set._items[type][item] = true; - } - return false; - } else if (item in set._items[type]) { - return true; - } else { - if (shouldAdd) { - set._items[type][item] = true; - } - return false; - } - } - - case 'boolean': - // set._items['boolean'] holds a two element array - // representing [ falseExists, trueExists ] - if (type in set._items) { - var bIdx = item ? 1 : 0; - if (set._items[type][bIdx]) { - return true; - } else { - if (shouldAdd) { - set._items[type][bIdx] = true; - } - return false; - } - } else { - if (shouldAdd) { - set._items[type] = item ? [false, true] : [true, false]; - } - return false; - } - - case 'function': - // compare functions for reference equality - if (set._nativeSet !== null) { - if (shouldAdd) { - prevSize = set._nativeSet.size; - set._nativeSet.add(item); - newSize = set._nativeSet.size; - return newSize === prevSize; - } else { - return set._nativeSet.has(item); - } - } else { - if (!(type in set._items)) { - if (shouldAdd) { - set._items[type] = [item]; - } - return false; - } - if (!_includes(item, set._items[type])) { - if (shouldAdd) { - set._items[type].push(item); - } - return false; - } - return true; - } - - case 'undefined': - if (set._items[type]) { - return true; - } else { - if (shouldAdd) { - set._items[type] = true; - } - return false; - } - - case 'object': - if (item === null) { - if (!set._items['null']) { - if (shouldAdd) { - set._items['null'] = true; - } - return false; - } - return true; - } - /* falls through */ - default: - // reduce the search size of heterogeneous sets by creating buckets - // for each type. - type = Object.prototype.toString.call(item); - if (!(type in set._items)) { - if (shouldAdd) { - set._items[type] = [item]; - } - return false; - } - // scan through all previously applied items - if (!_includes(item, set._items[type])) { - if (shouldAdd) { - set._items[type].push(item); - } - return false; - } - return true; - } - } - - /** - * Finds the set (i.e. no duplicates) of all elements in the first list not - * contained in the second list. Objects and Arrays are compared in terms of - * value equality, not reference equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` that are not in `list2`. - * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without - * @example - * - * R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2] - * R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5] - * R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}] - */ - var difference = _curry2(function difference(first, second) { - var out = []; - var idx = 0; - var firstLen = first.length; - var secondLen = second.length; - var toFilterOut = new _Set(); - - for (var i = 0; i < secondLen; i += 1) { - toFilterOut.add(second[i]); - } - - while (idx < firstLen) { - if (toFilterOut.add(first[idx])) { - out[out.length] = first[idx]; - } - idx += 1; - } - return out; - }); - - /** - * Finds the set (i.e. no duplicates) of all elements in the first list not - * contained in the second list. Duplication is determined according to the - * value returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` that are not in `list2`. - * @see R.difference, R.symmetricDifference, R.symmetricDifferenceWith - * @example - * - * const cmp = (x, y) => x.a === y.a; - * const l1 = [{a: 1}, {a: 2}, {a: 3}]; - * const l2 = [{a: 3}, {a: 4}]; - * R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}] - */ - var differenceWith = _curry3(function differenceWith(pred, first, second) { - var out = []; - var idx = 0; - var firstLen = first.length; - while (idx < firstLen) { - if (!_includesWith(pred, first[idx], second) && - !_includesWith(pred, first[idx], out)) { - out.push(first[idx]); - } - idx += 1; - } - return out; - }); - - /** - * Returns a new object that does not contain a `prop` property. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Object - * @sig String -> {k: v} -> {k: v} - * @param {String} prop The name of the property to dissociate - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original but without the specified property - * @see R.assoc, R.omit - * @example - * - * R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3} - */ - var dissoc = _curry2(function dissoc(prop, obj) { - var result = {}; - for (var p in obj) { - result[p] = obj[p]; - } - delete result[prop]; - return result; - }); - - /** - * Removes the sub-list of `list` starting at index `start` and containing - * `count` elements. _Note that this is not destructive_: it returns a copy of - * the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.2.2 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @param {Number} start The position to start removing elements - * @param {Number} count The number of elements to remove - * @param {Array} list The list to remove from - * @return {Array} A new Array with `count` elements from `start` removed. - * @see R.without - * @example - * - * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8] - */ - var remove = _curry3(function remove(start, count, list) { - var result = Array.prototype.slice.call(list, 0); - result.splice(start, count); - return result; - }); - - /** - * Returns a new copy of the array with the element at the provided index - * replaced with the given value. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig Number -> a -> [a] -> [a] - * @param {Number} idx The index to update. - * @param {*} x The value to exist at the given index of the returned array. - * @param {Array|Arguments} list The source array-like object to be updated. - * @return {Array} A copy of `list` with the value at index `idx` replaced with `x`. - * @see R.adjust - * @example - * - * R.update(1, '_', ['a', 'b', 'c']); //=> ['a', '_', 'c'] - * R.update(-1, '_', ['a', 'b', 'c']); //=> ['a', 'b', '_'] - * @symb R.update(-1, a, [b, c]) = [b, a] - * @symb R.update(0, a, [b, c]) = [a, c] - * @symb R.update(1, a, [b, c]) = [b, a] - */ - var update = _curry3(function update(idx, x, list) { - return adjust(idx, always(x), list); - }); - - /** - * Makes a shallow clone of an object, omitting the property at the given path. - * Note that this copies and flattens prototype properties onto the new object - * as well. All non-primitive properties are copied by reference. - * - * @func - * @memberOf R - * @since v0.11.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {k: v} -> {k: v} - * @param {Array} path The path to the value to omit - * @param {Object} obj The object to clone - * @return {Object} A new object without the property at path - * @see R.assocPath - * @example - * - * R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}} - */ - var dissocPath = _curry2(function dissocPath(path, obj) { - switch (path.length) { - case 0: - return obj; - case 1: - return _isInteger(path[0]) && _isArray(obj) ? remove(path[0], 1, obj) : dissoc(path[0], obj); - default: - var head = path[0]; - var tail = Array.prototype.slice.call(path, 1); - if (obj[head] == null) { - return obj; - } else if (_isInteger(head) && _isArray(obj)) { - return update(head, dissocPath(tail, obj[head]), obj); - } else { - return assoc(head, dissocPath(tail, obj[head]), obj); - } - } - }); - - /** - * Divides two numbers. Equivalent to `a / b`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a / b`. - * @see R.multiply - * @example - * - * R.divide(71, 100); //=> 0.71 - * - * const half = R.divide(R.__, 2); - * half(42); //=> 21 - * - * const reciprocal = R.divide(1); - * reciprocal(4); //=> 0.25 - */ - var divide = _curry2(function divide(a, b) { return a / b; }); - - function XDrop(n, xf) { - this.xf = xf; - this.n = n; - } - XDrop.prototype['@@transducer/init'] = _xfBase.init; - XDrop.prototype['@@transducer/result'] = _xfBase.result; - XDrop.prototype['@@transducer/step'] = function(result, input) { - if (this.n > 0) { - this.n -= 1; - return result; - } - return this.xf['@@transducer/step'](result, input); - }; - - var _xdrop = _curry2(function _xdrop(n, xf) { return new XDrop(n, xf); }); - - /** - * Returns all but the first `n` elements of the given list, string, or - * transducer/transformer (or object with a `drop` method). - * - * Dispatches to the `drop` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n - * @param {*} list - * @return {*} A copy of list without the first `n` elements - * @see R.take, R.transduce, R.dropLast, R.dropWhile - * @example - * - * R.drop(1, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] - * R.drop(2, ['foo', 'bar', 'baz']); //=> ['baz'] - * R.drop(3, ['foo', 'bar', 'baz']); //=> [] - * R.drop(4, ['foo', 'bar', 'baz']); //=> [] - * R.drop(3, 'ramda'); //=> 'da' - */ - var drop = _curry2(_dispatchable(['drop'], _xdrop, function drop(n, xs) { - return slice(Math.max(0, n), Infinity, xs); - })); - - function XTake(n, xf) { - this.xf = xf; - this.n = n; - this.i = 0; - } - XTake.prototype['@@transducer/init'] = _xfBase.init; - XTake.prototype['@@transducer/result'] = _xfBase.result; - XTake.prototype['@@transducer/step'] = function(result, input) { - this.i += 1; - var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input); - return this.n >= 0 && this.i >= this.n ? _reduced(ret) : ret; - }; - - var _xtake = _curry2(function _xtake(n, xf) { return new XTake(n, xf); }); - - /** - * Returns the first `n` elements of the given list, string, or - * transducer/transformer (or object with a `take` method). - * - * Dispatches to the `take` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n - * @param {*} list - * @return {*} - * @see R.drop - * @example - * - * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo'] - * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] - * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.take(3, 'ramda'); //=> 'ram' - * - * const personnel = [ - * 'Dave Brubeck', - * 'Paul Desmond', - * 'Eugene Wright', - * 'Joe Morello', - * 'Gerry Mulligan', - * 'Bob Bates', - * 'Joe Dodge', - * 'Ron Crotty' - * ]; - * - * const takeFive = R.take(5); - * takeFive(personnel); - * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan'] - * @symb R.take(-1, [a, b]) = [a, b] - * @symb R.take(0, [a, b]) = [] - * @symb R.take(1, [a, b]) = [a] - * @symb R.take(2, [a, b]) = [a, b] - */ - var take = _curry2(_dispatchable(['take'], _xtake, function take(n, xs) { - return slice(0, n < 0 ? Infinity : n, xs); - })); - - function dropLast(n, xs) { - return take(n < xs.length ? xs.length - n : 0, xs); - } - - function XDropLast(n, xf) { - this.xf = xf; - this.pos = 0; - this.full = false; - this.acc = new Array(n); - } - XDropLast.prototype['@@transducer/init'] = _xfBase.init; - XDropLast.prototype['@@transducer/result'] = function(result) { - this.acc = null; - return this.xf['@@transducer/result'](result); - }; - XDropLast.prototype['@@transducer/step'] = function(result, input) { - if (this.full) { - result = this.xf['@@transducer/step'](result, this.acc[this.pos]); - } - this.store(input); - return result; - }; - XDropLast.prototype.store = function(input) { - this.acc[this.pos] = input; - this.pos += 1; - if (this.pos === this.acc.length) { - this.pos = 0; - this.full = true; - } - }; - - var _xdropLast = _curry2(function _xdropLast(n, xf) { return new XDropLast(n, xf); }); - - /** - * Returns a list containing all but the last `n` elements of the given `list`. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n The number of elements of `list` to skip. - * @param {Array} list The list of elements to consider. - * @return {Array} A copy of the list with only the first `list.length - n` elements - * @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile - * @example - * - * R.dropLast(1, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] - * R.dropLast(2, ['foo', 'bar', 'baz']); //=> ['foo'] - * R.dropLast(3, ['foo', 'bar', 'baz']); //=> [] - * R.dropLast(4, ['foo', 'bar', 'baz']); //=> [] - * R.dropLast(3, 'ramda'); //=> 'ra' - */ - var dropLast$1 = _curry2(_dispatchable([], _xdropLast, dropLast)); - - function dropLastWhile(pred, xs) { - var idx = xs.length - 1; - while (idx >= 0 && pred(xs[idx])) { - idx -= 1; - } - return slice(0, idx + 1, xs); - } - - function XDropLastWhile(fn, xf) { - this.f = fn; - this.retained = []; - this.xf = xf; - } - XDropLastWhile.prototype['@@transducer/init'] = _xfBase.init; - XDropLastWhile.prototype['@@transducer/result'] = function(result) { - this.retained = null; - return this.xf['@@transducer/result'](result); - }; - XDropLastWhile.prototype['@@transducer/step'] = function(result, input) { - return this.f(input) - ? this.retain(result, input) - : this.flush(result, input); - }; - XDropLastWhile.prototype.flush = function(result, input) { - result = _reduce( - this.xf['@@transducer/step'], - result, - this.retained - ); - this.retained = []; - return this.xf['@@transducer/step'](result, input); - }; - XDropLastWhile.prototype.retain = function(result, input) { - this.retained.push(input); - return result; - }; - - var _xdropLastWhile = _curry2(function _xdropLastWhile(fn, xf) { return new XDropLastWhile(fn, xf); }); - - /** - * Returns a new list excluding all the tailing elements of a given list which - * satisfy the supplied predicate function. It passes each value from the right - * to the supplied predicate function, skipping elements until the predicate - * function returns a `falsy` value. The predicate function is applied to one argument: - * *(value)*. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @sig (a -> Boolean) -> String -> String - * @param {Function} predicate The function to be called on each element - * @param {Array} xs The collection to iterate over. - * @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`. - * @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile - * @example - * - * const lteThree = x => x <= 3; - * - * R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4] - * - * R.dropLastWhile(x => x !== 'd' , 'Ramda'); //=> 'Ramd' - */ - var dropLastWhile$1 = _curry2(_dispatchable([], _xdropLastWhile, dropLastWhile)); - - function XDropRepeatsWith(pred, xf) { - this.xf = xf; - this.pred = pred; - this.lastValue = undefined; - this.seenFirstValue = false; - } - - XDropRepeatsWith.prototype['@@transducer/init'] = _xfBase.init; - XDropRepeatsWith.prototype['@@transducer/result'] = _xfBase.result; - XDropRepeatsWith.prototype['@@transducer/step'] = function(result, input) { - var sameAsLast = false; - if (!this.seenFirstValue) { - this.seenFirstValue = true; - } else if (this.pred(this.lastValue, input)) { - sameAsLast = true; - } - this.lastValue = input; - return sameAsLast ? result : this.xf['@@transducer/step'](result, input); - }; - - var _xdropRepeatsWith = _curry2(function _xdropRepeatsWith(pred, xf) { return new XDropRepeatsWith(pred, xf); }); - - /** - * Returns the last element of the given list or string. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig [a] -> a | Undefined - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.init, R.head, R.tail - * @example - * - * R.last(['fi', 'fo', 'fum']); //=> 'fum' - * R.last([]); //=> undefined - * - * R.last('abc'); //=> 'c' - * R.last(''); //=> '' - */ - var last = nth(-1); - - /** - * Returns a new list without any consecutively repeating elements. Equality is - * determined by applying the supplied predicate to each pair of consecutive elements. The - * first element in a series of equal elements will be preserved. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig ((a, a) -> Boolean) -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list The array to consider. - * @return {Array} `list` without repeating elements. - * @see R.transduce - * @example - * - * const l = [1, -1, 1, 3, 4, -4, -4, -5, 5, 3, 3]; - * R.dropRepeatsWith(R.eqBy(Math.abs), l); //=> [1, 3, 4, -5, 3] - */ - var dropRepeatsWith = _curry2(_dispatchable([], _xdropRepeatsWith, function dropRepeatsWith(pred, list) { - var result = []; - var idx = 1; - var len = list.length; - if (len !== 0) { - result[0] = list[0]; - while (idx < len) { - if (!pred(last(result), list[idx])) { - result[result.length] = list[idx]; - } - idx += 1; - } - } - return result; - })); - - /** - * Returns a new list without any consecutively repeating elements. - * [`R.equals`](#equals) is used to determine equality. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig [a] -> [a] - * @param {Array} list The array to consider. - * @return {Array} `list` without repeating elements. - * @see R.transduce - * @example - * - * R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2] - */ - var dropRepeats = _curry1( - _dispatchable([], _xdropRepeatsWith(equals), dropRepeatsWith(equals)) - ); - - function XDropWhile(f, xf) { - this.xf = xf; - this.f = f; - } - XDropWhile.prototype['@@transducer/init'] = _xfBase.init; - XDropWhile.prototype['@@transducer/result'] = _xfBase.result; - XDropWhile.prototype['@@transducer/step'] = function(result, input) { - if (this.f) { - if (this.f(input)) { - return result; - } - this.f = null; - } - return this.xf['@@transducer/step'](result, input); - }; - - var _xdropWhile = _curry2(function _xdropWhile(f, xf) { return new XDropWhile(f, xf); }); - - /** - * Returns a new list excluding the leading elements of a given list which - * satisfy the supplied predicate function. It passes each value to the supplied - * predicate function, skipping elements while the predicate function returns - * `true`. The predicate function is applied to one argument: *(value)*. - * - * Dispatches to the `dropWhile` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @sig (a -> Boolean) -> String -> String - * @param {Function} fn The function called per iteration. - * @param {Array} xs The collection to iterate over. - * @return {Array} A new array. - * @see R.takeWhile, R.transduce, R.addIndex - * @example - * - * const lteTwo = x => x <= 2; - * - * R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1] - * - * R.dropWhile(x => x !== 'd' , 'Ramda'); //=> 'da' - */ - var dropWhile = _curry2(_dispatchable(['dropWhile'], _xdropWhile, function dropWhile(pred, xs) { - var idx = 0; - var len = xs.length; - while (idx < len && pred(xs[idx])) { - idx += 1; - } - return slice(idx, Infinity, xs); - })); - - /** - * Returns `true` if one or both of its arguments are `true`. Returns `false` - * if both arguments are `false`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> b -> a | b - * @param {Any} a - * @param {Any} b - * @return {Any} the first argument if truthy, otherwise the second argument. - * @see R.either, R.xor - * @example - * - * R.or(true, true); //=> true - * R.or(true, false); //=> true - * R.or(false, true); //=> true - * R.or(false, false); //=> false - */ - var or = _curry2(function or(a, b) { - return a || b; - }); - - /** - * A function wrapping calls to the two functions in an `||` operation, - * returning the result of the first function if it is truth-y and the result - * of the second function otherwise. Note that this is short-circuited, - * meaning that the second function will not be invoked if the first returns a - * truth-y value. - * - * In addition to functions, `R.either` also accepts any fantasy-land compatible - * applicative functor. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) - * @param {Function} f a predicate - * @param {Function} g another predicate - * @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together. - * @see R.or - * @example - * - * const gt10 = x => x > 10; - * const even = x => x % 2 === 0; - * const f = R.either(gt10, even); - * f(101); //=> true - * f(8); //=> true - * - * R.either(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(55) - * R.either([false, false, 'a'], [11]) // => [11, 11, "a"] - */ - var either = _curry2(function either(f, g) { - return _isFunction(f) ? - function _either() { - return f.apply(this, arguments) || g.apply(this, arguments); - } : - lift(or)(f, g); - }); - - /** - * Returns the empty value of its argument's type. Ramda defines the empty - * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other - * types are supported if they define `.empty`, - * `.prototype.empty` or implement the - * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid). - * - * Dispatches to the `empty` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig a -> a - * @param {*} x - * @return {*} - * @example - * - * R.empty(Just(42)); //=> Nothing() - * R.empty([1, 2, 3]); //=> [] - * R.empty('unicorns'); //=> '' - * R.empty({x: 1, y: 2}); //=> {} - */ - var empty = _curry1(function empty(x) { - return ( - (x != null && typeof x['fantasy-land/empty'] === 'function') - ? x['fantasy-land/empty']() - : (x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function') - ? x.constructor['fantasy-land/empty']() - : (x != null && typeof x.empty === 'function') - ? x.empty() - : (x != null && x.constructor != null && typeof x.constructor.empty === 'function') - ? x.constructor.empty() - : _isArray(x) - ? [] - : _isString(x) - ? '' - : _isObject(x) - ? {} - : _isArguments(x) - ? (function() { return arguments; }()) - : void 0 // else - ); - }); - - /** - * Returns a new list containing the last `n` elements of the given list. - * If `n > list.length`, returns a list of `list.length` elements. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n The number of elements to return. - * @param {Array} xs The collection to consider. - * @return {Array} - * @see R.dropLast - * @example - * - * R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz'] - * R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] - * R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.takeLast(3, 'ramda'); //=> 'mda' - */ - var takeLast = _curry2(function takeLast(n, xs) { - return drop(n >= 0 ? xs.length - n : 0, xs); - }); - - /** - * Checks if a list ends with the provided sublist. - * - * Similarly, checks if a string ends with the provided substring. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category List - * @sig [a] -> [a] -> Boolean - * @sig String -> String -> Boolean - * @param {*} suffix - * @param {*} list - * @return {Boolean} - * @see R.startsWith - * @example - * - * R.endsWith('c', 'abc') //=> true - * R.endsWith('b', 'abc') //=> false - * R.endsWith(['c'], ['a', 'b', 'c']) //=> true - * R.endsWith(['b'], ['a', 'b', 'c']) //=> false - */ - var endsWith = _curry2(function(suffix, list) { - return equals(takeLast(suffix.length, list), suffix); - }); - - /** - * Takes a function and two values in its domain and returns `true` if the - * values map to the same value in the codomain; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Relation - * @sig (a -> b) -> a -> a -> Boolean - * @param {Function} f - * @param {*} x - * @param {*} y - * @return {Boolean} - * @example - * - * R.eqBy(Math.abs, 5, -5); //=> true - */ - var eqBy = _curry3(function eqBy(f, x, y) { - return equals(f(x), f(y)); - }); - - /** - * Reports whether two objects have the same value, in [`R.equals`](#equals) - * terms, for the specified property. Useful as a curried predicate. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig k -> {k: v} -> {k: v} -> Boolean - * @param {String} prop The name of the property to compare - * @param {Object} obj1 - * @param {Object} obj2 - * @return {Boolean} - * - * @example - * - * const o1 = { a: 1, b: 2, c: 3, d: 4 }; - * const o2 = { a: 10, b: 20, c: 3, d: 40 }; - * R.eqProps('a', o1, o2); //=> false - * R.eqProps('c', o1, o2); //=> true - */ - var eqProps = _curry3(function eqProps(prop, obj1, obj2) { - return equals(obj1[prop], obj2[prop]); - }); - - /** - * Creates a new object by recursively evolving a shallow copy of `object`, - * according to the `transformation` functions. All non-primitive properties - * are copied by reference. - * - * A `transformation` function will not be invoked if its corresponding key - * does not exist in the evolved object. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {k: (v -> v)} -> {k: v} -> {k: v} - * @param {Object} transformations The object specifying transformation functions to apply - * to the object. - * @param {Object} object The object to be transformed. - * @return {Object} The transformed object. - * @example - * - * const tomato = {firstName: ' Tomato ', data: {elapsed: 100, remaining: 1400}, id:123}; - * const transformations = { - * firstName: R.trim, - * lastName: R.trim, // Will not get invoked. - * data: {elapsed: R.add(1), remaining: R.add(-1)} - * }; - * R.evolve(transformations, tomato); //=> {firstName: 'Tomato', data: {elapsed: 101, remaining: 1399}, id:123} - */ - var evolve = _curry2(function evolve(transformations, object) { - var result = object instanceof Array ? [] : {}; - var transformation, key, type; - for (key in object) { - transformation = transformations[key]; - type = typeof transformation; - result[key] = type === 'function' - ? transformation(object[key]) - : transformation && type === 'object' - ? evolve(transformation, object[key]) - : object[key]; - } - return result; - }); - - function XFind(f, xf) { - this.xf = xf; - this.f = f; - this.found = false; - } - XFind.prototype['@@transducer/init'] = _xfBase.init; - XFind.prototype['@@transducer/result'] = function(result) { - if (!this.found) { - result = this.xf['@@transducer/step'](result, void 0); - } - return this.xf['@@transducer/result'](result); - }; - XFind.prototype['@@transducer/step'] = function(result, input) { - if (this.f(input)) { - this.found = true; - result = _reduced(this.xf['@@transducer/step'](result, input)); - } - return result; - }; - - var _xfind = _curry2(function _xfind(f, xf) { return new XFind(f, xf); }); - - /** - * Returns the first element of the list which matches the predicate, or - * `undefined` if no element matches. - * - * Dispatches to the `find` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> a | undefined - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Object} The element found, or `undefined`. - * @see R.transduce - * @example - * - * const xs = [{a: 1}, {a: 2}, {a: 3}]; - * R.find(R.propEq('a', 2))(xs); //=> {a: 2} - * R.find(R.propEq('a', 4))(xs); //=> undefined - */ - var find = _curry2(_dispatchable(['find'], _xfind, function find(fn, list) { - var idx = 0; - var len = list.length; - while (idx < len) { - if (fn(list[idx])) { - return list[idx]; - } - idx += 1; - } - })); - - function XFindIndex(f, xf) { - this.xf = xf; - this.f = f; - this.idx = -1; - this.found = false; - } - XFindIndex.prototype['@@transducer/init'] = _xfBase.init; - XFindIndex.prototype['@@transducer/result'] = function(result) { - if (!this.found) { - result = this.xf['@@transducer/step'](result, -1); - } - return this.xf['@@transducer/result'](result); - }; - XFindIndex.prototype['@@transducer/step'] = function(result, input) { - this.idx += 1; - if (this.f(input)) { - this.found = true; - result = _reduced(this.xf['@@transducer/step'](result, this.idx)); - } - return result; - }; - - var _xfindIndex = _curry2(function _xfindIndex(f, xf) { return new XFindIndex(f, xf); }); - - /** - * Returns the index of the first element of the list which matches the - * predicate, or `-1` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> Number - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Number} The index of the element found, or `-1`. - * @see R.transduce - * @example - * - * const xs = [{a: 1}, {a: 2}, {a: 3}]; - * R.findIndex(R.propEq('a', 2))(xs); //=> 1 - * R.findIndex(R.propEq('a', 4))(xs); //=> -1 - */ - var findIndex = _curry2(_dispatchable([], _xfindIndex, function findIndex(fn, list) { - var idx = 0; - var len = list.length; - while (idx < len) { - if (fn(list[idx])) { - return idx; - } - idx += 1; - } - return -1; - })); - - function XFindLast(f, xf) { - this.xf = xf; - this.f = f; - } - XFindLast.prototype['@@transducer/init'] = _xfBase.init; - XFindLast.prototype['@@transducer/result'] = function(result) { - return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.last)); - }; - XFindLast.prototype['@@transducer/step'] = function(result, input) { - if (this.f(input)) { - this.last = input; - } - return result; - }; - - var _xfindLast = _curry2(function _xfindLast(f, xf) { return new XFindLast(f, xf); }); - - /** - * Returns the last element of the list which matches the predicate, or - * `undefined` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> a | undefined - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Object} The element found, or `undefined`. - * @see R.transduce - * @example - * - * const xs = [{a: 1, b: 0}, {a:1, b: 1}]; - * R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1} - * R.findLast(R.propEq('a', 4))(xs); //=> undefined - */ - var findLast = _curry2(_dispatchable([], _xfindLast, function findLast(fn, list) { - var idx = list.length - 1; - while (idx >= 0) { - if (fn(list[idx])) { - return list[idx]; - } - idx -= 1; - } - })); - - function XFindLastIndex(f, xf) { - this.xf = xf; - this.f = f; - this.idx = -1; - this.lastIdx = -1; - } - XFindLastIndex.prototype['@@transducer/init'] = _xfBase.init; - XFindLastIndex.prototype['@@transducer/result'] = function(result) { - return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.lastIdx)); - }; - XFindLastIndex.prototype['@@transducer/step'] = function(result, input) { - this.idx += 1; - if (this.f(input)) { - this.lastIdx = this.idx; - } - return result; - }; - - var _xfindLastIndex = _curry2(function _xfindLastIndex(f, xf) { return new XFindLastIndex(f, xf); }); - - /** - * Returns the index of the last element of the list which matches the - * predicate, or `-1` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> Number - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Number} The index of the element found, or `-1`. - * @see R.transduce - * @example - * - * const xs = [{a: 1, b: 0}, {a:1, b: 1}]; - * R.findLastIndex(R.propEq('a', 1))(xs); //=> 1 - * R.findLastIndex(R.propEq('a', 4))(xs); //=> -1 - */ - var findLastIndex = _curry2(_dispatchable([], _xfindLastIndex, function findLastIndex(fn, list) { - var idx = list.length - 1; - while (idx >= 0) { - if (fn(list[idx])) { - return idx; - } - idx -= 1; - } - return -1; - })); - - /** - * Returns a new list by pulling every item out of it (and all its sub-arrays) - * and putting them in a new array, depth-first. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] - * @param {Array} list The array to consider. - * @return {Array} The flattened list. - * @see R.unnest - * @example - * - * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]); - * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] - */ - var flatten = _curry1(_makeFlat(true)); - - /** - * Returns a new function much like the supplied one, except that the first two - * arguments' order is reversed. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z) - * @param {Function} fn The function to invoke with its first two parameters reversed. - * @return {*} The result of invoking `fn` with its first two parameters' order reversed. - * @example - * - * const mergeThree = (a, b, c) => [].concat(a, b, c); - * - * mergeThree(1, 2, 3); //=> [1, 2, 3] - * - * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3] - * @symb R.flip(f)(a, b, c) = f(b, a, c) - */ - var flip = _curry1(function flip(fn) { - return curryN(fn.length, function(a, b) { - var args = Array.prototype.slice.call(arguments, 0); - args[0] = b; - args[1] = a; - return fn.apply(this, args); - }); - }); - - /** - * Iterate over an input `list`, calling a provided function `fn` for each - * element in the list. - * - * `fn` receives one argument: *(value)*. - * - * Note: `R.forEach` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.forEach` method. For more - * details on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description - * - * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns - * the original array. In some libraries this function is named `each`. - * - * Dispatches to the `forEach` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> *) -> [a] -> [a] - * @param {Function} fn The function to invoke. Receives one argument, `value`. - * @param {Array} list The list to iterate over. - * @return {Array} The original list. - * @see R.addIndex - * @example - * - * const printXPlusFive = x => console.log(x + 5); - * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3] - * // logs 6 - * // logs 7 - * // logs 8 - * @symb R.forEach(f, [a, b, c]) = [a, b, c] - */ - var forEach = _curry2(_checkForMethod('forEach', function forEach(fn, list) { - var len = list.length; - var idx = 0; - while (idx < len) { - fn(list[idx]); - idx += 1; - } - return list; - })); - - /** - * Iterate over an input `object`, calling a provided function `fn` for each - * key and value in the object. - * - * `fn` receives three argument: *(value, key, obj)*. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Object - * @sig ((a, String, StrMap a) -> Any) -> StrMap a -> StrMap a - * @param {Function} fn The function to invoke. Receives three argument, `value`, `key`, `obj`. - * @param {Object} obj The object to iterate over. - * @return {Object} The original object. - * @example - * - * const printKeyConcatValue = (value, key) => console.log(key + ':' + value); - * R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2} - * // logs x:1 - * // logs y:2 - * @symb R.forEachObjIndexed(f, {x: a, y: b}) = {x: a, y: b} - */ - var forEachObjIndexed = _curry2(function forEachObjIndexed(fn, obj) { - var keyList = keys(obj); - var idx = 0; - while (idx < keyList.length) { - var key = keyList[idx]; - fn(obj[key], key, obj); - idx += 1; - } - return obj; - }); - - /** - * Creates a new object from a list key-value pairs. If a key appears in - * multiple pairs, the rightmost pair is included in the object. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [[k,v]] -> {k: v} - * @param {Array} pairs An array of two-element arrays that will be the keys and values of the output object. - * @return {Object} The object made by pairing up `keys` and `values`. - * @see R.toPairs, R.pair - * @example - * - * R.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3} - */ - var fromPairs = _curry1(function fromPairs(pairs) { - var result = {}; - var idx = 0; - while (idx < pairs.length) { - result[pairs[idx][0]] = pairs[idx][1]; - idx += 1; - } - return result; - }); - - /** - * Splits a list into sub-lists stored in an object, based on the result of - * calling a String-returning function on each element, and grouping the - * results according to values returned. - * - * Dispatches to the `groupBy` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> String) -> [a] -> {String: [a]} - * @param {Function} fn Function :: a -> String - * @param {Array} list The array to group - * @return {Object} An object with the output of `fn` for keys, mapped to arrays of elements - * that produced that key when passed to `fn`. - * @see R.reduceBy, R.transduce - * @example - * - * const byGrade = R.groupBy(function(student) { - * const score = student.score; - * return score < 65 ? 'F' : - * score < 70 ? 'D' : - * score < 80 ? 'C' : - * score < 90 ? 'B' : 'A'; - * }); - * const students = [{name: 'Abby', score: 84}, - * {name: 'Eddy', score: 58}, - * // ... - * {name: 'Jack', score: 69}]; - * byGrade(students); - * // { - * // 'A': [{name: 'Dianne', score: 99}], - * // 'B': [{name: 'Abby', score: 84}] - * // // ..., - * // 'F': [{name: 'Eddy', score: 58}] - * // } - */ - var groupBy = _curry2(_checkForMethod('groupBy', reduceBy(function(acc, item) { - if (acc == null) { - acc = []; - } - acc.push(item); - return acc; - }, null))); - - /** - * Takes a list and returns a list of lists where each sublist's elements are - * all satisfied pairwise comparison according to the provided function. - * Only adjacent elements are passed to the comparison function. - * - * @func - * @memberOf R - * @since v0.21.0 - * @category List - * @sig ((a, a) → Boolean) → [a] → [[a]] - * @param {Function} fn Function for determining whether two given (adjacent) - * elements should be in the same group - * @param {Array} list The array to group. Also accepts a string, which will be - * treated as a list of characters. - * @return {List} A list that contains sublists of elements, - * whose concatenations are equal to the original list. - * @example - * - * R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]] - * - * R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]] - * - * R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]] - * - * R.groupWith(R.eqBy(isVowel), 'aestiou') - * //=> ['ae', 'st', 'iou'] - */ - var groupWith = _curry2(function(fn, list) { - var res = []; - var idx = 0; - var len = list.length; - while (idx < len) { - var nextidx = idx + 1; - while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) { - nextidx += 1; - } - res.push(list.slice(idx, nextidx)); - idx = nextidx; - } - return res; - }); - - /** - * Returns `true` if the first argument is greater than the second; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @see R.lt - * @example - * - * R.gt(2, 1); //=> true - * R.gt(2, 2); //=> false - * R.gt(2, 3); //=> false - * R.gt('a', 'z'); //=> false - * R.gt('z', 'a'); //=> true - */ - var gt = _curry2(function gt(a, b) { return a > b; }); - - /** - * Returns `true` if the first argument is greater than or equal to the second; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {Number} a - * @param {Number} b - * @return {Boolean} - * @see R.lte - * @example - * - * R.gte(2, 1); //=> true - * R.gte(2, 2); //=> true - * R.gte(2, 3); //=> false - * R.gte('a', 'z'); //=> false - * R.gte('z', 'a'); //=> true - */ - var gte = _curry2(function gte(a, b) { return a >= b; }); - - /** - * Returns whether or not a path exists in an object. Only the object's - * own properties are checked. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {a} -> Boolean - * @param {Array} path The path to use. - * @param {Object} obj The object to check the path in. - * @return {Boolean} Whether the path exists. - * @see R.has - * @example - * - * R.hasPath(['a', 'b'], {a: {b: 2}}); // => true - * R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true - * R.hasPath(['a', 'b'], {a: {c: 2}}); // => false - * R.hasPath(['a', 'b'], {}); // => false - */ - var hasPath = _curry2(function hasPath(_path, obj) { - if (_path.length === 0 || isNil(obj)) { - return false; - } - var val = obj; - var idx = 0; - while (idx < _path.length) { - if (!isNil(val) && _has(_path[idx], val)) { - val = val[_path[idx]]; - idx += 1; - } else { - return false; - } - } - return true; - }); - - /** - * Returns whether or not an object has an own property with the specified name - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Object - * @sig s -> {s: x} -> Boolean - * @param {String} prop The name of the property to check for. - * @param {Object} obj The object to query. - * @return {Boolean} Whether the property exists. - * @example - * - * const hasName = R.has('name'); - * hasName({name: 'alice'}); //=> true - * hasName({name: 'bob'}); //=> true - * hasName({}); //=> false - * - * const point = {x: 0, y: 0}; - * const pointHas = R.has(R.__, point); - * pointHas('x'); //=> true - * pointHas('y'); //=> true - * pointHas('z'); //=> false - */ - var has = _curry2(function has(prop, obj) { - return hasPath([prop], obj); - }); - - /** - * Returns whether or not an object or its prototype chain has a property with - * the specified name - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Object - * @sig s -> {s: x} -> Boolean - * @param {String} prop The name of the property to check for. - * @param {Object} obj The object to query. - * @return {Boolean} Whether the property exists. - * @example - * - * function Rectangle(width, height) { - * this.width = width; - * this.height = height; - * } - * Rectangle.prototype.area = function() { - * return this.width * this.height; - * }; - * - * const square = new Rectangle(2, 2); - * R.hasIn('width', square); //=> true - * R.hasIn('area', square); //=> true - */ - var hasIn = _curry2(function hasIn(prop, obj) { - return prop in obj; - }); - - /** - * Returns true if its arguments are identical, false otherwise. Values are - * identical if they reference the same memory. `NaN` is identical to `NaN`; - * `0` and `-0` are not identical. - * - * Note this is merely a curried version of ES6 `Object.is`. - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Relation - * @sig a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @example - * - * const o = {}; - * R.identical(o, o); //=> true - * R.identical(1, 1); //=> true - * R.identical(1, '1'); //=> false - * R.identical([], []); //=> false - * R.identical(0, -0); //=> false - * R.identical(NaN, NaN); //=> true - */ - var identical = _curry2(_objectIs$1); - - /** - * Creates a function that will process either the `onTrue` or the `onFalse` - * function depending upon the result of the `condition` predicate. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *) - * @param {Function} condition A predicate function - * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value. - * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value. - * @return {Function} A new function that will process either the `onTrue` or the `onFalse` - * function depending upon the result of the `condition` predicate. - * @see R.unless, R.when, R.cond - * @example - * - * const incCount = R.ifElse( - * R.has('count'), - * R.over(R.lensProp('count'), R.inc), - * R.assoc('count', 1) - * ); - * incCount({}); //=> { count: 1 } - * incCount({ count: 1 }); //=> { count: 2 } - */ - var ifElse = _curry3(function ifElse(condition, onTrue, onFalse) { - return curryN(Math.max(condition.length, onTrue.length, onFalse.length), - function _ifElse() { - return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments); - } - ); - }); - - /** - * Increments its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} n + 1 - * @see R.dec - * @example - * - * R.inc(42); //=> 43 - */ - var inc = add(1); - - /** - * Returns `true` if the specified value is equal, in [`R.equals`](#equals) - * terms, to at least one element of the given list; `false` otherwise. - * Works also with strings. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category List - * @sig a -> [a] -> Boolean - * @param {Object} a The item to compare against. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. - * @see R.any - * @example - * - * R.includes(3, [1, 2, 3]); //=> true - * R.includes(4, [1, 2, 3]); //=> false - * R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true - * R.includes([42], [[42]]); //=> true - * R.includes('ba', 'banana'); //=>true - */ - var includes = _curry2(_includes); - - /** - * Given a function that generates a key, turns a list of objects into an - * object indexing the objects by the given key. Note that if multiple - * objects generate the same value for the indexing key only the last value - * will be included in the generated object. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (a -> String) -> [{k: v}] -> {k: {k: v}} - * @param {Function} fn Function :: a -> String - * @param {Array} array The array of objects to index - * @return {Object} An object indexing each array element by the given property. - * @example - * - * const list = [{id: 'xyz', title: 'A'}, {id: 'abc', title: 'B'}]; - * R.indexBy(R.prop('id'), list); - * //=> {abc: {id: 'abc', title: 'B'}, xyz: {id: 'xyz', title: 'A'}} - */ - var indexBy = reduceBy(function(acc, elem) { return elem; }, null); - - /** - * Returns the position of the first occurrence of an item in an array, or -1 - * if the item is not included in the array. [`R.equals`](#equals) is used to - * determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Number - * @param {*} target The item to find. - * @param {Array} xs The array to search in. - * @return {Number} the index of the target, or -1 if the target is not found. - * @see R.lastIndexOf - * @example - * - * R.indexOf(3, [1,2,3,4]); //=> 2 - * R.indexOf(10, [1,2,3,4]); //=> -1 - */ - var indexOf = _curry2(function indexOf(target, xs) { - return typeof xs.indexOf === 'function' && !_isArray(xs) ? - xs.indexOf(target) : - _indexOf(xs, target, 0); - }); - - /** - * Returns all but the last element of the given list or string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.last, R.head, R.tail - * @example - * - * R.init([1, 2, 3]); //=> [1, 2] - * R.init([1, 2]); //=> [1] - * R.init([1]); //=> [] - * R.init([]); //=> [] - * - * R.init('abc'); //=> 'ab' - * R.init('ab'); //=> 'a' - * R.init('a'); //=> '' - * R.init(''); //=> '' - */ - var init = slice(0, -1); - - /** - * Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list - * `xs'` comprising each of the elements of `xs` which is equal to one or more - * elements of `ys` according to `pred`. - * - * `pred` must be a binary function expecting an element from each list. - * - * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should - * not be significant, but since `xs'` is ordered the implementation guarantees - * that its values are in the same order as they appear in `xs`. Duplicates are - * not removed, so `xs'` may contain duplicates if `xs` contains duplicates. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Relation - * @sig ((a, b) -> Boolean) -> [a] -> [b] -> [a] - * @param {Function} pred - * @param {Array} xs - * @param {Array} ys - * @return {Array} - * @see R.intersection - * @example - * - * R.innerJoin( - * (record, id) => record.id === id, - * [{id: 824, name: 'Richie Furay'}, - * {id: 956, name: 'Dewey Martin'}, - * {id: 313, name: 'Bruce Palmer'}, - * {id: 456, name: 'Stephen Stills'}, - * {id: 177, name: 'Neil Young'}], - * [177, 456, 999] - * ); - * //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}] - */ - var innerJoin = _curry3(function innerJoin(pred, xs, ys) { - return _filter(function(x) { return _includesWith(pred, x, ys); }, xs); - }); - - /** - * Inserts the supplied element into the list, at the specified `index`. _Note that - - * this is not destructive_: it returns a copy of the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.2.2 - * @category List - * @sig Number -> a -> [a] -> [a] - * @param {Number} index The position to insert the element - * @param {*} elt The element to insert into the Array - * @param {Array} list The list to insert into - * @return {Array} A new Array with `elt` inserted at `index`. - * @example - * - * R.insert(2, 'x', [1,2,3,4]); //=> [1,2,'x',3,4] - */ - var insert = _curry3(function insert(idx, elt, list) { - idx = idx < list.length && idx >= 0 ? idx : list.length; - var result = Array.prototype.slice.call(list, 0); - result.splice(idx, 0, elt); - return result; - }); - - /** - * Inserts the sub-list into the list, at the specified `index`. _Note that this is not - * destructive_: it returns a copy of the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig Number -> [a] -> [a] -> [a] - * @param {Number} index The position to insert the sub-list - * @param {Array} elts The sub-list to insert into the Array - * @param {Array} list The list to insert the sub-list into - * @return {Array} A new Array with `elts` inserted starting at `index`. - * @example - * - * R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4] - */ - var insertAll = _curry3(function insertAll(idx, elts, list) { - idx = idx < list.length && idx >= 0 ? idx : list.length; - return [].concat( - Array.prototype.slice.call(list, 0, idx), - elts, - Array.prototype.slice.call(list, idx) - ); - }); - - /** - * Returns a new list containing only one copy of each element in the original - * list, based upon the value returned by applying the supplied function to - * each list element. Prefers the first item if the supplied function produces - * the same value on two items. [`R.equals`](#equals) is used for comparison. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> b) -> [a] -> [a] - * @param {Function} fn A function used to produce a value to use during comparisons. - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10] - */ - var uniqBy = _curry2(function uniqBy(fn, list) { - var set = new _Set(); - var result = []; - var idx = 0; - var appliedItem, item; - - while (idx < list.length) { - item = list[idx]; - appliedItem = fn(item); - if (set.add(appliedItem)) { - result.push(item); - } - idx += 1; - } - return result; - }); - - /** - * Returns a new list containing only one copy of each element in the original - * list. [`R.equals`](#equals) is used to determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * R.uniq([1, 1, 2, 1]); //=> [1, 2] - * R.uniq([1, '1']); //=> [1, '1'] - * R.uniq([[42], [42]]); //=> [[42]] - */ - var uniq = uniqBy(identity); - - /** - * Combines two lists into a set (i.e. no duplicates) composed of those - * elements common to both lists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The list of elements found in both `list1` and `list2`. - * @see R.innerJoin - * @example - * - * R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3] - */ - var intersection = _curry2(function intersection(list1, list2) { - var lookupList, filteredList; - if (list1.length > list2.length) { - lookupList = list1; - filteredList = list2; - } else { - lookupList = list2; - filteredList = list1; - } - return uniq(_filter(flip(_includes)(lookupList), filteredList)); - }); - - /** - * Creates a new list with the separator interposed between elements. - * - * Dispatches to the `intersperse` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} separator The element to add to the list. - * @param {Array} list The list to be interposed. - * @return {Array} The new list. - * @example - * - * R.intersperse('a', ['b', 'n', 'n', 's']); //=> ['b', 'a', 'n', 'a', 'n', 'a', 's'] - */ - var intersperse = _curry2(_checkForMethod('intersperse', function intersperse(separator, list) { - var out = []; - var idx = 0; - var length = list.length; - while (idx < length) { - if (idx === length - 1) { - out.push(list[idx]); - } else { - out.push(list[idx], separator); - } - idx += 1; - } - return out; - })); - - // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign - function _objectAssign(target) { - if (target == null) { - throw new TypeError('Cannot convert undefined or null to object'); - } - - var output = Object(target); - var idx = 1; - var length = arguments.length; - while (idx < length) { - var source = arguments[idx]; - if (source != null) { - for (var nextKey in source) { - if (_has(nextKey, source)) { - output[nextKey] = source[nextKey]; - } - } - } - idx += 1; - } - return output; - } - - var _objectAssign$1 = typeof Object.assign === 'function' ? Object.assign : _objectAssign; - - /** - * Creates an object containing a single key:value pair. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Object - * @sig String -> a -> {String:a} - * @param {String} key - * @param {*} val - * @return {Object} - * @see R.pair - * @example - * - * const matchPhrases = R.compose( - * R.objOf('must'), - * R.map(R.objOf('match_phrase')) - * ); - * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]} - */ - var objOf = _curry2(function objOf(key, val) { - var obj = {}; - obj[key] = val; - return obj; - }); - - var _stepCatArray = { - '@@transducer/init': Array, - '@@transducer/step': function(xs, x) { - xs.push(x); - return xs; - }, - '@@transducer/result': _identity - }; - var _stepCatString = { - '@@transducer/init': String, - '@@transducer/step': function(a, b) { return a + b; }, - '@@transducer/result': _identity - }; - var _stepCatObject = { - '@@transducer/init': Object, - '@@transducer/step': function(result, input) { - return _objectAssign$1( - result, - _isArrayLike(input) ? objOf(input[0], input[1]) : input - ); - }, - '@@transducer/result': _identity - }; - - function _stepCat(obj) { - if (_isTransformer(obj)) { - return obj; - } - if (_isArrayLike(obj)) { - return _stepCatArray; - } - if (typeof obj === 'string') { - return _stepCatString; - } - if (typeof obj === 'object') { - return _stepCatObject; - } - throw new Error('Cannot create transformer for ' + obj); - } - - /** - * Transforms the items of the list with the transducer and appends the - * transformed items to the accumulator using an appropriate iterator function - * based on the accumulator type. - * - * The accumulator can be an array, string, object or a transformer. Iterated - * items will be appended to arrays and concatenated to strings. Objects will - * be merged directly or 2-item arrays will be merged as key, value pairs. - * - * The accumulator can also be a transformer object that provides a 2-arity - * reducing iterator function, step, 0-arity initial value function, init, and - * 1-arity result extraction function result. The step function is used as the - * iterator function in reduce. The result function is used to convert the - * final accumulator into the return type and in most cases is R.identity. The - * init function is used to provide the initial accumulator. - * - * The iteration is performed with [`R.reduce`](#reduce) after initializing the - * transducer. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig a -> (b -> b) -> [c] -> a - * @param {*} acc The initial accumulator value. - * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.transduce - * @example - * - * const numbers = [1, 2, 3, 4]; - * const transducer = R.compose(R.map(R.add(1)), R.take(2)); - * - * R.into([], transducer, numbers); //=> [2, 3] - * - * const intoArray = R.into([]); - * intoArray(transducer, numbers); //=> [2, 3] - */ - var into = _curry3(function into(acc, xf, list) { - return _isTransformer(acc) ? - _reduce(xf(acc), acc['@@transducer/init'](), list) : - _reduce(xf(_stepCat(acc)), _clone(acc, [], [], false), list); - }); - - /** - * Same as [`R.invertObj`](#invertObj), however this accounts for objects with - * duplicate values by putting the values into an array. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {s: x} -> {x: [ s, ... ]} - * @param {Object} obj The object or array to invert - * @return {Object} out A new object with keys in an array. - * @see R.invertObj - * @example - * - * const raceResultsByFirstName = { - * first: 'alice', - * second: 'jake', - * third: 'alice', - * }; - * R.invert(raceResultsByFirstName); - * //=> { 'alice': ['first', 'third'], 'jake':['second'] } - */ - var invert = _curry1(function invert(obj) { - var props = keys(obj); - var len = props.length; - var idx = 0; - var out = {}; - - while (idx < len) { - var key = props[idx]; - var val = obj[key]; - var list = _has(val, out) ? out[val] : (out[val] = []); - list[list.length] = key; - idx += 1; - } - return out; - }); - - /** - * Returns a new object with the keys of the given object as values, and the - * values of the given object, which are coerced to strings, as keys. Note - * that the last key found is preferred when handling the same value. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {s: x} -> {x: s} - * @param {Object} obj The object or array to invert - * @return {Object} out A new object - * @see R.invert - * @example - * - * const raceResults = { - * first: 'alice', - * second: 'jake' - * }; - * R.invertObj(raceResults); - * //=> { 'alice': 'first', 'jake':'second' } - * - * // Alternatively: - * const raceResults = ['alice', 'jake']; - * R.invertObj(raceResults); - * //=> { 'alice': '0', 'jake':'1' } - */ - var invertObj = _curry1(function invertObj(obj) { - var props = keys(obj); - var len = props.length; - var idx = 0; - var out = {}; - - while (idx < len) { - var key = props[idx]; - out[obj[key]] = key; - idx += 1; - } - return out; - }); - - /** - * Turns a named method with a specified arity into a function that can be - * called directly supplied with arguments and a target object. - * - * The returned function is curried and accepts `arity + 1` parameters where - * the final parameter is the target object. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *) - * @param {Number} arity Number of arguments the returned function should take - * before the target object. - * @param {String} method Name of any of the target object's methods to call. - * @return {Function} A new curried function. - * @see R.construct - * @example - * - * const sliceFrom = R.invoker(1, 'slice'); - * sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm' - * const sliceFrom6 = R.invoker(2, 'slice')(6); - * sliceFrom6(8, 'abcdefghijklm'); //=> 'gh' - * - * const dog = { - * speak: async () => 'Woof!' - * }; - * const speak = R.invoker(0, 'speak'); - * speak(dog).then(console.log) //~> 'Woof!' - * - * @symb R.invoker(0, 'method')(o) = o['method']() - * @symb R.invoker(1, 'method')(a, o) = o['method'](a) - * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b) - */ - var invoker = _curry2(function invoker(arity, method) { - return curryN(arity + 1, function() { - var target = arguments[arity]; - if (target != null && _isFunction(target[method])) { - return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity)); - } - throw new TypeError(toString$1(target) + ' does not have a method named "' + method + '"'); - }); - }); - - /** - * See if an object (`val`) is an instance of the supplied constructor. This - * function will check up the inheritance chain, if any. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Type - * @sig (* -> {*}) -> a -> Boolean - * @param {Object} ctor A constructor - * @param {*} val The value to test - * @return {Boolean} - * @example - * - * R.is(Object, {}); //=> true - * R.is(Number, 1); //=> true - * R.is(Object, 1); //=> false - * R.is(String, 's'); //=> true - * R.is(String, new String('')); //=> true - * R.is(Object, new String('')); //=> true - * R.is(Object, 's'); //=> false - * R.is(Number, {}); //=> false - */ - var is = _curry2(function is(Ctor, val) { - return val != null && val.constructor === Ctor || val instanceof Ctor; - }); - - /** - * Returns `true` if the given value is its type's empty value; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> Boolean - * @param {*} x - * @return {Boolean} - * @see R.empty - * @example - * - * R.isEmpty([1, 2, 3]); //=> false - * R.isEmpty([]); //=> true - * R.isEmpty(''); //=> true - * R.isEmpty(null); //=> false - * R.isEmpty({}); //=> true - * R.isEmpty({length: 0}); //=> false - */ - var isEmpty = _curry1(function isEmpty(x) { - return x != null && equals(x, empty(x)); - }); - - /** - * Returns a string made by inserting the `separator` between each element and - * concatenating all the elements into a single string. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig String -> [a] -> String - * @param {Number|String} separator The string used to separate the elements. - * @param {Array} xs The elements to join into a string. - * @return {String} str The string made by concatenating `xs` with `separator`. - * @see R.split - * @example - * - * const spacer = R.join(' '); - * spacer(['a', 2, 3.4]); //=> 'a 2 3.4' - * R.join('|', [1, 2, 3]); //=> '1|2|3' - */ - var join = invoker(1, 'join'); - - /** - * juxt applies a list of functions to a list of values. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Function - * @sig [(a, b, ..., m) -> n] -> ((a, b, ..., m) -> [n]) - * @param {Array} fns An array of functions - * @return {Function} A function that returns a list of values after applying each of the original `fns` to its parameters. - * @see R.applySpec - * @example - * - * const getRange = R.juxt([Math.min, Math.max]); - * getRange(3, 4, 9, -3); //=> [-3, 9] - * @symb R.juxt([f, g, h])(a, b) = [f(a, b), g(a, b), h(a, b)] - */ - var juxt = _curry1(function juxt(fns) { - return converge(function() { return Array.prototype.slice.call(arguments, 0); }, fns); - }); - - /** - * Returns a list containing the names of all the properties of the supplied - * object, including prototype properties. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @sig {k: v} -> [k] - * @param {Object} obj The object to extract properties from - * @return {Array} An array of the object's own and prototype properties. - * @see R.keys, R.valuesIn - * @example - * - * const F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * const f = new F(); - * R.keysIn(f); //=> ['x', 'y'] - */ - var keysIn = _curry1(function keysIn(obj) { - var prop; - var ks = []; - for (prop in obj) { - ks[ks.length] = prop; - } - return ks; - }); - - /** - * Returns the position of the last occurrence of an item in an array, or -1 if - * the item is not included in the array. [`R.equals`](#equals) is used to - * determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Number - * @param {*} target The item to find. - * @param {Array} xs The array to search in. - * @return {Number} the index of the target, or -1 if the target is not found. - * @see R.indexOf - * @example - * - * R.lastIndexOf(3, [-1,3,3,0,1,2,3,4]); //=> 6 - * R.lastIndexOf(10, [1,2,3,4]); //=> -1 - */ - var lastIndexOf = _curry2(function lastIndexOf(target, xs) { - if (typeof xs.lastIndexOf === 'function' && !_isArray(xs)) { - return xs.lastIndexOf(target); - } else { - var idx = xs.length - 1; - while (idx >= 0) { - if (equals(xs[idx], target)) { - return idx; - } - idx -= 1; - } - return -1; - } - }); - - function _isNumber(x) { - return Object.prototype.toString.call(x) === '[object Number]'; - } - - /** - * Returns the number of elements in the array by returning `list.length`. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [a] -> Number - * @param {Array} list The array to inspect. - * @return {Number} The length of the array. - * @example - * - * R.length([]); //=> 0 - * R.length([1, 2, 3]); //=> 3 - */ - var length = _curry1(function length(list) { - return list != null && _isNumber(list.length) ? list.length : NaN; - }); - - /** - * Returns a lens for the given getter and setter functions. The getter "gets" - * the value of the focus; the setter "sets" the value of the focus. The setter - * should not mutate the data structure. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig (s -> a) -> ((a, s) -> s) -> Lens s a - * @param {Function} getter - * @param {Function} setter - * @return {Lens} - * @see R.view, R.set, R.over, R.lensIndex, R.lensProp - * @example - * - * const xLens = R.lens(R.prop('x'), R.assoc('x')); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} - */ - var lens = _curry2(function lens(getter, setter) { - return function(toFunctorFn) { - return function(target) { - return map( - function(focus) { - return setter(focus, target); - }, - toFunctorFn(getter(target)) - ); - }; - }; - }); - - /** - * Returns a lens whose focus is the specified index. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Number -> Lens s a - * @param {Number} n - * @return {Lens} - * @see R.view, R.set, R.over, R.nth - * @example - * - * const headLens = R.lensIndex(0); - * - * R.view(headLens, ['a', 'b', 'c']); //=> 'a' - * R.set(headLens, 'x', ['a', 'b', 'c']); //=> ['x', 'b', 'c'] - * R.over(headLens, R.toUpper, ['a', 'b', 'c']); //=> ['A', 'b', 'c'] - */ - var lensIndex = _curry1(function lensIndex(n) { - return lens(nth(n), update(n)); - }); - - /** - * Returns a lens whose focus is the specified path. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @typedefn Idx = String | Int - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig [Idx] -> Lens s a - * @param {Array} path The path to use. - * @return {Lens} - * @see R.view, R.set, R.over - * @example - * - * const xHeadYLens = R.lensPath(['x', 0, 'y']); - * - * R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> 2 - * R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]} - * R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]} - */ - var lensPath = _curry1(function lensPath(p) { - return lens(path(p), assocPath(p)); - }); - - /** - * Returns a lens whose focus is the specified property. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig String -> Lens s a - * @param {String} k - * @return {Lens} - * @see R.view, R.set, R.over - * @example - * - * const xLens = R.lensProp('x'); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} - */ - var lensProp = _curry1(function lensProp(k) { - return lens(prop(k), assoc(k)); - }); - - /** - * Returns `true` if the first argument is less than the second; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @see R.gt - * @example - * - * R.lt(2, 1); //=> false - * R.lt(2, 2); //=> false - * R.lt(2, 3); //=> true - * R.lt('a', 'z'); //=> true - * R.lt('z', 'a'); //=> false - */ - var lt = _curry2(function lt(a, b) { return a < b; }); - - /** - * Returns `true` if the first argument is less than or equal to the second; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {Number} a - * @param {Number} b - * @return {Boolean} - * @see R.gte - * @example - * - * R.lte(2, 1); //=> false - * R.lte(2, 2); //=> true - * R.lte(2, 3); //=> true - * R.lte('a', 'z'); //=> true - * R.lte('z', 'a'); //=> false - */ - var lte = _curry2(function lte(a, b) { return a <= b; }); - - /** - * The `mapAccum` function behaves like a combination of map and reduce; it - * applies a function to each element of a list, passing an accumulating - * parameter from left to right, and returning a final value of this - * accumulator together with the new list. - * - * The iterator function receives two arguments, *acc* and *value*, and should - * return a tuple *[acc, value]*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y]) - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.scan, R.addIndex, R.mapAccumRight - * @example - * - * const digits = ['1', '2', '3', '4']; - * const appender = (a, b) => [a + b, a + b]; - * - * R.mapAccum(appender, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']] - * @symb R.mapAccum(f, a, [b, c, d]) = [ - * f(f(f(a, b)[0], c)[0], d)[0], - * [ - * f(a, b)[1], - * f(f(a, b)[0], c)[1], - * f(f(f(a, b)[0], c)[0], d)[1] - * ] - * ] - */ - var mapAccum = _curry3(function mapAccum(fn, acc, list) { - var idx = 0; - var len = list.length; - var result = []; - var tuple = [acc]; - while (idx < len) { - tuple = fn(tuple[0], list[idx]); - result[idx] = tuple[1]; - idx += 1; - } - return [tuple[0], result]; - }); - - /** - * The `mapAccumRight` function behaves like a combination of map and reduce; it - * applies a function to each element of a list, passing an accumulating - * parameter from right to left, and returning a final value of this - * accumulator together with the new list. - * - * Similar to [`mapAccum`](#mapAccum), except moves through the input list from - * the right to the left. - * - * The iterator function receives two arguments, *acc* and *value*, and should - * return a tuple *[acc, value]*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y]) - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.addIndex, R.mapAccum - * @example - * - * const digits = ['1', '2', '3', '4']; - * const appender = (a, b) => [b + a, b + a]; - * - * R.mapAccumRight(appender, 5, digits); //=> ['12345', ['12345', '2345', '345', '45']] - * @symb R.mapAccumRight(f, a, [b, c, d]) = [ - * f(f(f(a, d)[0], c)[0], b)[0], - * [ - * f(a, d)[1], - * f(f(a, d)[0], c)[1], - * f(f(f(a, d)[0], c)[0], b)[1] - * ] - * ] - */ - var mapAccumRight = _curry3(function mapAccumRight(fn, acc, list) { - var idx = list.length - 1; - var result = []; - var tuple = [acc]; - while (idx >= 0) { - tuple = fn(tuple[0], list[idx]); - result[idx] = tuple[1]; - idx -= 1; - } - return [tuple[0], result]; - }); - - /** - * An Object-specific version of [`map`](#map). The function is applied to three - * arguments: *(value, key, obj)*. If only the value is significant, use - * [`map`](#map) instead. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig ((*, String, Object) -> *) -> Object -> Object - * @param {Function} fn - * @param {Object} obj - * @return {Object} - * @see R.map - * @example - * - * const xyz = { x: 1, y: 2, z: 3 }; - * const prependKeyAndDouble = (num, key, obj) => key + (num * 2); - * - * R.mapObjIndexed(prependKeyAndDouble, xyz); //=> { x: 'x2', y: 'y4', z: 'z6' } - */ - var mapObjIndexed = _curry2(function mapObjIndexed(fn, obj) { - return _reduce(function(acc, key) { - acc[key] = fn(obj[key], key, obj); - return acc; - }, {}, keys(obj)); - }); - - /** - * Tests a regular expression against a String. Note that this function will - * return an empty array when there are no matches. This differs from - * [`String.prototype.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) - * which returns `null` when there are no matches. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category String - * @sig RegExp -> String -> [String | Undefined] - * @param {RegExp} rx A regular expression. - * @param {String} str The string to match against - * @return {Array} The list of matches or empty array. - * @see R.test - * @example - * - * R.match(/([a-z]a)/g, 'bananas'); //=> ['ba', 'na', 'na'] - * R.match(/a/, 'b'); //=> [] - * R.match(/a/, null); //=> TypeError: null does not have a method named "match" - */ - var match = _curry2(function match(rx, str) { - return str.match(rx) || []; - }); - - /** - * `mathMod` behaves like the modulo operator should mathematically, unlike the - * `%` operator (and by extension, [`R.modulo`](#modulo)). So while - * `-17 % 5` is `-2`, `mathMod(-17, 5)` is `3`. `mathMod` requires Integer - * arguments, and returns NaN when the modulus is zero or negative. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} m The dividend. - * @param {Number} p the modulus. - * @return {Number} The result of `b mod a`. - * @see R.modulo - * @example - * - * R.mathMod(-17, 5); //=> 3 - * R.mathMod(17, 5); //=> 2 - * R.mathMod(17, -5); //=> NaN - * R.mathMod(17, 0); //=> NaN - * R.mathMod(17.2, 5); //=> NaN - * R.mathMod(17, 5.3); //=> NaN - * - * const clock = R.mathMod(R.__, 12); - * clock(15); //=> 3 - * clock(24); //=> 0 - * - * const seventeenMod = R.mathMod(17); - * seventeenMod(3); //=> 2 - * seventeenMod(4); //=> 1 - * seventeenMod(10); //=> 7 - */ - var mathMod = _curry2(function mathMod(m, p) { - if (!_isInteger(m)) { return NaN; } - if (!_isInteger(p) || p < 1) { return NaN; } - return ((m % p) + p) % p; - }); - - /** - * Takes a function and two values, and returns whichever value produces the - * larger result when passed to the provided function. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Relation - * @sig Ord b => (a -> b) -> a -> a -> a - * @param {Function} f - * @param {*} a - * @param {*} b - * @return {*} - * @see R.max, R.minBy - * @example - * - * // square :: Number -> Number - * const square = n => n * n; - * - * R.maxBy(square, -3, 2); //=> -3 - * - * R.reduce(R.maxBy(square), 0, [3, -5, 4, 1, -2]); //=> -5 - * R.reduce(R.maxBy(square), 0, []); //=> 0 - */ - var maxBy = _curry3(function maxBy(f, a, b) { - return f(b) > f(a) ? b : a; - }); - - /** - * Adds together all the elements of a list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list An array of numbers - * @return {Number} The sum of all the numbers in the list. - * @see R.reduce - * @example - * - * R.sum([2,4,6,8,100,1]); //=> 121 - */ - var sum = reduce(add, 0); - - /** - * Returns the mean of the given list of numbers. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list - * @return {Number} - * @see R.median - * @example - * - * R.mean([2, 7, 9]); //=> 6 - * R.mean([]); //=> NaN - */ - var mean = _curry1(function mean(list) { - return sum(list) / list.length; - }); - - /** - * Returns the median of the given list of numbers. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list - * @return {Number} - * @see R.mean - * @example - * - * R.median([2, 9, 7]); //=> 7 - * R.median([7, 2, 10, 9]); //=> 8 - * R.median([]); //=> NaN - */ - var median = _curry1(function median(list) { - var len = list.length; - if (len === 0) { - return NaN; - } - var width = 2 - len % 2; - var idx = (len - width) / 2; - return mean(Array.prototype.slice.call(list, 0).sort(function(a, b) { - return a < b ? -1 : a > b ? 1 : 0; - }).slice(idx, idx + width)); - }); - - /** - * Creates a new function that, when invoked, caches the result of calling `fn` - * for a given argument set and returns the result. Subsequent calls to the - * memoized `fn` with the same argument set will not result in an additional - * call to `fn`; instead, the cached result for that set of arguments will be - * returned. - * - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Function - * @sig (*... -> String) -> (*... -> a) -> (*... -> a) - * @param {Function} fn The function to generate the cache key. - * @param {Function} fn The function to memoize. - * @return {Function} Memoized version of `fn`. - * @example - * - * let count = 0; - * const factorial = R.memoizeWith(R.identity, n => { - * count += 1; - * return R.product(R.range(1, n + 1)); - * }); - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * count; //=> 1 - */ - var memoizeWith = _curry2(function memoizeWith(mFn, fn) { - var cache = {}; - return _arity(fn.length, function() { - var key = mFn.apply(this, arguments); - if (!_has(key, cache)) { - cache[key] = fn.apply(this, arguments); - } - return cache[key]; - }); - }); - - /** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeRight, R.mergeDeepRight, R.mergeWith, R.mergeWithKey - * @deprecated since v0.26.0 - * @example - * - * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * const withDefaults = R.merge({x: 0, y: 0}); - * withDefaults({y: 2}); //=> {x: 0, y: 2} - * @symb R.merge(a, b) = {...a, ...b} - */ - var merge = _curry2(function merge(l, r) { - return _objectAssign$1({}, l, r); - }); - - /** - * Merges a list of objects together into one object. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig [{k: v}] -> {k: v} - * @param {Array} list An array of objects - * @return {Object} A merged object. - * @see R.reduce - * @example - * - * R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3} - * R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2} - * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 } - */ - var mergeAll = _curry1(function mergeAll(list) { - return _objectAssign$1.apply(null, [{}].concat(list)); - }); - - /** - * Creates a new object with the own properties of the two provided objects. If - * a key exists in both objects, the provided function is applied to the key - * and the values associated with the key in each object, with the result being - * used as the value associated with the key in the returned object. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeDeepWithKey, R.merge, R.mergeWith - * @example - * - * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r - * R.mergeWithKey(concatValues, - * { a: true, thing: 'foo', values: [10, 20] }, - * { b: true, thing: 'bar', values: [15, 35] }); - * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] } - * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 } - */ - var mergeWithKey = _curry3(function mergeWithKey(fn, l, r) { - var result = {}; - var k; - - for (k in l) { - if (_has(k, l)) { - result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k]; - } - } - - for (k in r) { - if (_has(k, r) && !(_has(k, result))) { - result[k] = r[k]; - } - } - - return result; - }); - - /** - * Creates a new object with the own properties of the two provided objects. - * If a key exists in both objects: - * - and both associated values are also objects then the values will be - * recursively merged. - * - otherwise the provided function is applied to the key and associated values - * using the resulting value as the new value associated with the key. - * If a key only exists in one object, the value will be associated with the key - * of the resulting object. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.mergeWithKey, R.mergeDeepWith - * @example - * - * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r - * R.mergeDeepWithKey(concatValues, - * { a: true, c: { thing: 'foo', values: [10, 20] }}, - * { b: true, c: { thing: 'bar', values: [15, 35] }}); - * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }} - */ - var mergeDeepWithKey = _curry3(function mergeDeepWithKey(fn, lObj, rObj) { - return mergeWithKey(function(k, lVal, rVal) { - if (_isObject(lVal) && _isObject(rVal)) { - return mergeDeepWithKey(fn, lVal, rVal); - } else { - return fn(k, lVal, rVal); - } - }, lObj, rObj); - }); - - /** - * Creates a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects: - * - and both values are objects, the two values will be recursively merged - * - otherwise the value from the first object will be used. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig {a} -> {a} -> {a} - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.merge, R.mergeDeepRight, R.mergeDeepWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepLeft({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, - * { age: 40, contact: { email: 'baa@example.com' }}); - * //=> { name: 'fred', age: 10, contact: { email: 'moo@example.com' }} - */ - var mergeDeepLeft = _curry2(function mergeDeepLeft(lObj, rObj) { - return mergeDeepWithKey(function(k, lVal, rVal) { - return lVal; - }, lObj, rObj); - }); - - /** - * Creates a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects: - * - and both values are objects, the two values will be recursively merged - * - otherwise the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig {a} -> {a} -> {a} - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, - * { age: 40, contact: { email: 'baa@example.com' }}); - * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }} - */ - var mergeDeepRight = _curry2(function mergeDeepRight(lObj, rObj) { - return mergeDeepWithKey(function(k, lVal, rVal) { - return rVal; - }, lObj, rObj); - }); - - /** - * Creates a new object with the own properties of the two provided objects. - * If a key exists in both objects: - * - and both associated values are also objects then the values will be - * recursively merged. - * - otherwise the provided function is applied to associated values using the - * resulting value as the new value associated with the key. - * If a key only exists in one object, the value will be associated with the key - * of the resulting object. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig ((a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.mergeWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepWith(R.concat, - * { a: true, c: { values: [10, 20] }}, - * { b: true, c: { values: [15, 35] }}); - * //=> { a: true, b: true, c: { values: [10, 20, 15, 35] }} - */ - var mergeDeepWith = _curry3(function mergeDeepWith(fn, lObj, rObj) { - return mergeDeepWithKey(function(k, lVal, rVal) { - return fn(lVal, rVal); - }, lObj, rObj); - }); - - /** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the first object will be used. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeRight, R.mergeDeepLeft, R.mergeWith, R.mergeWithKey - * @example - * - * R.mergeLeft({ 'age': 40 }, { 'name': 'fred', 'age': 10 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * const resetToDefault = R.mergeLeft({x: 0}); - * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2} - * @symb R.mergeLeft(a, b) = {...b, ...a} - */ - var mergeLeft = _curry2(function mergeLeft(l, r) { - return _objectAssign$1({}, r, l); - }); - - /** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeLeft, R.mergeDeepRight, R.mergeWith, R.mergeWithKey - * @example - * - * R.mergeRight({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * const withDefaults = R.mergeRight({x: 0, y: 0}); - * withDefaults({y: 2}); //=> {x: 0, y: 2} - * @symb R.mergeRight(a, b) = {...a, ...b} - */ - var mergeRight = _curry2(function mergeRight(l, r) { - return _objectAssign$1({}, l, r); - }); - - /** - * Creates a new object with the own properties of the two provided objects. If - * a key exists in both objects, the provided function is applied to the values - * associated with the key in each object, with the result being used as the - * value associated with the key in the returned object. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @sig ((a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeDeepWith, R.merge, R.mergeWithKey - * @example - * - * R.mergeWith(R.concat, - * { a: true, values: [10, 20] }, - * { b: true, values: [15, 35] }); - * //=> { a: true, b: true, values: [10, 20, 15, 35] } - */ - var mergeWith = _curry3(function mergeWith(fn, l, r) { - return mergeWithKey(function(_, _l, _r) { - return fn(_l, _r); - }, l, r); - }); - - /** - * Returns the smaller of its two arguments. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> a - * @param {*} a - * @param {*} b - * @return {*} - * @see R.minBy, R.max - * @example - * - * R.min(789, 123); //=> 123 - * R.min('a', 'b'); //=> 'a' - */ - var min = _curry2(function min(a, b) { return b < a ? b : a; }); - - /** - * Takes a function and two values, and returns whichever value produces the - * smaller result when passed to the provided function. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Relation - * @sig Ord b => (a -> b) -> a -> a -> a - * @param {Function} f - * @param {*} a - * @param {*} b - * @return {*} - * @see R.min, R.maxBy - * @example - * - * // square :: Number -> Number - * const square = n => n * n; - * - * R.minBy(square, -3, 2); //=> 2 - * - * R.reduce(R.minBy(square), Infinity, [3, -5, 4, 1, -2]); //=> 1 - * R.reduce(R.minBy(square), Infinity, []); //=> Infinity - */ - var minBy = _curry3(function minBy(f, a, b) { - return f(b) < f(a) ? b : a; - }); - - /** - * Divides the first parameter by the second and returns the remainder. Note - * that this function preserves the JavaScript-style behavior for modulo. For - * mathematical modulo see [`mathMod`](#mathMod). - * - * @func - * @memberOf R - * @since v0.1.1 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The value to the divide. - * @param {Number} b The pseudo-modulus - * @return {Number} The result of `b % a`. - * @see R.mathMod - * @example - * - * R.modulo(17, 3); //=> 2 - * // JS behavior: - * R.modulo(-17, 3); //=> -2 - * R.modulo(17, -3); //=> 2 - * - * const isOdd = R.modulo(R.__, 2); - * isOdd(42); //=> 0 - * isOdd(21); //=> 1 - */ - var modulo = _curry2(function modulo(a, b) { return a % b; }); - - /** - * Move an item, at index `from`, to index `to`, in a list of elements. - * A new list will be created containing the new elements order. - * - * @func - * @memberOf R - * @since v0.27.1 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @param {Number} from The source index - * @param {Number} to The destination index - * @param {Array} list The list which will serve to realise the move - * @return {Array} The new list reordered - * @example - * - * R.move(0, 2, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['b', 'c', 'a', 'd', 'e', 'f'] - * R.move(-1, 0, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['f', 'a', 'b', 'c', 'd', 'e'] list rotation - */ - var move = _curry3(function(from, to, list) { - var length = list.length; - var result = list.slice(); - var positiveFrom = from < 0 ? length + from : from; - var positiveTo = to < 0 ? length + to : to; - var item = result.splice(positiveFrom, 1); - - return positiveFrom < 0 || positiveFrom >= list.length - || positiveTo < 0 || positiveTo >= list.length - ? list - : [] - .concat(result.slice(0, positiveTo)) - .concat(item) - .concat(result.slice(positiveTo, list.length)); - }); - - /** - * Multiplies two numbers. Equivalent to `a * b` but curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a * b`. - * @see R.divide - * @example - * - * const double = R.multiply(2); - * const triple = R.multiply(3); - * double(3); //=> 6 - * triple(4); //=> 12 - * R.multiply(2, 5); //=> 10 - */ - var multiply = _curry2(function multiply(a, b) { return a * b; }); - - /** - * Negates its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} - * @example - * - * R.negate(42); //=> -42 - */ - var negate = _curry1(function negate(n) { return -n; }); - - /** - * Returns `true` if no elements of the list match the predicate, `false` - * otherwise. - * - * Dispatches to the `all` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise. - * @see R.all, R.any - * @example - * - * const isEven = n => n % 2 === 0; - * const isOdd = n => n % 2 === 1; - * - * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true - * R.none(isOdd, [1, 3, 5, 7, 8, 11]); //=> false - */ - var none = _curry2(function none(fn, input) { - return all(_complement(fn), input); - }); - - /** - * Returns a function which returns its nth argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig Number -> *... -> * - * @param {Number} n - * @return {Function} - * @example - * - * R.nthArg(1)('a', 'b', 'c'); //=> 'b' - * R.nthArg(-1)('a', 'b', 'c'); //=> 'c' - * @symb R.nthArg(-1)(a, b, c) = c - * @symb R.nthArg(0)(a, b, c) = a - * @symb R.nthArg(1)(a, b, c) = b - */ - var nthArg = _curry1(function nthArg(n) { - var arity = n < 0 ? 1 : n + 1; - return curryN(arity, function() { - return nth(n, arguments); - }); - }); - - /** - * `o` is a curried composition function that returns a unary function. - * Like [`compose`](#compose), `o` performs right-to-left function composition. - * Unlike [`compose`](#compose), the rightmost function passed to `o` will be - * invoked with only one argument. Also, unlike [`compose`](#compose), `o` is - * limited to accepting only 2 unary functions. The name o was chosen because - * of its similarity to the mathematical composition operator ∘. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Function - * @sig (b -> c) -> (a -> b) -> a -> c - * @param {Function} f - * @param {Function} g - * @return {Function} - * @see R.compose, R.pipe - * @example - * - * const classyGreeting = name => "The name's " + name.last + ", " + name.first + " " + name.last - * const yellGreeting = R.o(R.toUpper, classyGreeting); - * yellGreeting({first: 'James', last: 'Bond'}); //=> "THE NAME'S BOND, JAMES BOND" - * - * R.o(R.multiply(10), R.add(10))(-4) //=> 60 - * - * @symb R.o(f, g, x) = f(g(x)) - */ - var o = _curry3(function o(f, g, x) { - return f(g(x)); - }); - - function _of(x) { return [x]; } - - /** - * Returns a singleton array containing the value provided. - * - * Note this `of` is different from the ES6 `of`; See - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig a -> [a] - * @param {*} x any value - * @return {Array} An array wrapping `x`. - * @example - * - * R.of(null); //=> [null] - * R.of([42]); //=> [[42]] - */ - var of = _curry1(_of); - - /** - * Returns a partial copy of an object omitting the keys specified. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [String] -> {String: *} -> {String: *} - * @param {Array} names an array of String property names to omit from the new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with properties from `names` not on it. - * @see R.pick - * @example - * - * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3} - */ - var omit = _curry2(function omit(names, obj) { - var result = {}; - var index = {}; - var idx = 0; - var len = names.length; - - while (idx < len) { - index[names[idx]] = 1; - idx += 1; - } - - for (var prop in obj) { - if (!index.hasOwnProperty(prop)) { - result[prop] = obj[prop]; - } - } - return result; - }); - - /** - * Accepts a function `fn` and returns a function that guards invocation of - * `fn` such that `fn` can only ever be called once, no matter how many times - * the returned function is invoked. The first value calculated is returned in - * subsequent invocations. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a... -> b) -> (a... -> b) - * @param {Function} fn The function to wrap in a call-only-once wrapper. - * @return {Function} The wrapped function. - * @example - * - * const addOneOnce = R.once(x => x + 1); - * addOneOnce(10); //=> 11 - * addOneOnce(addOneOnce(50)); //=> 11 - */ - var once = _curry1(function once(fn) { - var called = false; - var result; - return _arity(fn.length, function() { - if (called) { - return result; - } - called = true; - result = fn.apply(this, arguments); - return result; - }); - }); - - function _assertPromise(name, p) { - if (p == null || !_isFunction(p.then)) { - throw new TypeError('`' + name + '` expected a Promise, received ' + _toString(p, [])); - } - } - - /** - * Returns the result of applying the onFailure function to the value inside - * a failed promise. This is useful for handling rejected promises - * inside function compositions. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig (e -> b) -> (Promise e a) -> (Promise e b) - * @sig (e -> (Promise f b)) -> (Promise e a) -> (Promise f b) - * @param {Function} onFailure The function to apply. Can return a value or a promise of a value. - * @param {Promise} p - * @return {Promise} The result of calling `p.then(null, onFailure)` - * @see R.then - * @example - * - * var failedFetch = (id) => Promise.reject('bad ID'); - * var useDefault = () => ({ firstName: 'Bob', lastName: 'Loblaw' }) - * - * //recoverFromFailure :: String -> Promise ({firstName, lastName}) - * var recoverFromFailure = R.pipe( - * failedFetch, - * R.otherwise(useDefault), - * R.then(R.pick(['firstName', 'lastName'])), - * ); - * recoverFromFailure(12345).then(console.log) - */ - var otherwise = _curry2(function otherwise(f, p) { - _assertPromise('otherwise', p); - - return p.then(null, f); - }); - - // `Identity` is a functor that holds a single value, where `map` simply - // transforms the held value with the provided function. - var Identity = function(x) { - return {value: x, map: function(f) { return Identity(f(x)); }}; - }; - - - /** - * Returns the result of "setting" the portion of the given data structure - * focused by the given lens to the result of applying the given function to - * the focused value. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> (a -> a) -> s -> s - * @param {Lens} lens - * @param {*} v - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * const headLens = R.lensIndex(0); - * - * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz'] - */ - var over = _curry3(function over(lens, f, x) { - // The value returned by the getter function is first transformed with `f`, - // then set as the value of an `Identity`. This is then mapped over with the - // setter function of the lens. - return lens(function(y) { return Identity(f(y)); })(x).value; - }); - - /** - * Takes two arguments, `fst` and `snd`, and returns `[fst, snd]`. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category List - * @sig a -> b -> (a,b) - * @param {*} fst - * @param {*} snd - * @return {Array} - * @see R.objOf, R.of - * @example - * - * R.pair('foo', 'bar'); //=> ['foo', 'bar'] - */ - var pair = _curry2(function pair(fst, snd) { return [fst, snd]; }); - - function _createPartialApplicator(concat) { - return _curry2(function(fn, args) { - return _arity(Math.max(0, fn.length - args.length), function() { - return fn.apply(this, concat(args, arguments)); - }); - }); - } - - /** - * Takes a function `f` and a list of arguments, and returns a function `g`. - * When applied, `g` returns the result of applying `f` to the arguments - * provided initially followed by the arguments provided to `g`. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x) - * @param {Function} f - * @param {Array} args - * @return {Function} - * @see R.partialRight, R.curry - * @example - * - * const multiply2 = (a, b) => a * b; - * const double = R.partial(multiply2, [2]); - * double(2); //=> 4 - * - * const greet = (salutation, title, firstName, lastName) => - * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; - * - * const sayHello = R.partial(greet, ['Hello']); - * const sayHelloToMs = R.partial(sayHello, ['Ms.']); - * sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!' - * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d) - */ - var partial = _createPartialApplicator(_concat); - - /** - * Takes a function `f` and a list of arguments, and returns a function `g`. - * When applied, `g` returns the result of applying `f` to the arguments - * provided to `g` followed by the arguments provided initially. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x) - * @param {Function} f - * @param {Array} args - * @return {Function} - * @see R.partial - * @example - * - * const greet = (salutation, title, firstName, lastName) => - * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; - * - * const greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']); - * - * greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!' - * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b) - */ - var partialRight = _createPartialApplicator(flip(_concat)); - - /** - * Takes a predicate and a list or other `Filterable` object and returns the - * pair of filterable objects of the same type of elements which do and do not - * satisfy, the predicate, respectively. Filterable objects include plain objects or any object - * that has a filter method such as `Array`. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> [f a, f a] - * @param {Function} pred A predicate to determine which side the element belongs to. - * @param {Array} filterable the list (or other filterable) to partition. - * @return {Array} An array, containing first the subset of elements that satisfy the - * predicate, and second the subset of elements that do not satisfy. - * @see R.filter, R.reject - * @example - * - * R.partition(R.includes('s'), ['sss', 'ttt', 'foo', 'bars']); - * // => [ [ 'sss', 'bars' ], [ 'ttt', 'foo' ] ] - * - * R.partition(R.includes('s'), { a: 'sss', b: 'ttt', foo: 'bars' }); - * // => [ { a: 'sss', foo: 'bars' }, { b: 'ttt' } ] - */ - var partition = juxt([filter, reject]); - - /** - * Determines whether a nested path on an object has a specific value, in - * [`R.equals`](#equals) terms. Most likely used to filter a list. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Relation - * @typedefn Idx = String | Int - * @sig [Idx] -> a -> {a} -> Boolean - * @param {Array} path The path of the nested property to use - * @param {*} val The value to compare the nested property with - * @param {Object} obj The object to check the nested property in - * @return {Boolean} `true` if the value equals the nested object property, - * `false` otherwise. - * @example - * - * const user1 = { address: { zipCode: 90210 } }; - * const user2 = { address: { zipCode: 55555 } }; - * const user3 = { name: 'Bob' }; - * const users = [ user1, user2, user3 ]; - * const isFamous = R.pathEq(['address', 'zipCode'], 90210); - * R.filter(isFamous, users); //=> [ user1 ] - */ - var pathEq = _curry3(function pathEq(_path, val, obj) { - return equals(path(_path, obj), val); - }); - - /** - * If the given, non-null object has a value at the given path, returns the - * value at that path. Otherwise returns the provided default value. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Object - * @typedefn Idx = String | Int - * @sig a -> [Idx] -> {a} -> a - * @param {*} d The default value. - * @param {Array} p The path to use. - * @param {Object} obj The object to retrieve the nested property from. - * @return {*} The data at `path` of the supplied object or the default value. - * @example - * - * R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2 - * R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A" - */ - var pathOr = _curry3(function pathOr(d, p, obj) { - return defaultTo(d, path(p, obj)); - }); - - /** - * Returns `true` if the specified object property at given path satisfies the - * given predicate; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Logic - * @typedefn Idx = String | Int - * @sig (a -> Boolean) -> [Idx] -> {a} -> Boolean - * @param {Function} pred - * @param {Array} propPath - * @param {*} obj - * @return {Boolean} - * @see R.propSatisfies, R.path - * @example - * - * R.pathSatisfies(y => y > 0, ['x', 'y'], {x: {y: 2}}); //=> true - * R.pathSatisfies(R.is(Object), [], {x: {y: 2}}); //=> true - */ - var pathSatisfies = _curry3(function pathSatisfies(pred, propPath, obj) { - return pred(path(propPath, obj)); - }); - - /** - * Returns a partial copy of an object containing only the keys specified. If - * the key does not exist, the property is ignored. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> {k: v} - * @param {Array} names an array of String property names to copy onto a new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties from `names` on it. - * @see R.omit, R.props - * @example - * - * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} - * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1} - */ - var pick = _curry2(function pick(names, obj) { - var result = {}; - var idx = 0; - while (idx < names.length) { - if (names[idx] in obj) { - result[names[idx]] = obj[names[idx]]; - } - idx += 1; - } - return result; - }); - - /** - * Similar to `pick` except that this one includes a `key: undefined` pair for - * properties that don't exist. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> {k: v} - * @param {Array} names an array of String property names to copy onto a new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties from `names` on it. - * @see R.pick - * @example - * - * R.pickAll(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} - * R.pickAll(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined} - */ - var pickAll = _curry2(function pickAll(names, obj) { - var result = {}; - var idx = 0; - var len = names.length; - while (idx < len) { - var name = names[idx]; - result[name] = obj[name]; - idx += 1; - } - return result; - }); - - /** - * Returns a partial copy of an object containing only the keys that satisfy - * the supplied predicate. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @sig ((v, k) -> Boolean) -> {k: v} -> {k: v} - * @param {Function} pred A predicate to determine whether or not a key - * should be included on the output object. - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties that satisfy `pred` - * on it. - * @see R.pick, R.filter - * @example - * - * const isUpperCase = (val, key) => key.toUpperCase() === key; - * R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4} - */ - var pickBy = _curry2(function pickBy(test, obj) { - var result = {}; - for (var prop in obj) { - if (test(obj[prop], prop, obj)) { - result[prop] = obj[prop]; - } - } - return result; - }); - - /** - * Returns the left-to-right Kleisli composition of the provided functions, - * each of which must return a value of a type supported by [`chain`](#chain). - * - * `R.pipeK(f, g, h)` is equivalent to `R.pipe(f, R.chain(g), R.chain(h))`. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Function - * @sig Chain m => ((a -> m b), (b -> m c), ..., (y -> m z)) -> (a -> m z) - * @param {...Function} - * @return {Function} - * @see R.composeK - * @deprecated since v0.26.0 - * @example - * - * // parseJson :: String -> Maybe * - * // get :: String -> Object -> Maybe * - * - * // getStateCode :: Maybe String -> Maybe String - * const getStateCode = R.pipeK( - * parseJson, - * get('user'), - * get('address'), - * get('state'), - * R.compose(Maybe.of, R.toUpper) - * ); - * - * getStateCode('{"user":{"address":{"state":"ny"}}}'); - * //=> Just('NY') - * getStateCode('[Invalid JSON]'); - * //=> Nothing() - * @symb R.pipeK(f, g, h)(a) = R.chain(h, R.chain(g, f(a))) - */ - function pipeK() { - if (arguments.length === 0) { - throw new Error('pipeK requires at least one argument'); - } - return composeK.apply(this, reverse(arguments)); - } - - /** - * Returns a new list with the given element at the front, followed by the - * contents of the list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} el The item to add to the head of the output list. - * @param {Array} list The array to add to the tail of the output list. - * @return {Array} A new array. - * @see R.append - * @example - * - * R.prepend('fee', ['fi', 'fo', 'fum']); //=> ['fee', 'fi', 'fo', 'fum'] - */ - var prepend = _curry2(function prepend(el, list) { - return _concat([el], list); - }); - - /** - * Multiplies together all the elements of a list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list An array of numbers - * @return {Number} The product of all the numbers in the list. - * @see R.reduce - * @example - * - * R.product([2,4,6,8,100,1]); //=> 38400 - */ - var product = reduce(multiply, 1); - - /** - * Accepts a function `fn` and a list of transformer functions and returns a - * new curried function. When the new function is invoked, it calls the - * function `fn` with parameters consisting of the result of calling each - * supplied handler on successive arguments to the new function. - * - * If more arguments are passed to the returned function than transformer - * functions, those arguments are passed directly to `fn` as additional - * parameters. If you expect additional arguments that don't need to be - * transformed, although you can ignore them, it's best to pass an identity - * function so that the new function reports the correct arity. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((x1, x2, ...) -> z) -> [(a -> x1), (b -> x2), ...] -> (a -> b -> ... -> z) - * @param {Function} fn The function to wrap. - * @param {Array} transformers A list of transformer functions - * @return {Function} The wrapped function. - * @see R.converge - * @example - * - * R.useWith(Math.pow, [R.identity, R.identity])(3, 4); //=> 81 - * R.useWith(Math.pow, [R.identity, R.identity])(3)(4); //=> 81 - * R.useWith(Math.pow, [R.dec, R.inc])(3, 4); //=> 32 - * R.useWith(Math.pow, [R.dec, R.inc])(3)(4); //=> 32 - * @symb R.useWith(f, [g, h])(a, b) = f(g(a), h(b)) - */ - var useWith = _curry2(function useWith(fn, transformers) { - return curryN(transformers.length, function() { - var args = []; - var idx = 0; - while (idx < transformers.length) { - args.push(transformers[idx].call(this, arguments[idx])); - idx += 1; - } - return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, transformers.length))); - }); - }); - - /** - * Reasonable analog to SQL `select` statement. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @category Relation - * @sig [k] -> [{k: v}] -> [{k: v}] - * @param {Array} props The property names to project - * @param {Array} objs The objects to query - * @return {Array} An array of objects with just the `props` properties. - * @example - * - * const abby = {name: 'Abby', age: 7, hair: 'blond', grade: 2}; - * const fred = {name: 'Fred', age: 12, hair: 'brown', grade: 7}; - * const kids = [abby, fred]; - * R.project(['name', 'grade'], kids); //=> [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}] - */ - var project = useWith(_map, [pickAll, identity]); // passing `identity` gives correct arity - - /** - * Returns `true` if the specified object property is equal, in - * [`R.equals`](#equals) terms, to the given value; `false` otherwise. - * You can test multiple properties with [`R.whereEq`](#whereEq). - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig String -> a -> Object -> Boolean - * @param {String} name - * @param {*} val - * @param {*} obj - * @return {Boolean} - * @see R.whereEq, R.propSatisfies, R.equals - * @example - * - * const abby = {name: 'Abby', age: 7, hair: 'blond'}; - * const fred = {name: 'Fred', age: 12, hair: 'brown'}; - * const rusty = {name: 'Rusty', age: 10, hair: 'brown'}; - * const alois = {name: 'Alois', age: 15, disposition: 'surly'}; - * const kids = [abby, fred, rusty, alois]; - * const hasBrownHair = R.propEq('hair', 'brown'); - * R.filter(hasBrownHair, kids); //=> [fred, rusty] - */ - var propEq = _curry3(function propEq(name, val, obj) { - return equals(val, obj[name]); - }); - - /** - * Returns `true` if the specified object property is of the given type; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Type - * @sig Type -> String -> Object -> Boolean - * @param {Function} type - * @param {String} name - * @param {*} obj - * @return {Boolean} - * @see R.is, R.propSatisfies - * @example - * - * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true - * R.propIs(Number, 'x', {x: 'foo'}); //=> false - * R.propIs(Number, 'x', {}); //=> false - */ - var propIs = _curry3(function propIs(type, name, obj) { - return is(type, obj[name]); - }); - - /** - * If the given, non-null object has an own property with the specified name, - * returns the value of that property. Otherwise returns the provided default - * value. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Object - * @sig a -> String -> Object -> a - * @param {*} val The default value. - * @param {String} p The name of the property to return. - * @param {Object} obj The object to query. - * @return {*} The value of given property of the supplied object or the default value. - * @example - * - * const alice = { - * name: 'ALICE', - * age: 101 - * }; - * const favorite = R.prop('favoriteLibrary'); - * const favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary'); - * - * favorite(alice); //=> undefined - * favoriteWithDefault(alice); //=> 'Ramda' - */ - var propOr = _curry3(function propOr(val, p, obj) { - return pathOr(val, [p], obj); - }); - - /** - * Returns `true` if the specified object property satisfies the given - * predicate; `false` otherwise. You can test multiple properties with - * [`R.where`](#where). - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Logic - * @sig (a -> Boolean) -> String -> {String: a} -> Boolean - * @param {Function} pred - * @param {String} name - * @param {*} obj - * @return {Boolean} - * @see R.where, R.propEq, R.propIs - * @example - * - * R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true - */ - var propSatisfies = _curry3(function propSatisfies(pred, name, obj) { - return pred(obj[name]); - }); - - /** - * Acts as multiple `prop`: array of keys in, array of values out. Preserves - * order. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> [v] - * @param {Array} ps The property names to fetch - * @param {Object} obj The object to query - * @return {Array} The corresponding values or partially applied function. - * @example - * - * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2] - * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2] - * - * const fullName = R.compose(R.join(' '), R.props(['first', 'last'])); - * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth' - */ - var props = _curry2(function props(ps, obj) { - return ps.map(function(p) { - return path([p], obj); - }); - }); - - /** - * Returns a list of numbers from `from` (inclusive) to `to` (exclusive). - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> Number -> [Number] - * @param {Number} from The first number in the list. - * @param {Number} to One more than the last number in the list. - * @return {Array} The list of numbers in the set `[a, b)`. - * @example - * - * R.range(1, 5); //=> [1, 2, 3, 4] - * R.range(50, 53); //=> [50, 51, 52] - */ - var range = _curry2(function range(from, to) { - if (!(_isNumber(from) && _isNumber(to))) { - throw new TypeError('Both arguments to range must be numbers'); - } - var result = []; - var n = from; - while (n < to) { - result.push(n); - n += 1; - } - return result; - }); - - /** - * Returns a single item by iterating through the list, successively calling - * the iterator function and passing it an accumulator value and the current - * value from the array, and then passing the result to the next call. - * - * Similar to [`reduce`](#reduce), except moves through the input list from the - * right to the left. - * - * The iterator function receives two values: *(value, acc)*, while the arguments' - * order of `reduce`'s iterator function is *(acc, value)*. - * - * Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.reduceRight` method. For more details - * on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, b) -> b) -> b -> [a] -> b - * @param {Function} fn The iterator function. Receives two values, the current element from the array - * and the accumulator. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.addIndex - * @example - * - * R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2 - * // - -2 - * // / \ / \ - * // 1 - 1 3 - * // / \ / \ - * // 2 - ==> 2 -1 - * // / \ / \ - * // 3 - 3 4 - * // / \ / \ - * // 4 0 4 0 - * - * @symb R.reduceRight(f, a, [b, c, d]) = f(b, f(c, f(d, a))) - */ - var reduceRight = _curry3(function reduceRight(fn, acc, list) { - var idx = list.length - 1; - while (idx >= 0) { - acc = fn(list[idx], acc); - idx -= 1; - } - return acc; - }); - - /** - * Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating - * through the list, successively calling the iterator function. `reduceWhile` - * also takes a predicate that is evaluated before each step. If the predicate - * returns `false`, it "short-circuits" the iteration and returns the current - * value of the accumulator. - * - * @func - * @memberOf R - * @since v0.22.0 - * @category List - * @sig ((a, b) -> Boolean) -> ((a, b) -> a) -> a -> [b] -> a - * @param {Function} pred The predicate. It is passed the accumulator and the - * current element. - * @param {Function} fn The iterator function. Receives two values, the - * accumulator and the current element. - * @param {*} a The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.reduced - * @example - * - * const isOdd = (acc, x) => x % 2 === 1; - * const xs = [1, 3, 5, 60, 777, 800]; - * R.reduceWhile(isOdd, R.add, 0, xs); //=> 9 - * - * const ys = [2, 4, 6] - * R.reduceWhile(isOdd, R.add, 111, ys); //=> 111 - */ - var reduceWhile = _curryN(4, [], function _reduceWhile(pred, fn, a, list) { - return _reduce(function(acc, x) { - return pred(acc, x) ? fn(acc, x) : _reduced(acc); - }, a, list); - }); - - /** - * Returns a value wrapped to indicate that it is the final value of the reduce - * and transduce functions. The returned value should be considered a black - * box: the internal structure is not guaranteed to be stable. - * - * Note: this optimization is only available to the below functions: - * - [`reduce`](#reduce) - * - [`reduceWhile`](#reduceWhile) - * - [`transduce`](#transduce) - * - * @func - * @memberOf R - * @since v0.15.0 - * @category List - * @sig a -> * - * @param {*} x The final value of the reduce. - * @return {*} The wrapped value. - * @see R.reduce, R.reduceWhile, R.transduce - * @example - * - * R.reduce( - * (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item), - * [], - * [1, 2, 3, 4, 5]) // [1, 2, 3] - */ - var reduced = _curry1(_reduced); - - /** - * Calls an input function `n` times, returning an array containing the results - * of those function calls. - * - * `fn` is passed one argument: The current value of `n`, which begins at `0` - * and is gradually incremented to `n - 1`. - * - * @func - * @memberOf R - * @since v0.2.3 - * @category List - * @sig (Number -> a) -> Number -> [a] - * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`. - * @param {Number} n A value between `0` and `n - 1`. Increments after each function call. - * @return {Array} An array containing the return values of all calls to `fn`. - * @see R.repeat - * @example - * - * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4] - * @symb R.times(f, 0) = [] - * @symb R.times(f, 1) = [f(0)] - * @symb R.times(f, 2) = [f(0), f(1)] - */ - var times = _curry2(function times(fn, n) { - var len = Number(n); - var idx = 0; - var list; - - if (len < 0 || isNaN(len)) { - throw new RangeError('n must be a non-negative number'); - } - list = new Array(len); - while (idx < len) { - list[idx] = fn(idx); - idx += 1; - } - return list; - }); - - /** - * Returns a fixed list of size `n` containing a specified identical value. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig a -> n -> [a] - * @param {*} value The value to repeat. - * @param {Number} n The desired size of the output list. - * @return {Array} A new array containing `n` `value`s. - * @see R.times - * @example - * - * R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi'] - * - * const obj = {}; - * const repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}] - * repeatedObjs[0] === repeatedObjs[1]; //=> true - * @symb R.repeat(a, 0) = [] - * @symb R.repeat(a, 1) = [a] - * @symb R.repeat(a, 2) = [a, a] - */ - var repeat = _curry2(function repeat(value, n) { - return times(always(value), n); - }); - - /** - * Replace a substring or regex match in a string with a replacement. - * - * The first two parameters correspond to the parameters of the - * `String.prototype.replace()` function, so the second parameter can also be a - * function. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category String - * @sig RegExp|String -> String -> String -> String - * @param {RegExp|String} pattern A regular expression or a substring to match. - * @param {String} replacement The string to replace the matches with. - * @param {String} str The String to do the search and replacement in. - * @return {String} The result. - * @example - * - * R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo' - * R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo' - * - * // Use the "g" (global) flag to replace all occurrences: - * R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar' - */ - var replace = _curry3(function replace(regex, replacement, str) { - return str.replace(regex, replacement); - }); - - /** - * Scan is similar to [`reduce`](#reduce), but returns a list of successively - * reduced values from the left - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig ((a, b) -> a) -> a -> [b] -> [a] - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {Array} A list of all intermediately reduced values. - * @see R.reduce, R.mapAccum - * @example - * - * const numbers = [1, 2, 3, 4]; - * const factorials = R.scan(R.multiply, 1, numbers); //=> [1, 1, 2, 6, 24] - * @symb R.scan(f, a, [b, c]) = [a, f(a, b), f(f(a, b), c)] - */ - var scan = _curry3(function scan(fn, acc, list) { - var idx = 0; - var len = list.length; - var result = [acc]; - while (idx < len) { - acc = fn(acc, list[idx]); - result[idx + 1] = acc; - idx += 1; - } - return result; - }); - - /** - * Transforms a [Traversable](https://github.com/fantasyland/fantasy-land#traversable) - * of [Applicative](https://github.com/fantasyland/fantasy-land#applicative) into an - * Applicative of Traversable. - * - * Dispatches to the `sequence` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (Applicative f, Traversable t) => (a -> f a) -> t (f a) -> f (t a) - * @param {Function} of - * @param {*} traversable - * @return {*} - * @see R.traverse - * @example - * - * R.sequence(Maybe.of, [Just(1), Just(2), Just(3)]); //=> Just([1, 2, 3]) - * R.sequence(Maybe.of, [Just(1), Just(2), Nothing()]); //=> Nothing() - * - * R.sequence(R.of, Just([1, 2, 3])); //=> [Just(1), Just(2), Just(3)] - * R.sequence(R.of, Nothing()); //=> [Nothing()] - */ - var sequence = _curry2(function sequence(of, traversable) { - return typeof traversable.sequence === 'function' ? - traversable.sequence(of) : - reduceRight( - function(x, acc) { return ap(map(prepend, x), acc); }, - of([]), - traversable - ); - }); - - /** - * Returns the result of "setting" the portion of the given data structure - * focused by the given lens to the given value. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> a -> s -> s - * @param {Lens} lens - * @param {*} v - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * const xLens = R.lensProp('x'); - * - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.set(xLens, 8, {x: 1, y: 2}); //=> {x: 8, y: 2} - */ - var set = _curry3(function set(lens, v, x) { - return over(lens, always(v), x); - }); - - /** - * Returns a copy of the list, sorted according to the comparator function, - * which should accept two values at a time and return a negative number if the - * first value is smaller, a positive number if it's larger, and zero if they - * are equal. Please note that this is a **copy** of the list. It does not - * modify the original. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, a) -> Number) -> [a] -> [a] - * @param {Function} comparator A sorting function :: a -> b -> Int - * @param {Array} list The list to sort - * @return {Array} a new array with its elements sorted by the comparator function. - * @example - * - * const diff = function(a, b) { return a - b; }; - * R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7] - */ - var sort = _curry2(function sort(comparator, list) { - return Array.prototype.slice.call(list, 0).sort(comparator); - }); - - /** - * Sorts the list according to the supplied function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord b => (a -> b) -> [a] -> [a] - * @param {Function} fn - * @param {Array} list The list to sort. - * @return {Array} A new list sorted by the keys generated by `fn`. - * @example - * - * const sortByFirstItem = R.sortBy(R.prop(0)); - * const pairs = [[-1, 1], [-2, 2], [-3, 3]]; - * sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]] - * - * const sortByNameCaseInsensitive = R.sortBy(R.compose(R.toLower, R.prop('name'))); - * const alice = { - * name: 'ALICE', - * age: 101 - * }; - * const bob = { - * name: 'Bob', - * age: -10 - * }; - * const clara = { - * name: 'clara', - * age: 314.159 - * }; - * const people = [clara, bob, alice]; - * sortByNameCaseInsensitive(people); //=> [alice, bob, clara] - */ - var sortBy = _curry2(function sortBy(fn, list) { - return Array.prototype.slice.call(list, 0).sort(function(a, b) { - var aa = fn(a); - var bb = fn(b); - return aa < bb ? -1 : aa > bb ? 1 : 0; - }); - }); - - /** - * Sorts a list according to a list of comparators. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Relation - * @sig [(a, a) -> Number] -> [a] -> [a] - * @param {Array} functions A list of comparator functions. - * @param {Array} list The list to sort. - * @return {Array} A new list sorted according to the comarator functions. - * @example - * - * const alice = { - * name: 'alice', - * age: 40 - * }; - * const bob = { - * name: 'bob', - * age: 30 - * }; - * const clara = { - * name: 'clara', - * age: 40 - * }; - * const people = [clara, bob, alice]; - * const ageNameSort = R.sortWith([ - * R.descend(R.prop('age')), - * R.ascend(R.prop('name')) - * ]); - * ageNameSort(people); //=> [alice, clara, bob] - */ - var sortWith = _curry2(function sortWith(fns, list) { - return Array.prototype.slice.call(list, 0).sort(function(a, b) { - var result = 0; - var i = 0; - while (result === 0 && i < fns.length) { - result = fns[i](a, b); - i += 1; - } - return result; - }); - }); - - /** - * Splits a string into an array of strings based on the given - * separator. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category String - * @sig (String | RegExp) -> String -> [String] - * @param {String|RegExp} sep The pattern. - * @param {String} str The string to separate into an array. - * @return {Array} The array of strings from `str` separated by `sep`. - * @see R.join - * @example - * - * const pathComponents = R.split('/'); - * R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node'] - * - * R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd'] - */ - var split = invoker(1, 'split'); - - /** - * Splits a given list or string at a given index. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig Number -> [a] -> [[a], [a]] - * @sig Number -> String -> [String, String] - * @param {Number} index The index where the array/string is split. - * @param {Array|String} array The array/string to be split. - * @return {Array} - * @example - * - * R.splitAt(1, [1, 2, 3]); //=> [[1], [2, 3]] - * R.splitAt(5, 'hello world'); //=> ['hello', ' world'] - * R.splitAt(-1, 'foobar'); //=> ['fooba', 'r'] - */ - var splitAt = _curry2(function splitAt(index, array) { - return [slice(0, index, array), slice(index, length(array), array)]; - }); - - /** - * Splits a collection into slices of the specified length. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [[a]] - * @sig Number -> String -> [String] - * @param {Number} n - * @param {Array} list - * @return {Array} - * @example - * - * R.splitEvery(3, [1, 2, 3, 4, 5, 6, 7]); //=> [[1, 2, 3], [4, 5, 6], [7]] - * R.splitEvery(3, 'foobarbaz'); //=> ['foo', 'bar', 'baz'] - */ - var splitEvery = _curry2(function splitEvery(n, list) { - if (n <= 0) { - throw new Error('First argument to splitEvery must be a positive integer'); - } - var result = []; - var idx = 0; - while (idx < list.length) { - result.push(slice(idx, idx += n, list)); - } - return result; - }); - - /** - * Takes a list and a predicate and returns a pair of lists with the following properties: - * - * - the result of concatenating the two output lists is equivalent to the input list; - * - none of the elements of the first output list satisfies the predicate; and - * - if the second output list is non-empty, its first element satisfies the predicate. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [[a], [a]] - * @param {Function} pred The predicate that determines where the array is split. - * @param {Array} list The array to be split. - * @return {Array} - * @example - * - * R.splitWhen(R.equals(2), [1, 2, 3, 1, 2, 3]); //=> [[1], [2, 3, 1, 2, 3]] - */ - var splitWhen = _curry2(function splitWhen(pred, list) { - var idx = 0; - var len = list.length; - var prefix = []; - - while (idx < len && !pred(list[idx])) { - prefix.push(list[idx]); - idx += 1; - } - - return [prefix, Array.prototype.slice.call(list, idx)]; - }); - - /** - * Checks if a list starts with the provided sublist. - * - * Similarly, checks if a string starts with the provided substring. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category List - * @sig [a] -> [a] -> Boolean - * @sig String -> String -> Boolean - * @param {*} prefix - * @param {*} list - * @return {Boolean} - * @see R.endsWith - * @example - * - * R.startsWith('a', 'abc') //=> true - * R.startsWith('b', 'abc') //=> false - * R.startsWith(['a'], ['a', 'b', 'c']) //=> true - * R.startsWith(['b'], ['a', 'b', 'c']) //=> false - */ - var startsWith = _curry2(function(prefix, list) { - return equals(take(prefix.length, list), prefix); - }); - - /** - * Subtracts its second argument from its first argument. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a - b`. - * @see R.add - * @example - * - * R.subtract(10, 8); //=> 2 - * - * const minus5 = R.subtract(R.__, 5); - * minus5(17); //=> 12 - * - * const complementaryAngle = R.subtract(90); - * complementaryAngle(30); //=> 60 - * complementaryAngle(72); //=> 18 - */ - var subtract = _curry2(function subtract(a, b) { - return Number(a) - Number(b); - }); - - /** - * Finds the set (i.e. no duplicates) of all elements contained in the first or - * second list, but not both. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` or `list2`, but not both. - * @see R.symmetricDifferenceWith, R.difference, R.differenceWith - * @example - * - * R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5] - * R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2] - */ - var symmetricDifference = _curry2(function symmetricDifference(list1, list2) { - return concat(difference(list1, list2), difference(list2, list1)); - }); - - /** - * Finds the set (i.e. no duplicates) of all elements contained in the first or - * second list, but not both. Duplication is determined according to the value - * returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` or `list2`, but not both. - * @see R.symmetricDifference, R.difference, R.differenceWith - * @example - * - * const eqA = R.eqBy(R.prop('a')); - * const l1 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; - * const l2 = [{a: 3}, {a: 4}, {a: 5}, {a: 6}]; - * R.symmetricDifferenceWith(eqA, l1, l2); //=> [{a: 1}, {a: 2}, {a: 5}, {a: 6}] - */ - var symmetricDifferenceWith = _curry3(function symmetricDifferenceWith(pred, list1, list2) { - return concat(differenceWith(pred, list1, list2), differenceWith(pred, list2, list1)); - }); - - /** - * Returns a new list containing the last `n` elements of a given list, passing - * each value to the supplied predicate function, and terminating when the - * predicate function returns `false`. Excludes the element that caused the - * predicate function to fail. The predicate function is passed one argument: - * *(value)*. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @sig (a -> Boolean) -> String -> String - * @param {Function} fn The function called per iteration. - * @param {Array} xs The collection to iterate over. - * @return {Array} A new array. - * @see R.dropLastWhile, R.addIndex - * @example - * - * const isNotOne = x => x !== 1; - * - * R.takeLastWhile(isNotOne, [1, 2, 3, 4]); //=> [2, 3, 4] - * - * R.takeLastWhile(x => x !== 'R' , 'Ramda'); //=> 'amda' - */ - var takeLastWhile = _curry2(function takeLastWhile(fn, xs) { - var idx = xs.length - 1; - while (idx >= 0 && fn(xs[idx])) { - idx -= 1; - } - return slice(idx + 1, Infinity, xs); - }); - - function XTakeWhile(f, xf) { - this.xf = xf; - this.f = f; - } - XTakeWhile.prototype['@@transducer/init'] = _xfBase.init; - XTakeWhile.prototype['@@transducer/result'] = _xfBase.result; - XTakeWhile.prototype['@@transducer/step'] = function(result, input) { - return this.f(input) ? this.xf['@@transducer/step'](result, input) : _reduced(result); - }; - - var _xtakeWhile = _curry2(function _xtakeWhile(f, xf) { return new XTakeWhile(f, xf); }); - - /** - * Returns a new list containing the first `n` elements of a given list, - * passing each value to the supplied predicate function, and terminating when - * the predicate function returns `false`. Excludes the element that caused the - * predicate function to fail. The predicate function is passed one argument: - * *(value)*. - * - * Dispatches to the `takeWhile` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @sig (a -> Boolean) -> String -> String - * @param {Function} fn The function called per iteration. - * @param {Array} xs The collection to iterate over. - * @return {Array} A new array. - * @see R.dropWhile, R.transduce, R.addIndex - * @example - * - * const isNotFour = x => x !== 4; - * - * R.takeWhile(isNotFour, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3] - * - * R.takeWhile(x => x !== 'd' , 'Ramda'); //=> 'Ram' - */ - var takeWhile = _curry2(_dispatchable(['takeWhile'], _xtakeWhile, function takeWhile(fn, xs) { - var idx = 0; - var len = xs.length; - while (idx < len && fn(xs[idx])) { - idx += 1; - } - return slice(0, idx, xs); - })); - - function XTap(f, xf) { - this.xf = xf; - this.f = f; - } - XTap.prototype['@@transducer/init'] = _xfBase.init; - XTap.prototype['@@transducer/result'] = _xfBase.result; - XTap.prototype['@@transducer/step'] = function(result, input) { - this.f(input); - return this.xf['@@transducer/step'](result, input); - }; - - var _xtap = _curry2(function _xtap(f, xf) { return new XTap(f, xf); }); - - /** - * Runs the given function with the supplied object, then returns the object. - * - * Acts as a transducer if a transformer is given as second parameter. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a -> *) -> a -> a - * @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away. - * @param {*} x - * @return {*} `x`. - * @example - * - * const sayX = x => console.log('x is ' + x); - * R.tap(sayX, 100); //=> 100 - * // logs 'x is 100' - * @symb R.tap(f, a) = a - */ - var tap = _curry2(_dispatchable([], _xtap, function tap(fn, x) { - fn(x); - return x; - })); - - function _isRegExp(x) { - return Object.prototype.toString.call(x) === '[object RegExp]'; - } - - /** - * Determines whether a given string matches a given regular expression. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category String - * @sig RegExp -> String -> Boolean - * @param {RegExp} pattern - * @param {String} str - * @return {Boolean} - * @see R.match - * @example - * - * R.test(/^x/, 'xyz'); //=> true - * R.test(/^y/, 'xyz'); //=> false - */ - var test = _curry2(function test(pattern, str) { - if (!_isRegExp(pattern)) { - throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + toString$1(pattern)); - } - return _cloneRegExp(pattern).test(str); - }); - - /** - * Returns the result of applying the onSuccess function to the value inside - * a successfully resolved promise. This is useful for working with promises - * inside function compositions. - * - * @func - * @memberOf R - * @since v0.27.1 - * @category Function - * @sig (a -> b) -> (Promise e a) -> (Promise e b) - * @sig (a -> (Promise e b)) -> (Promise e a) -> (Promise e b) - * @param {Function} onSuccess The function to apply. Can return a value or a promise of a value. - * @param {Promise} p - * @return {Promise} The result of calling `p.then(onSuccess)` - * @see R.otherwise - * @example - * - * var makeQuery = (email) => ({ query: { email }}); - * - * //getMemberName :: String -> Promise ({firstName, lastName}) - * var getMemberName = R.pipe( - * makeQuery, - * fetchMember, - * R.andThen(R.pick(['firstName', 'lastName'])) - * ); - */ - var andThen = _curry2(function andThen(f, p) { - _assertPromise('andThen', p); - - return p.then(f); - }); - - /** - * The lower case version of a string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category String - * @sig String -> String - * @param {String} str The string to lower case. - * @return {String} The lower case version of `str`. - * @see R.toUpper - * @example - * - * R.toLower('XYZ'); //=> 'xyz' - */ - var toLower = invoker(0, 'toLowerCase'); - - /** - * Converts an object into an array of key, value arrays. Only the object's - * own properties are used. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Object - * @sig {String: *} -> [[String,*]] - * @param {Object} obj The object to extract from - * @return {Array} An array of key, value arrays from the object's own properties. - * @see R.fromPairs - * @example - * - * R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]] - */ - var toPairs = _curry1(function toPairs(obj) { - var pairs = []; - for (var prop in obj) { - if (_has(prop, obj)) { - pairs[pairs.length] = [prop, obj[prop]]; - } - } - return pairs; - }); - - /** - * Converts an object into an array of key, value arrays. The object's own - * properties and prototype properties are used. Note that the order of the - * output array is not guaranteed to be consistent across different JS - * platforms. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Object - * @sig {String: *} -> [[String,*]] - * @param {Object} obj The object to extract from - * @return {Array} An array of key, value arrays from the object's own - * and prototype properties. - * @example - * - * const F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * const f = new F(); - * R.toPairsIn(f); //=> [['x','X'], ['y','Y']] - */ - var toPairsIn = _curry1(function toPairsIn(obj) { - var pairs = []; - for (var prop in obj) { - pairs[pairs.length] = [prop, obj[prop]]; - } - return pairs; - }); - - /** - * The upper case version of a string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category String - * @sig String -> String - * @param {String} str The string to upper case. - * @return {String} The upper case version of `str`. - * @see R.toLower - * @example - * - * R.toUpper('abc'); //=> 'ABC' - */ - var toUpper = invoker(0, 'toUpperCase'); - - /** - * Initializes a transducer using supplied iterator function. Returns a single - * item by iterating through the list, successively calling the transformed - * iterator function and passing it an accumulator value and the current value - * from the array, and then passing the result to the next call. - * - * The iterator function receives two values: *(acc, value)*. It will be - * wrapped as a transformer to initialize the transducer. A transformer can be - * passed directly in place of an iterator function. In both cases, iteration - * may be stopped early with the [`R.reduced`](#reduced) function. - * - * A transducer is a function that accepts a transformer and returns a - * transformer and can be composed directly. - * - * A transformer is an an object that provides a 2-arity reducing iterator - * function, step, 0-arity initial value function, init, and 1-arity result - * extraction function, result. The step function is used as the iterator - * function in reduce. The result function is used to convert the final - * accumulator into the return type and in most cases is - * [`R.identity`](#identity). The init function can be used to provide an - * initial accumulator, but is ignored by transduce. - * - * The iteration is performed with [`R.reduce`](#reduce) after initializing the transducer. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig (c -> c) -> ((a, b) -> a) -> a -> [b] -> a - * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array. Wrapped as transformer, if necessary, and used to - * initialize the transducer - * @param {*} acc The initial accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.reduced, R.into - * @example - * - * const numbers = [1, 2, 3, 4]; - * const transducer = R.compose(R.map(R.add(1)), R.take(2)); - * R.transduce(transducer, R.flip(R.append), [], numbers); //=> [2, 3] - * - * const isOdd = (x) => x % 2 === 1; - * const firstOddTransducer = R.compose(R.filter(isOdd), R.take(1)); - * R.transduce(firstOddTransducer, R.flip(R.append), [], R.range(0, 100)); //=> [1] - */ - var transduce = curryN(4, function transduce(xf, fn, acc, list) { - return _reduce(xf(typeof fn === 'function' ? _xwrap(fn) : fn), acc, list); - }); - - /** - * Transposes the rows and columns of a 2D list. - * When passed a list of `n` lists of length `x`, - * returns a list of `x` lists of length `n`. - * - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig [[a]] -> [[a]] - * @param {Array} list A 2D list - * @return {Array} A 2D list - * @example - * - * R.transpose([[1, 'a'], [2, 'b'], [3, 'c']]) //=> [[1, 2, 3], ['a', 'b', 'c']] - * R.transpose([[1, 2, 3], ['a', 'b', 'c']]) //=> [[1, 'a'], [2, 'b'], [3, 'c']] - * - * // If some of the rows are shorter than the following rows, their elements are skipped: - * R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]] - * @symb R.transpose([[a], [b], [c]]) = [a, b, c] - * @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]] - * @symb R.transpose([[a, b], [c]]) = [[a, c], [b]] - */ - var transpose = _curry1(function transpose(outerlist) { - var i = 0; - var result = []; - while (i < outerlist.length) { - var innerlist = outerlist[i]; - var j = 0; - while (j < innerlist.length) { - if (typeof result[j] === 'undefined') { - result[j] = []; - } - result[j].push(innerlist[j]); - j += 1; - } - i += 1; - } - return result; - }); - - /** - * Maps an [Applicative](https://github.com/fantasyland/fantasy-land#applicative)-returning - * function over a [Traversable](https://github.com/fantasyland/fantasy-land#traversable), - * then uses [`sequence`](#sequence) to transform the resulting Traversable of Applicative - * into an Applicative of Traversable. - * - * Dispatches to the `traverse` method of the third argument, if present. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (Applicative f, Traversable t) => (a -> f a) -> (a -> f b) -> t a -> f (t b) - * @param {Function} of - * @param {Function} f - * @param {*} traversable - * @return {*} - * @see R.sequence - * @example - * - * // Returns `Maybe.Nothing` if the given divisor is `0` - * const safeDiv = n => d => d === 0 ? Maybe.Nothing() : Maybe.Just(n / d) - * - * R.traverse(Maybe.of, safeDiv(10), [2, 4, 5]); //=> Maybe.Just([5, 2.5, 2]) - * R.traverse(Maybe.of, safeDiv(10), [2, 0, 5]); //=> Maybe.Nothing - */ - var traverse = _curry3(function traverse(of, f, traversable) { - return typeof traversable['fantasy-land/traverse'] === 'function' ? - traversable['fantasy-land/traverse'](f, of) : - sequence(of, map(f, traversable)); - }); - - var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + - '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + - '\u2029\uFEFF'; - var zeroWidth = '\u200b'; - var hasProtoTrim = (typeof String.prototype.trim === 'function'); - /** - * Removes (strips) whitespace from both ends of the string. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category String - * @sig String -> String - * @param {String} str The string to trim. - * @return {String} Trimmed version of `str`. - * @example - * - * R.trim(' xyz '); //=> 'xyz' - * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z'] - */ - var trim = !hasProtoTrim || (ws.trim() || !zeroWidth.trim()) ? - _curry1(function trim(str) { - var beginRx = new RegExp('^[' + ws + '][' + ws + ']*'); - var endRx = new RegExp('[' + ws + '][' + ws + ']*$'); - return str.replace(beginRx, '').replace(endRx, ''); - }) : - _curry1(function trim(str) { - return str.trim(); - }); - - /** - * `tryCatch` takes two functions, a `tryer` and a `catcher`. The returned - * function evaluates the `tryer`; if it does not throw, it simply returns the - * result. If the `tryer` *does* throw, the returned function evaluates the - * `catcher` function and returns its result. Note that for effective - * composition with this function, both the `tryer` and `catcher` functions - * must return the same type of results. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Function - * @sig (...x -> a) -> ((e, ...x) -> a) -> (...x -> a) - * @param {Function} tryer The function that may throw. - * @param {Function} catcher The function that will be evaluated if `tryer` throws. - * @return {Function} A new function that will catch exceptions and send then to the catcher. - * @example - * - * R.tryCatch(R.prop('x'), R.F)({x: true}); //=> true - * R.tryCatch(() => { throw 'foo'}, R.always('catched'))('bar') // => 'catched' - * R.tryCatch(R.times(R.identity), R.always([]))('s') // => [] - * R.tryCatch(() => { throw 'this is not a valid value'}, (err, value)=>({error : err, value }))('bar') // => {'error': 'this is not a valid value', 'value': 'bar'} - */ - var tryCatch = _curry2(function _tryCatch(tryer, catcher) { - return _arity(tryer.length, function() { - try { - return tryer.apply(this, arguments); - } catch (e) { - return catcher.apply(this, _concat([e], arguments)); - } - }); - }); - - /** - * Takes a function `fn`, which takes a single array argument, and returns a - * function which: - * - * - takes any number of positional arguments; - * - passes these arguments to `fn` as an array; and - * - returns the result. - * - * In other words, `R.unapply` derives a variadic function from a function which - * takes an array. `R.unapply` is the inverse of [`R.apply`](#apply). - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Function - * @sig ([*...] -> a) -> (*... -> a) - * @param {Function} fn - * @return {Function} - * @see R.apply - * @example - * - * R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]' - * @symb R.unapply(f)(a, b) = f([a, b]) - */ - var unapply = _curry1(function unapply(fn) { - return function() { - return fn(Array.prototype.slice.call(arguments, 0)); - }; - }); - - /** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly 1 parameter. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Function - * @sig (* -> b) -> (a -> b) - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity 1. - * @see R.binary, R.nAry - * @example - * - * const takesTwoArgs = function(a, b) { - * return [a, b]; - * }; - * takesTwoArgs.length; //=> 2 - * takesTwoArgs(1, 2); //=> [1, 2] - * - * const takesOneArg = R.unary(takesTwoArgs); - * takesOneArg.length; //=> 1 - * // Only 1 argument is passed to the wrapped function - * takesOneArg(1, 2); //=> [1, undefined] - * @symb R.unary(f)(a, b, c) = f(a) - */ - var unary = _curry1(function unary(fn) { - return nAry(1, fn); - }); - - /** - * Returns a function of arity `n` from a (manually) curried function. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Function - * @sig Number -> (a -> b) -> (a -> c) - * @param {Number} length The arity for the returned function. - * @param {Function} fn The function to uncurry. - * @return {Function} A new function. - * @see R.curry - * @example - * - * const addFour = a => b => c => d => a + b + c + d; - * - * const uncurriedAddFour = R.uncurryN(4, addFour); - * uncurriedAddFour(1, 2, 3, 4); //=> 10 - */ - var uncurryN = _curry2(function uncurryN(depth, fn) { - return curryN(depth, function() { - var currentDepth = 1; - var value = fn; - var idx = 0; - var endIdx; - while (currentDepth <= depth && typeof value === 'function') { - endIdx = currentDepth === depth ? arguments.length : idx + value.length; - value = value.apply(this, Array.prototype.slice.call(arguments, idx, endIdx)); - currentDepth += 1; - idx = endIdx; - } - return value; - }); - }); - - /** - * Builds a list from a seed value. Accepts an iterator function, which returns - * either false to stop iteration or an array of length 2 containing the value - * to add to the resulting list and the seed to be used in the next call to the - * iterator function. - * - * The iterator function receives one argument: *(seed)*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig (a -> [b]) -> * -> [b] - * @param {Function} fn The iterator function. receives one argument, `seed`, and returns - * either false to quit iteration or an array of length two to proceed. The element - * at index 0 of this array will be added to the resulting array, and the element - * at index 1 will be passed to the next call to `fn`. - * @param {*} seed The seed value. - * @return {Array} The final list. - * @example - * - * const f = n => n > 50 ? false : [-n, n + 10]; - * R.unfold(f, 10); //=> [-10, -20, -30, -40, -50] - * @symb R.unfold(f, x) = [f(x)[0], f(f(x)[1])[0], f(f(f(x)[1])[1])[0], ...] - */ - var unfold = _curry2(function unfold(fn, seed) { - var pair = fn(seed); - var result = []; - while (pair && pair.length) { - result[result.length] = pair[0]; - pair = fn(pair[1]); - } - return result; - }); - - /** - * Combines two lists into a set (i.e. no duplicates) composed of the elements - * of each list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} as The first list. - * @param {Array} bs The second list. - * @return {Array} The first and second lists concatenated, with - * duplicates removed. - * @example - * - * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4] - */ - var union = _curry2(compose(uniq, _concat)); - - /** - * Returns a new list containing only one copy of each element in the original - * list, based upon the value returned by applying the supplied predicate to - * two list elements. Prefers the first item if two items compare equal based - * on the predicate. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category List - * @sig ((a, a) -> Boolean) -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * const strEq = R.eqBy(String); - * R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2] - * R.uniqWith(strEq)([{}, {}]); //=> [{}] - * R.uniqWith(strEq)([1, '1', 1]); //=> [1] - * R.uniqWith(strEq)(['1', 1, 1]); //=> ['1'] - */ - var uniqWith = _curry2(function uniqWith(pred, list) { - var idx = 0; - var len = list.length; - var result = []; - var item; - while (idx < len) { - item = list[idx]; - if (!_includesWith(pred, item, result)) { - result[result.length] = item; - } - idx += 1; - } - return result; - }); - - /** - * Combines two lists into a set (i.e. no duplicates) composed of the elements - * of each list. Duplication is determined according to the value returned by - * applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [*] -> [*] -> [*] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The first and second lists concatenated, with - * duplicates removed. - * @see R.union - * @example - * - * const l1 = [{a: 1}, {a: 2}]; - * const l2 = [{a: 1}, {a: 4}]; - * R.unionWith(R.eqBy(R.prop('a')), l1, l2); //=> [{a: 1}, {a: 2}, {a: 4}] - */ - var unionWith = _curry3(function unionWith(pred, list1, list2) { - return uniqWith(pred, _concat(list1, list2)); - }); - - /** - * Tests the final argument by passing it to the given predicate function. If - * the predicate is not satisfied, the function will return the result of - * calling the `whenFalseFn` function with the same argument. If the predicate - * is satisfied, the argument is returned as is. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} whenFalseFn A function to invoke when the `pred` evaluates - * to a falsy value. - * @param {*} x An object to test with the `pred` function and - * pass to `whenFalseFn` if necessary. - * @return {*} Either `x` or the result of applying `x` to `whenFalseFn`. - * @see R.ifElse, R.when, R.cond - * @example - * - * let safeInc = R.unless(R.isNil, R.inc); - * safeInc(null); //=> null - * safeInc(1); //=> 2 - */ - var unless = _curry3(function unless(pred, whenFalseFn, x) { - return pred(x) ? x : whenFalseFn(x); - }); - - /** - * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from - * any [Chain](https://github.com/fantasyland/fantasy-land#chain). - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig Chain c => c (c a) -> c a - * @param {*} list - * @return {*} - * @see R.flatten, R.chain - * @example - * - * R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]] - * R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6] - */ - var unnest = chain(_identity); - - /** - * Takes a predicate, a transformation function, and an initial value, - * and returns a value of the same type as the initial value. - * It does so by applying the transformation until the predicate is satisfied, - * at which point it returns the satisfactory value. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} fn The iterator function - * @param {*} init Initial value - * @return {*} Final value that satisfies predicate - * @example - * - * R.until(R.gt(R.__, 100), R.multiply(2))(1) // => 128 - */ - var until = _curry3(function until(pred, fn, init) { - var val = init; - while (!pred(val)) { - val = fn(val); - } - return val; - }); - - /** - * Returns a list of all the properties, including prototype properties, of the - * supplied object. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @sig {k: v} -> [v] - * @param {Object} obj The object to extract values from - * @return {Array} An array of the values of the object's own and prototype properties. - * @see R.values, R.keysIn - * @example - * - * const F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * const f = new F(); - * R.valuesIn(f); //=> ['X', 'Y'] - */ - var valuesIn = _curry1(function valuesIn(obj) { - var prop; - var vs = []; - for (prop in obj) { - vs[vs.length] = obj[prop]; - } - return vs; - }); - - // `Const` is a functor that effectively ignores the function given to `map`. - var Const = function(x) { - return {value: x, 'fantasy-land/map': function() { return this; }}; - }; - - /** - * Returns a "view" of the given data structure, determined by the given lens. - * The lens's focus determines which portion of the data structure is visible. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> s -> a - * @param {Lens} lens - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * const xLens = R.lensProp('x'); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.view(xLens, {x: 4, y: 2}); //=> 4 - */ - var view = _curry2(function view(lens, x) { - // Using `Const` effectively ignores the setter function of the `lens`, - // leaving the value returned by the getter function unmodified. - return lens(Const)(x).value; - }); - - /** - * Tests the final argument by passing it to the given predicate function. If - * the predicate is satisfied, the function will return the result of calling - * the `whenTrueFn` function with the same argument. If the predicate is not - * satisfied, the argument is returned as is. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} whenTrueFn A function to invoke when the `condition` - * evaluates to a truthy value. - * @param {*} x An object to test with the `pred` function and - * pass to `whenTrueFn` if necessary. - * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`. - * @see R.ifElse, R.unless, R.cond - * @example - * - * // truncate :: String -> String - * const truncate = R.when( - * R.propSatisfies(R.gt(R.__, 10), 'length'), - * R.pipe(R.take(10), R.append('…'), R.join('')) - * ); - * truncate('12345'); //=> '12345' - * truncate('0123456789ABC'); //=> '0123456789…' - */ - var when = _curry3(function when(pred, whenTrueFn, x) { - return pred(x) ? whenTrueFn(x) : x; - }); - - /** - * Takes a spec object and a test object; returns true if the test satisfies - * the spec. Each of the spec's own properties must be a predicate function. - * Each predicate is applied to the value of the corresponding property of the - * test object. `where` returns true if all the predicates return true, false - * otherwise. - * - * `where` is well suited to declaratively expressing constraints for other - * functions such as [`filter`](#filter) and [`find`](#find). - * - * @func - * @memberOf R - * @since v0.1.1 - * @category Object - * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean - * @param {Object} spec - * @param {Object} testObj - * @return {Boolean} - * @see R.propSatisfies, R.whereEq - * @example - * - * // pred :: Object -> Boolean - * const pred = R.where({ - * a: R.equals('foo'), - * b: R.complement(R.equals('bar')), - * x: R.gt(R.__, 10), - * y: R.lt(R.__, 20) - * }); - * - * pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true - * pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false - * pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false - * pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false - * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false - */ - var where = _curry2(function where(spec, testObj) { - for (var prop in spec) { - if (_has(prop, spec) && !spec[prop](testObj[prop])) { - return false; - } - } - return true; - }); - - /** - * Takes a spec object and a test object; returns true if the test satisfies - * the spec, false otherwise. An object satisfies the spec if, for each of the - * spec's own properties, accessing that property of the object gives the same - * value (in [`R.equals`](#equals) terms) as accessing that property of the - * spec. - * - * `whereEq` is a specialization of [`where`](#where). - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @sig {String: *} -> {String: *} -> Boolean - * @param {Object} spec - * @param {Object} testObj - * @return {Boolean} - * @see R.propEq, R.where - * @example - * - * // pred :: Object -> Boolean - * const pred = R.whereEq({a: 1, b: 2}); - * - * pred({a: 1}); //=> false - * pred({a: 1, b: 2}); //=> true - * pred({a: 1, b: 2, c: 3}); //=> true - * pred({a: 1, b: 1}); //=> false - */ - var whereEq = _curry2(function whereEq(spec, testObj) { - return where(map(equals, spec), testObj); - }); - - /** - * Returns a new list without values in the first argument. - * [`R.equals`](#equals) is used to determine equality. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig [a] -> [a] -> [a] - * @param {Array} list1 The values to be removed from `list2`. - * @param {Array} list2 The array to remove values from. - * @return {Array} The new array without values in `list1`. - * @see R.transduce, R.difference, R.remove - * @example - * - * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4] - */ - var without = _curry2(function(xs, list) { - return reject(flip(_includes)(xs), list); - }); - - /** - * Exclusive disjunction logical operation. - * Returns `true` if one of the arguments is truthy and the other is falsy. - * Otherwise, it returns `false`. - * - * @func - * @memberOf R - * @since v0.27.1 - * @category Logic - * @sig a -> b -> Boolean - * @param {Any} a - * @param {Any} b - * @return {Boolean} true if one of the arguments is truthy and the other is falsy - * @see R.or, R.and - * @example - * - * R.xor(true, true); //=> false - * R.xor(true, false); //=> true - * R.xor(false, true); //=> true - * R.xor(false, false); //=> false - */ - var xor = _curry2(function xor(a, b) { - return Boolean(!a ^ !b); - }); - - /** - * Creates a new list out of the two supplied by creating each possible pair - * from the lists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] -> [[a,b]] - * @param {Array} as The first list. - * @param {Array} bs The second list. - * @return {Array} The list made by combining each possible pair from - * `as` and `bs` into pairs (`[a, b]`). - * @example - * - * R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] - * @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]] - */ - var xprod = _curry2(function xprod(a, b) { // = xprodWith(prepend); (takes about 3 times as long...) - var idx = 0; - var ilen = a.length; - var j; - var jlen = b.length; - var result = []; - while (idx < ilen) { - j = 0; - while (j < jlen) { - result[result.length] = [a[idx], b[j]]; - j += 1; - } - idx += 1; - } - return result; - }); - - /** - * Creates a new list out of the two supplied by pairing up equally-positioned - * items from both lists. The returned list is truncated to the length of the - * shorter of the two input lists. - * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] -> [[a,b]] - * @param {Array} list1 The first array to consider. - * @param {Array} list2 The second array to consider. - * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`. - * @example - * - * R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']] - * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]] - */ - var zip = _curry2(function zip(a, b) { - var rv = []; - var idx = 0; - var len = Math.min(a.length, b.length); - while (idx < len) { - rv[idx] = [a[idx], b[idx]]; - idx += 1; - } - return rv; - }); - - /** - * Creates a new object out of a list of keys and a list of values. - * Key/value pairing is truncated to the length of the shorter of the two lists. - * Note: `zipObj` is equivalent to `pipe(zip, fromPairs)`. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [String] -> [*] -> {String: *} - * @param {Array} keys The array that will be properties on the output object. - * @param {Array} values The list of values on the output object. - * @return {Object} The object made by pairing up same-indexed elements of `keys` and `values`. - * @example - * - * R.zipObj(['a', 'b', 'c'], [1, 2, 3]); //=> {a: 1, b: 2, c: 3} - */ - var zipObj = _curry2(function zipObj(keys, values) { - var idx = 0; - var len = Math.min(keys.length, values.length); - var out = {}; - while (idx < len) { - out[keys[idx]] = values[idx]; - idx += 1; - } - return out; - }); - - /** - * Creates a new list out of the two supplied by applying the function to each - * equally-positioned pair in the lists. The returned list is truncated to the - * length of the shorter of the two input lists. - * - * @function - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, b) -> c) -> [a] -> [b] -> [c] - * @param {Function} fn The function used to combine the two elements into one value. - * @param {Array} list1 The first array to consider. - * @param {Array} list2 The second array to consider. - * @return {Array} The list made by combining same-indexed elements of `list1` and `list2` - * using `fn`. - * @example - * - * const f = (x, y) => { - * // ... - * }; - * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']); - * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')] - * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)] - */ - var zipWith = _curry3(function zipWith(fn, a, b) { - var rv = []; - var idx = 0; - var len = Math.min(a.length, b.length); - while (idx < len) { - rv[idx] = fn(a[idx], b[idx]); - idx += 1; - } - return rv; - }); - - /** - * Creates a thunk out of a function. A thunk delays a calculation until - * its result is needed, providing lazy evaluation of arguments. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig ((a, b, ..., j) -> k) -> (a, b, ..., j) -> (() -> k) - * @param {Function} fn A function to wrap in a thunk - * @return {Function} Expects arguments for `fn` and returns a new function - * that, when called, applies those arguments to `fn`. - * @see R.partial, R.partialRight - * @example - * - * R.thunkify(R.identity)(42)(); //=> 42 - * R.thunkify((a, b) => a + b)(25, 17)(); //=> 42 - */ - var thunkify = _curry1(function thunkify(fn) { - return curryN(fn.length, function createThunk() { - var fnArgs = arguments; - return function invokeThunk() { - return fn.apply(this, fnArgs); - }; - }); - }); - - exports.F = F; - exports.T = T; - exports.__ = __; - exports.add = add; - exports.addIndex = addIndex; - exports.adjust = adjust; - exports.all = all; - exports.allPass = allPass; - exports.always = always; - exports.and = and; - exports.any = any; - exports.anyPass = anyPass; - exports.ap = ap; - exports.aperture = aperture; - exports.append = append; - exports.apply = apply; - exports.applySpec = applySpec; - exports.applyTo = applyTo; - exports.ascend = ascend; - exports.assoc = assoc; - exports.assocPath = assocPath; - exports.binary = binary; - exports.bind = bind; - exports.both = both; - exports.call = call; - exports.chain = chain; - exports.clamp = clamp; - exports.clone = clone; - exports.comparator = comparator; - exports.complement = complement; - exports.compose = compose; - exports.composeK = composeK; - exports.composeP = composeP; - exports.composeWith = composeWith; - exports.concat = concat; - exports.cond = cond; - exports.construct = construct; - exports.constructN = constructN; - exports.contains = contains$1; - exports.converge = converge; - exports.countBy = countBy; - exports.curry = curry; - exports.curryN = curryN; - exports.dec = dec; - exports.defaultTo = defaultTo; - exports.descend = descend; - exports.difference = difference; - exports.differenceWith = differenceWith; - exports.dissoc = dissoc; - exports.dissocPath = dissocPath; - exports.divide = divide; - exports.drop = drop; - exports.dropLast = dropLast$1; - exports.dropLastWhile = dropLastWhile$1; - exports.dropRepeats = dropRepeats; - exports.dropRepeatsWith = dropRepeatsWith; - exports.dropWhile = dropWhile; - exports.either = either; - exports.empty = empty; - exports.endsWith = endsWith; - exports.eqBy = eqBy; - exports.eqProps = eqProps; - exports.equals = equals; - exports.evolve = evolve; - exports.filter = filter; - exports.find = find; - exports.findIndex = findIndex; - exports.findLast = findLast; - exports.findLastIndex = findLastIndex; - exports.flatten = flatten; - exports.flip = flip; - exports.forEach = forEach; - exports.forEachObjIndexed = forEachObjIndexed; - exports.fromPairs = fromPairs; - exports.groupBy = groupBy; - exports.groupWith = groupWith; - exports.gt = gt; - exports.gte = gte; - exports.has = has; - exports.hasIn = hasIn; - exports.hasPath = hasPath; - exports.head = head; - exports.identical = identical; - exports.identity = identity; - exports.ifElse = ifElse; - exports.inc = inc; - exports.includes = includes; - exports.indexBy = indexBy; - exports.indexOf = indexOf; - exports.init = init; - exports.innerJoin = innerJoin; - exports.insert = insert; - exports.insertAll = insertAll; - exports.intersection = intersection; - exports.intersperse = intersperse; - exports.into = into; - exports.invert = invert; - exports.invertObj = invertObj; - exports.invoker = invoker; - exports.is = is; - exports.isEmpty = isEmpty; - exports.isNil = isNil; - exports.join = join; - exports.juxt = juxt; - exports.keys = keys; - exports.keysIn = keysIn; - exports.last = last; - exports.lastIndexOf = lastIndexOf; - exports.length = length; - exports.lens = lens; - exports.lensIndex = lensIndex; - exports.lensPath = lensPath; - exports.lensProp = lensProp; - exports.lift = lift; - exports.liftN = liftN; - exports.lt = lt; - exports.lte = lte; - exports.map = map; - exports.mapAccum = mapAccum; - exports.mapAccumRight = mapAccumRight; - exports.mapObjIndexed = mapObjIndexed; - exports.match = match; - exports.mathMod = mathMod; - exports.max = max; - exports.maxBy = maxBy; - exports.mean = mean; - exports.median = median; - exports.memoizeWith = memoizeWith; - exports.merge = merge; - exports.mergeAll = mergeAll; - exports.mergeDeepLeft = mergeDeepLeft; - exports.mergeDeepRight = mergeDeepRight; - exports.mergeDeepWith = mergeDeepWith; - exports.mergeDeepWithKey = mergeDeepWithKey; - exports.mergeLeft = mergeLeft; - exports.mergeRight = mergeRight; - exports.mergeWith = mergeWith; - exports.mergeWithKey = mergeWithKey; - exports.min = min; - exports.minBy = minBy; - exports.modulo = modulo; - exports.move = move; - exports.multiply = multiply; - exports.nAry = nAry; - exports.negate = negate; - exports.none = none; - exports.not = not; - exports.nth = nth; - exports.nthArg = nthArg; - exports.o = o; - exports.objOf = objOf; - exports.of = of; - exports.omit = omit; - exports.once = once; - exports.or = or; - exports.otherwise = otherwise; - exports.over = over; - exports.pair = pair; - exports.partial = partial; - exports.partialRight = partialRight; - exports.partition = partition; - exports.path = path; - exports.paths = paths; - exports.pathEq = pathEq; - exports.pathOr = pathOr; - exports.pathSatisfies = pathSatisfies; - exports.pick = pick; - exports.pickAll = pickAll; - exports.pickBy = pickBy; - exports.pipe = pipe; - exports.pipeK = pipeK; - exports.pipeP = pipeP; - exports.pipeWith = pipeWith; - exports.pluck = pluck; - exports.prepend = prepend; - exports.product = product; - exports.project = project; - exports.prop = prop; - exports.propEq = propEq; - exports.propIs = propIs; - exports.propOr = propOr; - exports.propSatisfies = propSatisfies; - exports.props = props; - exports.range = range; - exports.reduce = reduce; - exports.reduceBy = reduceBy; - exports.reduceRight = reduceRight; - exports.reduceWhile = reduceWhile; - exports.reduced = reduced; - exports.reject = reject; - exports.remove = remove; - exports.repeat = repeat; - exports.replace = replace; - exports.reverse = reverse; - exports.scan = scan; - exports.sequence = sequence; - exports.set = set; - exports.slice = slice; - exports.sort = sort; - exports.sortBy = sortBy; - exports.sortWith = sortWith; - exports.split = split; - exports.splitAt = splitAt; - exports.splitEvery = splitEvery; - exports.splitWhen = splitWhen; - exports.startsWith = startsWith; - exports.subtract = subtract; - exports.sum = sum; - exports.symmetricDifference = symmetricDifference; - exports.symmetricDifferenceWith = symmetricDifferenceWith; - exports.tail = tail; - exports.take = take; - exports.takeLast = takeLast; - exports.takeLastWhile = takeLastWhile; - exports.takeWhile = takeWhile; - exports.tap = tap; - exports.test = test; - exports.andThen = andThen; - exports.times = times; - exports.toLower = toLower; - exports.toPairs = toPairs; - exports.toPairsIn = toPairsIn; - exports.toString = toString$1; - exports.toUpper = toUpper; - exports.transduce = transduce; - exports.transpose = transpose; - exports.traverse = traverse; - exports.trim = trim; - exports.tryCatch = tryCatch; - exports.type = type; - exports.unapply = unapply; - exports.unary = unary; - exports.uncurryN = uncurryN; - exports.unfold = unfold; - exports.union = union; - exports.unionWith = unionWith; - exports.uniq = uniq; - exports.uniqBy = uniqBy; - exports.uniqWith = uniqWith; - exports.unless = unless; - exports.unnest = unnest; - exports.until = until; - exports.update = update; - exports.useWith = useWith; - exports.values = values; - exports.valuesIn = valuesIn; - exports.view = view; - exports.when = when; - exports.where = where; - exports.whereEq = whereEq; - exports.without = without; - exports.xor = xor; - exports.xprod = xprod; - exports.zip = zip; - exports.zipObj = zipObj; - exports.zipWith = zipWith; - exports.thunkify = thunkify; - - Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/ramda/dist/ramda.min.js b/node_modules/ramda/dist/ramda.min.js deleted file mode 100644 index ee0823c..0000000 --- a/node_modules/ramda/dist/ramda.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t=t||self).R={})}(this,function(t){"use strict";function a(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]}function o(r){return function t(n){return 0===arguments.length||a(n)?t:r.apply(this,arguments)}}function n(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return a(n)?t:o(function(t){return e(n,t)});default:return a(n)&&a(r)?t:a(n)?o(function(t){return e(t,r)}):a(r)?o(function(t){return e(n,t)}):e(n,r)}}}var r=n(function(t,n){return+t+ +n});function i(t,n){var r,e=(t=t||[]).length,u=(n=n||[]).length,i=[];for(r=0;r":ln(t,n)}function t(n,t){return x(function(t){return nn(t)+": "+u(n[t])},t.slice().sort())}switch(Object.prototype.toString.call(r)){case"[object Arguments]":return"(function() { return arguments; }("+x(u,r).join(", ")+"))";case"[object Array]":return"["+x(u,r).concat(t(r,sn(function(t){return/^\d+$/.test(t)},U(r)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof r?"new Boolean("+u(r.valueOf())+")":""+r;case"[object Date]":return"new Date("+(isNaN(r.valueOf())?u(NaN):nn(en(r)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof r?"new Number("+u(r.valueOf())+")":1/r==-1/0?"-0":r.toString(10);case"[object String]":return"object"==typeof r?"new String("+u(r.valueOf())+")":nn(r);case"[object Undefined]":return"undefined";default:if("function"==typeof r.toString){var n=""+r;if("[object Object]"!=n)return n}return"{"+t(r,U(r)).join(", ")+"}"}}var pn=o(function(t){return ln(t,[])}),hn=n(function(t,n){if(p(t)){if(p(n))return t.concat(n);throw new TypeError(pn(n)+" is not an array")}if(w(t)){if(w(n))return t+n;throw new TypeError(pn(n)+" is not a string")}if(null!=t&&dt(t["fantasy-land/concat"]))return t["fantasy-land/concat"](n);if(null!=t&&dt(t.concat))return t.concat(n);throw new TypeError(pn(t)+' does not have a method named "concat" or "fantasy-land/concat"')}),yn=o(function(n){return f($(b,0,D(function(t){return t[0].length},n)),function(){for(var t=0;tt(n)?r:n}),pe=$(r,0),he=o(function(t){return pe(t)/t.length}),ye=o(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return he(Array.prototype.slice.call(t,0).sort(function(t,n){return t Boolean - * @param {*} - * @return {Boolean} - * @see R.T - * @example - * - * R.F(); //=> false - */ -var F = function () { - return false; -}; - -export default F; \ No newline at end of file diff --git a/node_modules/ramda/es/T.js b/node_modules/ramda/es/T.js deleted file mode 100644 index b4c455a..0000000 --- a/node_modules/ramda/es/T.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * A function that always returns `true`. Any passed in parameters are ignored. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig * -> Boolean - * @param {*} - * @return {Boolean} - * @see R.F - * @example - * - * R.T(); //=> true - */ -var T = function () { - return true; -}; - -export default T; \ No newline at end of file diff --git a/node_modules/ramda/es/__.js b/node_modules/ramda/es/__.js deleted file mode 100644 index c515902..0000000 --- a/node_modules/ramda/es/__.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * A special placeholder value used to specify "gaps" within curried functions, - * allowing partial application of any combination of arguments, regardless of - * their positions. - * - * If `g` is a curried ternary function and `_` is `R.__`, the following are - * equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2, _)(1, 3)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @name __ - * @constant - * @memberOf R - * @since v0.6.0 - * @category Function - * @example - * - * const greet = R.replace('{name}', R.__, 'Hello, {name}!'); - * greet('Alice'); //=> 'Hello, Alice!' - */ -export default { - '@@functional/placeholder': true -}; \ No newline at end of file diff --git a/node_modules/ramda/es/add.js b/node_modules/ramda/es/add.js deleted file mode 100644 index 4cb92d3..0000000 --- a/node_modules/ramda/es/add.js +++ /dev/null @@ -1,26 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Adds two values. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a - * @param {Number} b - * @return {Number} - * @see R.subtract - * @example - * - * R.add(2, 3); //=> 5 - * R.add(7)(10); //=> 17 - */ - -var add = -/*#__PURE__*/ -_curry2(function add(a, b) { - return Number(a) + Number(b); -}); - -export default add; \ No newline at end of file diff --git a/node_modules/ramda/es/addIndex.js b/node_modules/ramda/es/addIndex.js deleted file mode 100644 index 0a2d292..0000000 --- a/node_modules/ramda/es/addIndex.js +++ /dev/null @@ -1,48 +0,0 @@ -import _concat from "./internal/_concat.js"; -import _curry1 from "./internal/_curry1.js"; -import curryN from "./curryN.js"; -/** - * Creates a new list iteration function from an existing one by adding two new - * parameters to its callback function: the current index, and the entire list. - * - * This would turn, for instance, [`R.map`](#map) function into one that - * more closely resembles `Array.prototype.map`. Note that this will only work - * for functions in which the iteration callback function is the first - * parameter, and where the list is the last parameter. (This latter might be - * unimportant if the list parameter is not used.) - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Function - * @category List - * @sig ((a ... -> b) ... -> [a] -> *) -> ((a ..., Int, [a] -> b) ... -> [a] -> *) - * @param {Function} fn A list iteration function that does not pass index or list to its callback - * @return {Function} An altered list iteration function that passes (item, index, list) to its callback - * @example - * - * const mapIndexed = R.addIndex(R.map); - * mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']); - * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r'] - */ - -var addIndex = -/*#__PURE__*/ -_curry1(function addIndex(fn) { - return curryN(fn.length, function () { - var idx = 0; - var origFn = arguments[0]; - var list = arguments[arguments.length - 1]; - var args = Array.prototype.slice.call(arguments, 0); - - args[0] = function () { - var result = origFn.apply(this, _concat(arguments, [idx, list])); - idx += 1; - return result; - }; - - return fn.apply(this, args); - }); -}); - -export default addIndex; \ No newline at end of file diff --git a/node_modules/ramda/es/adjust.js b/node_modules/ramda/es/adjust.js deleted file mode 100644 index a28d25a..0000000 --- a/node_modules/ramda/es/adjust.js +++ /dev/null @@ -1,46 +0,0 @@ -import _concat from "./internal/_concat.js"; -import _curry3 from "./internal/_curry3.js"; -/** - * Applies a function to the value at the given index of an array, returning a - * new copy of the array with the element at the given index replaced with the - * result of the function application. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig Number -> (a -> a) -> [a] -> [a] - * @param {Number} idx The index. - * @param {Function} fn The function to apply. - * @param {Array|Arguments} list An array-like object whose value - * at the supplied index will be replaced. - * @return {Array} A copy of the supplied array-like object with - * the element at index `idx` replaced with the value - * returned by applying `fn` to the existing element. - * @see R.update - * @example - * - * R.adjust(1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'B', 'c', 'd'] - * R.adjust(-1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c', 'D'] - * @symb R.adjust(-1, f, [a, b]) = [a, f(b)] - * @symb R.adjust(0, f, [a, b]) = [f(a), b] - */ - -var adjust = -/*#__PURE__*/ -_curry3(function adjust(idx, fn, list) { - if (idx >= list.length || idx < -list.length) { - return list; - } - - var start = idx < 0 ? list.length : 0; - - var _idx = start + idx; - - var _list = _concat(list); - - _list[_idx] = fn(list[_idx]); - return _list; -}); - -export default adjust; \ No newline at end of file diff --git a/node_modules/ramda/es/all.js b/node_modules/ramda/es/all.js deleted file mode 100644 index 2a6af4c..0000000 --- a/node_modules/ramda/es/all.js +++ /dev/null @@ -1,47 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xall from "./internal/_xall.js"; -/** - * Returns `true` if all elements of the list match the predicate, `false` if - * there are any that don't. - * - * Dispatches to the `all` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is satisfied by every element, `false` - * otherwise. - * @see R.any, R.none, R.transduce - * @example - * - * const equals3 = R.equals(3); - * R.all(equals3)([3, 3, 3, 3]); //=> true - * R.all(equals3)([3, 3, 1, 3]); //=> false - */ - -var all = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['all'], _xall, function all(fn, list) { - var idx = 0; - - while (idx < list.length) { - if (!fn(list[idx])) { - return false; - } - - idx += 1; - } - - return true; -})); - -export default all; \ No newline at end of file diff --git a/node_modules/ramda/es/allPass.js b/node_modules/ramda/es/allPass.js deleted file mode 100644 index c0c75ef..0000000 --- a/node_modules/ramda/es/allPass.js +++ /dev/null @@ -1,51 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import curryN from "./curryN.js"; -import max from "./max.js"; -import pluck from "./pluck.js"; -import reduce from "./reduce.js"; -/** - * Takes a list of predicates and returns a predicate that returns true for a - * given list of arguments if every one of the provided predicates is satisfied - * by those arguments. - * - * The function returned is a curried function whose arity matches that of the - * highest-arity predicate. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Logic - * @sig [(*... -> Boolean)] -> (*... -> Boolean) - * @param {Array} predicates An array of predicates to check - * @return {Function} The combined predicate - * @see R.anyPass - * @example - * - * const isQueen = R.propEq('rank', 'Q'); - * const isSpade = R.propEq('suit', '♠︎'); - * const isQueenOfSpades = R.allPass([isQueen, isSpade]); - * - * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false - * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true - */ - -var allPass = -/*#__PURE__*/ -_curry1(function allPass(preds) { - return curryN(reduce(max, 0, pluck('length', preds)), function () { - var idx = 0; - var len = preds.length; - - while (idx < len) { - if (!preds[idx].apply(this, arguments)) { - return false; - } - - idx += 1; - } - - return true; - }); -}); - -export default allPass; \ No newline at end of file diff --git a/node_modules/ramda/es/always.js b/node_modules/ramda/es/always.js deleted file mode 100644 index 15bd140..0000000 --- a/node_modules/ramda/es/always.js +++ /dev/null @@ -1,30 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -/** - * Returns a function that always returns the given value. Note that for - * non-primitives the value returned is a reference to the original value. - * - * This function is known as `const`, `constant`, or `K` (for K combinator) in - * other languages and libraries. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig a -> (* -> a) - * @param {*} val The value to wrap in a function - * @return {Function} A Function :: * -> val. - * @example - * - * const t = R.always('Tee'); - * t(); //=> 'Tee' - */ - -var always = -/*#__PURE__*/ -_curry1(function always(val) { - return function () { - return val; - }; -}); - -export default always; \ No newline at end of file diff --git a/node_modules/ramda/es/and.js b/node_modules/ramda/es/and.js deleted file mode 100644 index 0bf9d37..0000000 --- a/node_modules/ramda/es/and.js +++ /dev/null @@ -1,28 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns `true` if both arguments are `true`; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> b -> a | b - * @param {Any} a - * @param {Any} b - * @return {Any} the first argument if it is falsy, otherwise the second argument. - * @see R.both, R.xor - * @example - * - * R.and(true, true); //=> true - * R.and(true, false); //=> false - * R.and(false, true); //=> false - * R.and(false, false); //=> false - */ - -var and = -/*#__PURE__*/ -_curry2(function and(a, b) { - return a && b; -}); - -export default and; \ No newline at end of file diff --git a/node_modules/ramda/es/andThen.js b/node_modules/ramda/es/andThen.js deleted file mode 100644 index e402087..0000000 --- a/node_modules/ramda/es/andThen.js +++ /dev/null @@ -1,38 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _assertPromise from "./internal/_assertPromise.js"; -/** - * Returns the result of applying the onSuccess function to the value inside - * a successfully resolved promise. This is useful for working with promises - * inside function compositions. - * - * @func - * @memberOf R - * @since v0.27.1 - * @category Function - * @sig (a -> b) -> (Promise e a) -> (Promise e b) - * @sig (a -> (Promise e b)) -> (Promise e a) -> (Promise e b) - * @param {Function} onSuccess The function to apply. Can return a value or a promise of a value. - * @param {Promise} p - * @return {Promise} The result of calling `p.then(onSuccess)` - * @see R.otherwise - * @example - * - * var makeQuery = (email) => ({ query: { email }}); - * - * //getMemberName :: String -> Promise ({firstName, lastName}) - * var getMemberName = R.pipe( - * makeQuery, - * fetchMember, - * R.andThen(R.pick(['firstName', 'lastName'])) - * ); - */ - -var andThen = -/*#__PURE__*/ -_curry2(function andThen(f, p) { - _assertPromise('andThen', p); - - return p.then(f); -}); - -export default andThen; \ No newline at end of file diff --git a/node_modules/ramda/es/any.js b/node_modules/ramda/es/any.js deleted file mode 100644 index 4362265..0000000 --- a/node_modules/ramda/es/any.js +++ /dev/null @@ -1,48 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xany from "./internal/_xany.js"; -/** - * Returns `true` if at least one of the elements of the list match the predicate, - * `false` otherwise. - * - * Dispatches to the `any` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false` - * otherwise. - * @see R.all, R.none, R.transduce - * @example - * - * const lessThan0 = R.flip(R.lt)(0); - * const lessThan2 = R.flip(R.lt)(2); - * R.any(lessThan0)([1, 2]); //=> false - * R.any(lessThan2)([1, 2]); //=> true - */ - -var any = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['any'], _xany, function any(fn, list) { - var idx = 0; - - while (idx < list.length) { - if (fn(list[idx])) { - return true; - } - - idx += 1; - } - - return false; -})); - -export default any; \ No newline at end of file diff --git a/node_modules/ramda/es/anyPass.js b/node_modules/ramda/es/anyPass.js deleted file mode 100644 index e98a7d1..0000000 --- a/node_modules/ramda/es/anyPass.js +++ /dev/null @@ -1,52 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import curryN from "./curryN.js"; -import max from "./max.js"; -import pluck from "./pluck.js"; -import reduce from "./reduce.js"; -/** - * Takes a list of predicates and returns a predicate that returns true for a - * given list of arguments if at least one of the provided predicates is - * satisfied by those arguments. - * - * The function returned is a curried function whose arity matches that of the - * highest-arity predicate. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Logic - * @sig [(*... -> Boolean)] -> (*... -> Boolean) - * @param {Array} predicates An array of predicates to check - * @return {Function} The combined predicate - * @see R.allPass - * @example - * - * const isClub = R.propEq('suit', '♣'); - * const isSpade = R.propEq('suit', '♠'); - * const isBlackCard = R.anyPass([isClub, isSpade]); - * - * isBlackCard({rank: '10', suit: '♣'}); //=> true - * isBlackCard({rank: 'Q', suit: '♠'}); //=> true - * isBlackCard({rank: 'Q', suit: '♦'}); //=> false - */ - -var anyPass = -/*#__PURE__*/ -_curry1(function anyPass(preds) { - return curryN(reduce(max, 0, pluck('length', preds)), function () { - var idx = 0; - var len = preds.length; - - while (idx < len) { - if (preds[idx].apply(this, arguments)) { - return true; - } - - idx += 1; - } - - return false; - }); -}); - -export default anyPass; \ No newline at end of file diff --git a/node_modules/ramda/es/ap.js b/node_modules/ramda/es/ap.js deleted file mode 100644 index 3de065f..0000000 --- a/node_modules/ramda/es/ap.js +++ /dev/null @@ -1,42 +0,0 @@ -import _concat from "./internal/_concat.js"; -import _curry2 from "./internal/_curry2.js"; -import _reduce from "./internal/_reduce.js"; -import map from "./map.js"; -/** - * ap applies a list of functions to a list of values. - * - * Dispatches to the `ap` method of the second argument, if present. Also - * treats curried functions as applicatives. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig [a -> b] -> [a] -> [b] - * @sig Apply f => f (a -> b) -> f a -> f b - * @sig (r -> a -> b) -> (r -> a) -> (r -> b) - * @param {*} applyF - * @param {*} applyX - * @return {*} - * @example - * - * R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6] - * R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> ["tasty pizza", "tasty salad", "PIZZA", "SALAD"] - * - * // R.ap can also be used as S combinator - * // when only two functions are passed - * R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA' - * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)] - */ - -var ap = -/*#__PURE__*/ -_curry2(function ap(applyF, applyX) { - return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) { - return applyF(x)(applyX(x)); - } : _reduce(function (acc, f) { - return _concat(acc, map(f, applyX)); - }, [], applyF); -}); - -export default ap; \ No newline at end of file diff --git a/node_modules/ramda/es/aperture.js b/node_modules/ramda/es/aperture.js deleted file mode 100644 index db78388..0000000 --- a/node_modules/ramda/es/aperture.js +++ /dev/null @@ -1,33 +0,0 @@ -import _aperture from "./internal/_aperture.js"; -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xaperture from "./internal/_xaperture.js"; -/** - * Returns a new list, composed of n-tuples of consecutive elements. If `n` is - * greater than the length of the list, an empty list is returned. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig Number -> [a] -> [[a]] - * @param {Number} n The size of the tuples to create - * @param {Array} list The list to split into `n`-length tuples - * @return {Array} The resulting list of `n`-length tuples - * @see R.transduce - * @example - * - * R.aperture(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [2, 3], [3, 4], [4, 5]] - * R.aperture(3, [1, 2, 3, 4, 5]); //=> [[1, 2, 3], [2, 3, 4], [3, 4, 5]] - * R.aperture(7, [1, 2, 3, 4, 5]); //=> [] - */ - -var aperture = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xaperture, _aperture)); - -export default aperture; \ No newline at end of file diff --git a/node_modules/ramda/es/append.js b/node_modules/ramda/es/append.js deleted file mode 100644 index ceb15b6..0000000 --- a/node_modules/ramda/es/append.js +++ /dev/null @@ -1,30 +0,0 @@ -import _concat from "./internal/_concat.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Returns a new list containing the contents of the given list, followed by - * the given element. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} el The element to add to the end of the new list. - * @param {Array} list The list of elements to add a new item to. - * list. - * @return {Array} A new list containing the elements of the old list followed by `el`. - * @see R.prepend - * @example - * - * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests'] - * R.append('tests', []); //=> ['tests'] - * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']] - */ - -var append = -/*#__PURE__*/ -_curry2(function append(el, list) { - return _concat(list, [el]); -}); - -export default append; \ No newline at end of file diff --git a/node_modules/ramda/es/apply.js b/node_modules/ramda/es/apply.js deleted file mode 100644 index 66248ac..0000000 --- a/node_modules/ramda/es/apply.js +++ /dev/null @@ -1,29 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Applies function `fn` to the argument list `args`. This is useful for - * creating a fixed-arity function from a variadic function. `fn` should be a - * bound function if context is significant. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig (*... -> a) -> [*] -> a - * @param {Function} fn The function which will be called with `args` - * @param {Array} args The arguments to call `fn` with - * @return {*} result The result, equivalent to `fn(...args)` - * @see R.call, R.unapply - * @example - * - * const nums = [1, 2, 3, -99, 42, 6, 7]; - * R.apply(Math.max, nums); //=> 42 - * @symb R.apply(f, [a, b, c]) = f(a, b, c) - */ - -var apply = -/*#__PURE__*/ -_curry2(function apply(fn, args) { - return fn.apply(this, args); -}); - -export default apply; \ No newline at end of file diff --git a/node_modules/ramda/es/applySpec.js b/node_modules/ramda/es/applySpec.js deleted file mode 100644 index e1967cb..0000000 --- a/node_modules/ramda/es/applySpec.js +++ /dev/null @@ -1,58 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import apply from "./apply.js"; -import curryN from "./curryN.js"; -import max from "./max.js"; -import pluck from "./pluck.js"; -import reduce from "./reduce.js"; -import keys from "./keys.js"; -import values from "./values.js"; // Use custom mapValues function to avoid issues with specs that include a "map" key and R.map -// delegating calls to .map - -function mapValues(fn, obj) { - return keys(obj).reduce(function (acc, key) { - acc[key] = fn(obj[key]); - return acc; - }, {}); -} -/** - * Given a spec object recursively mapping properties to functions, creates a - * function producing an object of the same structure, by mapping each property - * to the result of calling its associated function with the supplied arguments. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Function - * @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v}) - * @param {Object} spec an object recursively mapping properties to functions for - * producing the values for these properties. - * @return {Function} A function that returns an object of the same structure - * as `spec', with each property set to the value returned by calling its - * associated function with the supplied arguments. - * @see R.converge, R.juxt - * @example - * - * const getMetrics = R.applySpec({ - * sum: R.add, - * nested: { mul: R.multiply } - * }); - * getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } } - * @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } } - */ - - -var applySpec = -/*#__PURE__*/ -_curry1(function applySpec(spec) { - spec = mapValues(function (v) { - return typeof v == 'function' ? v : applySpec(v); - }, spec); - return curryN(reduce(max, 0, pluck('length', values(spec))), function () { - var args = arguments; - return mapValues(function (f) { - return apply(f, args); - }, spec); - }); -}); - -export default applySpec; \ No newline at end of file diff --git a/node_modules/ramda/es/applyTo.js b/node_modules/ramda/es/applyTo.js deleted file mode 100644 index 837c87b..0000000 --- a/node_modules/ramda/es/applyTo.js +++ /dev/null @@ -1,28 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Takes a value and applies a function to it. - * - * This function is also known as the `thrush` combinator. - * - * @func - * @memberOf R - * @since v0.25.0 - * @category Function - * @sig a -> (a -> b) -> b - * @param {*} x The value - * @param {Function} f The function to apply - * @return {*} The result of applying `f` to `x` - * @example - * - * const t42 = R.applyTo(42); - * t42(R.identity); //=> 42 - * t42(R.add(1)); //=> 43 - */ - -var applyTo = -/*#__PURE__*/ -_curry2(function applyTo(x, f) { - return f(x); -}); - -export default applyTo; \ No newline at end of file diff --git a/node_modules/ramda/es/ascend.js b/node_modules/ramda/es/ascend.js deleted file mode 100644 index c6cf38b..0000000 --- a/node_modules/ramda/es/ascend.js +++ /dev/null @@ -1,36 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Makes an ascending comparator function out of a function that returns a value - * that can be compared with `<` and `>`. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Function - * @sig Ord b => (a -> b) -> a -> a -> Number - * @param {Function} fn A function of arity one that returns a value that can be compared - * @param {*} a The first item to be compared. - * @param {*} b The second item to be compared. - * @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0` - * @see R.descend - * @example - * - * const byAge = R.ascend(R.prop('age')); - * const people = [ - * { name: 'Emma', age: 70 }, - * { name: 'Peter', age: 78 }, - * { name: 'Mikhail', age: 62 }, - * ]; - * const peopleByYoungestFirst = R.sort(byAge, people); - * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }] - */ - -var ascend = -/*#__PURE__*/ -_curry3(function ascend(fn, a, b) { - var aa = fn(a); - var bb = fn(b); - return aa < bb ? -1 : aa > bb ? 1 : 0; -}); - -export default ascend; \ No newline at end of file diff --git a/node_modules/ramda/es/assoc.js b/node_modules/ramda/es/assoc.js deleted file mode 100644 index ef0b606..0000000 --- a/node_modules/ramda/es/assoc.js +++ /dev/null @@ -1,36 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Makes a shallow clone of an object, setting or overriding the specified - * property with the given value. Note that this copies and flattens prototype - * properties onto the new object as well. All non-primitive properties are - * copied by reference. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @sig String -> a -> {k: v} -> {k: v} - * @param {String} prop The property name to set - * @param {*} val The new value - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original except for the changed property. - * @see R.dissoc, R.pick - * @example - * - * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3} - */ - -var assoc = -/*#__PURE__*/ -_curry3(function assoc(prop, val, obj) { - var result = {}; - - for (var p in obj) { - result[p] = obj[p]; - } - - result[prop] = val; - return result; -}); - -export default assoc; \ No newline at end of file diff --git a/node_modules/ramda/es/assocPath.js b/node_modules/ramda/es/assocPath.js deleted file mode 100644 index e1c1c49..0000000 --- a/node_modules/ramda/es/assocPath.js +++ /dev/null @@ -1,55 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import _has from "./internal/_has.js"; -import _isArray from "./internal/_isArray.js"; -import _isInteger from "./internal/_isInteger.js"; -import assoc from "./assoc.js"; -import isNil from "./isNil.js"; -/** - * Makes a shallow clone of an object, setting or overriding the nodes required - * to create the given path, and placing the specific value at the tail end of - * that path. Note that this copies and flattens prototype properties onto the - * new object as well. All non-primitive properties are copied by reference. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> a -> {a} -> {a} - * @param {Array} path the path to set - * @param {*} val The new value - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original except along the specified path. - * @see R.dissocPath - * @example - * - * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} - * - * // Any missing or non-object keys in path will be overridden - * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} - */ - -var assocPath = -/*#__PURE__*/ -_curry3(function assocPath(path, val, obj) { - if (path.length === 0) { - return val; - } - - var idx = path[0]; - - if (path.length > 1) { - var nextObj = !isNil(obj) && _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {}; - val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); - } - - if (_isInteger(idx) && _isArray(obj)) { - var arr = [].concat(obj); - arr[idx] = val; - return arr; - } else { - return assoc(idx, val, obj); - } -}); - -export default assocPath; \ No newline at end of file diff --git a/node_modules/ramda/es/binary.js b/node_modules/ramda/es/binary.js deleted file mode 100644 index 15638d3..0000000 --- a/node_modules/ramda/es/binary.js +++ /dev/null @@ -1,38 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import nAry from "./nAry.js"; -/** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly 2 parameters. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Function - * @sig (* -> c) -> (a, b -> c) - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity 2. - * @see R.nAry, R.unary - * @example - * - * const takesThreeArgs = function(a, b, c) { - * return [a, b, c]; - * }; - * takesThreeArgs.length; //=> 3 - * takesThreeArgs(1, 2, 3); //=> [1, 2, 3] - * - * const takesTwoArgs = R.binary(takesThreeArgs); - * takesTwoArgs.length; //=> 2 - * // Only 2 arguments are passed to the wrapped function - * takesTwoArgs(1, 2, 3); //=> [1, 2, undefined] - * @symb R.binary(f)(a, b, c) = f(a, b) - */ - -var binary = -/*#__PURE__*/ -_curry1(function binary(fn) { - return nAry(2, fn); -}); - -export default binary; \ No newline at end of file diff --git a/node_modules/ramda/es/bind.js b/node_modules/ramda/es/bind.js deleted file mode 100644 index 78a1fc5..0000000 --- a/node_modules/ramda/es/bind.js +++ /dev/null @@ -1,34 +0,0 @@ -import _arity from "./internal/_arity.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Creates a function that is bound to a context. - * Note: `R.bind` does not provide the additional argument-binding capabilities of - * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Function - * @category Object - * @sig (* -> *) -> {*} -> (* -> *) - * @param {Function} fn The function to bind to context - * @param {Object} thisObj The context to bind `fn` to - * @return {Function} A function that will execute in the context of `thisObj`. - * @see R.partial - * @example - * - * const log = R.bind(console.log, console); - * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3} - * // logs {a: 2} - * @symb R.bind(f, o)(a, b) = f.call(o, a, b) - */ - -var bind = -/*#__PURE__*/ -_curry2(function bind(fn, thisObj) { - return _arity(fn.length, function () { - return fn.apply(thisObj, arguments); - }); -}); - -export default bind; \ No newline at end of file diff --git a/node_modules/ramda/es/both.js b/node_modules/ramda/es/both.js deleted file mode 100644 index 98e1c40..0000000 --- a/node_modules/ramda/es/both.js +++ /dev/null @@ -1,45 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _isFunction from "./internal/_isFunction.js"; -import and from "./and.js"; -import lift from "./lift.js"; -/** - * A function which calls the two provided functions and returns the `&&` - * of the results. - * It returns the result of the first function if it is false-y and the result - * of the second function otherwise. Note that this is short-circuited, - * meaning that the second function will not be invoked if the first returns a - * false-y value. - * - * In addition to functions, `R.both` also accepts any fantasy-land compatible - * applicative functor. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) - * @param {Function} f A predicate - * @param {Function} g Another predicate - * @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together. - * @see R.and - * @example - * - * const gt10 = R.gt(R.__, 10) - * const lt20 = R.lt(R.__, 20) - * const f = R.both(gt10, lt20); - * f(15); //=> true - * f(30); //=> false - * - * R.both(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(false) - * R.both([false, false, 'a'], [11]); //=> [false, false, 11] - */ - -var both = -/*#__PURE__*/ -_curry2(function both(f, g) { - return _isFunction(f) ? function _both() { - return f.apply(this, arguments) && g.apply(this, arguments); - } : lift(and)(f, g); -}); - -export default both; \ No newline at end of file diff --git a/node_modules/ramda/es/call.js b/node_modules/ramda/es/call.js deleted file mode 100644 index 2825695..0000000 --- a/node_modules/ramda/es/call.js +++ /dev/null @@ -1,40 +0,0 @@ -import curry from "./curry.js"; -/** - * Returns the result of calling its first argument with the remaining - * arguments. This is occasionally useful as a converging function for - * [`R.converge`](#converge): the first branch can produce a function while the - * remaining branches produce values to be passed to that function as its - * arguments. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig (*... -> a),*... -> a - * @param {Function} fn The function to apply to the remaining arguments. - * @param {...*} args Any number of positional arguments. - * @return {*} - * @see R.apply - * @example - * - * R.call(R.add, 1, 2); //=> 3 - * - * const indentN = R.pipe(R.repeat(' '), - * R.join(''), - * R.replace(/^(?!$)/gm)); - * - * const format = R.converge(R.call, [ - * R.pipe(R.prop('indent'), indentN), - * R.prop('value') - * ]); - * - * format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n' - * @symb R.call(f, a, b) = f(a, b) - */ - -var call = -/*#__PURE__*/ -curry(function call(fn) { - return fn.apply(this, Array.prototype.slice.call(arguments, 1)); -}); -export default call; \ No newline at end of file diff --git a/node_modules/ramda/es/chain.js b/node_modules/ramda/es/chain.js deleted file mode 100644 index f9697eb..0000000 --- a/node_modules/ramda/es/chain.js +++ /dev/null @@ -1,47 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _makeFlat from "./internal/_makeFlat.js"; -import _xchain from "./internal/_xchain.js"; -import map from "./map.js"; -/** - * `chain` maps a function over a list and concatenates the results. `chain` - * is also known as `flatMap` in some libraries. - * - * Dispatches to the `chain` method of the second argument, if present, - * according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain). - * - * If second argument is a function, `chain(f, g)(x)` is equivalent to `f(g(x), x)`. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig Chain m => (a -> m b) -> m a -> m b - * @param {Function} fn The function to map with - * @param {Array} list The list to map over - * @return {Array} The result of flat-mapping `list` with `fn` - * @example - * - * const duplicate = n => [n, n]; - * R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3] - * - * R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1] - */ - -var chain = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['fantasy-land/chain', 'chain'], _xchain, function chain(fn, monad) { - if (typeof monad === 'function') { - return function (x) { - return fn(monad(x))(x); - }; - } - - return _makeFlat(false)(map(fn, monad)); -})); - -export default chain; \ No newline at end of file diff --git a/node_modules/ramda/es/clamp.js b/node_modules/ramda/es/clamp.js deleted file mode 100644 index 7a3cb78..0000000 --- a/node_modules/ramda/es/clamp.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Restricts a number to be within a range. - * - * Also works for other ordered types such as Strings and Dates. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Relation - * @sig Ord a => a -> a -> a -> a - * @param {Number} minimum The lower limit of the clamp (inclusive) - * @param {Number} maximum The upper limit of the clamp (inclusive) - * @param {Number} value Value to be clamped - * @return {Number} Returns `minimum` when `val < minimum`, `maximum` when `val > maximum`, returns `val` otherwise - * @example - * - * R.clamp(1, 10, -5) // => 1 - * R.clamp(1, 10, 15) // => 10 - * R.clamp(1, 10, 4) // => 4 - */ - -var clamp = -/*#__PURE__*/ -_curry3(function clamp(min, max, value) { - if (min > max) { - throw new Error('min must not be greater than max in clamp(min, max, value)'); - } - - return value < min ? min : value > max ? max : value; -}); - -export default clamp; \ No newline at end of file diff --git a/node_modules/ramda/es/clone.js b/node_modules/ramda/es/clone.js deleted file mode 100644 index 0ab2d17..0000000 --- a/node_modules/ramda/es/clone.js +++ /dev/null @@ -1,31 +0,0 @@ -import _clone from "./internal/_clone.js"; -import _curry1 from "./internal/_curry1.js"; -/** - * Creates a deep copy of the value which may contain (nested) `Array`s and - * `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are - * assigned by reference rather than copied - * - * Dispatches to a `clone` method if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {*} -> {*} - * @param {*} value The object or array to clone - * @return {*} A deeply cloned copy of `val` - * @example - * - * const objects = [{}, {}, {}]; - * const objectsClone = R.clone(objects); - * objects === objectsClone; //=> false - * objects[0] === objectsClone[0]; //=> false - */ - -var clone = -/*#__PURE__*/ -_curry1(function clone(value) { - return value != null && typeof value.clone === 'function' ? value.clone() : _clone(value, [], [], true); -}); - -export default clone; \ No newline at end of file diff --git a/node_modules/ramda/es/comparator.js b/node_modules/ramda/es/comparator.js deleted file mode 100644 index 9936d66..0000000 --- a/node_modules/ramda/es/comparator.js +++ /dev/null @@ -1,34 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -/** - * Makes a comparator function out of a function that reports whether the first - * element is less than the second. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((a, b) -> Boolean) -> ((a, b) -> Number) - * @param {Function} pred A predicate function of arity two which will return `true` if the first argument - * is less than the second, `false` otherwise - * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0` - * @example - * - * const byAge = R.comparator((a, b) => a.age < b.age); - * const people = [ - * { name: 'Emma', age: 70 }, - * { name: 'Peter', age: 78 }, - * { name: 'Mikhail', age: 62 }, - * ]; - * const peopleByIncreasingAge = R.sort(byAge, people); - * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }] - */ - -var comparator = -/*#__PURE__*/ -_curry1(function comparator(pred) { - return function (a, b) { - return pred(a, b) ? -1 : pred(b, a) ? 1 : 0; - }; -}); - -export default comparator; \ No newline at end of file diff --git a/node_modules/ramda/es/complement.js b/node_modules/ramda/es/complement.js deleted file mode 100644 index cbc7ecf..0000000 --- a/node_modules/ramda/es/complement.js +++ /dev/null @@ -1,29 +0,0 @@ -import lift from "./lift.js"; -import not from "./not.js"; -/** - * Takes a function `f` and returns a function `g` such that if called with the same arguments - * when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`. - * - * `R.complement` may be applied to any functor - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> *) -> (*... -> Boolean) - * @param {Function} f - * @return {Function} - * @see R.not - * @example - * - * const isNotNil = R.complement(R.isNil); - * isNil(null); //=> true - * isNotNil(null); //=> false - * isNil(7); //=> false - * isNotNil(7); //=> true - */ - -var complement = -/*#__PURE__*/ -lift(not); -export default complement; \ No newline at end of file diff --git a/node_modules/ramda/es/compose.js b/node_modules/ramda/es/compose.js deleted file mode 100644 index 7bb0ee5..0000000 --- a/node_modules/ramda/es/compose.js +++ /dev/null @@ -1,34 +0,0 @@ -import pipe from "./pipe.js"; -import reverse from "./reverse.js"; -/** - * Performs right-to-left function composition. The last argument may have - * any arity; the remaining arguments must be unary. - * - * **Note:** The result of compose is not automatically curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.pipe - * @example - * - * const classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName - * const yellGreeting = R.compose(R.toUpper, classyGreeting); - * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND" - * - * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7 - * - * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b))) - */ - -export default function compose() { - if (arguments.length === 0) { - throw new Error('compose requires at least one argument'); - } - - return pipe.apply(this, reverse(arguments)); -} \ No newline at end of file diff --git a/node_modules/ramda/es/composeK.js b/node_modules/ramda/es/composeK.js deleted file mode 100644 index 7c9beba..0000000 --- a/node_modules/ramda/es/composeK.js +++ /dev/null @@ -1,44 +0,0 @@ -import chain from "./chain.js"; -import compose from "./compose.js"; -import map from "./map.js"; -/** - * Returns the right-to-left Kleisli composition of the provided functions, - * each of which must return a value of a type supported by [`chain`](#chain). - * - * `R.composeK(h, g, f)` is equivalent to `R.compose(R.chain(h), R.chain(g), f)`. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Function - * @sig Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> (a -> m z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.pipeK - * @deprecated since v0.26.0 - * @example - * - * // get :: String -> Object -> Maybe * - * const get = R.curry((propName, obj) => Maybe(obj[propName])) - * - * // getStateCode :: Maybe String -> Maybe String - * const getStateCode = R.composeK( - * R.compose(Maybe.of, R.toUpper), - * get('state'), - * get('address'), - * get('user'), - * ); - * getStateCode({"user":{"address":{"state":"ny"}}}); //=> Maybe.Just("NY") - * getStateCode({}); //=> Maybe.Nothing() - * @symb R.composeK(f, g, h)(a) = R.chain(f, R.chain(g, h(a))) - */ - -export default function composeK() { - if (arguments.length === 0) { - throw new Error('composeK requires at least one argument'); - } - - var init = Array.prototype.slice.call(arguments); - var last = init.pop(); - return compose(compose.apply(this, map(chain, init)), last); -} \ No newline at end of file diff --git a/node_modules/ramda/es/composeP.js b/node_modules/ramda/es/composeP.js deleted file mode 100644 index 36b202b..0000000 --- a/node_modules/ramda/es/composeP.js +++ /dev/null @@ -1,45 +0,0 @@ -import pipeP from "./pipeP.js"; -import reverse from "./reverse.js"; -/** - * Performs right-to-left composition of one or more Promise-returning - * functions. The last arguments may have any arity; the remaining - * arguments must be unary. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((y -> Promise z), (x -> Promise y), ..., (a -> Promise b)) -> (a -> Promise z) - * @param {...Function} functions The functions to compose - * @return {Function} - * @see R.pipeP - * @deprecated since v0.26.0 - * @example - * - * const db = { - * users: { - * JOE: { - * name: 'Joe', - * followers: ['STEVE', 'SUZY'] - * } - * } - * } - * - * // We'll pretend to do a db lookup which returns a promise - * const lookupUser = (userId) => Promise.resolve(db.users[userId]) - * const lookupFollowers = (user) => Promise.resolve(user.followers) - * lookupUser('JOE').then(lookupFollowers) - * - * // followersForUser :: String -> Promise [UserId] - * const followersForUser = R.composeP(lookupFollowers, lookupUser); - * followersForUser('JOE').then(followers => console.log('Followers:', followers)) - * // Followers: ["STEVE","SUZY"] - */ - -export default function composeP() { - if (arguments.length === 0) { - throw new Error('composeP requires at least one argument'); - } - - return pipeP.apply(this, reverse(arguments)); -} \ No newline at end of file diff --git a/node_modules/ramda/es/composeWith.js b/node_modules/ramda/es/composeWith.js deleted file mode 100644 index 21531a9..0000000 --- a/node_modules/ramda/es/composeWith.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import pipeWith from "./pipeWith.js"; -import reverse from "./reverse.js"; -/** - * Performs right-to-left function composition using transforming function. The last argument may have - * any arity; the remaining arguments must be unary. - * - * **Note:** The result of compose is not automatically curried. Transforming function is not used on the - * last argument. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig ((* -> *), [(y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)]) -> ((a, b, ..., n) -> z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.compose, R.pipeWith - * @example - * - * const composeWhileNotNil = R.composeWith((f, res) => R.isNil(res) ? res : f(res)); - * - * composeWhileNotNil([R.inc, R.prop('age')])({age: 1}) //=> 2 - * composeWhileNotNil([R.inc, R.prop('age')])({}) //=> undefined - * - * @symb R.composeWith(f)([g, h, i])(...args) = f(g, f(h, i(...args))) - */ - -var composeWith = -/*#__PURE__*/ -_curry2(function composeWith(xf, list) { - return pipeWith.apply(this, [xf, reverse(list)]); -}); - -export default composeWith; \ No newline at end of file diff --git a/node_modules/ramda/es/concat.js b/node_modules/ramda/es/concat.js deleted file mode 100644 index 198f073..0000000 --- a/node_modules/ramda/es/concat.js +++ /dev/null @@ -1,65 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _isArray from "./internal/_isArray.js"; -import _isFunction from "./internal/_isFunction.js"; -import _isString from "./internal/_isString.js"; -import toString from "./toString.js"; -/** - * Returns the result of concatenating the given lists or strings. - * - * Note: `R.concat` expects both arguments to be of the same type, - * unlike the native `Array.prototype.concat` method. It will throw - * an error if you `concat` an Array with a non-Array value. - * - * Dispatches to the `concat` method of the first argument, if present. - * Can also concatenate two members of a [fantasy-land - * compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup). - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] -> [a] - * @sig String -> String -> String - * @param {Array|String} firstList The first list - * @param {Array|String} secondList The second list - * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of - * `secondList`. - * - * @example - * - * R.concat('ABC', 'DEF'); // 'ABCDEF' - * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] - * R.concat([], []); //=> [] - */ - -var concat = -/*#__PURE__*/ -_curry2(function concat(a, b) { - if (_isArray(a)) { - if (_isArray(b)) { - return a.concat(b); - } - - throw new TypeError(toString(b) + ' is not an array'); - } - - if (_isString(a)) { - if (_isString(b)) { - return a + b; - } - - throw new TypeError(toString(b) + ' is not a string'); - } - - if (a != null && _isFunction(a['fantasy-land/concat'])) { - return a['fantasy-land/concat'](b); - } - - if (a != null && _isFunction(a.concat)) { - return a.concat(b); - } - - throw new TypeError(toString(a) + ' does not have a method named "concat" or "fantasy-land/concat"'); -}); - -export default concat; \ No newline at end of file diff --git a/node_modules/ramda/es/cond.js b/node_modules/ramda/es/cond.js deleted file mode 100644 index 922d2b8..0000000 --- a/node_modules/ramda/es/cond.js +++ /dev/null @@ -1,53 +0,0 @@ -import _arity from "./internal/_arity.js"; -import _curry1 from "./internal/_curry1.js"; -import map from "./map.js"; -import max from "./max.js"; -import reduce from "./reduce.js"; -/** - * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic. - * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments - * to `fn` are applied to each of the predicates in turn until one returns a - * "truthy" value, at which point `fn` returns the result of applying its - * arguments to the corresponding transformer. If none of the predicates - * matches, `fn` returns undefined. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Logic - * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *) - * @param {Array} pairs A list of [predicate, transformer] - * @return {Function} - * @see R.ifElse, R.unless, R.when - * @example - * - * const fn = R.cond([ - * [R.equals(0), R.always('water freezes at 0°C')], - * [R.equals(100), R.always('water boils at 100°C')], - * [R.T, temp => 'nothing special happens at ' + temp + '°C'] - * ]); - * fn(0); //=> 'water freezes at 0°C' - * fn(50); //=> 'nothing special happens at 50°C' - * fn(100); //=> 'water boils at 100°C' - */ - -var cond = -/*#__PURE__*/ -_curry1(function cond(pairs) { - var arity = reduce(max, 0, map(function (pair) { - return pair[0].length; - }, pairs)); - return _arity(arity, function () { - var idx = 0; - - while (idx < pairs.length) { - if (pairs[idx][0].apply(this, arguments)) { - return pairs[idx][1].apply(this, arguments); - } - - idx += 1; - } - }); -}); - -export default cond; \ No newline at end of file diff --git a/node_modules/ramda/es/construct.js b/node_modules/ramda/es/construct.js deleted file mode 100644 index 523d573..0000000 --- a/node_modules/ramda/es/construct.js +++ /dev/null @@ -1,42 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import constructN from "./constructN.js"; -/** - * Wraps a constructor function inside a curried function that can be called - * with the same arguments and returns the same type. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (* -> {*}) -> (* -> {*}) - * @param {Function} fn The constructor function to wrap. - * @return {Function} A wrapped, curried constructor function. - * @see R.invoker - * @example - * - * // Constructor function - * function Animal(kind) { - * this.kind = kind; - * }; - * Animal.prototype.sighting = function() { - * return "It's a " + this.kind + "!"; - * } - * - * const AnimalConstructor = R.construct(Animal) - * - * // Notice we no longer need the 'new' keyword: - * AnimalConstructor('Pig'); //=> {"kind": "Pig", "sighting": function (){...}}; - * - * const animalTypes = ["Lion", "Tiger", "Bear"]; - * const animalSighting = R.invoker(0, 'sighting'); - * const sightNewAnimal = R.compose(animalSighting, AnimalConstructor); - * R.map(sightNewAnimal, animalTypes); //=> ["It's a Lion!", "It's a Tiger!", "It's a Bear!"] - */ - -var construct = -/*#__PURE__*/ -_curry1(function construct(Fn) { - return constructN(Fn.length, Fn); -}); - -export default construct; \ No newline at end of file diff --git a/node_modules/ramda/es/constructN.js b/node_modules/ramda/es/constructN.js deleted file mode 100644 index 8aa5fae..0000000 --- a/node_modules/ramda/es/constructN.js +++ /dev/null @@ -1,88 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import curry from "./curry.js"; -import nAry from "./nAry.js"; -/** - * Wraps a constructor function inside a curried function that can be called - * with the same arguments and returns the same type. The arity of the function - * returned is specified to allow using variadic constructor functions. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Function - * @sig Number -> (* -> {*}) -> (* -> {*}) - * @param {Number} n The arity of the constructor function. - * @param {Function} Fn The constructor function to wrap. - * @return {Function} A wrapped, curried constructor function. - * @example - * - * // Variadic Constructor function - * function Salad() { - * this.ingredients = arguments; - * } - * - * Salad.prototype.recipe = function() { - * const instructions = R.map(ingredient => 'Add a dollop of ' + ingredient, this.ingredients); - * return R.join('\n', instructions); - * }; - * - * const ThreeLayerSalad = R.constructN(3, Salad); - * - * // Notice we no longer need the 'new' keyword, and the constructor is curried for 3 arguments. - * const salad = ThreeLayerSalad('Mayonnaise')('Potato Chips')('Ketchup'); - * - * console.log(salad.recipe()); - * // Add a dollop of Mayonnaise - * // Add a dollop of Potato Chips - * // Add a dollop of Ketchup - */ - -var constructN = -/*#__PURE__*/ -_curry2(function constructN(n, Fn) { - if (n > 10) { - throw new Error('Constructor with greater than ten arguments'); - } - - if (n === 0) { - return function () { - return new Fn(); - }; - } - - return curry(nAry(n, function ($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) { - switch (arguments.length) { - case 1: - return new Fn($0); - - case 2: - return new Fn($0, $1); - - case 3: - return new Fn($0, $1, $2); - - case 4: - return new Fn($0, $1, $2, $3); - - case 5: - return new Fn($0, $1, $2, $3, $4); - - case 6: - return new Fn($0, $1, $2, $3, $4, $5); - - case 7: - return new Fn($0, $1, $2, $3, $4, $5, $6); - - case 8: - return new Fn($0, $1, $2, $3, $4, $5, $6, $7); - - case 9: - return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8); - - case 10: - return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8, $9); - } - })); -}); - -export default constructN; \ No newline at end of file diff --git a/node_modules/ramda/es/contains.js b/node_modules/ramda/es/contains.js deleted file mode 100644 index 63530f8..0000000 --- a/node_modules/ramda/es/contains.js +++ /dev/null @@ -1,31 +0,0 @@ -import _includes from "./internal/_includes.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Returns `true` if the specified value is equal, in [`R.equals`](#equals) - * terms, to at least one element of the given list; `false` otherwise. - * Works also with strings. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Boolean - * @param {Object} a The item to compare against. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. - * @see R.includes - * @deprecated since v0.26.0 - * @example - * - * R.contains(3, [1, 2, 3]); //=> true - * R.contains(4, [1, 2, 3]); //=> false - * R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true - * R.contains([42], [[42]]); //=> true - * R.contains('ba', 'banana'); //=>true - */ - -var contains = -/*#__PURE__*/ -_curry2(_includes); - -export default contains; \ No newline at end of file diff --git a/node_modules/ramda/es/converge.js b/node_modules/ramda/es/converge.js deleted file mode 100644 index 1886995..0000000 --- a/node_modules/ramda/es/converge.js +++ /dev/null @@ -1,48 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _map from "./internal/_map.js"; -import curryN from "./curryN.js"; -import max from "./max.js"; -import pluck from "./pluck.js"; -import reduce from "./reduce.js"; -/** - * Accepts a converging function and a list of branching functions and returns - * a new function. The arity of the new function is the same as the arity of - * the longest branching function. When invoked, this new function is applied - * to some arguments, and each branching function is applied to those same - * arguments. The results of each branching function are passed as arguments - * to the converging function to produce the return value. - * - * @func - * @memberOf R - * @since v0.4.2 - * @category Function - * @sig ((x1, x2, ...) -> z) -> [((a, b, ...) -> x1), ((a, b, ...) -> x2), ...] -> (a -> b -> ... -> z) - * @param {Function} after A function. `after` will be invoked with the return values of - * `fn1` and `fn2` as its arguments. - * @param {Array} functions A list of functions. - * @return {Function} A new function. - * @see R.useWith - * @example - * - * const average = R.converge(R.divide, [R.sum, R.length]) - * average([1, 2, 3, 4, 5, 6, 7]) //=> 4 - * - * const strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower]) - * strangeConcat("Yodel") //=> "YODELyodel" - * - * @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b)) - */ - -var converge = -/*#__PURE__*/ -_curry2(function converge(after, fns) { - return curryN(reduce(max, 0, pluck('length', fns)), function () { - var args = arguments; - var context = this; - return after.apply(context, _map(function (fn) { - return fn.apply(context, args); - }, fns)); - }); -}); - -export default converge; \ No newline at end of file diff --git a/node_modules/ramda/es/countBy.js b/node_modules/ramda/es/countBy.js deleted file mode 100644 index 6ce42c8..0000000 --- a/node_modules/ramda/es/countBy.js +++ /dev/null @@ -1,32 +0,0 @@ -import reduceBy from "./reduceBy.js"; -/** - * Counts the elements of a list according to how many match each value of a - * key generated by the supplied function. Returns an object mapping the keys - * produced by `fn` to the number of occurrences in the list. Note that all - * keys are coerced to strings because of how JavaScript objects work. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig (a -> String) -> [a] -> {*} - * @param {Function} fn The function used to map values to keys. - * @param {Array} list The list to count elements from. - * @return {Object} An object mapping keys to number of occurrences in the list. - * @example - * - * const numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2]; - * R.countBy(Math.floor)(numbers); //=> {'1': 3, '2': 2, '3': 1} - * - * const letters = ['a', 'b', 'A', 'a', 'B', 'c']; - * R.countBy(R.toLower)(letters); //=> {'a': 3, 'b': 2, 'c': 1} - */ - -var countBy = -/*#__PURE__*/ -reduceBy(function (acc, elem) { - return acc + 1; -}, 0); -export default countBy; \ No newline at end of file diff --git a/node_modules/ramda/es/curry.js b/node_modules/ramda/es/curry.js deleted file mode 100644 index 643edb9..0000000 --- a/node_modules/ramda/es/curry.js +++ /dev/null @@ -1,51 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import curryN from "./curryN.js"; -/** - * Returns a curried equivalent of the provided function. The curried function - * has two unusual capabilities. First, its arguments needn't be provided one - * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the - * following are equivalent: - * - * - `g(1)(2)(3)` - * - `g(1)(2, 3)` - * - `g(1, 2)(3)` - * - `g(1, 2, 3)` - * - * Secondly, the special placeholder value [`R.__`](#__) may be used to specify - * "gaps", allowing partial application of any combination of arguments, - * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), - * the following are equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (* -> a) -> (* -> a) - * @param {Function} fn The function to curry. - * @return {Function} A new, curried function. - * @see R.curryN, R.partial - * @example - * - * const addFourNumbers = (a, b, c, d) => a + b + c + d; - * - * const curriedAddFourNumbers = R.curry(addFourNumbers); - * const f = curriedAddFourNumbers(1, 2); - * const g = f(3); - * g(4); //=> 10 - */ - -var curry = -/*#__PURE__*/ -_curry1(function curry(fn) { - return curryN(fn.length, fn); -}); - -export default curry; \ No newline at end of file diff --git a/node_modules/ramda/es/curryN.js b/node_modules/ramda/es/curryN.js deleted file mode 100644 index bcf634f..0000000 --- a/node_modules/ramda/es/curryN.js +++ /dev/null @@ -1,58 +0,0 @@ -import _arity from "./internal/_arity.js"; -import _curry1 from "./internal/_curry1.js"; -import _curry2 from "./internal/_curry2.js"; -import _curryN from "./internal/_curryN.js"; -/** - * Returns a curried equivalent of the provided function, with the specified - * arity. The curried function has two unusual capabilities. First, its - * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the - * following are equivalent: - * - * - `g(1)(2)(3)` - * - `g(1)(2, 3)` - * - `g(1, 2)(3)` - * - `g(1, 2, 3)` - * - * Secondly, the special placeholder value [`R.__`](#__) may be used to specify - * "gaps", allowing partial application of any combination of arguments, - * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), - * the following are equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @func - * @memberOf R - * @since v0.5.0 - * @category Function - * @sig Number -> (* -> a) -> (* -> a) - * @param {Number} length The arity for the returned function. - * @param {Function} fn The function to curry. - * @return {Function} A new, curried function. - * @see R.curry - * @example - * - * const sumArgs = (...args) => R.sum(args); - * - * const curriedAddFourNumbers = R.curryN(4, sumArgs); - * const f = curriedAddFourNumbers(1, 2); - * const g = f(3); - * g(4); //=> 10 - */ - -var curryN = -/*#__PURE__*/ -_curry2(function curryN(length, fn) { - if (length === 1) { - return _curry1(fn); - } - - return _arity(length, _curryN(length, [], fn)); -}); - -export default curryN; \ No newline at end of file diff --git a/node_modules/ramda/es/dec.js b/node_modules/ramda/es/dec.js deleted file mode 100644 index f911fa8..0000000 --- a/node_modules/ramda/es/dec.js +++ /dev/null @@ -1,21 +0,0 @@ -import add from "./add.js"; -/** - * Decrements its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} n - 1 - * @see R.inc - * @example - * - * R.dec(42); //=> 41 - */ - -var dec = -/*#__PURE__*/ -add(-1); -export default dec; \ No newline at end of file diff --git a/node_modules/ramda/es/defaultTo.js b/node_modules/ramda/es/defaultTo.js deleted file mode 100644 index 4d0fb9e..0000000 --- a/node_modules/ramda/es/defaultTo.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns the second argument if it is not `null`, `undefined` or `NaN`; - * otherwise the first argument is returned. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Logic - * @sig a -> b -> a | b - * @param {a} default The default value. - * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`. - * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value - * @example - * - * const defaultTo42 = R.defaultTo(42); - * - * defaultTo42(null); //=> 42 - * defaultTo42(undefined); //=> 42 - * defaultTo42(false); //=> false - * defaultTo42('Ramda'); //=> 'Ramda' - * // parseInt('string') results in NaN - * defaultTo42(parseInt('string')); //=> 42 - */ - -var defaultTo = -/*#__PURE__*/ -_curry2(function defaultTo(d, v) { - return v == null || v !== v ? d : v; -}); - -export default defaultTo; \ No newline at end of file diff --git a/node_modules/ramda/es/descend.js b/node_modules/ramda/es/descend.js deleted file mode 100644 index af051fd..0000000 --- a/node_modules/ramda/es/descend.js +++ /dev/null @@ -1,36 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Makes a descending comparator function out of a function that returns a value - * that can be compared with `<` and `>`. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Function - * @sig Ord b => (a -> b) -> a -> a -> Number - * @param {Function} fn A function of arity one that returns a value that can be compared - * @param {*} a The first item to be compared. - * @param {*} b The second item to be compared. - * @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0` - * @see R.ascend - * @example - * - * const byAge = R.descend(R.prop('age')); - * const people = [ - * { name: 'Emma', age: 70 }, - * { name: 'Peter', age: 78 }, - * { name: 'Mikhail', age: 62 }, - * ]; - * const peopleByOldestFirst = R.sort(byAge, people); - * //=> [{ name: 'Peter', age: 78 }, { name: 'Emma', age: 70 }, { name: 'Mikhail', age: 62 }] - */ - -var descend = -/*#__PURE__*/ -_curry3(function descend(fn, a, b) { - var aa = fn(a); - var bb = fn(b); - return aa > bb ? -1 : aa < bb ? 1 : 0; -}); - -export default descend; \ No newline at end of file diff --git a/node_modules/ramda/es/difference.js b/node_modules/ramda/es/difference.js deleted file mode 100644 index ed3ce98..0000000 --- a/node_modules/ramda/es/difference.js +++ /dev/null @@ -1,48 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _Set from "./internal/_Set.js"; -/** - * Finds the set (i.e. no duplicates) of all elements in the first list not - * contained in the second list. Objects and Arrays are compared in terms of - * value equality, not reference equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` that are not in `list2`. - * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without - * @example - * - * R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2] - * R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5] - * R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}] - */ - -var difference = -/*#__PURE__*/ -_curry2(function difference(first, second) { - var out = []; - var idx = 0; - var firstLen = first.length; - var secondLen = second.length; - var toFilterOut = new _Set(); - - for (var i = 0; i < secondLen; i += 1) { - toFilterOut.add(second[i]); - } - - while (idx < firstLen) { - if (toFilterOut.add(first[idx])) { - out[out.length] = first[idx]; - } - - idx += 1; - } - - return out; -}); - -export default difference; \ No newline at end of file diff --git a/node_modules/ramda/es/differenceWith.js b/node_modules/ramda/es/differenceWith.js deleted file mode 100644 index 5c1791d..0000000 --- a/node_modules/ramda/es/differenceWith.js +++ /dev/null @@ -1,44 +0,0 @@ -import _includesWith from "./internal/_includesWith.js"; -import _curry3 from "./internal/_curry3.js"; -/** - * Finds the set (i.e. no duplicates) of all elements in the first list not - * contained in the second list. Duplication is determined according to the - * value returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` that are not in `list2`. - * @see R.difference, R.symmetricDifference, R.symmetricDifferenceWith - * @example - * - * const cmp = (x, y) => x.a === y.a; - * const l1 = [{a: 1}, {a: 2}, {a: 3}]; - * const l2 = [{a: 3}, {a: 4}]; - * R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}] - */ - -var differenceWith = -/*#__PURE__*/ -_curry3(function differenceWith(pred, first, second) { - var out = []; - var idx = 0; - var firstLen = first.length; - - while (idx < firstLen) { - if (!_includesWith(pred, first[idx], second) && !_includesWith(pred, first[idx], out)) { - out.push(first[idx]); - } - - idx += 1; - } - - return out; -}); - -export default differenceWith; \ No newline at end of file diff --git a/node_modules/ramda/es/dissoc.js b/node_modules/ramda/es/dissoc.js deleted file mode 100644 index 2bf8e8f..0000000 --- a/node_modules/ramda/es/dissoc.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns a new object that does not contain a `prop` property. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Object - * @sig String -> {k: v} -> {k: v} - * @param {String} prop The name of the property to dissociate - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original but without the specified property - * @see R.assoc, R.omit - * @example - * - * R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3} - */ - -var dissoc = -/*#__PURE__*/ -_curry2(function dissoc(prop, obj) { - var result = {}; - - for (var p in obj) { - result[p] = obj[p]; - } - - delete result[prop]; - return result; -}); - -export default dissoc; \ No newline at end of file diff --git a/node_modules/ramda/es/dissocPath.js b/node_modules/ramda/es/dissocPath.js deleted file mode 100644 index 427477b..0000000 --- a/node_modules/ramda/es/dissocPath.js +++ /dev/null @@ -1,53 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _isInteger from "./internal/_isInteger.js"; -import _isArray from "./internal/_isArray.js"; -import assoc from "./assoc.js"; -import dissoc from "./dissoc.js"; -import remove from "./remove.js"; -import update from "./update.js"; -/** - * Makes a shallow clone of an object, omitting the property at the given path. - * Note that this copies and flattens prototype properties onto the new object - * as well. All non-primitive properties are copied by reference. - * - * @func - * @memberOf R - * @since v0.11.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {k: v} -> {k: v} - * @param {Array} path The path to the value to omit - * @param {Object} obj The object to clone - * @return {Object} A new object without the property at path - * @see R.assocPath - * @example - * - * R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}} - */ - -var dissocPath = -/*#__PURE__*/ -_curry2(function dissocPath(path, obj) { - switch (path.length) { - case 0: - return obj; - - case 1: - return _isInteger(path[0]) && _isArray(obj) ? remove(path[0], 1, obj) : dissoc(path[0], obj); - - default: - var head = path[0]; - var tail = Array.prototype.slice.call(path, 1); - - if (obj[head] == null) { - return obj; - } else if (_isInteger(head) && _isArray(obj)) { - return update(head, dissocPath(tail, obj[head]), obj); - } else { - return assoc(head, dissocPath(tail, obj[head]), obj); - } - - } -}); - -export default dissocPath; \ No newline at end of file diff --git a/node_modules/ramda/es/divide.js b/node_modules/ramda/es/divide.js deleted file mode 100644 index 6d949e2..0000000 --- a/node_modules/ramda/es/divide.js +++ /dev/null @@ -1,31 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Divides two numbers. Equivalent to `a / b`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a / b`. - * @see R.multiply - * @example - * - * R.divide(71, 100); //=> 0.71 - * - * const half = R.divide(R.__, 2); - * half(42); //=> 21 - * - * const reciprocal = R.divide(1); - * reciprocal(4); //=> 0.25 - */ - -var divide = -/*#__PURE__*/ -_curry2(function divide(a, b) { - return a / b; -}); - -export default divide; \ No newline at end of file diff --git a/node_modules/ramda/es/drop.js b/node_modules/ramda/es/drop.js deleted file mode 100644 index 62e6fd2..0000000 --- a/node_modules/ramda/es/drop.js +++ /dev/null @@ -1,38 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xdrop from "./internal/_xdrop.js"; -import slice from "./slice.js"; -/** - * Returns all but the first `n` elements of the given list, string, or - * transducer/transformer (or object with a `drop` method). - * - * Dispatches to the `drop` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n - * @param {*} list - * @return {*} A copy of list without the first `n` elements - * @see R.take, R.transduce, R.dropLast, R.dropWhile - * @example - * - * R.drop(1, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] - * R.drop(2, ['foo', 'bar', 'baz']); //=> ['baz'] - * R.drop(3, ['foo', 'bar', 'baz']); //=> [] - * R.drop(4, ['foo', 'bar', 'baz']); //=> [] - * R.drop(3, 'ramda'); //=> 'da' - */ - -var drop = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['drop'], _xdrop, function drop(n, xs) { - return slice(Math.max(0, n), Infinity, xs); -})); - -export default drop; \ No newline at end of file diff --git a/node_modules/ramda/es/dropLast.js b/node_modules/ramda/es/dropLast.js deleted file mode 100644 index de0b54a..0000000 --- a/node_modules/ramda/es/dropLast.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _dropLast from "./internal/_dropLast.js"; -import _xdropLast from "./internal/_xdropLast.js"; -/** - * Returns a list containing all but the last `n` elements of the given `list`. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n The number of elements of `list` to skip. - * @param {Array} list The list of elements to consider. - * @return {Array} A copy of the list with only the first `list.length - n` elements - * @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile - * @example - * - * R.dropLast(1, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] - * R.dropLast(2, ['foo', 'bar', 'baz']); //=> ['foo'] - * R.dropLast(3, ['foo', 'bar', 'baz']); //=> [] - * R.dropLast(4, ['foo', 'bar', 'baz']); //=> [] - * R.dropLast(3, 'ramda'); //=> 'ra' - */ - -var dropLast = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xdropLast, _dropLast)); - -export default dropLast; \ No newline at end of file diff --git a/node_modules/ramda/es/dropLastWhile.js b/node_modules/ramda/es/dropLastWhile.js deleted file mode 100644 index bfec24f..0000000 --- a/node_modules/ramda/es/dropLastWhile.js +++ /dev/null @@ -1,39 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _dropLastWhile from "./internal/_dropLastWhile.js"; -import _xdropLastWhile from "./internal/_xdropLastWhile.js"; -/** - * Returns a new list excluding all the tailing elements of a given list which - * satisfy the supplied predicate function. It passes each value from the right - * to the supplied predicate function, skipping elements until the predicate - * function returns a `falsy` value. The predicate function is applied to one argument: - * *(value)*. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @sig (a -> Boolean) -> String -> String - * @param {Function} predicate The function to be called on each element - * @param {Array} xs The collection to iterate over. - * @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`. - * @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile - * @example - * - * const lteThree = x => x <= 3; - * - * R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4] - * - * R.dropLastWhile(x => x !== 'd' , 'Ramda'); //=> 'Ramd' - */ - -var dropLastWhile = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xdropLastWhile, _dropLastWhile)); - -export default dropLastWhile; \ No newline at end of file diff --git a/node_modules/ramda/es/dropRepeats.js b/node_modules/ramda/es/dropRepeats.js deleted file mode 100644 index 3481025..0000000 --- a/node_modules/ramda/es/dropRepeats.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xdropRepeatsWith from "./internal/_xdropRepeatsWith.js"; -import dropRepeatsWith from "./dropRepeatsWith.js"; -import equals from "./equals.js"; -/** - * Returns a new list without any consecutively repeating elements. - * [`R.equals`](#equals) is used to determine equality. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig [a] -> [a] - * @param {Array} list The array to consider. - * @return {Array} `list` without repeating elements. - * @see R.transduce - * @example - * - * R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2] - */ - -var dropRepeats = -/*#__PURE__*/ -_curry1( -/*#__PURE__*/ -_dispatchable([], -/*#__PURE__*/ -_xdropRepeatsWith(equals), -/*#__PURE__*/ -dropRepeatsWith(equals))); - -export default dropRepeats; \ No newline at end of file diff --git a/node_modules/ramda/es/dropRepeatsWith.js b/node_modules/ramda/es/dropRepeatsWith.js deleted file mode 100644 index dab3554..0000000 --- a/node_modules/ramda/es/dropRepeatsWith.js +++ /dev/null @@ -1,51 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xdropRepeatsWith from "./internal/_xdropRepeatsWith.js"; -import last from "./last.js"; -/** - * Returns a new list without any consecutively repeating elements. Equality is - * determined by applying the supplied predicate to each pair of consecutive elements. The - * first element in a series of equal elements will be preserved. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig ((a, a) -> Boolean) -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list The array to consider. - * @return {Array} `list` without repeating elements. - * @see R.transduce - * @example - * - * const l = [1, -1, 1, 3, 4, -4, -4, -5, 5, 3, 3]; - * R.dropRepeatsWith(R.eqBy(Math.abs), l); //=> [1, 3, 4, -5, 3] - */ - -var dropRepeatsWith = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xdropRepeatsWith, function dropRepeatsWith(pred, list) { - var result = []; - var idx = 1; - var len = list.length; - - if (len !== 0) { - result[0] = list[0]; - - while (idx < len) { - if (!pred(last(result), list[idx])) { - result[result.length] = list[idx]; - } - - idx += 1; - } - } - - return result; -})); - -export default dropRepeatsWith; \ No newline at end of file diff --git a/node_modules/ramda/es/dropWhile.js b/node_modules/ramda/es/dropWhile.js deleted file mode 100644 index d3b336c..0000000 --- a/node_modules/ramda/es/dropWhile.js +++ /dev/null @@ -1,49 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xdropWhile from "./internal/_xdropWhile.js"; -import slice from "./slice.js"; -/** - * Returns a new list excluding the leading elements of a given list which - * satisfy the supplied predicate function. It passes each value to the supplied - * predicate function, skipping elements while the predicate function returns - * `true`. The predicate function is applied to one argument: *(value)*. - * - * Dispatches to the `dropWhile` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @sig (a -> Boolean) -> String -> String - * @param {Function} fn The function called per iteration. - * @param {Array} xs The collection to iterate over. - * @return {Array} A new array. - * @see R.takeWhile, R.transduce, R.addIndex - * @example - * - * const lteTwo = x => x <= 2; - * - * R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1] - * - * R.dropWhile(x => x !== 'd' , 'Ramda'); //=> 'da' - */ - -var dropWhile = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['dropWhile'], _xdropWhile, function dropWhile(pred, xs) { - var idx = 0; - var len = xs.length; - - while (idx < len && pred(xs[idx])) { - idx += 1; - } - - return slice(idx, Infinity, xs); -})); - -export default dropWhile; \ No newline at end of file diff --git a/node_modules/ramda/es/either.js b/node_modules/ramda/es/either.js deleted file mode 100644 index 9f6ba85..0000000 --- a/node_modules/ramda/es/either.js +++ /dev/null @@ -1,44 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _isFunction from "./internal/_isFunction.js"; -import lift from "./lift.js"; -import or from "./or.js"; -/** - * A function wrapping calls to the two functions in an `||` operation, - * returning the result of the first function if it is truth-y and the result - * of the second function otherwise. Note that this is short-circuited, - * meaning that the second function will not be invoked if the first returns a - * truth-y value. - * - * In addition to functions, `R.either` also accepts any fantasy-land compatible - * applicative functor. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) - * @param {Function} f a predicate - * @param {Function} g another predicate - * @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together. - * @see R.or - * @example - * - * const gt10 = x => x > 10; - * const even = x => x % 2 === 0; - * const f = R.either(gt10, even); - * f(101); //=> true - * f(8); //=> true - * - * R.either(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(55) - * R.either([false, false, 'a'], [11]) // => [11, 11, "a"] - */ - -var either = -/*#__PURE__*/ -_curry2(function either(f, g) { - return _isFunction(f) ? function _either() { - return f.apply(this, arguments) || g.apply(this, arguments); - } : lift(or)(f, g); -}); - -export default either; \ No newline at end of file diff --git a/node_modules/ramda/es/empty.js b/node_modules/ramda/es/empty.js deleted file mode 100644 index e22cfe6..0000000 --- a/node_modules/ramda/es/empty.js +++ /dev/null @@ -1,39 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import _isArguments from "./internal/_isArguments.js"; -import _isArray from "./internal/_isArray.js"; -import _isObject from "./internal/_isObject.js"; -import _isString from "./internal/_isString.js"; -/** - * Returns the empty value of its argument's type. Ramda defines the empty - * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other - * types are supported if they define `.empty`, - * `.prototype.empty` or implement the - * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid). - * - * Dispatches to the `empty` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig a -> a - * @param {*} x - * @return {*} - * @example - * - * R.empty(Just(42)); //=> Nothing() - * R.empty([1, 2, 3]); //=> [] - * R.empty('unicorns'); //=> '' - * R.empty({x: 1, y: 2}); //=> {} - */ - -var empty = -/*#__PURE__*/ -_curry1(function empty(x) { - return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments(x) ? function () { - return arguments; - }() : void 0 // else - ; -}); - -export default empty; \ No newline at end of file diff --git a/node_modules/ramda/es/endsWith.js b/node_modules/ramda/es/endsWith.js deleted file mode 100644 index af8d754..0000000 --- a/node_modules/ramda/es/endsWith.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import equals from "./equals.js"; -import takeLast from "./takeLast.js"; -/** - * Checks if a list ends with the provided sublist. - * - * Similarly, checks if a string ends with the provided substring. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category List - * @sig [a] -> [a] -> Boolean - * @sig String -> String -> Boolean - * @param {*} suffix - * @param {*} list - * @return {Boolean} - * @see R.startsWith - * @example - * - * R.endsWith('c', 'abc') //=> true - * R.endsWith('b', 'abc') //=> false - * R.endsWith(['c'], ['a', 'b', 'c']) //=> true - * R.endsWith(['b'], ['a', 'b', 'c']) //=> false - */ - -var endsWith = -/*#__PURE__*/ -_curry2(function (suffix, list) { - return equals(takeLast(suffix.length, list), suffix); -}); - -export default endsWith; \ No newline at end of file diff --git a/node_modules/ramda/es/eqBy.js b/node_modules/ramda/es/eqBy.js deleted file mode 100644 index 83b9f3a..0000000 --- a/node_modules/ramda/es/eqBy.js +++ /dev/null @@ -1,27 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import equals from "./equals.js"; -/** - * Takes a function and two values in its domain and returns `true` if the - * values map to the same value in the codomain; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Relation - * @sig (a -> b) -> a -> a -> Boolean - * @param {Function} f - * @param {*} x - * @param {*} y - * @return {Boolean} - * @example - * - * R.eqBy(Math.abs, 5, -5); //=> true - */ - -var eqBy = -/*#__PURE__*/ -_curry3(function eqBy(f, x, y) { - return equals(f(x), f(y)); -}); - -export default eqBy; \ No newline at end of file diff --git a/node_modules/ramda/es/eqProps.js b/node_modules/ramda/es/eqProps.js deleted file mode 100644 index 4739f5d..0000000 --- a/node_modules/ramda/es/eqProps.js +++ /dev/null @@ -1,31 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import equals from "./equals.js"; -/** - * Reports whether two objects have the same value, in [`R.equals`](#equals) - * terms, for the specified property. Useful as a curried predicate. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig k -> {k: v} -> {k: v} -> Boolean - * @param {String} prop The name of the property to compare - * @param {Object} obj1 - * @param {Object} obj2 - * @return {Boolean} - * - * @example - * - * const o1 = { a: 1, b: 2, c: 3, d: 4 }; - * const o2 = { a: 10, b: 20, c: 3, d: 40 }; - * R.eqProps('a', o1, o2); //=> false - * R.eqProps('c', o1, o2); //=> true - */ - -var eqProps = -/*#__PURE__*/ -_curry3(function eqProps(prop, obj1, obj2) { - return equals(obj1[prop], obj2[prop]); -}); - -export default eqProps; \ No newline at end of file diff --git a/node_modules/ramda/es/equals.js b/node_modules/ramda/es/equals.js deleted file mode 100644 index 7e832e4..0000000 --- a/node_modules/ramda/es/equals.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _equals from "./internal/_equals.js"; -/** - * Returns `true` if its arguments are equivalent, `false` otherwise. Handles - * cyclical data structures. - * - * Dispatches symmetrically to the `equals` methods of both arguments, if - * present. - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Relation - * @sig a -> b -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @example - * - * R.equals(1, 1); //=> true - * R.equals(1, '1'); //=> false - * R.equals([1, 2, 3], [1, 2, 3]); //=> true - * - * const a = {}; a.v = a; - * const b = {}; b.v = b; - * R.equals(a, b); //=> true - */ - -var equals = -/*#__PURE__*/ -_curry2(function equals(a, b) { - return _equals(a, b, [], []); -}); - -export default equals; \ No newline at end of file diff --git a/node_modules/ramda/es/evolve.js b/node_modules/ramda/es/evolve.js deleted file mode 100644 index fb8ce25..0000000 --- a/node_modules/ramda/es/evolve.js +++ /dev/null @@ -1,45 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Creates a new object by recursively evolving a shallow copy of `object`, - * according to the `transformation` functions. All non-primitive properties - * are copied by reference. - * - * A `transformation` function will not be invoked if its corresponding key - * does not exist in the evolved object. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {k: (v -> v)} -> {k: v} -> {k: v} - * @param {Object} transformations The object specifying transformation functions to apply - * to the object. - * @param {Object} object The object to be transformed. - * @return {Object} The transformed object. - * @example - * - * const tomato = {firstName: ' Tomato ', data: {elapsed: 100, remaining: 1400}, id:123}; - * const transformations = { - * firstName: R.trim, - * lastName: R.trim, // Will not get invoked. - * data: {elapsed: R.add(1), remaining: R.add(-1)} - * }; - * R.evolve(transformations, tomato); //=> {firstName: 'Tomato', data: {elapsed: 101, remaining: 1399}, id:123} - */ - -var evolve = -/*#__PURE__*/ -_curry2(function evolve(transformations, object) { - var result = object instanceof Array ? [] : {}; - var transformation, key, type; - - for (key in object) { - transformation = transformations[key]; - type = typeof transformation; - result[key] = type === 'function' ? transformation(object[key]) : transformation && type === 'object' ? evolve(transformation, object[key]) : object[key]; - } - - return result; -}); - -export default evolve; \ No newline at end of file diff --git a/node_modules/ramda/es/filter.js b/node_modules/ramda/es/filter.js deleted file mode 100644 index 6512708..0000000 --- a/node_modules/ramda/es/filter.js +++ /dev/null @@ -1,51 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _filter from "./internal/_filter.js"; -import _isObject from "./internal/_isObject.js"; -import _reduce from "./internal/_reduce.js"; -import _xfilter from "./internal/_xfilter.js"; -import keys from "./keys.js"; -/** - * Takes a predicate and a `Filterable`, and returns a new filterable of the - * same type containing the members of the given filterable which satisfy the - * given predicate. Filterable objects include plain objects or any object - * that has a filter method such as `Array`. - * - * Dispatches to the `filter` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> f a - * @param {Function} pred - * @param {Array} filterable - * @return {Array} Filterable - * @see R.reject, R.transduce, R.addIndex - * @example - * - * const isEven = n => n % 2 === 0; - * - * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4] - * - * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} - */ - -var filter = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['filter'], _xfilter, function (pred, filterable) { - return _isObject(filterable) ? _reduce(function (acc, key) { - if (pred(filterable[key])) { - acc[key] = filterable[key]; - } - - return acc; - }, {}, keys(filterable)) : // else - _filter(pred, filterable); -})); - -export default filter; \ No newline at end of file diff --git a/node_modules/ramda/es/find.js b/node_modules/ramda/es/find.js deleted file mode 100644 index f312bcc..0000000 --- a/node_modules/ramda/es/find.js +++ /dev/null @@ -1,46 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xfind from "./internal/_xfind.js"; -/** - * Returns the first element of the list which matches the predicate, or - * `undefined` if no element matches. - * - * Dispatches to the `find` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> a | undefined - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Object} The element found, or `undefined`. - * @see R.transduce - * @example - * - * const xs = [{a: 1}, {a: 2}, {a: 3}]; - * R.find(R.propEq('a', 2))(xs); //=> {a: 2} - * R.find(R.propEq('a', 4))(xs); //=> undefined - */ - -var find = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['find'], _xfind, function find(fn, list) { - var idx = 0; - var len = list.length; - - while (idx < len) { - if (fn(list[idx])) { - return list[idx]; - } - - idx += 1; - } -})); - -export default find; \ No newline at end of file diff --git a/node_modules/ramda/es/findIndex.js b/node_modules/ramda/es/findIndex.js deleted file mode 100644 index 5df1726..0000000 --- a/node_modules/ramda/es/findIndex.js +++ /dev/null @@ -1,46 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xfindIndex from "./internal/_xfindIndex.js"; -/** - * Returns the index of the first element of the list which matches the - * predicate, or `-1` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> Number - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Number} The index of the element found, or `-1`. - * @see R.transduce - * @example - * - * const xs = [{a: 1}, {a: 2}, {a: 3}]; - * R.findIndex(R.propEq('a', 2))(xs); //=> 1 - * R.findIndex(R.propEq('a', 4))(xs); //=> -1 - */ - -var findIndex = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xfindIndex, function findIndex(fn, list) { - var idx = 0; - var len = list.length; - - while (idx < len) { - if (fn(list[idx])) { - return idx; - } - - idx += 1; - } - - return -1; -})); - -export default findIndex; \ No newline at end of file diff --git a/node_modules/ramda/es/findLast.js b/node_modules/ramda/es/findLast.js deleted file mode 100644 index 709e5b4..0000000 --- a/node_modules/ramda/es/findLast.js +++ /dev/null @@ -1,43 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xfindLast from "./internal/_xfindLast.js"; -/** - * Returns the last element of the list which matches the predicate, or - * `undefined` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> a | undefined - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Object} The element found, or `undefined`. - * @see R.transduce - * @example - * - * const xs = [{a: 1, b: 0}, {a:1, b: 1}]; - * R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1} - * R.findLast(R.propEq('a', 4))(xs); //=> undefined - */ - -var findLast = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xfindLast, function findLast(fn, list) { - var idx = list.length - 1; - - while (idx >= 0) { - if (fn(list[idx])) { - return list[idx]; - } - - idx -= 1; - } -})); - -export default findLast; \ No newline at end of file diff --git a/node_modules/ramda/es/findLastIndex.js b/node_modules/ramda/es/findLastIndex.js deleted file mode 100644 index 2012abb..0000000 --- a/node_modules/ramda/es/findLastIndex.js +++ /dev/null @@ -1,45 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xfindLastIndex from "./internal/_xfindLastIndex.js"; -/** - * Returns the index of the last element of the list which matches the - * predicate, or `-1` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> Number - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Number} The index of the element found, or `-1`. - * @see R.transduce - * @example - * - * const xs = [{a: 1, b: 0}, {a:1, b: 1}]; - * R.findLastIndex(R.propEq('a', 1))(xs); //=> 1 - * R.findLastIndex(R.propEq('a', 4))(xs); //=> -1 - */ - -var findLastIndex = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xfindLastIndex, function findLastIndex(fn, list) { - var idx = list.length - 1; - - while (idx >= 0) { - if (fn(list[idx])) { - return idx; - } - - idx -= 1; - } - - return -1; -})); - -export default findLastIndex; \ No newline at end of file diff --git a/node_modules/ramda/es/flatten.js b/node_modules/ramda/es/flatten.js deleted file mode 100644 index 7d7ef6b..0000000 --- a/node_modules/ramda/es/flatten.js +++ /dev/null @@ -1,27 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import _makeFlat from "./internal/_makeFlat.js"; -/** - * Returns a new list by pulling every item out of it (and all its sub-arrays) - * and putting them in a new array, depth-first. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] - * @param {Array} list The array to consider. - * @return {Array} The flattened list. - * @see R.unnest - * @example - * - * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]); - * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] - */ - -var flatten = -/*#__PURE__*/ -_curry1( -/*#__PURE__*/ -_makeFlat(true)); - -export default flatten; \ No newline at end of file diff --git a/node_modules/ramda/es/flip.js b/node_modules/ramda/es/flip.js deleted file mode 100644 index 69f08f8..0000000 --- a/node_modules/ramda/es/flip.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import curryN from "./curryN.js"; -/** - * Returns a new function much like the supplied one, except that the first two - * arguments' order is reversed. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z) - * @param {Function} fn The function to invoke with its first two parameters reversed. - * @return {*} The result of invoking `fn` with its first two parameters' order reversed. - * @example - * - * const mergeThree = (a, b, c) => [].concat(a, b, c); - * - * mergeThree(1, 2, 3); //=> [1, 2, 3] - * - * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3] - * @symb R.flip(f)(a, b, c) = f(b, a, c) - */ - -var flip = -/*#__PURE__*/ -_curry1(function flip(fn) { - return curryN(fn.length, function (a, b) { - var args = Array.prototype.slice.call(arguments, 0); - args[0] = b; - args[1] = a; - return fn.apply(this, args); - }); -}); - -export default flip; \ No newline at end of file diff --git a/node_modules/ramda/es/forEach.js b/node_modules/ramda/es/forEach.js deleted file mode 100644 index 40978fe..0000000 --- a/node_modules/ramda/es/forEach.js +++ /dev/null @@ -1,54 +0,0 @@ -import _checkForMethod from "./internal/_checkForMethod.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Iterate over an input `list`, calling a provided function `fn` for each - * element in the list. - * - * `fn` receives one argument: *(value)*. - * - * Note: `R.forEach` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.forEach` method. For more - * details on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description - * - * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns - * the original array. In some libraries this function is named `each`. - * - * Dispatches to the `forEach` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> *) -> [a] -> [a] - * @param {Function} fn The function to invoke. Receives one argument, `value`. - * @param {Array} list The list to iterate over. - * @return {Array} The original list. - * @see R.addIndex - * @example - * - * const printXPlusFive = x => console.log(x + 5); - * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3] - * // logs 6 - * // logs 7 - * // logs 8 - * @symb R.forEach(f, [a, b, c]) = [a, b, c] - */ - -var forEach = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_checkForMethod('forEach', function forEach(fn, list) { - var len = list.length; - var idx = 0; - - while (idx < len) { - fn(list[idx]); - idx += 1; - } - - return list; -})); - -export default forEach; \ No newline at end of file diff --git a/node_modules/ramda/es/forEachObjIndexed.js b/node_modules/ramda/es/forEachObjIndexed.js deleted file mode 100644 index 33adfd9..0000000 --- a/node_modules/ramda/es/forEachObjIndexed.js +++ /dev/null @@ -1,41 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import keys from "./keys.js"; -/** - * Iterate over an input `object`, calling a provided function `fn` for each - * key and value in the object. - * - * `fn` receives three argument: *(value, key, obj)*. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Object - * @sig ((a, String, StrMap a) -> Any) -> StrMap a -> StrMap a - * @param {Function} fn The function to invoke. Receives three argument, `value`, `key`, `obj`. - * @param {Object} obj The object to iterate over. - * @return {Object} The original object. - * @example - * - * const printKeyConcatValue = (value, key) => console.log(key + ':' + value); - * R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2} - * // logs x:1 - * // logs y:2 - * @symb R.forEachObjIndexed(f, {x: a, y: b}) = {x: a, y: b} - */ - -var forEachObjIndexed = -/*#__PURE__*/ -_curry2(function forEachObjIndexed(fn, obj) { - var keyList = keys(obj); - var idx = 0; - - while (idx < keyList.length) { - var key = keyList[idx]; - fn(obj[key], key, obj); - idx += 1; - } - - return obj; -}); - -export default forEachObjIndexed; \ No newline at end of file diff --git a/node_modules/ramda/es/fromPairs.js b/node_modules/ramda/es/fromPairs.js deleted file mode 100644 index 14a3ec0..0000000 --- a/node_modules/ramda/es/fromPairs.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -/** - * Creates a new object from a list key-value pairs. If a key appears in - * multiple pairs, the rightmost pair is included in the object. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [[k,v]] -> {k: v} - * @param {Array} pairs An array of two-element arrays that will be the keys and values of the output object. - * @return {Object} The object made by pairing up `keys` and `values`. - * @see R.toPairs, R.pair - * @example - * - * R.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3} - */ - -var fromPairs = -/*#__PURE__*/ -_curry1(function fromPairs(pairs) { - var result = {}; - var idx = 0; - - while (idx < pairs.length) { - result[pairs[idx][0]] = pairs[idx][1]; - idx += 1; - } - - return result; -}); - -export default fromPairs; \ No newline at end of file diff --git a/node_modules/ramda/es/groupBy.js b/node_modules/ramda/es/groupBy.js deleted file mode 100644 index 0f7bbcd..0000000 --- a/node_modules/ramda/es/groupBy.js +++ /dev/null @@ -1,60 +0,0 @@ -import _checkForMethod from "./internal/_checkForMethod.js"; -import _curry2 from "./internal/_curry2.js"; -import reduceBy from "./reduceBy.js"; -/** - * Splits a list into sub-lists stored in an object, based on the result of - * calling a String-returning function on each element, and grouping the - * results according to values returned. - * - * Dispatches to the `groupBy` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> String) -> [a] -> {String: [a]} - * @param {Function} fn Function :: a -> String - * @param {Array} list The array to group - * @return {Object} An object with the output of `fn` for keys, mapped to arrays of elements - * that produced that key when passed to `fn`. - * @see R.reduceBy, R.transduce - * @example - * - * const byGrade = R.groupBy(function(student) { - * const score = student.score; - * return score < 65 ? 'F' : - * score < 70 ? 'D' : - * score < 80 ? 'C' : - * score < 90 ? 'B' : 'A'; - * }); - * const students = [{name: 'Abby', score: 84}, - * {name: 'Eddy', score: 58}, - * // ... - * {name: 'Jack', score: 69}]; - * byGrade(students); - * // { - * // 'A': [{name: 'Dianne', score: 99}], - * // 'B': [{name: 'Abby', score: 84}] - * // // ..., - * // 'F': [{name: 'Eddy', score: 58}] - * // } - */ - -var groupBy = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_checkForMethod('groupBy', -/*#__PURE__*/ -reduceBy(function (acc, item) { - if (acc == null) { - acc = []; - } - - acc.push(item); - return acc; -}, null))); - -export default groupBy; \ No newline at end of file diff --git a/node_modules/ramda/es/groupWith.js b/node_modules/ramda/es/groupWith.js deleted file mode 100644 index 0961852..0000000 --- a/node_modules/ramda/es/groupWith.js +++ /dev/null @@ -1,54 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Takes a list and returns a list of lists where each sublist's elements are - * all satisfied pairwise comparison according to the provided function. - * Only adjacent elements are passed to the comparison function. - * - * @func - * @memberOf R - * @since v0.21.0 - * @category List - * @sig ((a, a) → Boolean) → [a] → [[a]] - * @param {Function} fn Function for determining whether two given (adjacent) - * elements should be in the same group - * @param {Array} list The array to group. Also accepts a string, which will be - * treated as a list of characters. - * @return {List} A list that contains sublists of elements, - * whose concatenations are equal to the original list. - * @example - * - * R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]] - * - * R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]] - * - * R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]] - * - * R.groupWith(R.eqBy(isVowel), 'aestiou') - * //=> ['ae', 'st', 'iou'] - */ - -var groupWith = -/*#__PURE__*/ -_curry2(function (fn, list) { - var res = []; - var idx = 0; - var len = list.length; - - while (idx < len) { - var nextidx = idx + 1; - - while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) { - nextidx += 1; - } - - res.push(list.slice(idx, nextidx)); - idx = nextidx; - } - - return res; -}); - -export default groupWith; \ No newline at end of file diff --git a/node_modules/ramda/es/gt.js b/node_modules/ramda/es/gt.js deleted file mode 100644 index 94a7180..0000000 --- a/node_modules/ramda/es/gt.js +++ /dev/null @@ -1,30 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns `true` if the first argument is greater than the second; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @see R.lt - * @example - * - * R.gt(2, 1); //=> true - * R.gt(2, 2); //=> false - * R.gt(2, 3); //=> false - * R.gt('a', 'z'); //=> false - * R.gt('z', 'a'); //=> true - */ - -var gt = -/*#__PURE__*/ -_curry2(function gt(a, b) { - return a > b; -}); - -export default gt; \ No newline at end of file diff --git a/node_modules/ramda/es/gte.js b/node_modules/ramda/es/gte.js deleted file mode 100644 index 53ac728..0000000 --- a/node_modules/ramda/es/gte.js +++ /dev/null @@ -1,30 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns `true` if the first argument is greater than or equal to the second; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {Number} a - * @param {Number} b - * @return {Boolean} - * @see R.lte - * @example - * - * R.gte(2, 1); //=> true - * R.gte(2, 2); //=> true - * R.gte(2, 3); //=> false - * R.gte('a', 'z'); //=> false - * R.gte('z', 'a'); //=> true - */ - -var gte = -/*#__PURE__*/ -_curry2(function gte(a, b) { - return a >= b; -}); - -export default gte; \ No newline at end of file diff --git a/node_modules/ramda/es/has.js b/node_modules/ramda/es/has.js deleted file mode 100644 index 6e91105..0000000 --- a/node_modules/ramda/es/has.js +++ /dev/null @@ -1,34 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import hasPath from "./hasPath.js"; -/** - * Returns whether or not an object has an own property with the specified name - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Object - * @sig s -> {s: x} -> Boolean - * @param {String} prop The name of the property to check for. - * @param {Object} obj The object to query. - * @return {Boolean} Whether the property exists. - * @example - * - * const hasName = R.has('name'); - * hasName({name: 'alice'}); //=> true - * hasName({name: 'bob'}); //=> true - * hasName({}); //=> false - * - * const point = {x: 0, y: 0}; - * const pointHas = R.has(R.__, point); - * pointHas('x'); //=> true - * pointHas('y'); //=> true - * pointHas('z'); //=> false - */ - -var has = -/*#__PURE__*/ -_curry2(function has(prop, obj) { - return hasPath([prop], obj); -}); - -export default has; \ No newline at end of file diff --git a/node_modules/ramda/es/hasIn.js b/node_modules/ramda/es/hasIn.js deleted file mode 100644 index 8281e3d..0000000 --- a/node_modules/ramda/es/hasIn.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns whether or not an object or its prototype chain has a property with - * the specified name - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Object - * @sig s -> {s: x} -> Boolean - * @param {String} prop The name of the property to check for. - * @param {Object} obj The object to query. - * @return {Boolean} Whether the property exists. - * @example - * - * function Rectangle(width, height) { - * this.width = width; - * this.height = height; - * } - * Rectangle.prototype.area = function() { - * return this.width * this.height; - * }; - * - * const square = new Rectangle(2, 2); - * R.hasIn('width', square); //=> true - * R.hasIn('area', square); //=> true - */ - -var hasIn = -/*#__PURE__*/ -_curry2(function hasIn(prop, obj) { - return prop in obj; -}); - -export default hasIn; \ No newline at end of file diff --git a/node_modules/ramda/es/hasPath.js b/node_modules/ramda/es/hasPath.js deleted file mode 100644 index c471663..0000000 --- a/node_modules/ramda/es/hasPath.js +++ /dev/null @@ -1,48 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _has from "./internal/_has.js"; -import isNil from "./isNil.js"; -/** - * Returns whether or not a path exists in an object. Only the object's - * own properties are checked. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {a} -> Boolean - * @param {Array} path The path to use. - * @param {Object} obj The object to check the path in. - * @return {Boolean} Whether the path exists. - * @see R.has - * @example - * - * R.hasPath(['a', 'b'], {a: {b: 2}}); // => true - * R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true - * R.hasPath(['a', 'b'], {a: {c: 2}}); // => false - * R.hasPath(['a', 'b'], {}); // => false - */ - -var hasPath = -/*#__PURE__*/ -_curry2(function hasPath(_path, obj) { - if (_path.length === 0 || isNil(obj)) { - return false; - } - - var val = obj; - var idx = 0; - - while (idx < _path.length) { - if (!isNil(val) && _has(_path[idx], val)) { - val = val[_path[idx]]; - idx += 1; - } else { - return false; - } - } - - return true; -}); - -export default hasPath; \ No newline at end of file diff --git a/node_modules/ramda/es/head.js b/node_modules/ramda/es/head.js deleted file mode 100644 index 1fefa1a..0000000 --- a/node_modules/ramda/es/head.js +++ /dev/null @@ -1,27 +0,0 @@ -import nth from "./nth.js"; -/** - * Returns the first element of the given list or string. In some libraries - * this function is named `first`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> a | Undefined - * @sig String -> String - * @param {Array|String} list - * @return {*} - * @see R.tail, R.init, R.last - * @example - * - * R.head(['fi', 'fo', 'fum']); //=> 'fi' - * R.head([]); //=> undefined - * - * R.head('abc'); //=> 'a' - * R.head(''); //=> '' - */ - -var head = -/*#__PURE__*/ -nth(0); -export default head; \ No newline at end of file diff --git a/node_modules/ramda/es/identical.js b/node_modules/ramda/es/identical.js deleted file mode 100644 index a904825..0000000 --- a/node_modules/ramda/es/identical.js +++ /dev/null @@ -1,33 +0,0 @@ -import _objectIs from "./internal/_objectIs.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Returns true if its arguments are identical, false otherwise. Values are - * identical if they reference the same memory. `NaN` is identical to `NaN`; - * `0` and `-0` are not identical. - * - * Note this is merely a curried version of ES6 `Object.is`. - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Relation - * @sig a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @example - * - * const o = {}; - * R.identical(o, o); //=> true - * R.identical(1, 1); //=> true - * R.identical(1, '1'); //=> false - * R.identical([], []); //=> false - * R.identical(0, -0); //=> false - * R.identical(NaN, NaN); //=> true - */ - -var identical = -/*#__PURE__*/ -_curry2(_objectIs); - -export default identical; \ No newline at end of file diff --git a/node_modules/ramda/es/identity.js b/node_modules/ramda/es/identity.js deleted file mode 100644 index 7a3584d..0000000 --- a/node_modules/ramda/es/identity.js +++ /dev/null @@ -1,27 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import _identity from "./internal/_identity.js"; -/** - * A function that does nothing but return the parameter supplied to it. Good - * as a default or placeholder function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig a -> a - * @param {*} x The value to return. - * @return {*} The input value, `x`. - * @example - * - * R.identity(1); //=> 1 - * - * const obj = {}; - * R.identity(obj) === obj; //=> true - * @symb R.identity(a) = a - */ - -var identity = -/*#__PURE__*/ -_curry1(_identity); - -export default identity; \ No newline at end of file diff --git a/node_modules/ramda/es/ifElse.js b/node_modules/ramda/es/ifElse.js deleted file mode 100644 index c198f5e..0000000 --- a/node_modules/ramda/es/ifElse.js +++ /dev/null @@ -1,37 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import curryN from "./curryN.js"; -/** - * Creates a function that will process either the `onTrue` or the `onFalse` - * function depending upon the result of the `condition` predicate. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *) - * @param {Function} condition A predicate function - * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value. - * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value. - * @return {Function} A new function that will process either the `onTrue` or the `onFalse` - * function depending upon the result of the `condition` predicate. - * @see R.unless, R.when, R.cond - * @example - * - * const incCount = R.ifElse( - * R.has('count'), - * R.over(R.lensProp('count'), R.inc), - * R.assoc('count', 1) - * ); - * incCount({}); //=> { count: 1 } - * incCount({ count: 1 }); //=> { count: 2 } - */ - -var ifElse = -/*#__PURE__*/ -_curry3(function ifElse(condition, onTrue, onFalse) { - return curryN(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() { - return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments); - }); -}); - -export default ifElse; \ No newline at end of file diff --git a/node_modules/ramda/es/inc.js b/node_modules/ramda/es/inc.js deleted file mode 100644 index 2b5ef33..0000000 --- a/node_modules/ramda/es/inc.js +++ /dev/null @@ -1,21 +0,0 @@ -import add from "./add.js"; -/** - * Increments its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} n + 1 - * @see R.dec - * @example - * - * R.inc(42); //=> 43 - */ - -var inc = -/*#__PURE__*/ -add(1); -export default inc; \ No newline at end of file diff --git a/node_modules/ramda/es/includes.js b/node_modules/ramda/es/includes.js deleted file mode 100644 index d00d884..0000000 --- a/node_modules/ramda/es/includes.js +++ /dev/null @@ -1,30 +0,0 @@ -import _includes from "./internal/_includes.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Returns `true` if the specified value is equal, in [`R.equals`](#equals) - * terms, to at least one element of the given list; `false` otherwise. - * Works also with strings. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category List - * @sig a -> [a] -> Boolean - * @param {Object} a The item to compare against. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. - * @see R.any - * @example - * - * R.includes(3, [1, 2, 3]); //=> true - * R.includes(4, [1, 2, 3]); //=> false - * R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true - * R.includes([42], [[42]]); //=> true - * R.includes('ba', 'banana'); //=>true - */ - -var includes = -/*#__PURE__*/ -_curry2(_includes); - -export default includes; \ No newline at end of file diff --git a/node_modules/ramda/es/index.js b/node_modules/ramda/es/index.js deleted file mode 100644 index d139d5f..0000000 --- a/node_modules/ramda/es/index.js +++ /dev/null @@ -1,257 +0,0 @@ -export { default as F } from "./F.js"; -export { default as T } from "./T.js"; -export { default as __ } from "./__.js"; -export { default as add } from "./add.js"; -export { default as addIndex } from "./addIndex.js"; -export { default as adjust } from "./adjust.js"; -export { default as all } from "./all.js"; -export { default as allPass } from "./allPass.js"; -export { default as always } from "./always.js"; -export { default as and } from "./and.js"; -export { default as any } from "./any.js"; -export { default as anyPass } from "./anyPass.js"; -export { default as ap } from "./ap.js"; -export { default as aperture } from "./aperture.js"; -export { default as append } from "./append.js"; -export { default as apply } from "./apply.js"; -export { default as applySpec } from "./applySpec.js"; -export { default as applyTo } from "./applyTo.js"; -export { default as ascend } from "./ascend.js"; -export { default as assoc } from "./assoc.js"; -export { default as assocPath } from "./assocPath.js"; -export { default as binary } from "./binary.js"; -export { default as bind } from "./bind.js"; -export { default as both } from "./both.js"; -export { default as call } from "./call.js"; -export { default as chain } from "./chain.js"; -export { default as clamp } from "./clamp.js"; -export { default as clone } from "./clone.js"; -export { default as comparator } from "./comparator.js"; -export { default as complement } from "./complement.js"; -export { default as compose } from "./compose.js"; -export { default as composeK } from "./composeK.js"; -export { default as composeP } from "./composeP.js"; -export { default as composeWith } from "./composeWith.js"; -export { default as concat } from "./concat.js"; -export { default as cond } from "./cond.js"; -export { default as construct } from "./construct.js"; -export { default as constructN } from "./constructN.js"; -export { default as contains } from "./contains.js"; -export { default as converge } from "./converge.js"; -export { default as countBy } from "./countBy.js"; -export { default as curry } from "./curry.js"; -export { default as curryN } from "./curryN.js"; -export { default as dec } from "./dec.js"; -export { default as defaultTo } from "./defaultTo.js"; -export { default as descend } from "./descend.js"; -export { default as difference } from "./difference.js"; -export { default as differenceWith } from "./differenceWith.js"; -export { default as dissoc } from "./dissoc.js"; -export { default as dissocPath } from "./dissocPath.js"; -export { default as divide } from "./divide.js"; -export { default as drop } from "./drop.js"; -export { default as dropLast } from "./dropLast.js"; -export { default as dropLastWhile } from "./dropLastWhile.js"; -export { default as dropRepeats } from "./dropRepeats.js"; -export { default as dropRepeatsWith } from "./dropRepeatsWith.js"; -export { default as dropWhile } from "./dropWhile.js"; -export { default as either } from "./either.js"; -export { default as empty } from "./empty.js"; -export { default as endsWith } from "./endsWith.js"; -export { default as eqBy } from "./eqBy.js"; -export { default as eqProps } from "./eqProps.js"; -export { default as equals } from "./equals.js"; -export { default as evolve } from "./evolve.js"; -export { default as filter } from "./filter.js"; -export { default as find } from "./find.js"; -export { default as findIndex } from "./findIndex.js"; -export { default as findLast } from "./findLast.js"; -export { default as findLastIndex } from "./findLastIndex.js"; -export { default as flatten } from "./flatten.js"; -export { default as flip } from "./flip.js"; -export { default as forEach } from "./forEach.js"; -export { default as forEachObjIndexed } from "./forEachObjIndexed.js"; -export { default as fromPairs } from "./fromPairs.js"; -export { default as groupBy } from "./groupBy.js"; -export { default as groupWith } from "./groupWith.js"; -export { default as gt } from "./gt.js"; -export { default as gte } from "./gte.js"; -export { default as has } from "./has.js"; -export { default as hasIn } from "./hasIn.js"; -export { default as hasPath } from "./hasPath.js"; -export { default as head } from "./head.js"; -export { default as identical } from "./identical.js"; -export { default as identity } from "./identity.js"; -export { default as ifElse } from "./ifElse.js"; -export { default as inc } from "./inc.js"; -export { default as includes } from "./includes.js"; -export { default as indexBy } from "./indexBy.js"; -export { default as indexOf } from "./indexOf.js"; -export { default as init } from "./init.js"; -export { default as innerJoin } from "./innerJoin.js"; -export { default as insert } from "./insert.js"; -export { default as insertAll } from "./insertAll.js"; -export { default as intersection } from "./intersection.js"; -export { default as intersperse } from "./intersperse.js"; -export { default as into } from "./into.js"; -export { default as invert } from "./invert.js"; -export { default as invertObj } from "./invertObj.js"; -export { default as invoker } from "./invoker.js"; -export { default as is } from "./is.js"; -export { default as isEmpty } from "./isEmpty.js"; -export { default as isNil } from "./isNil.js"; -export { default as join } from "./join.js"; -export { default as juxt } from "./juxt.js"; -export { default as keys } from "./keys.js"; -export { default as keysIn } from "./keysIn.js"; -export { default as last } from "./last.js"; -export { default as lastIndexOf } from "./lastIndexOf.js"; -export { default as length } from "./length.js"; -export { default as lens } from "./lens.js"; -export { default as lensIndex } from "./lensIndex.js"; -export { default as lensPath } from "./lensPath.js"; -export { default as lensProp } from "./lensProp.js"; -export { default as lift } from "./lift.js"; -export { default as liftN } from "./liftN.js"; -export { default as lt } from "./lt.js"; -export { default as lte } from "./lte.js"; -export { default as map } from "./map.js"; -export { default as mapAccum } from "./mapAccum.js"; -export { default as mapAccumRight } from "./mapAccumRight.js"; -export { default as mapObjIndexed } from "./mapObjIndexed.js"; -export { default as match } from "./match.js"; -export { default as mathMod } from "./mathMod.js"; -export { default as max } from "./max.js"; -export { default as maxBy } from "./maxBy.js"; -export { default as mean } from "./mean.js"; -export { default as median } from "./median.js"; -export { default as memoizeWith } from "./memoizeWith.js"; -export { default as merge } from "./merge.js"; -export { default as mergeAll } from "./mergeAll.js"; -export { default as mergeDeepLeft } from "./mergeDeepLeft.js"; -export { default as mergeDeepRight } from "./mergeDeepRight.js"; -export { default as mergeDeepWith } from "./mergeDeepWith.js"; -export { default as mergeDeepWithKey } from "./mergeDeepWithKey.js"; -export { default as mergeLeft } from "./mergeLeft.js"; -export { default as mergeRight } from "./mergeRight.js"; -export { default as mergeWith } from "./mergeWith.js"; -export { default as mergeWithKey } from "./mergeWithKey.js"; -export { default as min } from "./min.js"; -export { default as minBy } from "./minBy.js"; -export { default as modulo } from "./modulo.js"; -export { default as move } from "./move.js"; -export { default as multiply } from "./multiply.js"; -export { default as nAry } from "./nAry.js"; -export { default as negate } from "./negate.js"; -export { default as none } from "./none.js"; -export { default as not } from "./not.js"; -export { default as nth } from "./nth.js"; -export { default as nthArg } from "./nthArg.js"; -export { default as o } from "./o.js"; -export { default as objOf } from "./objOf.js"; -export { default as of } from "./of.js"; -export { default as omit } from "./omit.js"; -export { default as once } from "./once.js"; -export { default as or } from "./or.js"; -export { default as otherwise } from "./otherwise.js"; -export { default as over } from "./over.js"; -export { default as pair } from "./pair.js"; -export { default as partial } from "./partial.js"; -export { default as partialRight } from "./partialRight.js"; -export { default as partition } from "./partition.js"; -export { default as path } from "./path.js"; -export { default as paths } from "./paths.js"; -export { default as pathEq } from "./pathEq.js"; -export { default as pathOr } from "./pathOr.js"; -export { default as pathSatisfies } from "./pathSatisfies.js"; -export { default as pick } from "./pick.js"; -export { default as pickAll } from "./pickAll.js"; -export { default as pickBy } from "./pickBy.js"; -export { default as pipe } from "./pipe.js"; -export { default as pipeK } from "./pipeK.js"; -export { default as pipeP } from "./pipeP.js"; -export { default as pipeWith } from "./pipeWith.js"; -export { default as pluck } from "./pluck.js"; -export { default as prepend } from "./prepend.js"; -export { default as product } from "./product.js"; -export { default as project } from "./project.js"; -export { default as prop } from "./prop.js"; -export { default as propEq } from "./propEq.js"; -export { default as propIs } from "./propIs.js"; -export { default as propOr } from "./propOr.js"; -export { default as propSatisfies } from "./propSatisfies.js"; -export { default as props } from "./props.js"; -export { default as range } from "./range.js"; -export { default as reduce } from "./reduce.js"; -export { default as reduceBy } from "./reduceBy.js"; -export { default as reduceRight } from "./reduceRight.js"; -export { default as reduceWhile } from "./reduceWhile.js"; -export { default as reduced } from "./reduced.js"; -export { default as reject } from "./reject.js"; -export { default as remove } from "./remove.js"; -export { default as repeat } from "./repeat.js"; -export { default as replace } from "./replace.js"; -export { default as reverse } from "./reverse.js"; -export { default as scan } from "./scan.js"; -export { default as sequence } from "./sequence.js"; -export { default as set } from "./set.js"; -export { default as slice } from "./slice.js"; -export { default as sort } from "./sort.js"; -export { default as sortBy } from "./sortBy.js"; -export { default as sortWith } from "./sortWith.js"; -export { default as split } from "./split.js"; -export { default as splitAt } from "./splitAt.js"; -export { default as splitEvery } from "./splitEvery.js"; -export { default as splitWhen } from "./splitWhen.js"; -export { default as startsWith } from "./startsWith.js"; -export { default as subtract } from "./subtract.js"; -export { default as sum } from "./sum.js"; -export { default as symmetricDifference } from "./symmetricDifference.js"; -export { default as symmetricDifferenceWith } from "./symmetricDifferenceWith.js"; -export { default as tail } from "./tail.js"; -export { default as take } from "./take.js"; -export { default as takeLast } from "./takeLast.js"; -export { default as takeLastWhile } from "./takeLastWhile.js"; -export { default as takeWhile } from "./takeWhile.js"; -export { default as tap } from "./tap.js"; -export { default as test } from "./test.js"; -export { default as andThen } from "./andThen.js"; -export { default as times } from "./times.js"; -export { default as toLower } from "./toLower.js"; -export { default as toPairs } from "./toPairs.js"; -export { default as toPairsIn } from "./toPairsIn.js"; -export { default as toString } from "./toString.js"; -export { default as toUpper } from "./toUpper.js"; -export { default as transduce } from "./transduce.js"; -export { default as transpose } from "./transpose.js"; -export { default as traverse } from "./traverse.js"; -export { default as trim } from "./trim.js"; -export { default as tryCatch } from "./tryCatch.js"; -export { default as type } from "./type.js"; -export { default as unapply } from "./unapply.js"; -export { default as unary } from "./unary.js"; -export { default as uncurryN } from "./uncurryN.js"; -export { default as unfold } from "./unfold.js"; -export { default as union } from "./union.js"; -export { default as unionWith } from "./unionWith.js"; -export { default as uniq } from "./uniq.js"; -export { default as uniqBy } from "./uniqBy.js"; -export { default as uniqWith } from "./uniqWith.js"; -export { default as unless } from "./unless.js"; -export { default as unnest } from "./unnest.js"; -export { default as until } from "./until.js"; -export { default as update } from "./update.js"; -export { default as useWith } from "./useWith.js"; -export { default as values } from "./values.js"; -export { default as valuesIn } from "./valuesIn.js"; -export { default as view } from "./view.js"; -export { default as when } from "./when.js"; -export { default as where } from "./where.js"; -export { default as whereEq } from "./whereEq.js"; -export { default as without } from "./without.js"; -export { default as xor } from "./xor.js"; -export { default as xprod } from "./xprod.js"; -export { default as zip } from "./zip.js"; -export { default as zipObj } from "./zipObj.js"; -export { default as zipWith } from "./zipWith.js"; -export { default as thunkify } from "./thunkify.js"; \ No newline at end of file diff --git a/node_modules/ramda/es/indexBy.js b/node_modules/ramda/es/indexBy.js deleted file mode 100644 index 23281e9..0000000 --- a/node_modules/ramda/es/indexBy.js +++ /dev/null @@ -1,30 +0,0 @@ -import reduceBy from "./reduceBy.js"; -/** - * Given a function that generates a key, turns a list of objects into an - * object indexing the objects by the given key. Note that if multiple - * objects generate the same value for the indexing key only the last value - * will be included in the generated object. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (a -> String) -> [{k: v}] -> {k: {k: v}} - * @param {Function} fn Function :: a -> String - * @param {Array} array The array of objects to index - * @return {Object} An object indexing each array element by the given property. - * @example - * - * const list = [{id: 'xyz', title: 'A'}, {id: 'abc', title: 'B'}]; - * R.indexBy(R.prop('id'), list); - * //=> {abc: {id: 'abc', title: 'B'}, xyz: {id: 'xyz', title: 'A'}} - */ - -var indexBy = -/*#__PURE__*/ -reduceBy(function (acc, elem) { - return elem; -}, null); -export default indexBy; \ No newline at end of file diff --git a/node_modules/ramda/es/indexOf.js b/node_modules/ramda/es/indexOf.js deleted file mode 100644 index f968769..0000000 --- a/node_modules/ramda/es/indexOf.js +++ /dev/null @@ -1,30 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _indexOf from "./internal/_indexOf.js"; -import _isArray from "./internal/_isArray.js"; -/** - * Returns the position of the first occurrence of an item in an array, or -1 - * if the item is not included in the array. [`R.equals`](#equals) is used to - * determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Number - * @param {*} target The item to find. - * @param {Array} xs The array to search in. - * @return {Number} the index of the target, or -1 if the target is not found. - * @see R.lastIndexOf - * @example - * - * R.indexOf(3, [1,2,3,4]); //=> 2 - * R.indexOf(10, [1,2,3,4]); //=> -1 - */ - -var indexOf = -/*#__PURE__*/ -_curry2(function indexOf(target, xs) { - return typeof xs.indexOf === 'function' && !_isArray(xs) ? xs.indexOf(target) : _indexOf(xs, target, 0); -}); - -export default indexOf; \ No newline at end of file diff --git a/node_modules/ramda/es/init.js b/node_modules/ramda/es/init.js deleted file mode 100644 index 6b774ad..0000000 --- a/node_modules/ramda/es/init.js +++ /dev/null @@ -1,30 +0,0 @@ -import slice from "./slice.js"; -/** - * Returns all but the last element of the given list or string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.last, R.head, R.tail - * @example - * - * R.init([1, 2, 3]); //=> [1, 2] - * R.init([1, 2]); //=> [1] - * R.init([1]); //=> [] - * R.init([]); //=> [] - * - * R.init('abc'); //=> 'ab' - * R.init('ab'); //=> 'a' - * R.init('a'); //=> '' - * R.init(''); //=> '' - */ - -var init = -/*#__PURE__*/ -slice(0, -1); -export default init; \ No newline at end of file diff --git a/node_modules/ramda/es/innerJoin.js b/node_modules/ramda/es/innerJoin.js deleted file mode 100644 index fbdfa0e..0000000 --- a/node_modules/ramda/es/innerJoin.js +++ /dev/null @@ -1,48 +0,0 @@ -import _includesWith from "./internal/_includesWith.js"; -import _curry3 from "./internal/_curry3.js"; -import _filter from "./internal/_filter.js"; -/** - * Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list - * `xs'` comprising each of the elements of `xs` which is equal to one or more - * elements of `ys` according to `pred`. - * - * `pred` must be a binary function expecting an element from each list. - * - * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should - * not be significant, but since `xs'` is ordered the implementation guarantees - * that its values are in the same order as they appear in `xs`. Duplicates are - * not removed, so `xs'` may contain duplicates if `xs` contains duplicates. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Relation - * @sig ((a, b) -> Boolean) -> [a] -> [b] -> [a] - * @param {Function} pred - * @param {Array} xs - * @param {Array} ys - * @return {Array} - * @see R.intersection - * @example - * - * R.innerJoin( - * (record, id) => record.id === id, - * [{id: 824, name: 'Richie Furay'}, - * {id: 956, name: 'Dewey Martin'}, - * {id: 313, name: 'Bruce Palmer'}, - * {id: 456, name: 'Stephen Stills'}, - * {id: 177, name: 'Neil Young'}], - * [177, 456, 999] - * ); - * //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}] - */ - -var innerJoin = -/*#__PURE__*/ -_curry3(function innerJoin(pred, xs, ys) { - return _filter(function (x) { - return _includesWith(pred, x, ys); - }, xs); -}); - -export default innerJoin; \ No newline at end of file diff --git a/node_modules/ramda/es/insert.js b/node_modules/ramda/es/insert.js deleted file mode 100644 index 70e9acf..0000000 --- a/node_modules/ramda/es/insert.js +++ /dev/null @@ -1,31 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Inserts the supplied element into the list, at the specified `index`. _Note that - - * this is not destructive_: it returns a copy of the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.2.2 - * @category List - * @sig Number -> a -> [a] -> [a] - * @param {Number} index The position to insert the element - * @param {*} elt The element to insert into the Array - * @param {Array} list The list to insert into - * @return {Array} A new Array with `elt` inserted at `index`. - * @example - * - * R.insert(2, 'x', [1,2,3,4]); //=> [1,2,'x',3,4] - */ - -var insert = -/*#__PURE__*/ -_curry3(function insert(idx, elt, list) { - idx = idx < list.length && idx >= 0 ? idx : list.length; - var result = Array.prototype.slice.call(list, 0); - result.splice(idx, 0, elt); - return result; -}); - -export default insert; \ No newline at end of file diff --git a/node_modules/ramda/es/insertAll.js b/node_modules/ramda/es/insertAll.js deleted file mode 100644 index 1d2498e..0000000 --- a/node_modules/ramda/es/insertAll.js +++ /dev/null @@ -1,28 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Inserts the sub-list into the list, at the specified `index`. _Note that this is not - * destructive_: it returns a copy of the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig Number -> [a] -> [a] -> [a] - * @param {Number} index The position to insert the sub-list - * @param {Array} elts The sub-list to insert into the Array - * @param {Array} list The list to insert the sub-list into - * @return {Array} A new Array with `elts` inserted starting at `index`. - * @example - * - * R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4] - */ - -var insertAll = -/*#__PURE__*/ -_curry3(function insertAll(idx, elts, list) { - idx = idx < list.length && idx >= 0 ? idx : list.length; - return [].concat(Array.prototype.slice.call(list, 0, idx), elts, Array.prototype.slice.call(list, idx)); -}); - -export default insertAll; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_Set.js b/node_modules/ramda/es/internal/_Set.js deleted file mode 100644 index 008e8ee..0000000 --- a/node_modules/ramda/es/internal/_Set.js +++ /dev/null @@ -1,201 +0,0 @@ -import _includes from "./_includes.js"; - -var _Set = -/*#__PURE__*/ -function () { - function _Set() { - /* globals Set */ - this._nativeSet = typeof Set === 'function' ? new Set() : null; - this._items = {}; - } - - // until we figure out why jsdoc chokes on this - // @param item The item to add to the Set - // @returns {boolean} true if the item did not exist prior, otherwise false - // - _Set.prototype.add = function (item) { - return !hasOrAdd(item, true, this); - }; // - // @param item The item to check for existence in the Set - // @returns {boolean} true if the item exists in the Set, otherwise false - // - - - _Set.prototype.has = function (item) { - return hasOrAdd(item, false, this); - }; // - // Combines the logic for checking whether an item is a member of the set and - // for adding a new item to the set. - // - // @param item The item to check or add to the Set instance. - // @param shouldAdd If true, the item will be added to the set if it doesn't - // already exist. - // @param set The set instance to check or add to. - // @return {boolean} true if the item already existed, otherwise false. - // - - - return _Set; -}(); - -function hasOrAdd(item, shouldAdd, set) { - var type = typeof item; - var prevSize, newSize; - - switch (type) { - case 'string': - case 'number': - // distinguish between +0 and -0 - if (item === 0 && 1 / item === -Infinity) { - if (set._items['-0']) { - return true; - } else { - if (shouldAdd) { - set._items['-0'] = true; - } - - return false; - } - } // these types can all utilise the native Set - - - if (set._nativeSet !== null) { - if (shouldAdd) { - prevSize = set._nativeSet.size; - - set._nativeSet.add(item); - - newSize = set._nativeSet.size; - return newSize === prevSize; - } else { - return set._nativeSet.has(item); - } - } else { - if (!(type in set._items)) { - if (shouldAdd) { - set._items[type] = {}; - set._items[type][item] = true; - } - - return false; - } else if (item in set._items[type]) { - return true; - } else { - if (shouldAdd) { - set._items[type][item] = true; - } - - return false; - } - } - - case 'boolean': - // set._items['boolean'] holds a two element array - // representing [ falseExists, trueExists ] - if (type in set._items) { - var bIdx = item ? 1 : 0; - - if (set._items[type][bIdx]) { - return true; - } else { - if (shouldAdd) { - set._items[type][bIdx] = true; - } - - return false; - } - } else { - if (shouldAdd) { - set._items[type] = item ? [false, true] : [true, false]; - } - - return false; - } - - case 'function': - // compare functions for reference equality - if (set._nativeSet !== null) { - if (shouldAdd) { - prevSize = set._nativeSet.size; - - set._nativeSet.add(item); - - newSize = set._nativeSet.size; - return newSize === prevSize; - } else { - return set._nativeSet.has(item); - } - } else { - if (!(type in set._items)) { - if (shouldAdd) { - set._items[type] = [item]; - } - - return false; - } - - if (!_includes(item, set._items[type])) { - if (shouldAdd) { - set._items[type].push(item); - } - - return false; - } - - return true; - } - - case 'undefined': - if (set._items[type]) { - return true; - } else { - if (shouldAdd) { - set._items[type] = true; - } - - return false; - } - - case 'object': - if (item === null) { - if (!set._items['null']) { - if (shouldAdd) { - set._items['null'] = true; - } - - return false; - } - - return true; - } - - /* falls through */ - - default: - // reduce the search size of heterogeneous sets by creating buckets - // for each type. - type = Object.prototype.toString.call(item); - - if (!(type in set._items)) { - if (shouldAdd) { - set._items[type] = [item]; - } - - return false; - } // scan through all previously applied items - - - if (!_includes(item, set._items[type])) { - if (shouldAdd) { - set._items[type].push(item); - } - - return false; - } - - return true; - } -} // A simple Set type that honours R.equals semantics - - -export default _Set; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_aperture.js b/node_modules/ramda/es/internal/_aperture.js deleted file mode 100644 index e971a61..0000000 --- a/node_modules/ramda/es/internal/_aperture.js +++ /dev/null @@ -1,12 +0,0 @@ -export default function _aperture(n, list) { - var idx = 0; - var limit = list.length - (n - 1); - var acc = new Array(limit >= 0 ? limit : 0); - - while (idx < limit) { - acc[idx] = Array.prototype.slice.call(list, idx, idx + n); - idx += 1; - } - - return acc; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_arity.js b/node_modules/ramda/es/internal/_arity.js deleted file mode 100644 index 10cac37..0000000 --- a/node_modules/ramda/es/internal/_arity.js +++ /dev/null @@ -1,62 +0,0 @@ -export default function _arity(n, fn) { - /* eslint-disable no-unused-vars */ - switch (n) { - case 0: - return function () { - return fn.apply(this, arguments); - }; - - case 1: - return function (a0) { - return fn.apply(this, arguments); - }; - - case 2: - return function (a0, a1) { - return fn.apply(this, arguments); - }; - - case 3: - return function (a0, a1, a2) { - return fn.apply(this, arguments); - }; - - case 4: - return function (a0, a1, a2, a3) { - return fn.apply(this, arguments); - }; - - case 5: - return function (a0, a1, a2, a3, a4) { - return fn.apply(this, arguments); - }; - - case 6: - return function (a0, a1, a2, a3, a4, a5) { - return fn.apply(this, arguments); - }; - - case 7: - return function (a0, a1, a2, a3, a4, a5, a6) { - return fn.apply(this, arguments); - }; - - case 8: - return function (a0, a1, a2, a3, a4, a5, a6, a7) { - return fn.apply(this, arguments); - }; - - case 9: - return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { - return fn.apply(this, arguments); - }; - - case 10: - return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { - return fn.apply(this, arguments); - }; - - default: - throw new Error('First argument to _arity must be a non-negative integer no greater than ten'); - } -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_arrayFromIterator.js b/node_modules/ramda/es/internal/_arrayFromIterator.js deleted file mode 100644 index f57c595..0000000 --- a/node_modules/ramda/es/internal/_arrayFromIterator.js +++ /dev/null @@ -1,10 +0,0 @@ -export default function _arrayFromIterator(iter) { - var list = []; - var next; - - while (!(next = iter.next()).done) { - list.push(next.value); - } - - return list; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_assertPromise.js b/node_modules/ramda/es/internal/_assertPromise.js deleted file mode 100644 index 645ffac..0000000 --- a/node_modules/ramda/es/internal/_assertPromise.js +++ /dev/null @@ -1,7 +0,0 @@ -import _isFunction from "./_isFunction.js"; -import _toString from "./_toString.js"; -export default function _assertPromise(name, p) { - if (p == null || !_isFunction(p.then)) { - throw new TypeError('`' + name + '` expected a Promise, received ' + _toString(p, [])); - } -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_checkForMethod.js b/node_modules/ramda/es/internal/_checkForMethod.js deleted file mode 100644 index 2b7ef9f..0000000 --- a/node_modules/ramda/es/internal/_checkForMethod.js +++ /dev/null @@ -1,24 +0,0 @@ -import _isArray from "./_isArray.js"; -/** - * This checks whether a function has a [methodname] function. If it isn't an - * array it will execute that function otherwise it will default to the ramda - * implementation. - * - * @private - * @param {Function} fn ramda implemtation - * @param {String} methodname property to check for a custom implementation - * @return {Object} Whatever the return value of the method is. - */ - -export default function _checkForMethod(methodname, fn) { - return function () { - var length = arguments.length; - - if (length === 0) { - return fn(); - } - - var obj = arguments[length - 1]; - return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_clone.js b/node_modules/ramda/es/internal/_clone.js deleted file mode 100644 index a6451d5..0000000 --- a/node_modules/ramda/es/internal/_clone.js +++ /dev/null @@ -1,53 +0,0 @@ -import _cloneRegExp from "./_cloneRegExp.js"; -import type from "../type.js"; -/** - * Copies an object. - * - * @private - * @param {*} value The value to be copied - * @param {Array} refFrom Array containing the source references - * @param {Array} refTo Array containing the copied source references - * @param {Boolean} deep Whether or not to perform deep cloning. - * @return {*} The copied value. - */ - -export default function _clone(value, refFrom, refTo, deep) { - var copy = function copy(copiedValue) { - var len = refFrom.length; - var idx = 0; - - while (idx < len) { - if (value === refFrom[idx]) { - return refTo[idx]; - } - - idx += 1; - } - - refFrom[idx + 1] = value; - refTo[idx + 1] = copiedValue; - - for (var key in value) { - copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key]; - } - - return copiedValue; - }; - - switch (type(value)) { - case 'Object': - return copy({}); - - case 'Array': - return copy([]); - - case 'Date': - return new Date(value.valueOf()); - - case 'RegExp': - return _cloneRegExp(value); - - default: - return value; - } -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_cloneRegExp.js b/node_modules/ramda/es/internal/_cloneRegExp.js deleted file mode 100644 index dba849f..0000000 --- a/node_modules/ramda/es/internal/_cloneRegExp.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function _cloneRegExp(pattern) { - return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : '')); -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_complement.js b/node_modules/ramda/es/internal/_complement.js deleted file mode 100644 index 0f06b0d..0000000 --- a/node_modules/ramda/es/internal/_complement.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function _complement(f) { - return function () { - return !f.apply(this, arguments); - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_concat.js b/node_modules/ramda/es/internal/_concat.js deleted file mode 100644 index f751441..0000000 --- a/node_modules/ramda/es/internal/_concat.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Private `concat` function to merge two array-like objects. - * - * @private - * @param {Array|Arguments} [set1=[]] An array-like object. - * @param {Array|Arguments} [set2=[]] An array-like object. - * @return {Array} A new, merged array. - * @example - * - * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] - */ -export default function _concat(set1, set2) { - set1 = set1 || []; - set2 = set2 || []; - var idx; - var len1 = set1.length; - var len2 = set2.length; - var result = []; - idx = 0; - - while (idx < len1) { - result[result.length] = set1[idx]; - idx += 1; - } - - idx = 0; - - while (idx < len2) { - result[result.length] = set2[idx]; - idx += 1; - } - - return result; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_createPartialApplicator.js b/node_modules/ramda/es/internal/_createPartialApplicator.js deleted file mode 100644 index 4d2b790..0000000 --- a/node_modules/ramda/es/internal/_createPartialApplicator.js +++ /dev/null @@ -1,9 +0,0 @@ -import _arity from "./_arity.js"; -import _curry2 from "./_curry2.js"; -export default function _createPartialApplicator(concat) { - return _curry2(function (fn, args) { - return _arity(Math.max(0, fn.length - args.length), function () { - return fn.apply(this, concat(args, arguments)); - }); - }); -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_curry1.js b/node_modules/ramda/es/internal/_curry1.js deleted file mode 100644 index c126949..0000000 --- a/node_modules/ramda/es/internal/_curry1.js +++ /dev/null @@ -1,19 +0,0 @@ -import _isPlaceholder from "./_isPlaceholder.js"; -/** - * Optimized internal one-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - -export default function _curry1(fn) { - return function f1(a) { - if (arguments.length === 0 || _isPlaceholder(a)) { - return f1; - } else { - return fn.apply(this, arguments); - } - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_curry2.js b/node_modules/ramda/es/internal/_curry2.js deleted file mode 100644 index 4290edd..0000000 --- a/node_modules/ramda/es/internal/_curry2.js +++ /dev/null @@ -1,31 +0,0 @@ -import _curry1 from "./_curry1.js"; -import _isPlaceholder from "./_isPlaceholder.js"; -/** - * Optimized internal two-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - -export default function _curry2(fn) { - return function f2(a, b) { - switch (arguments.length) { - case 0: - return f2; - - case 1: - return _isPlaceholder(a) ? f2 : _curry1(function (_b) { - return fn(a, _b); - }); - - default: - return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) { - return fn(_a, b); - }) : _isPlaceholder(b) ? _curry1(function (_b) { - return fn(a, _b); - }) : fn(a, b); - } - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_curry3.js b/node_modules/ramda/es/internal/_curry3.js deleted file mode 100644 index 3c104c8..0000000 --- a/node_modules/ramda/es/internal/_curry3.js +++ /dev/null @@ -1,49 +0,0 @@ -import _curry1 from "./_curry1.js"; -import _curry2 from "./_curry2.js"; -import _isPlaceholder from "./_isPlaceholder.js"; -/** - * Optimized internal three-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - -export default function _curry3(fn) { - return function f3(a, b, c) { - switch (arguments.length) { - case 0: - return f3; - - case 1: - return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) { - return fn(a, _b, _c); - }); - - case 2: - return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) { - return fn(_a, b, _c); - }) : _isPlaceholder(b) ? _curry2(function (_b, _c) { - return fn(a, _b, _c); - }) : _curry1(function (_c) { - return fn(a, b, _c); - }); - - default: - return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) { - return fn(_a, _b, c); - }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) { - return fn(_a, b, _c); - }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) { - return fn(a, _b, _c); - }) : _isPlaceholder(a) ? _curry1(function (_a) { - return fn(_a, b, c); - }) : _isPlaceholder(b) ? _curry1(function (_b) { - return fn(a, _b, c); - }) : _isPlaceholder(c) ? _curry1(function (_c) { - return fn(a, b, _c); - }) : fn(a, b, c); - } - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_curryN.js b/node_modules/ramda/es/internal/_curryN.js deleted file mode 100644 index f489104..0000000 --- a/node_modules/ramda/es/internal/_curryN.js +++ /dev/null @@ -1,42 +0,0 @@ -import _arity from "./_arity.js"; -import _isPlaceholder from "./_isPlaceholder.js"; -/** - * Internal curryN function. - * - * @private - * @category Function - * @param {Number} length The arity of the curried function. - * @param {Array} received An array of arguments received thus far. - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - -export default function _curryN(length, received, fn) { - return function () { - var combined = []; - var argsIdx = 0; - var left = length; - var combinedIdx = 0; - - while (combinedIdx < received.length || argsIdx < arguments.length) { - var result; - - if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) { - result = received[combinedIdx]; - } else { - result = arguments[argsIdx]; - argsIdx += 1; - } - - combined[combinedIdx] = result; - - if (!_isPlaceholder(result)) { - left -= 1; - } - - combinedIdx += 1; - } - - return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn)); - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_dispatchable.js b/node_modules/ramda/es/internal/_dispatchable.js deleted file mode 100644 index 0051926..0000000 --- a/node_modules/ramda/es/internal/_dispatchable.js +++ /dev/null @@ -1,46 +0,0 @@ -import _isArray from "./_isArray.js"; -import _isTransformer from "./_isTransformer.js"; -/** - * Returns a function that dispatches with different strategies based on the - * object in list position (last argument). If it is an array, executes [fn]. - * Otherwise, if it has a function with one of the given method names, it will - * execute that function (functor case). Otherwise, if it is a transformer, - * uses transducer [xf] to return a new transformer (transducer case). - * Otherwise, it will default to executing [fn]. - * - * @private - * @param {Array} methodNames properties to check for a custom implementation - * @param {Function} xf transducer to initialize if object is transformer - * @param {Function} fn default ramda implementation - * @return {Function} A function that dispatches on object in list position - */ - -export default function _dispatchable(methodNames, xf, fn) { - return function () { - if (arguments.length === 0) { - return fn(); - } - - var args = Array.prototype.slice.call(arguments, 0); - var obj = args.pop(); - - if (!_isArray(obj)) { - var idx = 0; - - while (idx < methodNames.length) { - if (typeof obj[methodNames[idx]] === 'function') { - return obj[methodNames[idx]].apply(obj, args); - } - - idx += 1; - } - - if (_isTransformer(obj)) { - var transducer = xf.apply(null, args); - return transducer(obj); - } - } - - return fn.apply(this, arguments); - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_dropLast.js b/node_modules/ramda/es/internal/_dropLast.js deleted file mode 100644 index 59ba5f8..0000000 --- a/node_modules/ramda/es/internal/_dropLast.js +++ /dev/null @@ -1,4 +0,0 @@ -import take from "../take.js"; -export default function dropLast(n, xs) { - return take(n < xs.length ? xs.length - n : 0, xs); -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_dropLastWhile.js b/node_modules/ramda/es/internal/_dropLastWhile.js deleted file mode 100644 index f67bc14..0000000 --- a/node_modules/ramda/es/internal/_dropLastWhile.js +++ /dev/null @@ -1,10 +0,0 @@ -import slice from "../slice.js"; -export default function dropLastWhile(pred, xs) { - var idx = xs.length - 1; - - while (idx >= 0 && pred(xs[idx])) { - idx -= 1; - } - - return slice(0, idx + 1, xs); -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_equals.js b/node_modules/ramda/es/internal/_equals.js deleted file mode 100644 index d28bd8e..0000000 --- a/node_modules/ramda/es/internal/_equals.js +++ /dev/null @@ -1,166 +0,0 @@ -import _arrayFromIterator from "./_arrayFromIterator.js"; -import _includesWith from "./_includesWith.js"; -import _functionName from "./_functionName.js"; -import _has from "./_has.js"; -import _objectIs from "./_objectIs.js"; -import keys from "../keys.js"; -import type from "../type.js"; -/** - * private _uniqContentEquals function. - * That function is checking equality of 2 iterator contents with 2 assumptions - * - iterators lengths are the same - * - iterators values are unique - * - * false-positive result will be returned for comparision of, e.g. - * - [1,2,3] and [1,2,3,4] - * - [1,1,1] and [1,2,3] - * */ - -function _uniqContentEquals(aIterator, bIterator, stackA, stackB) { - var a = _arrayFromIterator(aIterator); - - var b = _arrayFromIterator(bIterator); - - function eq(_a, _b) { - return _equals(_a, _b, stackA.slice(), stackB.slice()); - } // if *a* array contains any element that is not included in *b* - - - return !_includesWith(function (b, aItem) { - return !_includesWith(eq, aItem, b); - }, b, a); -} - -export default function _equals(a, b, stackA, stackB) { - if (_objectIs(a, b)) { - return true; - } - - var typeA = type(a); - - if (typeA !== type(b)) { - return false; - } - - if (a == null || b == null) { - return false; - } - - if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') { - return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a); - } - - if (typeof a.equals === 'function' || typeof b.equals === 'function') { - return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a); - } - - switch (typeA) { - case 'Arguments': - case 'Array': - case 'Object': - if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') { - return a === b; - } - - break; - - case 'Boolean': - case 'Number': - case 'String': - if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) { - return false; - } - - break; - - case 'Date': - if (!_objectIs(a.valueOf(), b.valueOf())) { - return false; - } - - break; - - case 'Error': - return a.name === b.name && a.message === b.message; - - case 'RegExp': - if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) { - return false; - } - - break; - } - - var idx = stackA.length - 1; - - while (idx >= 0) { - if (stackA[idx] === a) { - return stackB[idx] === b; - } - - idx -= 1; - } - - switch (typeA) { - case 'Map': - if (a.size !== b.size) { - return false; - } - - return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b])); - - case 'Set': - if (a.size !== b.size) { - return false; - } - - return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b])); - - case 'Arguments': - case 'Array': - case 'Object': - case 'Boolean': - case 'Number': - case 'String': - case 'Date': - case 'Error': - case 'RegExp': - case 'Int8Array': - case 'Uint8Array': - case 'Uint8ClampedArray': - case 'Int16Array': - case 'Uint16Array': - case 'Int32Array': - case 'Uint32Array': - case 'Float32Array': - case 'Float64Array': - case 'ArrayBuffer': - break; - - default: - // Values of other types are only equal if identical. - return false; - } - - var keysA = keys(a); - - if (keysA.length !== keys(b).length) { - return false; - } - - var extendedStackA = stackA.concat([a]); - var extendedStackB = stackB.concat([b]); - idx = keysA.length - 1; - - while (idx >= 0) { - var key = keysA[idx]; - - if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) { - return false; - } - - idx -= 1; - } - - return true; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_filter.js b/node_modules/ramda/es/internal/_filter.js deleted file mode 100644 index d9abc4a..0000000 --- a/node_modules/ramda/es/internal/_filter.js +++ /dev/null @@ -1,15 +0,0 @@ -export default function _filter(fn, list) { - var idx = 0; - var len = list.length; - var result = []; - - while (idx < len) { - if (fn(list[idx])) { - result[result.length] = list[idx]; - } - - idx += 1; - } - - return result; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_flatCat.js b/node_modules/ramda/es/internal/_flatCat.js deleted file mode 100644 index 26e141a..0000000 --- a/node_modules/ramda/es/internal/_flatCat.js +++ /dev/null @@ -1,32 +0,0 @@ -import _forceReduced from "./_forceReduced.js"; -import _isArrayLike from "./_isArrayLike.js"; -import _reduce from "./_reduce.js"; -import _xfBase from "./_xfBase.js"; - -var preservingReduced = function (xf) { - return { - '@@transducer/init': _xfBase.init, - '@@transducer/result': function (result) { - return xf['@@transducer/result'](result); - }, - '@@transducer/step': function (result, input) { - var ret = xf['@@transducer/step'](result, input); - return ret['@@transducer/reduced'] ? _forceReduced(ret) : ret; - } - }; -}; - -var _flatCat = function _xcat(xf) { - var rxf = preservingReduced(xf); - return { - '@@transducer/init': _xfBase.init, - '@@transducer/result': function (result) { - return rxf['@@transducer/result'](result); - }, - '@@transducer/step': function (result, input) { - return !_isArrayLike(input) ? _reduce(rxf, result, [input]) : _reduce(rxf, result, input); - } - }; -}; - -export default _flatCat; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_forceReduced.js b/node_modules/ramda/es/internal/_forceReduced.js deleted file mode 100644 index 7c59c78..0000000 --- a/node_modules/ramda/es/internal/_forceReduced.js +++ /dev/null @@ -1,6 +0,0 @@ -export default function _forceReduced(x) { - return { - '@@transducer/value': x, - '@@transducer/reduced': true - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_functionName.js b/node_modules/ramda/es/internal/_functionName.js deleted file mode 100644 index 17c7718..0000000 --- a/node_modules/ramda/es/internal/_functionName.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function _functionName(f) { - // String(x => x) evaluates to "x => x", so the pattern may not match. - var match = String(f).match(/^function (\w*)/); - return match == null ? '' : match[1]; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_functionsWith.js b/node_modules/ramda/es/internal/_functionsWith.js deleted file mode 100644 index 829eb6b..0000000 --- a/node_modules/ramda/es/internal/_functionsWith.js +++ /dev/null @@ -1,14 +0,0 @@ -import _filter from "./_filter.js"; -/** - * @private - * @param {Function} fn The strategy for extracting function names from an object - * @return {Function} A function that takes an object and returns an array of function names. - */ - -export default function _functionsWith(fn) { - return function (obj) { - return _filter(function (key) { - return typeof obj[key] === 'function'; - }, fn(obj)); - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_has.js b/node_modules/ramda/es/internal/_has.js deleted file mode 100644 index 71363cf..0000000 --- a/node_modules/ramda/es/internal/_has.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function _has(prop, obj) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_identity.js b/node_modules/ramda/es/internal/_identity.js deleted file mode 100644 index a1e7e4c..0000000 --- a/node_modules/ramda/es/internal/_identity.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function _identity(x) { - return x; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_includes.js b/node_modules/ramda/es/internal/_includes.js deleted file mode 100644 index e932f9d..0000000 --- a/node_modules/ramda/es/internal/_includes.js +++ /dev/null @@ -1,4 +0,0 @@ -import _indexOf from "./_indexOf.js"; -export default function _includes(a, list) { - return _indexOf(list, a, 0) >= 0; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_includesWith.js b/node_modules/ramda/es/internal/_includesWith.js deleted file mode 100644 index e13a214..0000000 --- a/node_modules/ramda/es/internal/_includesWith.js +++ /dev/null @@ -1,14 +0,0 @@ -export default function _includesWith(pred, x, list) { - var idx = 0; - var len = list.length; - - while (idx < len) { - if (pred(x, list[idx])) { - return true; - } - - idx += 1; - } - - return false; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_indexOf.js b/node_modules/ramda/es/internal/_indexOf.js deleted file mode 100644 index 80305d4..0000000 --- a/node_modules/ramda/es/internal/_indexOf.js +++ /dev/null @@ -1,67 +0,0 @@ -import equals from "../equals.js"; -export default function _indexOf(list, a, idx) { - var inf, item; // Array.prototype.indexOf doesn't exist below IE9 - - if (typeof list.indexOf === 'function') { - switch (typeof a) { - case 'number': - if (a === 0) { - // manually crawl the list to distinguish between +0 and -0 - inf = 1 / a; - - while (idx < list.length) { - item = list[idx]; - - if (item === 0 && 1 / item === inf) { - return idx; - } - - idx += 1; - } - - return -1; - } else if (a !== a) { - // NaN - while (idx < list.length) { - item = list[idx]; - - if (typeof item === 'number' && item !== item) { - return idx; - } - - idx += 1; - } - - return -1; - } // non-zero numbers can utilise Set - - - return list.indexOf(a, idx); - // all these types can utilise Set - - case 'string': - case 'boolean': - case 'function': - case 'undefined': - return list.indexOf(a, idx); - - case 'object': - if (a === null) { - // null can utilise Set - return list.indexOf(a, idx); - } - - } - } // anything else not covered above, defer to R.equals - - - while (idx < list.length) { - if (equals(list[idx], a)) { - return idx; - } - - idx += 1; - } - - return -1; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_isArguments.js b/node_modules/ramda/es/internal/_isArguments.js deleted file mode 100644 index 15df0be..0000000 --- a/node_modules/ramda/es/internal/_isArguments.js +++ /dev/null @@ -1,14 +0,0 @@ -import _has from "./_has.js"; -var toString = Object.prototype.toString; - -var _isArguments = -/*#__PURE__*/ -function () { - return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) { - return toString.call(x) === '[object Arguments]'; - } : function _isArguments(x) { - return _has('callee', x); - }; -}(); - -export default _isArguments; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_isArray.js b/node_modules/ramda/es/internal/_isArray.js deleted file mode 100644 index 762faf2..0000000 --- a/node_modules/ramda/es/internal/_isArray.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Tests whether or not an object is an array. - * - * @private - * @param {*} val The object to test. - * @return {Boolean} `true` if `val` is an array, `false` otherwise. - * @example - * - * _isArray([]); //=> true - * _isArray(null); //=> false - * _isArray({}); //=> false - */ -export default Array.isArray || function _isArray(val) { - return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]'; -}; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_isArrayLike.js b/node_modules/ramda/es/internal/_isArrayLike.js deleted file mode 100644 index d2ce956..0000000 --- a/node_modules/ramda/es/internal/_isArrayLike.js +++ /dev/null @@ -1,56 +0,0 @@ -import _curry1 from "./_curry1.js"; -import _isArray from "./_isArray.js"; -import _isString from "./_isString.js"; -/** - * Tests whether or not an object is similar to an array. - * - * @private - * @category Type - * @category List - * @sig * -> Boolean - * @param {*} x The object to test. - * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise. - * @example - * - * _isArrayLike([]); //=> true - * _isArrayLike(true); //=> false - * _isArrayLike({}); //=> false - * _isArrayLike({length: 10}); //=> false - * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true - */ - -var _isArrayLike = -/*#__PURE__*/ -_curry1(function isArrayLike(x) { - if (_isArray(x)) { - return true; - } - - if (!x) { - return false; - } - - if (typeof x !== 'object') { - return false; - } - - if (_isString(x)) { - return false; - } - - if (x.nodeType === 1) { - return !!x.length; - } - - if (x.length === 0) { - return true; - } - - if (x.length > 0) { - return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1); - } - - return false; -}); - -export default _isArrayLike; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_isFunction.js b/node_modules/ramda/es/internal/_isFunction.js deleted file mode 100644 index de7c232..0000000 --- a/node_modules/ramda/es/internal/_isFunction.js +++ /dev/null @@ -1,4 +0,0 @@ -export default function _isFunction(x) { - var type = Object.prototype.toString.call(x); - return type === '[object Function]' || type === '[object AsyncFunction]' || type === '[object GeneratorFunction]' || type === '[object AsyncGeneratorFunction]'; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_isInteger.js b/node_modules/ramda/es/internal/_isInteger.js deleted file mode 100644 index 64cbfc6..0000000 --- a/node_modules/ramda/es/internal/_isInteger.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Determine if the passed argument is an integer. - * - * @private - * @param {*} n - * @category Type - * @return {Boolean} - */ -export default Number.isInteger || function _isInteger(n) { - return n << 0 === n; -}; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_isNumber.js b/node_modules/ramda/es/internal/_isNumber.js deleted file mode 100644 index 9dc1df2..0000000 --- a/node_modules/ramda/es/internal/_isNumber.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function _isNumber(x) { - return Object.prototype.toString.call(x) === '[object Number]'; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_isObject.js b/node_modules/ramda/es/internal/_isObject.js deleted file mode 100644 index b85dc15..0000000 --- a/node_modules/ramda/es/internal/_isObject.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function _isObject(x) { - return Object.prototype.toString.call(x) === '[object Object]'; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_isPlaceholder.js b/node_modules/ramda/es/internal/_isPlaceholder.js deleted file mode 100644 index 23e63cc..0000000 --- a/node_modules/ramda/es/internal/_isPlaceholder.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function _isPlaceholder(a) { - return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_isRegExp.js b/node_modules/ramda/es/internal/_isRegExp.js deleted file mode 100644 index 07e7e1e..0000000 --- a/node_modules/ramda/es/internal/_isRegExp.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function _isRegExp(x) { - return Object.prototype.toString.call(x) === '[object RegExp]'; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_isString.js b/node_modules/ramda/es/internal/_isString.js deleted file mode 100644 index a5985ee..0000000 --- a/node_modules/ramda/es/internal/_isString.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function _isString(x) { - return Object.prototype.toString.call(x) === '[object String]'; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_isTransformer.js b/node_modules/ramda/es/internal/_isTransformer.js deleted file mode 100644 index cc3ceeb..0000000 --- a/node_modules/ramda/es/internal/_isTransformer.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function _isTransformer(obj) { - return obj != null && typeof obj['@@transducer/step'] === 'function'; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_makeFlat.js b/node_modules/ramda/es/internal/_makeFlat.js deleted file mode 100644 index aff90d3..0000000 --- a/node_modules/ramda/es/internal/_makeFlat.js +++ /dev/null @@ -1,35 +0,0 @@ -import _isArrayLike from "./_isArrayLike.js"; -/** - * `_makeFlat` is a helper function that returns a one-level or fully recursive - * function based on the flag passed in. - * - * @private - */ - -export default function _makeFlat(recursive) { - return function flatt(list) { - var value, jlen, j; - var result = []; - var idx = 0; - var ilen = list.length; - - while (idx < ilen) { - if (_isArrayLike(list[idx])) { - value = recursive ? flatt(list[idx]) : list[idx]; - j = 0; - jlen = value.length; - - while (j < jlen) { - result[result.length] = value[j]; - j += 1; - } - } else { - result[result.length] = list[idx]; - } - - idx += 1; - } - - return result; - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_map.js b/node_modules/ramda/es/internal/_map.js deleted file mode 100644 index ad4fc01..0000000 --- a/node_modules/ramda/es/internal/_map.js +++ /dev/null @@ -1,12 +0,0 @@ -export default function _map(fn, functor) { - var idx = 0; - var len = functor.length; - var result = Array(len); - - while (idx < len) { - result[idx] = fn(functor[idx]); - idx += 1; - } - - return result; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_objectAssign.js b/node_modules/ramda/es/internal/_objectAssign.js deleted file mode 100644 index 324aafd..0000000 --- a/node_modules/ramda/es/internal/_objectAssign.js +++ /dev/null @@ -1,29 +0,0 @@ -import _has from "./_has.js"; // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign - -function _objectAssign(target) { - if (target == null) { - throw new TypeError('Cannot convert undefined or null to object'); - } - - var output = Object(target); - var idx = 1; - var length = arguments.length; - - while (idx < length) { - var source = arguments[idx]; - - if (source != null) { - for (var nextKey in source) { - if (_has(nextKey, source)) { - output[nextKey] = source[nextKey]; - } - } - } - - idx += 1; - } - - return output; -} - -export default typeof Object.assign === 'function' ? Object.assign : _objectAssign; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_objectIs.js b/node_modules/ramda/es/internal/_objectIs.js deleted file mode 100644 index 6167f8e..0000000 --- a/node_modules/ramda/es/internal/_objectIs.js +++ /dev/null @@ -1,14 +0,0 @@ -// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is -function _objectIs(a, b) { - // SameValue algorithm - if (a === b) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return a !== 0 || 1 / a === 1 / b; - } else { - // Step 6.a: NaN == NaN - return a !== a && b !== b; - } -} - -export default typeof Object.is === 'function' ? Object.is : _objectIs; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_of.js b/node_modules/ramda/es/internal/_of.js deleted file mode 100644 index 68ea63a..0000000 --- a/node_modules/ramda/es/internal/_of.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function _of(x) { - return [x]; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_pipe.js b/node_modules/ramda/es/internal/_pipe.js deleted file mode 100644 index 01fb777..0000000 --- a/node_modules/ramda/es/internal/_pipe.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function _pipe(f, g) { - return function () { - return g.call(this, f.apply(this, arguments)); - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_pipeP.js b/node_modules/ramda/es/internal/_pipeP.js deleted file mode 100644 index a624764..0000000 --- a/node_modules/ramda/es/internal/_pipeP.js +++ /dev/null @@ -1,8 +0,0 @@ -export default function _pipeP(f, g) { - return function () { - var ctx = this; - return f.apply(ctx, arguments).then(function (x) { - return g.call(ctx, x); - }); - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_quote.js b/node_modules/ramda/es/internal/_quote.js deleted file mode 100644 index a7fd4d9..0000000 --- a/node_modules/ramda/es/internal/_quote.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function _quote(s) { - var escaped = s.replace(/\\/g, '\\\\').replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace - .replace(/\f/g, '\\f').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t').replace(/\v/g, '\\v').replace(/\0/g, '\\0'); - return '"' + escaped.replace(/"/g, '\\"') + '"'; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_reduce.js b/node_modules/ramda/es/internal/_reduce.js deleted file mode 100644 index f173326..0000000 --- a/node_modules/ramda/es/internal/_reduce.js +++ /dev/null @@ -1,71 +0,0 @@ -import _isArrayLike from "./_isArrayLike.js"; -import _xwrap from "./_xwrap.js"; -import bind from "../bind.js"; - -function _arrayReduce(xf, acc, list) { - var idx = 0; - var len = list.length; - - while (idx < len) { - acc = xf['@@transducer/step'](acc, list[idx]); - - if (acc && acc['@@transducer/reduced']) { - acc = acc['@@transducer/value']; - break; - } - - idx += 1; - } - - return xf['@@transducer/result'](acc); -} - -function _iterableReduce(xf, acc, iter) { - var step = iter.next(); - - while (!step.done) { - acc = xf['@@transducer/step'](acc, step.value); - - if (acc && acc['@@transducer/reduced']) { - acc = acc['@@transducer/value']; - break; - } - - step = iter.next(); - } - - return xf['@@transducer/result'](acc); -} - -function _methodReduce(xf, acc, obj, methodName) { - return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc)); -} - -var symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator'; -export default function _reduce(fn, acc, list) { - if (typeof fn === 'function') { - fn = _xwrap(fn); - } - - if (_isArrayLike(list)) { - return _arrayReduce(fn, acc, list); - } - - if (typeof list['fantasy-land/reduce'] === 'function') { - return _methodReduce(fn, acc, list, 'fantasy-land/reduce'); - } - - if (list[symIterator] != null) { - return _iterableReduce(fn, acc, list[symIterator]()); - } - - if (typeof list.next === 'function') { - return _iterableReduce(fn, acc, list); - } - - if (typeof list.reduce === 'function') { - return _methodReduce(fn, acc, list, 'reduce'); - } - - throw new TypeError('reduce: list must be array or iterable'); -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_reduced.js b/node_modules/ramda/es/internal/_reduced.js deleted file mode 100644 index 0f065cc..0000000 --- a/node_modules/ramda/es/internal/_reduced.js +++ /dev/null @@ -1,6 +0,0 @@ -export default function _reduced(x) { - return x && x['@@transducer/reduced'] ? x : { - '@@transducer/value': x, - '@@transducer/reduced': true - }; -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_stepCat.js b/node_modules/ramda/es/internal/_stepCat.js deleted file mode 100644 index a67c030..0000000 --- a/node_modules/ramda/es/internal/_stepCat.js +++ /dev/null @@ -1,46 +0,0 @@ -import _objectAssign from "./_objectAssign.js"; -import _identity from "./_identity.js"; -import _isArrayLike from "./_isArrayLike.js"; -import _isTransformer from "./_isTransformer.js"; -import objOf from "../objOf.js"; -var _stepCatArray = { - '@@transducer/init': Array, - '@@transducer/step': function (xs, x) { - xs.push(x); - return xs; - }, - '@@transducer/result': _identity -}; -var _stepCatString = { - '@@transducer/init': String, - '@@transducer/step': function (a, b) { - return a + b; - }, - '@@transducer/result': _identity -}; -var _stepCatObject = { - '@@transducer/init': Object, - '@@transducer/step': function (result, input) { - return _objectAssign(result, _isArrayLike(input) ? objOf(input[0], input[1]) : input); - }, - '@@transducer/result': _identity -}; -export default function _stepCat(obj) { - if (_isTransformer(obj)) { - return obj; - } - - if (_isArrayLike(obj)) { - return _stepCatArray; - } - - if (typeof obj === 'string') { - return _stepCatString; - } - - if (typeof obj === 'object') { - return _stepCatObject; - } - - throw new Error('Cannot create transformer for ' + obj); -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_toISOString.js b/node_modules/ramda/es/internal/_toISOString.js deleted file mode 100644 index dbd8119..0000000 --- a/node_modules/ramda/es/internal/_toISOString.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Polyfill from . - */ -var pad = function pad(n) { - return (n < 10 ? '0' : '') + n; -}; - -var _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) { - return d.toISOString(); -} : function _toISOString(d) { - return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z'; -}; - -export default _toISOString; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_toString.js b/node_modules/ramda/es/internal/_toString.js deleted file mode 100644 index c14c39c..0000000 --- a/node_modules/ramda/es/internal/_toString.js +++ /dev/null @@ -1,58 +0,0 @@ -import _includes from "./_includes.js"; -import _map from "./_map.js"; -import _quote from "./_quote.js"; -import _toISOString from "./_toISOString.js"; -import keys from "../keys.js"; -import reject from "../reject.js"; -export default function _toString(x, seen) { - var recur = function recur(y) { - var xs = seen.concat([x]); - return _includes(y, xs) ? '' : _toString(y, xs); - }; // mapPairs :: (Object, [String]) -> [String] - - - var mapPairs = function (obj, keys) { - return _map(function (k) { - return _quote(k) + ': ' + recur(obj[k]); - }, keys.slice().sort()); - }; - - switch (Object.prototype.toString.call(x)) { - case '[object Arguments]': - return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))'; - - case '[object Array]': - return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) { - return /^\d+$/.test(k); - }, keys(x)))).join(', ') + ']'; - - case '[object Boolean]': - return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString(); - - case '[object Date]': - return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')'; - - case '[object Null]': - return 'null'; - - case '[object Number]': - return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10); - - case '[object String]': - return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x); - - case '[object Undefined]': - return 'undefined'; - - default: - if (typeof x.toString === 'function') { - var repr = x.toString(); - - if (repr !== '[object Object]') { - return repr; - } - } - - return '{' + mapPairs(x, keys(x)).join(', ') + '}'; - } -} \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xall.js b/node_modules/ramda/es/internal/_xall.js deleted file mode 100644 index 69c367a..0000000 --- a/node_modules/ramda/es/internal/_xall.js +++ /dev/null @@ -1,42 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _reduced from "./_reduced.js"; -import _xfBase from "./_xfBase.js"; - -var XAll = -/*#__PURE__*/ -function () { - function XAll(f, xf) { - this.xf = xf; - this.f = f; - this.all = true; - } - - XAll.prototype['@@transducer/init'] = _xfBase.init; - - XAll.prototype['@@transducer/result'] = function (result) { - if (this.all) { - result = this.xf['@@transducer/step'](result, true); - } - - return this.xf['@@transducer/result'](result); - }; - - XAll.prototype['@@transducer/step'] = function (result, input) { - if (!this.f(input)) { - this.all = false; - result = _reduced(this.xf['@@transducer/step'](result, false)); - } - - return result; - }; - - return XAll; -}(); - -var _xall = -/*#__PURE__*/ -_curry2(function _xall(f, xf) { - return new XAll(f, xf); -}); - -export default _xall; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xany.js b/node_modules/ramda/es/internal/_xany.js deleted file mode 100644 index 36f9bb8..0000000 --- a/node_modules/ramda/es/internal/_xany.js +++ /dev/null @@ -1,42 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _reduced from "./_reduced.js"; -import _xfBase from "./_xfBase.js"; - -var XAny = -/*#__PURE__*/ -function () { - function XAny(f, xf) { - this.xf = xf; - this.f = f; - this.any = false; - } - - XAny.prototype['@@transducer/init'] = _xfBase.init; - - XAny.prototype['@@transducer/result'] = function (result) { - if (!this.any) { - result = this.xf['@@transducer/step'](result, false); - } - - return this.xf['@@transducer/result'](result); - }; - - XAny.prototype['@@transducer/step'] = function (result, input) { - if (this.f(input)) { - this.any = true; - result = _reduced(this.xf['@@transducer/step'](result, true)); - } - - return result; - }; - - return XAny; -}(); - -var _xany = -/*#__PURE__*/ -_curry2(function _xany(f, xf) { - return new XAny(f, xf); -}); - -export default _xany; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xaperture.js b/node_modules/ramda/es/internal/_xaperture.js deleted file mode 100644 index 32718dd..0000000 --- a/node_modules/ramda/es/internal/_xaperture.js +++ /dev/null @@ -1,50 +0,0 @@ -import _concat from "./_concat.js"; -import _curry2 from "./_curry2.js"; -import _xfBase from "./_xfBase.js"; - -var XAperture = -/*#__PURE__*/ -function () { - function XAperture(n, xf) { - this.xf = xf; - this.pos = 0; - this.full = false; - this.acc = new Array(n); - } - - XAperture.prototype['@@transducer/init'] = _xfBase.init; - - XAperture.prototype['@@transducer/result'] = function (result) { - this.acc = null; - return this.xf['@@transducer/result'](result); - }; - - XAperture.prototype['@@transducer/step'] = function (result, input) { - this.store(input); - return this.full ? this.xf['@@transducer/step'](result, this.getCopy()) : result; - }; - - XAperture.prototype.store = function (input) { - this.acc[this.pos] = input; - this.pos += 1; - - if (this.pos === this.acc.length) { - this.pos = 0; - this.full = true; - } - }; - - XAperture.prototype.getCopy = function () { - return _concat(Array.prototype.slice.call(this.acc, this.pos), Array.prototype.slice.call(this.acc, 0, this.pos)); - }; - - return XAperture; -}(); - -var _xaperture = -/*#__PURE__*/ -_curry2(function _xaperture(n, xf) { - return new XAperture(n, xf); -}); - -export default _xaperture; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xchain.js b/node_modules/ramda/es/internal/_xchain.js deleted file mode 100644 index 0903e48..0000000 --- a/node_modules/ramda/es/internal/_xchain.js +++ /dev/null @@ -1,11 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _flatCat from "./_flatCat.js"; -import map from "../map.js"; - -var _xchain = -/*#__PURE__*/ -_curry2(function _xchain(f, xf) { - return map(f, _flatCat(xf)); -}); - -export default _xchain; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xdrop.js b/node_modules/ramda/es/internal/_xdrop.js deleted file mode 100644 index f21a9e1..0000000 --- a/node_modules/ramda/es/internal/_xdrop.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _xfBase from "./_xfBase.js"; - -var XDrop = -/*#__PURE__*/ -function () { - function XDrop(n, xf) { - this.xf = xf; - this.n = n; - } - - XDrop.prototype['@@transducer/init'] = _xfBase.init; - XDrop.prototype['@@transducer/result'] = _xfBase.result; - - XDrop.prototype['@@transducer/step'] = function (result, input) { - if (this.n > 0) { - this.n -= 1; - return result; - } - - return this.xf['@@transducer/step'](result, input); - }; - - return XDrop; -}(); - -var _xdrop = -/*#__PURE__*/ -_curry2(function _xdrop(n, xf) { - return new XDrop(n, xf); -}); - -export default _xdrop; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xdropLast.js b/node_modules/ramda/es/internal/_xdropLast.js deleted file mode 100644 index 40ab8ef..0000000 --- a/node_modules/ramda/es/internal/_xdropLast.js +++ /dev/null @@ -1,49 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _xfBase from "./_xfBase.js"; - -var XDropLast = -/*#__PURE__*/ -function () { - function XDropLast(n, xf) { - this.xf = xf; - this.pos = 0; - this.full = false; - this.acc = new Array(n); - } - - XDropLast.prototype['@@transducer/init'] = _xfBase.init; - - XDropLast.prototype['@@transducer/result'] = function (result) { - this.acc = null; - return this.xf['@@transducer/result'](result); - }; - - XDropLast.prototype['@@transducer/step'] = function (result, input) { - if (this.full) { - result = this.xf['@@transducer/step'](result, this.acc[this.pos]); - } - - this.store(input); - return result; - }; - - XDropLast.prototype.store = function (input) { - this.acc[this.pos] = input; - this.pos += 1; - - if (this.pos === this.acc.length) { - this.pos = 0; - this.full = true; - } - }; - - return XDropLast; -}(); - -var _xdropLast = -/*#__PURE__*/ -_curry2(function _xdropLast(n, xf) { - return new XDropLast(n, xf); -}); - -export default _xdropLast; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xdropLastWhile.js b/node_modules/ramda/es/internal/_xdropLastWhile.js deleted file mode 100644 index 5ec0b5b..0000000 --- a/node_modules/ramda/es/internal/_xdropLastWhile.js +++ /dev/null @@ -1,45 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _reduce from "./_reduce.js"; -import _xfBase from "./_xfBase.js"; - -var XDropLastWhile = -/*#__PURE__*/ -function () { - function XDropLastWhile(fn, xf) { - this.f = fn; - this.retained = []; - this.xf = xf; - } - - XDropLastWhile.prototype['@@transducer/init'] = _xfBase.init; - - XDropLastWhile.prototype['@@transducer/result'] = function (result) { - this.retained = null; - return this.xf['@@transducer/result'](result); - }; - - XDropLastWhile.prototype['@@transducer/step'] = function (result, input) { - return this.f(input) ? this.retain(result, input) : this.flush(result, input); - }; - - XDropLastWhile.prototype.flush = function (result, input) { - result = _reduce(this.xf['@@transducer/step'], result, this.retained); - this.retained = []; - return this.xf['@@transducer/step'](result, input); - }; - - XDropLastWhile.prototype.retain = function (result, input) { - this.retained.push(input); - return result; - }; - - return XDropLastWhile; -}(); - -var _xdropLastWhile = -/*#__PURE__*/ -_curry2(function _xdropLastWhile(fn, xf) { - return new XDropLastWhile(fn, xf); -}); - -export default _xdropLastWhile; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xdropRepeatsWith.js b/node_modules/ramda/es/internal/_xdropRepeatsWith.js deleted file mode 100644 index bc86bda..0000000 --- a/node_modules/ramda/es/internal/_xdropRepeatsWith.js +++ /dev/null @@ -1,39 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _xfBase from "./_xfBase.js"; - -var XDropRepeatsWith = -/*#__PURE__*/ -function () { - function XDropRepeatsWith(pred, xf) { - this.xf = xf; - this.pred = pred; - this.lastValue = undefined; - this.seenFirstValue = false; - } - - XDropRepeatsWith.prototype['@@transducer/init'] = _xfBase.init; - XDropRepeatsWith.prototype['@@transducer/result'] = _xfBase.result; - - XDropRepeatsWith.prototype['@@transducer/step'] = function (result, input) { - var sameAsLast = false; - - if (!this.seenFirstValue) { - this.seenFirstValue = true; - } else if (this.pred(this.lastValue, input)) { - sameAsLast = true; - } - - this.lastValue = input; - return sameAsLast ? result : this.xf['@@transducer/step'](result, input); - }; - - return XDropRepeatsWith; -}(); - -var _xdropRepeatsWith = -/*#__PURE__*/ -_curry2(function _xdropRepeatsWith(pred, xf) { - return new XDropRepeatsWith(pred, xf); -}); - -export default _xdropRepeatsWith; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xdropWhile.js b/node_modules/ramda/es/internal/_xdropWhile.js deleted file mode 100644 index ee65fd9..0000000 --- a/node_modules/ramda/es/internal/_xdropWhile.js +++ /dev/null @@ -1,36 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _xfBase from "./_xfBase.js"; - -var XDropWhile = -/*#__PURE__*/ -function () { - function XDropWhile(f, xf) { - this.xf = xf; - this.f = f; - } - - XDropWhile.prototype['@@transducer/init'] = _xfBase.init; - XDropWhile.prototype['@@transducer/result'] = _xfBase.result; - - XDropWhile.prototype['@@transducer/step'] = function (result, input) { - if (this.f) { - if (this.f(input)) { - return result; - } - - this.f = null; - } - - return this.xf['@@transducer/step'](result, input); - }; - - return XDropWhile; -}(); - -var _xdropWhile = -/*#__PURE__*/ -_curry2(function _xdropWhile(f, xf) { - return new XDropWhile(f, xf); -}); - -export default _xdropWhile; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xfBase.js b/node_modules/ramda/es/internal/_xfBase.js deleted file mode 100644 index 97f6e2e..0000000 --- a/node_modules/ramda/es/internal/_xfBase.js +++ /dev/null @@ -1,8 +0,0 @@ -export default { - init: function () { - return this.xf['@@transducer/init'](); - }, - result: function (result) { - return this.xf['@@transducer/result'](result); - } -}; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xfilter.js b/node_modules/ramda/es/internal/_xfilter.js deleted file mode 100644 index 5c3449e..0000000 --- a/node_modules/ramda/es/internal/_xfilter.js +++ /dev/null @@ -1,28 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _xfBase from "./_xfBase.js"; - -var XFilter = -/*#__PURE__*/ -function () { - function XFilter(f, xf) { - this.xf = xf; - this.f = f; - } - - XFilter.prototype['@@transducer/init'] = _xfBase.init; - XFilter.prototype['@@transducer/result'] = _xfBase.result; - - XFilter.prototype['@@transducer/step'] = function (result, input) { - return this.f(input) ? this.xf['@@transducer/step'](result, input) : result; - }; - - return XFilter; -}(); - -var _xfilter = -/*#__PURE__*/ -_curry2(function _xfilter(f, xf) { - return new XFilter(f, xf); -}); - -export default _xfilter; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xfind.js b/node_modules/ramda/es/internal/_xfind.js deleted file mode 100644 index af5a84c..0000000 --- a/node_modules/ramda/es/internal/_xfind.js +++ /dev/null @@ -1,42 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _reduced from "./_reduced.js"; -import _xfBase from "./_xfBase.js"; - -var XFind = -/*#__PURE__*/ -function () { - function XFind(f, xf) { - this.xf = xf; - this.f = f; - this.found = false; - } - - XFind.prototype['@@transducer/init'] = _xfBase.init; - - XFind.prototype['@@transducer/result'] = function (result) { - if (!this.found) { - result = this.xf['@@transducer/step'](result, void 0); - } - - return this.xf['@@transducer/result'](result); - }; - - XFind.prototype['@@transducer/step'] = function (result, input) { - if (this.f(input)) { - this.found = true; - result = _reduced(this.xf['@@transducer/step'](result, input)); - } - - return result; - }; - - return XFind; -}(); - -var _xfind = -/*#__PURE__*/ -_curry2(function _xfind(f, xf) { - return new XFind(f, xf); -}); - -export default _xfind; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xfindIndex.js b/node_modules/ramda/es/internal/_xfindIndex.js deleted file mode 100644 index 21fca61..0000000 --- a/node_modules/ramda/es/internal/_xfindIndex.js +++ /dev/null @@ -1,45 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _reduced from "./_reduced.js"; -import _xfBase from "./_xfBase.js"; - -var XFindIndex = -/*#__PURE__*/ -function () { - function XFindIndex(f, xf) { - this.xf = xf; - this.f = f; - this.idx = -1; - this.found = false; - } - - XFindIndex.prototype['@@transducer/init'] = _xfBase.init; - - XFindIndex.prototype['@@transducer/result'] = function (result) { - if (!this.found) { - result = this.xf['@@transducer/step'](result, -1); - } - - return this.xf['@@transducer/result'](result); - }; - - XFindIndex.prototype['@@transducer/step'] = function (result, input) { - this.idx += 1; - - if (this.f(input)) { - this.found = true; - result = _reduced(this.xf['@@transducer/step'](result, this.idx)); - } - - return result; - }; - - return XFindIndex; -}(); - -var _xfindIndex = -/*#__PURE__*/ -_curry2(function _xfindIndex(f, xf) { - return new XFindIndex(f, xf); -}); - -export default _xfindIndex; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xfindLast.js b/node_modules/ramda/es/internal/_xfindLast.js deleted file mode 100644 index 5be0240..0000000 --- a/node_modules/ramda/es/internal/_xfindLast.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _xfBase from "./_xfBase.js"; - -var XFindLast = -/*#__PURE__*/ -function () { - function XFindLast(f, xf) { - this.xf = xf; - this.f = f; - } - - XFindLast.prototype['@@transducer/init'] = _xfBase.init; - - XFindLast.prototype['@@transducer/result'] = function (result) { - return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.last)); - }; - - XFindLast.prototype['@@transducer/step'] = function (result, input) { - if (this.f(input)) { - this.last = input; - } - - return result; - }; - - return XFindLast; -}(); - -var _xfindLast = -/*#__PURE__*/ -_curry2(function _xfindLast(f, xf) { - return new XFindLast(f, xf); -}); - -export default _xfindLast; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xfindLastIndex.js b/node_modules/ramda/es/internal/_xfindLastIndex.js deleted file mode 100644 index e82fcb9..0000000 --- a/node_modules/ramda/es/internal/_xfindLastIndex.js +++ /dev/null @@ -1,39 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _xfBase from "./_xfBase.js"; - -var XFindLastIndex = -/*#__PURE__*/ -function () { - function XFindLastIndex(f, xf) { - this.xf = xf; - this.f = f; - this.idx = -1; - this.lastIdx = -1; - } - - XFindLastIndex.prototype['@@transducer/init'] = _xfBase.init; - - XFindLastIndex.prototype['@@transducer/result'] = function (result) { - return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.lastIdx)); - }; - - XFindLastIndex.prototype['@@transducer/step'] = function (result, input) { - this.idx += 1; - - if (this.f(input)) { - this.lastIdx = this.idx; - } - - return result; - }; - - return XFindLastIndex; -}(); - -var _xfindLastIndex = -/*#__PURE__*/ -_curry2(function _xfindLastIndex(f, xf) { - return new XFindLastIndex(f, xf); -}); - -export default _xfindLastIndex; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xmap.js b/node_modules/ramda/es/internal/_xmap.js deleted file mode 100644 index b41ec32..0000000 --- a/node_modules/ramda/es/internal/_xmap.js +++ /dev/null @@ -1,28 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _xfBase from "./_xfBase.js"; - -var XMap = -/*#__PURE__*/ -function () { - function XMap(f, xf) { - this.xf = xf; - this.f = f; - } - - XMap.prototype['@@transducer/init'] = _xfBase.init; - XMap.prototype['@@transducer/result'] = _xfBase.result; - - XMap.prototype['@@transducer/step'] = function (result, input) { - return this.xf['@@transducer/step'](result, this.f(input)); - }; - - return XMap; -}(); - -var _xmap = -/*#__PURE__*/ -_curry2(function _xmap(f, xf) { - return new XMap(f, xf); -}); - -export default _xmap; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xreduceBy.js b/node_modules/ramda/es/internal/_xreduceBy.js deleted file mode 100644 index bacfdb2..0000000 --- a/node_modules/ramda/es/internal/_xreduceBy.js +++ /dev/null @@ -1,52 +0,0 @@ -import _curryN from "./_curryN.js"; -import _has from "./_has.js"; -import _xfBase from "./_xfBase.js"; - -var XReduceBy = -/*#__PURE__*/ -function () { - function XReduceBy(valueFn, valueAcc, keyFn, xf) { - this.valueFn = valueFn; - this.valueAcc = valueAcc; - this.keyFn = keyFn; - this.xf = xf; - this.inputs = {}; - } - - XReduceBy.prototype['@@transducer/init'] = _xfBase.init; - - XReduceBy.prototype['@@transducer/result'] = function (result) { - var key; - - for (key in this.inputs) { - if (_has(key, this.inputs)) { - result = this.xf['@@transducer/step'](result, this.inputs[key]); - - if (result['@@transducer/reduced']) { - result = result['@@transducer/value']; - break; - } - } - } - - this.inputs = null; - return this.xf['@@transducer/result'](result); - }; - - XReduceBy.prototype['@@transducer/step'] = function (result, input) { - var key = this.keyFn(input); - this.inputs[key] = this.inputs[key] || [key, this.valueAcc]; - this.inputs[key][1] = this.valueFn(this.inputs[key][1], input); - return result; - }; - - return XReduceBy; -}(); - -var _xreduceBy = -/*#__PURE__*/ -_curryN(4, [], function _xreduceBy(valueFn, valueAcc, keyFn, xf) { - return new XReduceBy(valueFn, valueAcc, keyFn, xf); -}); - -export default _xreduceBy; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xtake.js b/node_modules/ramda/es/internal/_xtake.js deleted file mode 100644 index 0495669..0000000 --- a/node_modules/ramda/es/internal/_xtake.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _reduced from "./_reduced.js"; -import _xfBase from "./_xfBase.js"; - -var XTake = -/*#__PURE__*/ -function () { - function XTake(n, xf) { - this.xf = xf; - this.n = n; - this.i = 0; - } - - XTake.prototype['@@transducer/init'] = _xfBase.init; - XTake.prototype['@@transducer/result'] = _xfBase.result; - - XTake.prototype['@@transducer/step'] = function (result, input) { - this.i += 1; - var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input); - return this.n >= 0 && this.i >= this.n ? _reduced(ret) : ret; - }; - - return XTake; -}(); - -var _xtake = -/*#__PURE__*/ -_curry2(function _xtake(n, xf) { - return new XTake(n, xf); -}); - -export default _xtake; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xtakeWhile.js b/node_modules/ramda/es/internal/_xtakeWhile.js deleted file mode 100644 index 1ee8fa1..0000000 --- a/node_modules/ramda/es/internal/_xtakeWhile.js +++ /dev/null @@ -1,29 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _reduced from "./_reduced.js"; -import _xfBase from "./_xfBase.js"; - -var XTakeWhile = -/*#__PURE__*/ -function () { - function XTakeWhile(f, xf) { - this.xf = xf; - this.f = f; - } - - XTakeWhile.prototype['@@transducer/init'] = _xfBase.init; - XTakeWhile.prototype['@@transducer/result'] = _xfBase.result; - - XTakeWhile.prototype['@@transducer/step'] = function (result, input) { - return this.f(input) ? this.xf['@@transducer/step'](result, input) : _reduced(result); - }; - - return XTakeWhile; -}(); - -var _xtakeWhile = -/*#__PURE__*/ -_curry2(function _xtakeWhile(f, xf) { - return new XTakeWhile(f, xf); -}); - -export default _xtakeWhile; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xtap.js b/node_modules/ramda/es/internal/_xtap.js deleted file mode 100644 index a0e733c..0000000 --- a/node_modules/ramda/es/internal/_xtap.js +++ /dev/null @@ -1,29 +0,0 @@ -import _curry2 from "./_curry2.js"; -import _xfBase from "./_xfBase.js"; - -var XTap = -/*#__PURE__*/ -function () { - function XTap(f, xf) { - this.xf = xf; - this.f = f; - } - - XTap.prototype['@@transducer/init'] = _xfBase.init; - XTap.prototype['@@transducer/result'] = _xfBase.result; - - XTap.prototype['@@transducer/step'] = function (result, input) { - this.f(input); - return this.xf['@@transducer/step'](result, input); - }; - - return XTap; -}(); - -var _xtap = -/*#__PURE__*/ -_curry2(function _xtap(f, xf) { - return new XTap(f, xf); -}); - -export default _xtap; \ No newline at end of file diff --git a/node_modules/ramda/es/internal/_xwrap.js b/node_modules/ramda/es/internal/_xwrap.js deleted file mode 100644 index ab1e8d5..0000000 --- a/node_modules/ramda/es/internal/_xwrap.js +++ /dev/null @@ -1,25 +0,0 @@ -var XWrap = -/*#__PURE__*/ -function () { - function XWrap(fn) { - this.f = fn; - } - - XWrap.prototype['@@transducer/init'] = function () { - throw new Error('init not implemented on XWrap'); - }; - - XWrap.prototype['@@transducer/result'] = function (acc) { - return acc; - }; - - XWrap.prototype['@@transducer/step'] = function (acc, x) { - return this.f(acc, x); - }; - - return XWrap; -}(); - -export default function _xwrap(fn) { - return new XWrap(fn); -} \ No newline at end of file diff --git a/node_modules/ramda/es/intersection.js b/node_modules/ramda/es/intersection.js deleted file mode 100644 index 667fc21..0000000 --- a/node_modules/ramda/es/intersection.js +++ /dev/null @@ -1,40 +0,0 @@ -import _includes from "./internal/_includes.js"; -import _curry2 from "./internal/_curry2.js"; -import _filter from "./internal/_filter.js"; -import flip from "./flip.js"; -import uniq from "./uniq.js"; -/** - * Combines two lists into a set (i.e. no duplicates) composed of those - * elements common to both lists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The list of elements found in both `list1` and `list2`. - * @see R.innerJoin - * @example - * - * R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3] - */ - -var intersection = -/*#__PURE__*/ -_curry2(function intersection(list1, list2) { - var lookupList, filteredList; - - if (list1.length > list2.length) { - lookupList = list1; - filteredList = list2; - } else { - lookupList = list2; - filteredList = list1; - } - - return uniq(_filter(flip(_includes)(lookupList), filteredList)); -}); - -export default intersection; \ No newline at end of file diff --git a/node_modules/ramda/es/intersperse.js b/node_modules/ramda/es/intersperse.js deleted file mode 100644 index fc9db39..0000000 --- a/node_modules/ramda/es/intersperse.js +++ /dev/null @@ -1,43 +0,0 @@ -import _checkForMethod from "./internal/_checkForMethod.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Creates a new list with the separator interposed between elements. - * - * Dispatches to the `intersperse` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} separator The element to add to the list. - * @param {Array} list The list to be interposed. - * @return {Array} The new list. - * @example - * - * R.intersperse('a', ['b', 'n', 'n', 's']); //=> ['b', 'a', 'n', 'a', 'n', 'a', 's'] - */ - -var intersperse = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_checkForMethod('intersperse', function intersperse(separator, list) { - var out = []; - var idx = 0; - var length = list.length; - - while (idx < length) { - if (idx === length - 1) { - out.push(list[idx]); - } else { - out.push(list[idx], separator); - } - - idx += 1; - } - - return out; -})); - -export default intersperse; \ No newline at end of file diff --git a/node_modules/ramda/es/into.js b/node_modules/ramda/es/into.js deleted file mode 100644 index 1bb07bc..0000000 --- a/node_modules/ramda/es/into.js +++ /dev/null @@ -1,52 +0,0 @@ -import _clone from "./internal/_clone.js"; -import _curry3 from "./internal/_curry3.js"; -import _isTransformer from "./internal/_isTransformer.js"; -import _reduce from "./internal/_reduce.js"; -import _stepCat from "./internal/_stepCat.js"; -/** - * Transforms the items of the list with the transducer and appends the - * transformed items to the accumulator using an appropriate iterator function - * based on the accumulator type. - * - * The accumulator can be an array, string, object or a transformer. Iterated - * items will be appended to arrays and concatenated to strings. Objects will - * be merged directly or 2-item arrays will be merged as key, value pairs. - * - * The accumulator can also be a transformer object that provides a 2-arity - * reducing iterator function, step, 0-arity initial value function, init, and - * 1-arity result extraction function result. The step function is used as the - * iterator function in reduce. The result function is used to convert the - * final accumulator into the return type and in most cases is R.identity. The - * init function is used to provide the initial accumulator. - * - * The iteration is performed with [`R.reduce`](#reduce) after initializing the - * transducer. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig a -> (b -> b) -> [c] -> a - * @param {*} acc The initial accumulator value. - * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.transduce - * @example - * - * const numbers = [1, 2, 3, 4]; - * const transducer = R.compose(R.map(R.add(1)), R.take(2)); - * - * R.into([], transducer, numbers); //=> [2, 3] - * - * const intoArray = R.into([]); - * intoArray(transducer, numbers); //=> [2, 3] - */ - -var into = -/*#__PURE__*/ -_curry3(function into(acc, xf, list) { - return _isTransformer(acc) ? _reduce(xf(acc), acc['@@transducer/init'](), list) : _reduce(xf(_stepCat(acc)), _clone(acc, [], [], false), list); -}); - -export default into; \ No newline at end of file diff --git a/node_modules/ramda/es/invert.js b/node_modules/ramda/es/invert.js deleted file mode 100644 index 99d5d1d..0000000 --- a/node_modules/ramda/es/invert.js +++ /dev/null @@ -1,46 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import _has from "./internal/_has.js"; -import keys from "./keys.js"; -/** - * Same as [`R.invertObj`](#invertObj), however this accounts for objects with - * duplicate values by putting the values into an array. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {s: x} -> {x: [ s, ... ]} - * @param {Object} obj The object or array to invert - * @return {Object} out A new object with keys in an array. - * @see R.invertObj - * @example - * - * const raceResultsByFirstName = { - * first: 'alice', - * second: 'jake', - * third: 'alice', - * }; - * R.invert(raceResultsByFirstName); - * //=> { 'alice': ['first', 'third'], 'jake':['second'] } - */ - -var invert = -/*#__PURE__*/ -_curry1(function invert(obj) { - var props = keys(obj); - var len = props.length; - var idx = 0; - var out = {}; - - while (idx < len) { - var key = props[idx]; - var val = obj[key]; - var list = _has(val, out) ? out[val] : out[val] = []; - list[list.length] = key; - idx += 1; - } - - return out; -}); - -export default invert; \ No newline at end of file diff --git a/node_modules/ramda/es/invertObj.js b/node_modules/ramda/es/invertObj.js deleted file mode 100644 index 1dd4a3e..0000000 --- a/node_modules/ramda/es/invertObj.js +++ /dev/null @@ -1,48 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import keys from "./keys.js"; -/** - * Returns a new object with the keys of the given object as values, and the - * values of the given object, which are coerced to strings, as keys. Note - * that the last key found is preferred when handling the same value. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {s: x} -> {x: s} - * @param {Object} obj The object or array to invert - * @return {Object} out A new object - * @see R.invert - * @example - * - * const raceResults = { - * first: 'alice', - * second: 'jake' - * }; - * R.invertObj(raceResults); - * //=> { 'alice': 'first', 'jake':'second' } - * - * // Alternatively: - * const raceResults = ['alice', 'jake']; - * R.invertObj(raceResults); - * //=> { 'alice': '0', 'jake':'1' } - */ - -var invertObj = -/*#__PURE__*/ -_curry1(function invertObj(obj) { - var props = keys(obj); - var len = props.length; - var idx = 0; - var out = {}; - - while (idx < len) { - var key = props[idx]; - out[obj[key]] = key; - idx += 1; - } - - return out; -}); - -export default invertObj; \ No newline at end of file diff --git a/node_modules/ramda/es/invoker.js b/node_modules/ramda/es/invoker.js deleted file mode 100644 index f2eaf0b..0000000 --- a/node_modules/ramda/es/invoker.js +++ /dev/null @@ -1,54 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _isFunction from "./internal/_isFunction.js"; -import curryN from "./curryN.js"; -import toString from "./toString.js"; -/** - * Turns a named method with a specified arity into a function that can be - * called directly supplied with arguments and a target object. - * - * The returned function is curried and accepts `arity + 1` parameters where - * the final parameter is the target object. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *) - * @param {Number} arity Number of arguments the returned function should take - * before the target object. - * @param {String} method Name of any of the target object's methods to call. - * @return {Function} A new curried function. - * @see R.construct - * @example - * - * const sliceFrom = R.invoker(1, 'slice'); - * sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm' - * const sliceFrom6 = R.invoker(2, 'slice')(6); - * sliceFrom6(8, 'abcdefghijklm'); //=> 'gh' - * - * const dog = { - * speak: async () => 'Woof!' - * }; - * const speak = R.invoker(0, 'speak'); - * speak(dog).then(console.log) //~> 'Woof!' - * - * @symb R.invoker(0, 'method')(o) = o['method']() - * @symb R.invoker(1, 'method')(a, o) = o['method'](a) - * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b) - */ - -var invoker = -/*#__PURE__*/ -_curry2(function invoker(arity, method) { - return curryN(arity + 1, function () { - var target = arguments[arity]; - - if (target != null && _isFunction(target[method])) { - return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity)); - } - - throw new TypeError(toString(target) + ' does not have a method named "' + method + '"'); - }); -}); - -export default invoker; \ No newline at end of file diff --git a/node_modules/ramda/es/is.js b/node_modules/ramda/es/is.js deleted file mode 100644 index 96b0d59..0000000 --- a/node_modules/ramda/es/is.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * See if an object (`val`) is an instance of the supplied constructor. This - * function will check up the inheritance chain, if any. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Type - * @sig (* -> {*}) -> a -> Boolean - * @param {Object} ctor A constructor - * @param {*} val The value to test - * @return {Boolean} - * @example - * - * R.is(Object, {}); //=> true - * R.is(Number, 1); //=> true - * R.is(Object, 1); //=> false - * R.is(String, 's'); //=> true - * R.is(String, new String('')); //=> true - * R.is(Object, new String('')); //=> true - * R.is(Object, 's'); //=> false - * R.is(Number, {}); //=> false - */ - -var is = -/*#__PURE__*/ -_curry2(function is(Ctor, val) { - return val != null && val.constructor === Ctor || val instanceof Ctor; -}); - -export default is; \ No newline at end of file diff --git a/node_modules/ramda/es/isEmpty.js b/node_modules/ramda/es/isEmpty.js deleted file mode 100644 index d53e0dc..0000000 --- a/node_modules/ramda/es/isEmpty.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import empty from "./empty.js"; -import equals from "./equals.js"; -/** - * Returns `true` if the given value is its type's empty value; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> Boolean - * @param {*} x - * @return {Boolean} - * @see R.empty - * @example - * - * R.isEmpty([1, 2, 3]); //=> false - * R.isEmpty([]); //=> true - * R.isEmpty(''); //=> true - * R.isEmpty(null); //=> false - * R.isEmpty({}); //=> true - * R.isEmpty({length: 0}); //=> false - */ - -var isEmpty = -/*#__PURE__*/ -_curry1(function isEmpty(x) { - return x != null && equals(x, empty(x)); -}); - -export default isEmpty; \ No newline at end of file diff --git a/node_modules/ramda/es/isNil.js b/node_modules/ramda/es/isNil.js deleted file mode 100644 index e3ffaa3..0000000 --- a/node_modules/ramda/es/isNil.js +++ /dev/null @@ -1,26 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -/** - * Checks if the input value is `null` or `undefined`. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Type - * @sig * -> Boolean - * @param {*} x The value to test. - * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`. - * @example - * - * R.isNil(null); //=> true - * R.isNil(undefined); //=> true - * R.isNil(0); //=> false - * R.isNil([]); //=> false - */ - -var isNil = -/*#__PURE__*/ -_curry1(function isNil(x) { - return x == null; -}); - -export default isNil; \ No newline at end of file diff --git a/node_modules/ramda/es/join.js b/node_modules/ramda/es/join.js deleted file mode 100644 index d3a3aca..0000000 --- a/node_modules/ramda/es/join.js +++ /dev/null @@ -1,25 +0,0 @@ -import invoker from "./invoker.js"; -/** - * Returns a string made by inserting the `separator` between each element and - * concatenating all the elements into a single string. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig String -> [a] -> String - * @param {Number|String} separator The string used to separate the elements. - * @param {Array} xs The elements to join into a string. - * @return {String} str The string made by concatenating `xs` with `separator`. - * @see R.split - * @example - * - * const spacer = R.join(' '); - * spacer(['a', 2, 3.4]); //=> 'a 2 3.4' - * R.join('|', [1, 2, 3]); //=> '1|2|3' - */ - -var join = -/*#__PURE__*/ -invoker(1, 'join'); -export default join; \ No newline at end of file diff --git a/node_modules/ramda/es/juxt.js b/node_modules/ramda/es/juxt.js deleted file mode 100644 index 27701a0..0000000 --- a/node_modules/ramda/es/juxt.js +++ /dev/null @@ -1,29 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import converge from "./converge.js"; -/** - * juxt applies a list of functions to a list of values. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Function - * @sig [(a, b, ..., m) -> n] -> ((a, b, ..., m) -> [n]) - * @param {Array} fns An array of functions - * @return {Function} A function that returns a list of values after applying each of the original `fns` to its parameters. - * @see R.applySpec - * @example - * - * const getRange = R.juxt([Math.min, Math.max]); - * getRange(3, 4, 9, -3); //=> [-3, 9] - * @symb R.juxt([f, g, h])(a, b) = [f(a, b), g(a, b), h(a, b)] - */ - -var juxt = -/*#__PURE__*/ -_curry1(function juxt(fns) { - return converge(function () { - return Array.prototype.slice.call(arguments, 0); - }, fns); -}); - -export default juxt; \ No newline at end of file diff --git a/node_modules/ramda/es/keys.js b/node_modules/ramda/es/keys.js deleted file mode 100644 index 117ca8e..0000000 --- a/node_modules/ramda/es/keys.js +++ /dev/null @@ -1,91 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import _has from "./internal/_has.js"; -import _isArguments from "./internal/_isArguments.js"; // cover IE < 9 keys issues - -var hasEnumBug = ! -/*#__PURE__*/ -{ - toString: null -}.propertyIsEnumerable('toString'); -var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug - -var hasArgsEnumBug = -/*#__PURE__*/ -function () { - 'use strict'; - - return arguments.propertyIsEnumerable('length'); -}(); - -var contains = function contains(list, item) { - var idx = 0; - - while (idx < list.length) { - if (list[idx] === item) { - return true; - } - - idx += 1; - } - - return false; -}; -/** - * Returns a list containing the names of all the enumerable own properties of - * the supplied object. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> [k] - * @param {Object} obj The object to extract properties from - * @return {Array} An array of the object's own properties. - * @see R.keysIn, R.values - * @example - * - * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c'] - */ - - -var keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? -/*#__PURE__*/ -_curry1(function keys(obj) { - return Object(obj) !== obj ? [] : Object.keys(obj); -}) : -/*#__PURE__*/ -_curry1(function keys(obj) { - if (Object(obj) !== obj) { - return []; - } - - var prop, nIdx; - var ks = []; - - var checkArgsLength = hasArgsEnumBug && _isArguments(obj); - - for (prop in obj) { - if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) { - ks[ks.length] = prop; - } - } - - if (hasEnumBug) { - nIdx = nonEnumerableProps.length - 1; - - while (nIdx >= 0) { - prop = nonEnumerableProps[nIdx]; - - if (_has(prop, obj) && !contains(ks, prop)) { - ks[ks.length] = prop; - } - - nIdx -= 1; - } - } - - return ks; -}); -export default keys; \ No newline at end of file diff --git a/node_modules/ramda/es/keysIn.js b/node_modules/ramda/es/keysIn.js deleted file mode 100644 index 9d9937d..0000000 --- a/node_modules/ramda/es/keysIn.js +++ /dev/null @@ -1,37 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -/** - * Returns a list containing the names of all the properties of the supplied - * object, including prototype properties. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @sig {k: v} -> [k] - * @param {Object} obj The object to extract properties from - * @return {Array} An array of the object's own and prototype properties. - * @see R.keys, R.valuesIn - * @example - * - * const F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * const f = new F(); - * R.keysIn(f); //=> ['x', 'y'] - */ - -var keysIn = -/*#__PURE__*/ -_curry1(function keysIn(obj) { - var prop; - var ks = []; - - for (prop in obj) { - ks[ks.length] = prop; - } - - return ks; -}); - -export default keysIn; \ No newline at end of file diff --git a/node_modules/ramda/es/last.js b/node_modules/ramda/es/last.js deleted file mode 100644 index 8ee7c11..0000000 --- a/node_modules/ramda/es/last.js +++ /dev/null @@ -1,26 +0,0 @@ -import nth from "./nth.js"; -/** - * Returns the last element of the given list or string. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig [a] -> a | Undefined - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.init, R.head, R.tail - * @example - * - * R.last(['fi', 'fo', 'fum']); //=> 'fum' - * R.last([]); //=> undefined - * - * R.last('abc'); //=> 'c' - * R.last(''); //=> '' - */ - -var last = -/*#__PURE__*/ -nth(-1); -export default last; \ No newline at end of file diff --git a/node_modules/ramda/es/lastIndexOf.js b/node_modules/ramda/es/lastIndexOf.js deleted file mode 100644 index 4601f30..0000000 --- a/node_modules/ramda/es/lastIndexOf.js +++ /dev/null @@ -1,44 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _isArray from "./internal/_isArray.js"; -import equals from "./equals.js"; -/** - * Returns the position of the last occurrence of an item in an array, or -1 if - * the item is not included in the array. [`R.equals`](#equals) is used to - * determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Number - * @param {*} target The item to find. - * @param {Array} xs The array to search in. - * @return {Number} the index of the target, or -1 if the target is not found. - * @see R.indexOf - * @example - * - * R.lastIndexOf(3, [-1,3,3,0,1,2,3,4]); //=> 6 - * R.lastIndexOf(10, [1,2,3,4]); //=> -1 - */ - -var lastIndexOf = -/*#__PURE__*/ -_curry2(function lastIndexOf(target, xs) { - if (typeof xs.lastIndexOf === 'function' && !_isArray(xs)) { - return xs.lastIndexOf(target); - } else { - var idx = xs.length - 1; - - while (idx >= 0) { - if (equals(xs[idx], target)) { - return idx; - } - - idx -= 1; - } - - return -1; - } -}); - -export default lastIndexOf; \ No newline at end of file diff --git a/node_modules/ramda/es/length.js b/node_modules/ramda/es/length.js deleted file mode 100644 index c3c7b98..0000000 --- a/node_modules/ramda/es/length.js +++ /dev/null @@ -1,25 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import _isNumber from "./internal/_isNumber.js"; -/** - * Returns the number of elements in the array by returning `list.length`. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [a] -> Number - * @param {Array} list The array to inspect. - * @return {Number} The length of the array. - * @example - * - * R.length([]); //=> 0 - * R.length([1, 2, 3]); //=> 3 - */ - -var length = -/*#__PURE__*/ -_curry1(function length(list) { - return list != null && _isNumber(list.length) ? list.length : NaN; -}); - -export default length; \ No newline at end of file diff --git a/node_modules/ramda/es/lens.js b/node_modules/ramda/es/lens.js deleted file mode 100644 index 4bc179c..0000000 --- a/node_modules/ramda/es/lens.js +++ /dev/null @@ -1,39 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import map from "./map.js"; -/** - * Returns a lens for the given getter and setter functions. The getter "gets" - * the value of the focus; the setter "sets" the value of the focus. The setter - * should not mutate the data structure. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig (s -> a) -> ((a, s) -> s) -> Lens s a - * @param {Function} getter - * @param {Function} setter - * @return {Lens} - * @see R.view, R.set, R.over, R.lensIndex, R.lensProp - * @example - * - * const xLens = R.lens(R.prop('x'), R.assoc('x')); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} - */ - -var lens = -/*#__PURE__*/ -_curry2(function lens(getter, setter) { - return function (toFunctorFn) { - return function (target) { - return map(function (focus) { - return setter(focus, target); - }, toFunctorFn(getter(target))); - }; - }; -}); - -export default lens; \ No newline at end of file diff --git a/node_modules/ramda/es/lensIndex.js b/node_modules/ramda/es/lensIndex.js deleted file mode 100644 index 47cfaf2..0000000 --- a/node_modules/ramda/es/lensIndex.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import lens from "./lens.js"; -import nth from "./nth.js"; -import update from "./update.js"; -/** - * Returns a lens whose focus is the specified index. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Number -> Lens s a - * @param {Number} n - * @return {Lens} - * @see R.view, R.set, R.over, R.nth - * @example - * - * const headLens = R.lensIndex(0); - * - * R.view(headLens, ['a', 'b', 'c']); //=> 'a' - * R.set(headLens, 'x', ['a', 'b', 'c']); //=> ['x', 'b', 'c'] - * R.over(headLens, R.toUpper, ['a', 'b', 'c']); //=> ['A', 'b', 'c'] - */ - -var lensIndex = -/*#__PURE__*/ -_curry1(function lensIndex(n) { - return lens(nth(n), update(n)); -}); - -export default lensIndex; \ No newline at end of file diff --git a/node_modules/ramda/es/lensPath.js b/node_modules/ramda/es/lensPath.js deleted file mode 100644 index 7f7b0a3..0000000 --- a/node_modules/ramda/es/lensPath.js +++ /dev/null @@ -1,36 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import assocPath from "./assocPath.js"; -import lens from "./lens.js"; -import path from "./path.js"; -/** - * Returns a lens whose focus is the specified path. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @typedefn Idx = String | Int - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig [Idx] -> Lens s a - * @param {Array} path The path to use. - * @return {Lens} - * @see R.view, R.set, R.over - * @example - * - * const xHeadYLens = R.lensPath(['x', 0, 'y']); - * - * R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> 2 - * R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]} - * R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]} - */ - -var lensPath = -/*#__PURE__*/ -_curry1(function lensPath(p) { - return lens(path(p), assocPath(p)); -}); - -export default lensPath; \ No newline at end of file diff --git a/node_modules/ramda/es/lensProp.js b/node_modules/ramda/es/lensProp.js deleted file mode 100644 index 2f4a12b..0000000 --- a/node_modules/ramda/es/lensProp.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import assoc from "./assoc.js"; -import lens from "./lens.js"; -import prop from "./prop.js"; -/** - * Returns a lens whose focus is the specified property. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig String -> Lens s a - * @param {String} k - * @return {Lens} - * @see R.view, R.set, R.over - * @example - * - * const xLens = R.lensProp('x'); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} - */ - -var lensProp = -/*#__PURE__*/ -_curry1(function lensProp(k) { - return lens(prop(k), assoc(k)); -}); - -export default lensProp; \ No newline at end of file diff --git a/node_modules/ramda/es/lift.js b/node_modules/ramda/es/lift.js deleted file mode 100644 index c75e38d..0000000 --- a/node_modules/ramda/es/lift.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import liftN from "./liftN.js"; -/** - * "lifts" a function of arity > 1 so that it may "map over" a list, Function or other - * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig (*... -> *) -> ([*]... -> [*]) - * @param {Function} fn The function to lift into higher context - * @return {Function} The lifted function. - * @see R.liftN - * @example - * - * const madd3 = R.lift((a, b, c) => a + b + c); - * - * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] - * - * const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e); - * - * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24] - */ - -var lift = -/*#__PURE__*/ -_curry1(function lift(fn) { - return liftN(fn.length, fn); -}); - -export default lift; \ No newline at end of file diff --git a/node_modules/ramda/es/liftN.js b/node_modules/ramda/es/liftN.js deleted file mode 100644 index 6a9c4c7..0000000 --- a/node_modules/ramda/es/liftN.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _reduce from "./internal/_reduce.js"; -import ap from "./ap.js"; -import curryN from "./curryN.js"; -import map from "./map.js"; -/** - * "lifts" a function to be the specified arity, so that it may "map over" that - * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig Number -> (*... -> *) -> ([*]... -> [*]) - * @param {Function} fn The function to lift into higher context - * @return {Function} The lifted function. - * @see R.lift, R.ap - * @example - * - * const madd3 = R.liftN(3, (...args) => R.sum(args)); - * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] - */ - -var liftN = -/*#__PURE__*/ -_curry2(function liftN(arity, fn) { - var lifted = curryN(arity, fn); - return curryN(arity, function () { - return _reduce(ap, map(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1)); - }); -}); - -export default liftN; \ No newline at end of file diff --git a/node_modules/ramda/es/lt.js b/node_modules/ramda/es/lt.js deleted file mode 100644 index a4452a8..0000000 --- a/node_modules/ramda/es/lt.js +++ /dev/null @@ -1,30 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns `true` if the first argument is less than the second; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @see R.gt - * @example - * - * R.lt(2, 1); //=> false - * R.lt(2, 2); //=> false - * R.lt(2, 3); //=> true - * R.lt('a', 'z'); //=> true - * R.lt('z', 'a'); //=> false - */ - -var lt = -/*#__PURE__*/ -_curry2(function lt(a, b) { - return a < b; -}); - -export default lt; \ No newline at end of file diff --git a/node_modules/ramda/es/lte.js b/node_modules/ramda/es/lte.js deleted file mode 100644 index a76603e..0000000 --- a/node_modules/ramda/es/lte.js +++ /dev/null @@ -1,30 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns `true` if the first argument is less than or equal to the second; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {Number} a - * @param {Number} b - * @return {Boolean} - * @see R.gte - * @example - * - * R.lte(2, 1); //=> false - * R.lte(2, 2); //=> true - * R.lte(2, 3); //=> true - * R.lte('a', 'z'); //=> true - * R.lte('z', 'a'); //=> false - */ - -var lte = -/*#__PURE__*/ -_curry2(function lte(a, b) { - return a <= b; -}); - -export default lte; \ No newline at end of file diff --git a/node_modules/ramda/es/map.js b/node_modules/ramda/es/map.js deleted file mode 100644 index 330f291..0000000 --- a/node_modules/ramda/es/map.js +++ /dev/null @@ -1,66 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _map from "./internal/_map.js"; -import _reduce from "./internal/_reduce.js"; -import _xmap from "./internal/_xmap.js"; -import curryN from "./curryN.js"; -import keys from "./keys.js"; -/** - * Takes a function and - * a [functor](https://github.com/fantasyland/fantasy-land#functor), - * applies the function to each of the functor's values, and returns - * a functor of the same shape. - * - * Ramda provides suitable `map` implementations for `Array` and `Object`, - * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`. - * - * Dispatches to the `map` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * Also treats functions as functors and will compose them together. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Functor f => (a -> b) -> f a -> f b - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {Array} list The list to be iterated over. - * @return {Array} The new list. - * @see R.transduce, R.addIndex - * @example - * - * const double = x => x * 2; - * - * R.map(double, [1, 2, 3]); //=> [2, 4, 6] - * - * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6} - * @symb R.map(f, [a, b]) = [f(a), f(b)] - * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) } - * @symb R.map(f, functor_o) = functor_o.map(f) - */ - -var map = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) { - switch (Object.prototype.toString.call(functor)) { - case '[object Function]': - return curryN(functor.length, function () { - return fn.call(this, functor.apply(this, arguments)); - }); - - case '[object Object]': - return _reduce(function (acc, key) { - acc[key] = fn(functor[key]); - return acc; - }, {}, keys(functor)); - - default: - return _map(fn, functor); - } -})); - -export default map; \ No newline at end of file diff --git a/node_modules/ramda/es/mapAccum.js b/node_modules/ramda/es/mapAccum.js deleted file mode 100644 index d131ee4..0000000 --- a/node_modules/ramda/es/mapAccum.js +++ /dev/null @@ -1,54 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * The `mapAccum` function behaves like a combination of map and reduce; it - * applies a function to each element of a list, passing an accumulating - * parameter from left to right, and returning a final value of this - * accumulator together with the new list. - * - * The iterator function receives two arguments, *acc* and *value*, and should - * return a tuple *[acc, value]*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y]) - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.scan, R.addIndex, R.mapAccumRight - * @example - * - * const digits = ['1', '2', '3', '4']; - * const appender = (a, b) => [a + b, a + b]; - * - * R.mapAccum(appender, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']] - * @symb R.mapAccum(f, a, [b, c, d]) = [ - * f(f(f(a, b)[0], c)[0], d)[0], - * [ - * f(a, b)[1], - * f(f(a, b)[0], c)[1], - * f(f(f(a, b)[0], c)[0], d)[1] - * ] - * ] - */ - -var mapAccum = -/*#__PURE__*/ -_curry3(function mapAccum(fn, acc, list) { - var idx = 0; - var len = list.length; - var result = []; - var tuple = [acc]; - - while (idx < len) { - tuple = fn(tuple[0], list[idx]); - result[idx] = tuple[1]; - idx += 1; - } - - return [tuple[0], result]; -}); - -export default mapAccum; \ No newline at end of file diff --git a/node_modules/ramda/es/mapAccumRight.js b/node_modules/ramda/es/mapAccumRight.js deleted file mode 100644 index 93b9a06..0000000 --- a/node_modules/ramda/es/mapAccumRight.js +++ /dev/null @@ -1,56 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * The `mapAccumRight` function behaves like a combination of map and reduce; it - * applies a function to each element of a list, passing an accumulating - * parameter from right to left, and returning a final value of this - * accumulator together with the new list. - * - * Similar to [`mapAccum`](#mapAccum), except moves through the input list from - * the right to the left. - * - * The iterator function receives two arguments, *acc* and *value*, and should - * return a tuple *[acc, value]*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y]) - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.addIndex, R.mapAccum - * @example - * - * const digits = ['1', '2', '3', '4']; - * const appender = (a, b) => [b + a, b + a]; - * - * R.mapAccumRight(appender, 5, digits); //=> ['12345', ['12345', '2345', '345', '45']] - * @symb R.mapAccumRight(f, a, [b, c, d]) = [ - * f(f(f(a, d)[0], c)[0], b)[0], - * [ - * f(a, d)[1], - * f(f(a, d)[0], c)[1], - * f(f(f(a, d)[0], c)[0], b)[1] - * ] - * ] - */ - -var mapAccumRight = -/*#__PURE__*/ -_curry3(function mapAccumRight(fn, acc, list) { - var idx = list.length - 1; - var result = []; - var tuple = [acc]; - - while (idx >= 0) { - tuple = fn(tuple[0], list[idx]); - result[idx] = tuple[1]; - idx -= 1; - } - - return [tuple[0], result]; -}); - -export default mapAccumRight; \ No newline at end of file diff --git a/node_modules/ramda/es/mapObjIndexed.js b/node_modules/ramda/es/mapObjIndexed.js deleted file mode 100644 index 2916b29..0000000 --- a/node_modules/ramda/es/mapObjIndexed.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _reduce from "./internal/_reduce.js"; -import keys from "./keys.js"; -/** - * An Object-specific version of [`map`](#map). The function is applied to three - * arguments: *(value, key, obj)*. If only the value is significant, use - * [`map`](#map) instead. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig ((*, String, Object) -> *) -> Object -> Object - * @param {Function} fn - * @param {Object} obj - * @return {Object} - * @see R.map - * @example - * - * const xyz = { x: 1, y: 2, z: 3 }; - * const prependKeyAndDouble = (num, key, obj) => key + (num * 2); - * - * R.mapObjIndexed(prependKeyAndDouble, xyz); //=> { x: 'x2', y: 'y4', z: 'z6' } - */ - -var mapObjIndexed = -/*#__PURE__*/ -_curry2(function mapObjIndexed(fn, obj) { - return _reduce(function (acc, key) { - acc[key] = fn(obj[key], key, obj); - return acc; - }, {}, keys(obj)); -}); - -export default mapObjIndexed; \ No newline at end of file diff --git a/node_modules/ramda/es/match.js b/node_modules/ramda/es/match.js deleted file mode 100644 index 468ce35..0000000 --- a/node_modules/ramda/es/match.js +++ /dev/null @@ -1,30 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Tests a regular expression against a String. Note that this function will - * return an empty array when there are no matches. This differs from - * [`String.prototype.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) - * which returns `null` when there are no matches. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category String - * @sig RegExp -> String -> [String | Undefined] - * @param {RegExp} rx A regular expression. - * @param {String} str The string to match against - * @return {Array} The list of matches or empty array. - * @see R.test - * @example - * - * R.match(/([a-z]a)/g, 'bananas'); //=> ['ba', 'na', 'na'] - * R.match(/a/, 'b'); //=> [] - * R.match(/a/, null); //=> TypeError: null does not have a method named "match" - */ - -var match = -/*#__PURE__*/ -_curry2(function match(rx, str) { - return str.match(rx) || []; -}); - -export default match; \ No newline at end of file diff --git a/node_modules/ramda/es/mathMod.js b/node_modules/ramda/es/mathMod.js deleted file mode 100644 index 3238de5..0000000 --- a/node_modules/ramda/es/mathMod.js +++ /dev/null @@ -1,51 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _isInteger from "./internal/_isInteger.js"; -/** - * `mathMod` behaves like the modulo operator should mathematically, unlike the - * `%` operator (and by extension, [`R.modulo`](#modulo)). So while - * `-17 % 5` is `-2`, `mathMod(-17, 5)` is `3`. `mathMod` requires Integer - * arguments, and returns NaN when the modulus is zero or negative. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} m The dividend. - * @param {Number} p the modulus. - * @return {Number} The result of `b mod a`. - * @see R.modulo - * @example - * - * R.mathMod(-17, 5); //=> 3 - * R.mathMod(17, 5); //=> 2 - * R.mathMod(17, -5); //=> NaN - * R.mathMod(17, 0); //=> NaN - * R.mathMod(17.2, 5); //=> NaN - * R.mathMod(17, 5.3); //=> NaN - * - * const clock = R.mathMod(R.__, 12); - * clock(15); //=> 3 - * clock(24); //=> 0 - * - * const seventeenMod = R.mathMod(17); - * seventeenMod(3); //=> 2 - * seventeenMod(4); //=> 1 - * seventeenMod(10); //=> 7 - */ - -var mathMod = -/*#__PURE__*/ -_curry2(function mathMod(m, p) { - if (!_isInteger(m)) { - return NaN; - } - - if (!_isInteger(p) || p < 1) { - return NaN; - } - - return (m % p + p) % p; -}); - -export default mathMod; \ No newline at end of file diff --git a/node_modules/ramda/es/max.js b/node_modules/ramda/es/max.js deleted file mode 100644 index 5b0baf3..0000000 --- a/node_modules/ramda/es/max.js +++ /dev/null @@ -1,26 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns the larger of its two arguments. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> a - * @param {*} a - * @param {*} b - * @return {*} - * @see R.maxBy, R.min - * @example - * - * R.max(789, 123); //=> 789 - * R.max('a', 'b'); //=> 'b' - */ - -var max = -/*#__PURE__*/ -_curry2(function max(a, b) { - return b > a ? b : a; -}); - -export default max; \ No newline at end of file diff --git a/node_modules/ramda/es/maxBy.js b/node_modules/ramda/es/maxBy.js deleted file mode 100644 index c28266d..0000000 --- a/node_modules/ramda/es/maxBy.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Takes a function and two values, and returns whichever value produces the - * larger result when passed to the provided function. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Relation - * @sig Ord b => (a -> b) -> a -> a -> a - * @param {Function} f - * @param {*} a - * @param {*} b - * @return {*} - * @see R.max, R.minBy - * @example - * - * // square :: Number -> Number - * const square = n => n * n; - * - * R.maxBy(square, -3, 2); //=> -3 - * - * R.reduce(R.maxBy(square), 0, [3, -5, 4, 1, -2]); //=> -5 - * R.reduce(R.maxBy(square), 0, []); //=> 0 - */ - -var maxBy = -/*#__PURE__*/ -_curry3(function maxBy(f, a, b) { - return f(b) > f(a) ? b : a; -}); - -export default maxBy; \ No newline at end of file diff --git a/node_modules/ramda/es/mean.js b/node_modules/ramda/es/mean.js deleted file mode 100644 index 11d5b1e..0000000 --- a/node_modules/ramda/es/mean.js +++ /dev/null @@ -1,26 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import sum from "./sum.js"; -/** - * Returns the mean of the given list of numbers. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list - * @return {Number} - * @see R.median - * @example - * - * R.mean([2, 7, 9]); //=> 6 - * R.mean([]); //=> NaN - */ - -var mean = -/*#__PURE__*/ -_curry1(function mean(list) { - return sum(list) / list.length; -}); - -export default mean; \ No newline at end of file diff --git a/node_modules/ramda/es/median.js b/node_modules/ramda/es/median.js deleted file mode 100644 index c5f5e5d..0000000 --- a/node_modules/ramda/es/median.js +++ /dev/null @@ -1,37 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import mean from "./mean.js"; -/** - * Returns the median of the given list of numbers. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list - * @return {Number} - * @see R.mean - * @example - * - * R.median([2, 9, 7]); //=> 7 - * R.median([7, 2, 10, 9]); //=> 8 - * R.median([]); //=> NaN - */ - -var median = -/*#__PURE__*/ -_curry1(function median(list) { - var len = list.length; - - if (len === 0) { - return NaN; - } - - var width = 2 - len % 2; - var idx = (len - width) / 2; - return mean(Array.prototype.slice.call(list, 0).sort(function (a, b) { - return a < b ? -1 : a > b ? 1 : 0; - }).slice(idx, idx + width)); -}); - -export default median; \ No newline at end of file diff --git a/node_modules/ramda/es/memoizeWith.js b/node_modules/ramda/es/memoizeWith.js deleted file mode 100644 index a777db7..0000000 --- a/node_modules/ramda/es/memoizeWith.js +++ /dev/null @@ -1,48 +0,0 @@ -import _arity from "./internal/_arity.js"; -import _curry2 from "./internal/_curry2.js"; -import _has from "./internal/_has.js"; -/** - * Creates a new function that, when invoked, caches the result of calling `fn` - * for a given argument set and returns the result. Subsequent calls to the - * memoized `fn` with the same argument set will not result in an additional - * call to `fn`; instead, the cached result for that set of arguments will be - * returned. - * - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Function - * @sig (*... -> String) -> (*... -> a) -> (*... -> a) - * @param {Function} fn The function to generate the cache key. - * @param {Function} fn The function to memoize. - * @return {Function} Memoized version of `fn`. - * @example - * - * let count = 0; - * const factorial = R.memoizeWith(R.identity, n => { - * count += 1; - * return R.product(R.range(1, n + 1)); - * }); - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * count; //=> 1 - */ - -var memoizeWith = -/*#__PURE__*/ -_curry2(function memoizeWith(mFn, fn) { - var cache = {}; - return _arity(fn.length, function () { - var key = mFn.apply(this, arguments); - - if (!_has(key, cache)) { - cache[key] = fn.apply(this, arguments); - } - - return cache[key]; - }); -}); - -export default memoizeWith; \ No newline at end of file diff --git a/node_modules/ramda/es/merge.js b/node_modules/ramda/es/merge.js deleted file mode 100644 index 651d9e4..0000000 --- a/node_modules/ramda/es/merge.js +++ /dev/null @@ -1,34 +0,0 @@ -import _objectAssign from "./internal/_objectAssign.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeRight, R.mergeDeepRight, R.mergeWith, R.mergeWithKey - * @deprecated since v0.26.0 - * @example - * - * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * const withDefaults = R.merge({x: 0, y: 0}); - * withDefaults({y: 2}); //=> {x: 0, y: 2} - * @symb R.merge(a, b) = {...a, ...b} - */ - -var merge = -/*#__PURE__*/ -_curry2(function merge(l, r) { - return _objectAssign({}, l, r); -}); - -export default merge; \ No newline at end of file diff --git a/node_modules/ramda/es/mergeAll.js b/node_modules/ramda/es/mergeAll.js deleted file mode 100644 index 72254e6..0000000 --- a/node_modules/ramda/es/mergeAll.js +++ /dev/null @@ -1,27 +0,0 @@ -import _objectAssign from "./internal/_objectAssign.js"; -import _curry1 from "./internal/_curry1.js"; -/** - * Merges a list of objects together into one object. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig [{k: v}] -> {k: v} - * @param {Array} list An array of objects - * @return {Object} A merged object. - * @see R.reduce - * @example - * - * R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3} - * R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2} - * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 } - */ - -var mergeAll = -/*#__PURE__*/ -_curry1(function mergeAll(list) { - return _objectAssign.apply(null, [{}].concat(list)); -}); - -export default mergeAll; \ No newline at end of file diff --git a/node_modules/ramda/es/mergeDeepLeft.js b/node_modules/ramda/es/mergeDeepLeft.js deleted file mode 100644 index 5b5227c..0000000 --- a/node_modules/ramda/es/mergeDeepLeft.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import mergeDeepWithKey from "./mergeDeepWithKey.js"; -/** - * Creates a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects: - * - and both values are objects, the two values will be recursively merged - * - otherwise the value from the first object will be used. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig {a} -> {a} -> {a} - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.merge, R.mergeDeepRight, R.mergeDeepWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepLeft({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, - * { age: 40, contact: { email: 'baa@example.com' }}); - * //=> { name: 'fred', age: 10, contact: { email: 'moo@example.com' }} - */ - -var mergeDeepLeft = -/*#__PURE__*/ -_curry2(function mergeDeepLeft(lObj, rObj) { - return mergeDeepWithKey(function (k, lVal, rVal) { - return lVal; - }, lObj, rObj); -}); - -export default mergeDeepLeft; \ No newline at end of file diff --git a/node_modules/ramda/es/mergeDeepRight.js b/node_modules/ramda/es/mergeDeepRight.js deleted file mode 100644 index 1b754c7..0000000 --- a/node_modules/ramda/es/mergeDeepRight.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import mergeDeepWithKey from "./mergeDeepWithKey.js"; -/** - * Creates a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects: - * - and both values are objects, the two values will be recursively merged - * - otherwise the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig {a} -> {a} -> {a} - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, - * { age: 40, contact: { email: 'baa@example.com' }}); - * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }} - */ - -var mergeDeepRight = -/*#__PURE__*/ -_curry2(function mergeDeepRight(lObj, rObj) { - return mergeDeepWithKey(function (k, lVal, rVal) { - return rVal; - }, lObj, rObj); -}); - -export default mergeDeepRight; \ No newline at end of file diff --git a/node_modules/ramda/es/mergeDeepWith.js b/node_modules/ramda/es/mergeDeepWith.js deleted file mode 100644 index 853c461..0000000 --- a/node_modules/ramda/es/mergeDeepWith.js +++ /dev/null @@ -1,39 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import mergeDeepWithKey from "./mergeDeepWithKey.js"; -/** - * Creates a new object with the own properties of the two provided objects. - * If a key exists in both objects: - * - and both associated values are also objects then the values will be - * recursively merged. - * - otherwise the provided function is applied to associated values using the - * resulting value as the new value associated with the key. - * If a key only exists in one object, the value will be associated with the key - * of the resulting object. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig ((a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.mergeWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepWith(R.concat, - * { a: true, c: { values: [10, 20] }}, - * { b: true, c: { values: [15, 35] }}); - * //=> { a: true, b: true, c: { values: [10, 20, 15, 35] }} - */ - -var mergeDeepWith = -/*#__PURE__*/ -_curry3(function mergeDeepWith(fn, lObj, rObj) { - return mergeDeepWithKey(function (k, lVal, rVal) { - return fn(lVal, rVal); - }, lObj, rObj); -}); - -export default mergeDeepWith; \ No newline at end of file diff --git a/node_modules/ramda/es/mergeDeepWithKey.js b/node_modules/ramda/es/mergeDeepWithKey.js deleted file mode 100644 index 0cfc1fd..0000000 --- a/node_modules/ramda/es/mergeDeepWithKey.js +++ /dev/null @@ -1,45 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import _isObject from "./internal/_isObject.js"; -import mergeWithKey from "./mergeWithKey.js"; -/** - * Creates a new object with the own properties of the two provided objects. - * If a key exists in both objects: - * - and both associated values are also objects then the values will be - * recursively merged. - * - otherwise the provided function is applied to the key and associated values - * using the resulting value as the new value associated with the key. - * If a key only exists in one object, the value will be associated with the key - * of the resulting object. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.mergeWithKey, R.mergeDeepWith - * @example - * - * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r - * R.mergeDeepWithKey(concatValues, - * { a: true, c: { thing: 'foo', values: [10, 20] }}, - * { b: true, c: { thing: 'bar', values: [15, 35] }}); - * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }} - */ - -var mergeDeepWithKey = -/*#__PURE__*/ -_curry3(function mergeDeepWithKey(fn, lObj, rObj) { - return mergeWithKey(function (k, lVal, rVal) { - if (_isObject(lVal) && _isObject(rVal)) { - return mergeDeepWithKey(fn, lVal, rVal); - } else { - return fn(k, lVal, rVal); - } - }, lObj, rObj); -}); - -export default mergeDeepWithKey; \ No newline at end of file diff --git a/node_modules/ramda/es/mergeLeft.js b/node_modules/ramda/es/mergeLeft.js deleted file mode 100644 index 52cc798..0000000 --- a/node_modules/ramda/es/mergeLeft.js +++ /dev/null @@ -1,33 +0,0 @@ -import _objectAssign from "./internal/_objectAssign.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the first object will be used. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeRight, R.mergeDeepLeft, R.mergeWith, R.mergeWithKey - * @example - * - * R.mergeLeft({ 'age': 40 }, { 'name': 'fred', 'age': 10 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * const resetToDefault = R.mergeLeft({x: 0}); - * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2} - * @symb R.mergeLeft(a, b) = {...b, ...a} - */ - -var mergeLeft = -/*#__PURE__*/ -_curry2(function mergeLeft(l, r) { - return _objectAssign({}, r, l); -}); - -export default mergeLeft; \ No newline at end of file diff --git a/node_modules/ramda/es/mergeRight.js b/node_modules/ramda/es/mergeRight.js deleted file mode 100644 index 5912c14..0000000 --- a/node_modules/ramda/es/mergeRight.js +++ /dev/null @@ -1,33 +0,0 @@ -import _objectAssign from "./internal/_objectAssign.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeLeft, R.mergeDeepRight, R.mergeWith, R.mergeWithKey - * @example - * - * R.mergeRight({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * const withDefaults = R.mergeRight({x: 0, y: 0}); - * withDefaults({y: 2}); //=> {x: 0, y: 2} - * @symb R.mergeRight(a, b) = {...a, ...b} - */ - -var mergeRight = -/*#__PURE__*/ -_curry2(function mergeRight(l, r) { - return _objectAssign({}, l, r); -}); - -export default mergeRight; \ No newline at end of file diff --git a/node_modules/ramda/es/mergeWith.js b/node_modules/ramda/es/mergeWith.js deleted file mode 100644 index d5be1c8..0000000 --- a/node_modules/ramda/es/mergeWith.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import mergeWithKey from "./mergeWithKey.js"; -/** - * Creates a new object with the own properties of the two provided objects. If - * a key exists in both objects, the provided function is applied to the values - * associated with the key in each object, with the result being used as the - * value associated with the key in the returned object. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @sig ((a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeDeepWith, R.merge, R.mergeWithKey - * @example - * - * R.mergeWith(R.concat, - * { a: true, values: [10, 20] }, - * { b: true, values: [15, 35] }); - * //=> { a: true, b: true, values: [10, 20, 15, 35] } - */ - -var mergeWith = -/*#__PURE__*/ -_curry3(function mergeWith(fn, l, r) { - return mergeWithKey(function (_, _l, _r) { - return fn(_l, _r); - }, l, r); -}); - -export default mergeWith; \ No newline at end of file diff --git a/node_modules/ramda/es/mergeWithKey.js b/node_modules/ramda/es/mergeWithKey.js deleted file mode 100644 index ce34d1f..0000000 --- a/node_modules/ramda/es/mergeWithKey.js +++ /dev/null @@ -1,50 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import _has from "./internal/_has.js"; -/** - * Creates a new object with the own properties of the two provided objects. If - * a key exists in both objects, the provided function is applied to the key - * and the values associated with the key in each object, with the result being - * used as the value associated with the key in the returned object. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeDeepWithKey, R.merge, R.mergeWith - * @example - * - * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r - * R.mergeWithKey(concatValues, - * { a: true, thing: 'foo', values: [10, 20] }, - * { b: true, thing: 'bar', values: [15, 35] }); - * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] } - * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 } - */ - -var mergeWithKey = -/*#__PURE__*/ -_curry3(function mergeWithKey(fn, l, r) { - var result = {}; - var k; - - for (k in l) { - if (_has(k, l)) { - result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k]; - } - } - - for (k in r) { - if (_has(k, r) && !_has(k, result)) { - result[k] = r[k]; - } - } - - return result; -}); - -export default mergeWithKey; \ No newline at end of file diff --git a/node_modules/ramda/es/min.js b/node_modules/ramda/es/min.js deleted file mode 100644 index 1c6aef2..0000000 --- a/node_modules/ramda/es/min.js +++ /dev/null @@ -1,26 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns the smaller of its two arguments. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> a - * @param {*} a - * @param {*} b - * @return {*} - * @see R.minBy, R.max - * @example - * - * R.min(789, 123); //=> 123 - * R.min('a', 'b'); //=> 'a' - */ - -var min = -/*#__PURE__*/ -_curry2(function min(a, b) { - return b < a ? b : a; -}); - -export default min; \ No newline at end of file diff --git a/node_modules/ramda/es/minBy.js b/node_modules/ramda/es/minBy.js deleted file mode 100644 index f669627..0000000 --- a/node_modules/ramda/es/minBy.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Takes a function and two values, and returns whichever value produces the - * smaller result when passed to the provided function. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Relation - * @sig Ord b => (a -> b) -> a -> a -> a - * @param {Function} f - * @param {*} a - * @param {*} b - * @return {*} - * @see R.min, R.maxBy - * @example - * - * // square :: Number -> Number - * const square = n => n * n; - * - * R.minBy(square, -3, 2); //=> 2 - * - * R.reduce(R.minBy(square), Infinity, [3, -5, 4, 1, -2]); //=> 1 - * R.reduce(R.minBy(square), Infinity, []); //=> Infinity - */ - -var minBy = -/*#__PURE__*/ -_curry3(function minBy(f, a, b) { - return f(b) < f(a) ? b : a; -}); - -export default minBy; \ No newline at end of file diff --git a/node_modules/ramda/es/modulo.js b/node_modules/ramda/es/modulo.js deleted file mode 100644 index 2977491..0000000 --- a/node_modules/ramda/es/modulo.js +++ /dev/null @@ -1,34 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Divides the first parameter by the second and returns the remainder. Note - * that this function preserves the JavaScript-style behavior for modulo. For - * mathematical modulo see [`mathMod`](#mathMod). - * - * @func - * @memberOf R - * @since v0.1.1 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The value to the divide. - * @param {Number} b The pseudo-modulus - * @return {Number} The result of `b % a`. - * @see R.mathMod - * @example - * - * R.modulo(17, 3); //=> 2 - * // JS behavior: - * R.modulo(-17, 3); //=> -2 - * R.modulo(17, -3); //=> 2 - * - * const isOdd = R.modulo(R.__, 2); - * isOdd(42); //=> 0 - * isOdd(21); //=> 1 - */ - -var modulo = -/*#__PURE__*/ -_curry2(function modulo(a, b) { - return a % b; -}); - -export default modulo; \ No newline at end of file diff --git a/node_modules/ramda/es/move.js b/node_modules/ramda/es/move.js deleted file mode 100644 index 60fca13..0000000 --- a/node_modules/ramda/es/move.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Move an item, at index `from`, to index `to`, in a list of elements. - * A new list will be created containing the new elements order. - * - * @func - * @memberOf R - * @since v0.27.1 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @param {Number} from The source index - * @param {Number} to The destination index - * @param {Array} list The list which will serve to realise the move - * @return {Array} The new list reordered - * @example - * - * R.move(0, 2, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['b', 'c', 'a', 'd', 'e', 'f'] - * R.move(-1, 0, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['f', 'a', 'b', 'c', 'd', 'e'] list rotation - */ - -var move = -/*#__PURE__*/ -_curry3(function (from, to, list) { - var length = list.length; - var result = list.slice(); - var positiveFrom = from < 0 ? length + from : from; - var positiveTo = to < 0 ? length + to : to; - var item = result.splice(positiveFrom, 1); - return positiveFrom < 0 || positiveFrom >= list.length || positiveTo < 0 || positiveTo >= list.length ? list : [].concat(result.slice(0, positiveTo)).concat(item).concat(result.slice(positiveTo, list.length)); -}); - -export default move; \ No newline at end of file diff --git a/node_modules/ramda/es/multiply.js b/node_modules/ramda/es/multiply.js deleted file mode 100644 index e51b7f5..0000000 --- a/node_modules/ramda/es/multiply.js +++ /dev/null @@ -1,29 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Multiplies two numbers. Equivalent to `a * b` but curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a * b`. - * @see R.divide - * @example - * - * const double = R.multiply(2); - * const triple = R.multiply(3); - * double(3); //=> 6 - * triple(4); //=> 12 - * R.multiply(2, 5); //=> 10 - */ - -var multiply = -/*#__PURE__*/ -_curry2(function multiply(a, b) { - return a * b; -}); - -export default multiply; \ No newline at end of file diff --git a/node_modules/ramda/es/nAry.js b/node_modules/ramda/es/nAry.js deleted file mode 100644 index d386eca..0000000 --- a/node_modules/ramda/es/nAry.js +++ /dev/null @@ -1,97 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly `n` parameters. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig Number -> (* -> a) -> (* -> a) - * @param {Number} n The desired arity of the new function. - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity `n`. - * @see R.binary, R.unary - * @example - * - * const takesTwoArgs = (a, b) => [a, b]; - * - * takesTwoArgs.length; //=> 2 - * takesTwoArgs(1, 2); //=> [1, 2] - * - * const takesOneArg = R.nAry(1, takesTwoArgs); - * takesOneArg.length; //=> 1 - * // Only `n` arguments are passed to the wrapped function - * takesOneArg(1, 2); //=> [1, undefined] - * @symb R.nAry(0, f)(a, b) = f() - * @symb R.nAry(1, f)(a, b) = f(a) - * @symb R.nAry(2, f)(a, b) = f(a, b) - */ - -var nAry = -/*#__PURE__*/ -_curry2(function nAry(n, fn) { - switch (n) { - case 0: - return function () { - return fn.call(this); - }; - - case 1: - return function (a0) { - return fn.call(this, a0); - }; - - case 2: - return function (a0, a1) { - return fn.call(this, a0, a1); - }; - - case 3: - return function (a0, a1, a2) { - return fn.call(this, a0, a1, a2); - }; - - case 4: - return function (a0, a1, a2, a3) { - return fn.call(this, a0, a1, a2, a3); - }; - - case 5: - return function (a0, a1, a2, a3, a4) { - return fn.call(this, a0, a1, a2, a3, a4); - }; - - case 6: - return function (a0, a1, a2, a3, a4, a5) { - return fn.call(this, a0, a1, a2, a3, a4, a5); - }; - - case 7: - return function (a0, a1, a2, a3, a4, a5, a6) { - return fn.call(this, a0, a1, a2, a3, a4, a5, a6); - }; - - case 8: - return function (a0, a1, a2, a3, a4, a5, a6, a7) { - return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7); - }; - - case 9: - return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { - return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8); - }; - - case 10: - return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { - return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - }; - - default: - throw new Error('First argument to nAry must be a non-negative integer no greater than ten'); - } -}); - -export default nAry; \ No newline at end of file diff --git a/node_modules/ramda/es/negate.js b/node_modules/ramda/es/negate.js deleted file mode 100644 index 1841331..0000000 --- a/node_modules/ramda/es/negate.js +++ /dev/null @@ -1,23 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -/** - * Negates its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} - * @example - * - * R.negate(42); //=> -42 - */ - -var negate = -/*#__PURE__*/ -_curry1(function negate(n) { - return -n; -}); - -export default negate; \ No newline at end of file diff --git a/node_modules/ramda/es/none.js b/node_modules/ramda/es/none.js deleted file mode 100644 index f2c1ad4..0000000 --- a/node_modules/ramda/es/none.js +++ /dev/null @@ -1,36 +0,0 @@ -import _complement from "./internal/_complement.js"; -import _curry2 from "./internal/_curry2.js"; -import all from "./all.js"; -/** - * Returns `true` if no elements of the list match the predicate, `false` - * otherwise. - * - * Dispatches to the `all` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise. - * @see R.all, R.any - * @example - * - * const isEven = n => n % 2 === 0; - * const isOdd = n => n % 2 === 1; - * - * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true - * R.none(isOdd, [1, 3, 5, 7, 8, 11]); //=> false - */ - -var none = -/*#__PURE__*/ -_curry2(function none(fn, input) { - return all(_complement(fn), input); -}); - -export default none; \ No newline at end of file diff --git a/node_modules/ramda/es/not.js b/node_modules/ramda/es/not.js deleted file mode 100644 index 841bac4..0000000 --- a/node_modules/ramda/es/not.js +++ /dev/null @@ -1,28 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -/** - * A function that returns the `!` of its argument. It will return `true` when - * passed false-y value, and `false` when passed a truth-y one. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig * -> Boolean - * @param {*} a any value - * @return {Boolean} the logical inverse of passed argument. - * @see R.complement - * @example - * - * R.not(true); //=> false - * R.not(false); //=> true - * R.not(0); //=> true - * R.not(1); //=> false - */ - -var not = -/*#__PURE__*/ -_curry1(function not(a) { - return !a; -}); - -export default not; \ No newline at end of file diff --git a/node_modules/ramda/es/nth.js b/node_modules/ramda/es/nth.js deleted file mode 100644 index 3f7bdca..0000000 --- a/node_modules/ramda/es/nth.js +++ /dev/null @@ -1,37 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _isString from "./internal/_isString.js"; -/** - * Returns the nth element of the given list or string. If n is negative the - * element at index length + n is returned. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> a | Undefined - * @sig Number -> String -> String - * @param {Number} offset - * @param {*} list - * @return {*} - * @example - * - * const list = ['foo', 'bar', 'baz', 'quux']; - * R.nth(1, list); //=> 'bar' - * R.nth(-1, list); //=> 'quux' - * R.nth(-99, list); //=> undefined - * - * R.nth(2, 'abc'); //=> 'c' - * R.nth(3, 'abc'); //=> '' - * @symb R.nth(-1, [a, b, c]) = c - * @symb R.nth(0, [a, b, c]) = a - * @symb R.nth(1, [a, b, c]) = b - */ - -var nth = -/*#__PURE__*/ -_curry2(function nth(offset, list) { - var idx = offset < 0 ? list.length + offset : offset; - return _isString(list) ? list.charAt(idx) : list[idx]; -}); - -export default nth; \ No newline at end of file diff --git a/node_modules/ramda/es/nthArg.js b/node_modules/ramda/es/nthArg.js deleted file mode 100644 index 417eb2d..0000000 --- a/node_modules/ramda/es/nthArg.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import curryN from "./curryN.js"; -import nth from "./nth.js"; -/** - * Returns a function which returns its nth argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig Number -> *... -> * - * @param {Number} n - * @return {Function} - * @example - * - * R.nthArg(1)('a', 'b', 'c'); //=> 'b' - * R.nthArg(-1)('a', 'b', 'c'); //=> 'c' - * @symb R.nthArg(-1)(a, b, c) = c - * @symb R.nthArg(0)(a, b, c) = a - * @symb R.nthArg(1)(a, b, c) = b - */ - -var nthArg = -/*#__PURE__*/ -_curry1(function nthArg(n) { - var arity = n < 0 ? 1 : n + 1; - return curryN(arity, function () { - return nth(n, arguments); - }); -}); - -export default nthArg; \ No newline at end of file diff --git a/node_modules/ramda/es/o.js b/node_modules/ramda/es/o.js deleted file mode 100644 index 516fa7e..0000000 --- a/node_modules/ramda/es/o.js +++ /dev/null @@ -1,36 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * `o` is a curried composition function that returns a unary function. - * Like [`compose`](#compose), `o` performs right-to-left function composition. - * Unlike [`compose`](#compose), the rightmost function passed to `o` will be - * invoked with only one argument. Also, unlike [`compose`](#compose), `o` is - * limited to accepting only 2 unary functions. The name o was chosen because - * of its similarity to the mathematical composition operator ∘. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Function - * @sig (b -> c) -> (a -> b) -> a -> c - * @param {Function} f - * @param {Function} g - * @return {Function} - * @see R.compose, R.pipe - * @example - * - * const classyGreeting = name => "The name's " + name.last + ", " + name.first + " " + name.last - * const yellGreeting = R.o(R.toUpper, classyGreeting); - * yellGreeting({first: 'James', last: 'Bond'}); //=> "THE NAME'S BOND, JAMES BOND" - * - * R.o(R.multiply(10), R.add(10))(-4) //=> 60 - * - * @symb R.o(f, g, x) = f(g(x)) - */ - -var o = -/*#__PURE__*/ -_curry3(function o(f, g, x) { - return f(g(x)); -}); - -export default o; \ No newline at end of file diff --git a/node_modules/ramda/es/objOf.js b/node_modules/ramda/es/objOf.js deleted file mode 100644 index c905087..0000000 --- a/node_modules/ramda/es/objOf.js +++ /dev/null @@ -1,31 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Creates an object containing a single key:value pair. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Object - * @sig String -> a -> {String:a} - * @param {String} key - * @param {*} val - * @return {Object} - * @see R.pair - * @example - * - * const matchPhrases = R.compose( - * R.objOf('must'), - * R.map(R.objOf('match_phrase')) - * ); - * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]} - */ - -var objOf = -/*#__PURE__*/ -_curry2(function objOf(key, val) { - var obj = {}; - obj[key] = val; - return obj; -}); - -export default objOf; \ No newline at end of file diff --git a/node_modules/ramda/es/of.js b/node_modules/ramda/es/of.js deleted file mode 100644 index fc2586a..0000000 --- a/node_modules/ramda/es/of.js +++ /dev/null @@ -1,26 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import _of from "./internal/_of.js"; -/** - * Returns a singleton array containing the value provided. - * - * Note this `of` is different from the ES6 `of`; See - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig a -> [a] - * @param {*} x any value - * @return {Array} An array wrapping `x`. - * @example - * - * R.of(null); //=> [null] - * R.of([42]); //=> [[42]] - */ - -var of = -/*#__PURE__*/ -_curry1(_of); - -export default of; \ No newline at end of file diff --git a/node_modules/ramda/es/omit.js b/node_modules/ramda/es/omit.js deleted file mode 100644 index e40f168..0000000 --- a/node_modules/ramda/es/omit.js +++ /dev/null @@ -1,41 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns a partial copy of an object omitting the keys specified. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [String] -> {String: *} -> {String: *} - * @param {Array} names an array of String property names to omit from the new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with properties from `names` not on it. - * @see R.pick - * @example - * - * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3} - */ - -var omit = -/*#__PURE__*/ -_curry2(function omit(names, obj) { - var result = {}; - var index = {}; - var idx = 0; - var len = names.length; - - while (idx < len) { - index[names[idx]] = 1; - idx += 1; - } - - for (var prop in obj) { - if (!index.hasOwnProperty(prop)) { - result[prop] = obj[prop]; - } - } - - return result; -}); - -export default omit; \ No newline at end of file diff --git a/node_modules/ramda/es/once.js b/node_modules/ramda/es/once.js deleted file mode 100644 index b0ab044..0000000 --- a/node_modules/ramda/es/once.js +++ /dev/null @@ -1,39 +0,0 @@ -import _arity from "./internal/_arity.js"; -import _curry1 from "./internal/_curry1.js"; -/** - * Accepts a function `fn` and returns a function that guards invocation of - * `fn` such that `fn` can only ever be called once, no matter how many times - * the returned function is invoked. The first value calculated is returned in - * subsequent invocations. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a... -> b) -> (a... -> b) - * @param {Function} fn The function to wrap in a call-only-once wrapper. - * @return {Function} The wrapped function. - * @example - * - * const addOneOnce = R.once(x => x + 1); - * addOneOnce(10); //=> 11 - * addOneOnce(addOneOnce(50)); //=> 11 - */ - -var once = -/*#__PURE__*/ -_curry1(function once(fn) { - var called = false; - var result; - return _arity(fn.length, function () { - if (called) { - return result; - } - - called = true; - result = fn.apply(this, arguments); - return result; - }); -}); - -export default once; \ No newline at end of file diff --git a/node_modules/ramda/es/or.js b/node_modules/ramda/es/or.js deleted file mode 100644 index 63b52a8..0000000 --- a/node_modules/ramda/es/or.js +++ /dev/null @@ -1,29 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns `true` if one or both of its arguments are `true`. Returns `false` - * if both arguments are `false`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> b -> a | b - * @param {Any} a - * @param {Any} b - * @return {Any} the first argument if truthy, otherwise the second argument. - * @see R.either, R.xor - * @example - * - * R.or(true, true); //=> true - * R.or(true, false); //=> true - * R.or(false, true); //=> true - * R.or(false, false); //=> false - */ - -var or = -/*#__PURE__*/ -_curry2(function or(a, b) { - return a || b; -}); - -export default or; \ No newline at end of file diff --git a/node_modules/ramda/es/otherwise.js b/node_modules/ramda/es/otherwise.js deleted file mode 100644 index e68c1da..0000000 --- a/node_modules/ramda/es/otherwise.js +++ /dev/null @@ -1,40 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _assertPromise from "./internal/_assertPromise.js"; -/** - * Returns the result of applying the onFailure function to the value inside - * a failed promise. This is useful for handling rejected promises - * inside function compositions. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig (e -> b) -> (Promise e a) -> (Promise e b) - * @sig (e -> (Promise f b)) -> (Promise e a) -> (Promise f b) - * @param {Function} onFailure The function to apply. Can return a value or a promise of a value. - * @param {Promise} p - * @return {Promise} The result of calling `p.then(null, onFailure)` - * @see R.then - * @example - * - * var failedFetch = (id) => Promise.reject('bad ID'); - * var useDefault = () => ({ firstName: 'Bob', lastName: 'Loblaw' }) - * - * //recoverFromFailure :: String -> Promise ({firstName, lastName}) - * var recoverFromFailure = R.pipe( - * failedFetch, - * R.otherwise(useDefault), - * R.then(R.pick(['firstName', 'lastName'])), - * ); - * recoverFromFailure(12345).then(console.log) - */ - -var otherwise = -/*#__PURE__*/ -_curry2(function otherwise(f, p) { - _assertPromise('otherwise', p); - - return p.then(null, f); -}); - -export default otherwise; \ No newline at end of file diff --git a/node_modules/ramda/es/over.js b/node_modules/ramda/es/over.js deleted file mode 100644 index 3646309..0000000 --- a/node_modules/ramda/es/over.js +++ /dev/null @@ -1,47 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; // `Identity` is a functor that holds a single value, where `map` simply -// transforms the held value with the provided function. - -var Identity = function (x) { - return { - value: x, - map: function (f) { - return Identity(f(x)); - } - }; -}; -/** - * Returns the result of "setting" the portion of the given data structure - * focused by the given lens to the result of applying the given function to - * the focused value. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> (a -> a) -> s -> s - * @param {Lens} lens - * @param {*} v - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * const headLens = R.lensIndex(0); - * - * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz'] - */ - - -var over = -/*#__PURE__*/ -_curry3(function over(lens, f, x) { - // The value returned by the getter function is first transformed with `f`, - // then set as the value of an `Identity`. This is then mapped over with the - // setter function of the lens. - return lens(function (y) { - return Identity(f(y)); - })(x).value; -}); - -export default over; \ No newline at end of file diff --git a/node_modules/ramda/es/pair.js b/node_modules/ramda/es/pair.js deleted file mode 100644 index c6508fa..0000000 --- a/node_modules/ramda/es/pair.js +++ /dev/null @@ -1,25 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Takes two arguments, `fst` and `snd`, and returns `[fst, snd]`. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category List - * @sig a -> b -> (a,b) - * @param {*} fst - * @param {*} snd - * @return {Array} - * @see R.objOf, R.of - * @example - * - * R.pair('foo', 'bar'); //=> ['foo', 'bar'] - */ - -var pair = -/*#__PURE__*/ -_curry2(function pair(fst, snd) { - return [fst, snd]; -}); - -export default pair; \ No newline at end of file diff --git a/node_modules/ramda/es/partial.js b/node_modules/ramda/es/partial.js deleted file mode 100644 index fcd8ced..0000000 --- a/node_modules/ramda/es/partial.js +++ /dev/null @@ -1,36 +0,0 @@ -import _concat from "./internal/_concat.js"; -import _createPartialApplicator from "./internal/_createPartialApplicator.js"; -/** - * Takes a function `f` and a list of arguments, and returns a function `g`. - * When applied, `g` returns the result of applying `f` to the arguments - * provided initially followed by the arguments provided to `g`. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x) - * @param {Function} f - * @param {Array} args - * @return {Function} - * @see R.partialRight, R.curry - * @example - * - * const multiply2 = (a, b) => a * b; - * const double = R.partial(multiply2, [2]); - * double(2); //=> 4 - * - * const greet = (salutation, title, firstName, lastName) => - * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; - * - * const sayHello = R.partial(greet, ['Hello']); - * const sayHelloToMs = R.partial(sayHello, ['Ms.']); - * sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!' - * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d) - */ - -var partial = -/*#__PURE__*/ -_createPartialApplicator(_concat); - -export default partial; \ No newline at end of file diff --git a/node_modules/ramda/es/partialRight.js b/node_modules/ramda/es/partialRight.js deleted file mode 100644 index 8bae291..0000000 --- a/node_modules/ramda/es/partialRight.js +++ /dev/null @@ -1,35 +0,0 @@ -import _concat from "./internal/_concat.js"; -import _createPartialApplicator from "./internal/_createPartialApplicator.js"; -import flip from "./flip.js"; -/** - * Takes a function `f` and a list of arguments, and returns a function `g`. - * When applied, `g` returns the result of applying `f` to the arguments - * provided to `g` followed by the arguments provided initially. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x) - * @param {Function} f - * @param {Array} args - * @return {Function} - * @see R.partial - * @example - * - * const greet = (salutation, title, firstName, lastName) => - * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; - * - * const greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']); - * - * greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!' - * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b) - */ - -var partialRight = -/*#__PURE__*/ -_createPartialApplicator( -/*#__PURE__*/ -flip(_concat)); - -export default partialRight; \ No newline at end of file diff --git a/node_modules/ramda/es/partition.js b/node_modules/ramda/es/partition.js deleted file mode 100644 index 8923385..0000000 --- a/node_modules/ramda/es/partition.js +++ /dev/null @@ -1,32 +0,0 @@ -import filter from "./filter.js"; -import juxt from "./juxt.js"; -import reject from "./reject.js"; -/** - * Takes a predicate and a list or other `Filterable` object and returns the - * pair of filterable objects of the same type of elements which do and do not - * satisfy, the predicate, respectively. Filterable objects include plain objects or any object - * that has a filter method such as `Array`. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> [f a, f a] - * @param {Function} pred A predicate to determine which side the element belongs to. - * @param {Array} filterable the list (or other filterable) to partition. - * @return {Array} An array, containing first the subset of elements that satisfy the - * predicate, and second the subset of elements that do not satisfy. - * @see R.filter, R.reject - * @example - * - * R.partition(R.includes('s'), ['sss', 'ttt', 'foo', 'bars']); - * // => [ [ 'sss', 'bars' ], [ 'ttt', 'foo' ] ] - * - * R.partition(R.includes('s'), { a: 'sss', b: 'ttt', foo: 'bars' }); - * // => [ { a: 'sss', foo: 'bars' }, { b: 'ttt' } ] - */ - -var partition = -/*#__PURE__*/ -juxt([filter, reject]); -export default partition; \ No newline at end of file diff --git a/node_modules/ramda/es/path.js b/node_modules/ramda/es/path.js deleted file mode 100644 index b687271..0000000 --- a/node_modules/ramda/es/path.js +++ /dev/null @@ -1,30 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import paths from "./paths.js"; -/** - * Retrieve the value at a given path. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {a} -> a | Undefined - * @param {Array} path The path to use. - * @param {Object} obj The object to retrieve the nested property from. - * @return {*} The data at `path`. - * @see R.prop, R.nth - * @example - * - * R.path(['a', 'b'], {a: {b: 2}}); //=> 2 - * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined - * R.path(['a', 'b', 0], {a: {b: [1, 2, 3]}}); //=> 1 - * R.path(['a', 'b', -2], {a: {b: [1, 2, 3]}}); //=> 2 - */ - -var path = -/*#__PURE__*/ -_curry2(function path(pathAr, obj) { - return paths([pathAr], obj)[0]; -}); - -export default path; \ No newline at end of file diff --git a/node_modules/ramda/es/pathEq.js b/node_modules/ramda/es/pathEq.js deleted file mode 100644 index cee4dc8..0000000 --- a/node_modules/ramda/es/pathEq.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import equals from "./equals.js"; -import path from "./path.js"; -/** - * Determines whether a nested path on an object has a specific value, in - * [`R.equals`](#equals) terms. Most likely used to filter a list. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Relation - * @typedefn Idx = String | Int - * @sig [Idx] -> a -> {a} -> Boolean - * @param {Array} path The path of the nested property to use - * @param {*} val The value to compare the nested property with - * @param {Object} obj The object to check the nested property in - * @return {Boolean} `true` if the value equals the nested object property, - * `false` otherwise. - * @example - * - * const user1 = { address: { zipCode: 90210 } }; - * const user2 = { address: { zipCode: 55555 } }; - * const user3 = { name: 'Bob' }; - * const users = [ user1, user2, user3 ]; - * const isFamous = R.pathEq(['address', 'zipCode'], 90210); - * R.filter(isFamous, users); //=> [ user1 ] - */ - -var pathEq = -/*#__PURE__*/ -_curry3(function pathEq(_path, val, obj) { - return equals(path(_path, obj), val); -}); - -export default pathEq; \ No newline at end of file diff --git a/node_modules/ramda/es/pathOr.js b/node_modules/ramda/es/pathOr.js deleted file mode 100644 index 9729b8f..0000000 --- a/node_modules/ramda/es/pathOr.js +++ /dev/null @@ -1,30 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import defaultTo from "./defaultTo.js"; -import path from "./path.js"; -/** - * If the given, non-null object has a value at the given path, returns the - * value at that path. Otherwise returns the provided default value. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Object - * @typedefn Idx = String | Int - * @sig a -> [Idx] -> {a} -> a - * @param {*} d The default value. - * @param {Array} p The path to use. - * @param {Object} obj The object to retrieve the nested property from. - * @return {*} The data at `path` of the supplied object or the default value. - * @example - * - * R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2 - * R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A" - */ - -var pathOr = -/*#__PURE__*/ -_curry3(function pathOr(d, p, obj) { - return defaultTo(d, path(p, obj)); -}); - -export default pathOr; \ No newline at end of file diff --git a/node_modules/ramda/es/pathSatisfies.js b/node_modules/ramda/es/pathSatisfies.js deleted file mode 100644 index 1789006..0000000 --- a/node_modules/ramda/es/pathSatisfies.js +++ /dev/null @@ -1,30 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import path from "./path.js"; -/** - * Returns `true` if the specified object property at given path satisfies the - * given predicate; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Logic - * @typedefn Idx = String | Int - * @sig (a -> Boolean) -> [Idx] -> {a} -> Boolean - * @param {Function} pred - * @param {Array} propPath - * @param {*} obj - * @return {Boolean} - * @see R.propSatisfies, R.path - * @example - * - * R.pathSatisfies(y => y > 0, ['x', 'y'], {x: {y: 2}}); //=> true - * R.pathSatisfies(R.is(Object), [], {x: {y: 2}}); //=> true - */ - -var pathSatisfies = -/*#__PURE__*/ -_curry3(function pathSatisfies(pred, propPath, obj) { - return pred(path(propPath, obj)); -}); - -export default pathSatisfies; \ No newline at end of file diff --git a/node_modules/ramda/es/paths.js b/node_modules/ramda/es/paths.js deleted file mode 100644 index d738975..0000000 --- a/node_modules/ramda/es/paths.js +++ /dev/null @@ -1,45 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _isInteger from "./internal/_isInteger.js"; -import nth from "./nth.js"; -/** - * Retrieves the values at given paths of an object. - * - * @func - * @memberOf R - * @since v0.27.1 - * @category Object - * @typedefn Idx = [String | Int] - * @sig [Idx] -> {a} -> [a | Undefined] - * @param {Array} pathsArray The array of paths to be fetched. - * @param {Object} obj The object to retrieve the nested properties from. - * @return {Array} A list consisting of values at paths specified by "pathsArray". - * @see R.path - * @example - * - * R.paths([['a', 'b'], ['p', 0, 'q']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, 3] - * R.paths([['a', 'b'], ['p', 'r']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, undefined] - */ - -var paths = -/*#__PURE__*/ -_curry2(function paths(pathsArray, obj) { - return pathsArray.map(function (paths) { - var val = obj; - var idx = 0; - var p; - - while (idx < paths.length) { - if (val == null) { - return; - } - - p = paths[idx]; - val = _isInteger(p) ? nth(p, val) : val[p]; - idx += 1; - } - - return val; - }); -}); - -export default paths; \ No newline at end of file diff --git a/node_modules/ramda/es/pick.js b/node_modules/ramda/es/pick.js deleted file mode 100644 index 59a4ed0..0000000 --- a/node_modules/ramda/es/pick.js +++ /dev/null @@ -1,38 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns a partial copy of an object containing only the keys specified. If - * the key does not exist, the property is ignored. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> {k: v} - * @param {Array} names an array of String property names to copy onto a new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties from `names` on it. - * @see R.omit, R.props - * @example - * - * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} - * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1} - */ - -var pick = -/*#__PURE__*/ -_curry2(function pick(names, obj) { - var result = {}; - var idx = 0; - - while (idx < names.length) { - if (names[idx] in obj) { - result[names[idx]] = obj[names[idx]]; - } - - idx += 1; - } - - return result; -}); - -export default pick; \ No newline at end of file diff --git a/node_modules/ramda/es/pickAll.js b/node_modules/ramda/es/pickAll.js deleted file mode 100644 index 91d223b..0000000 --- a/node_modules/ramda/es/pickAll.js +++ /dev/null @@ -1,37 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Similar to `pick` except that this one includes a `key: undefined` pair for - * properties that don't exist. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> {k: v} - * @param {Array} names an array of String property names to copy onto a new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties from `names` on it. - * @see R.pick - * @example - * - * R.pickAll(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} - * R.pickAll(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined} - */ - -var pickAll = -/*#__PURE__*/ -_curry2(function pickAll(names, obj) { - var result = {}; - var idx = 0; - var len = names.length; - - while (idx < len) { - var name = names[idx]; - result[name] = obj[name]; - idx += 1; - } - - return result; -}); - -export default pickAll; \ No newline at end of file diff --git a/node_modules/ramda/es/pickBy.js b/node_modules/ramda/es/pickBy.js deleted file mode 100644 index 9bdbda9..0000000 --- a/node_modules/ramda/es/pickBy.js +++ /dev/null @@ -1,37 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns a partial copy of an object containing only the keys that satisfy - * the supplied predicate. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @sig ((v, k) -> Boolean) -> {k: v} -> {k: v} - * @param {Function} pred A predicate to determine whether or not a key - * should be included on the output object. - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties that satisfy `pred` - * on it. - * @see R.pick, R.filter - * @example - * - * const isUpperCase = (val, key) => key.toUpperCase() === key; - * R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4} - */ - -var pickBy = -/*#__PURE__*/ -_curry2(function pickBy(test, obj) { - var result = {}; - - for (var prop in obj) { - if (test(obj[prop], prop, obj)) { - result[prop] = obj[prop]; - } - } - - return result; -}); - -export default pickBy; \ No newline at end of file diff --git a/node_modules/ramda/es/pipe.js b/node_modules/ramda/es/pipe.js deleted file mode 100644 index 3a74d8d..0000000 --- a/node_modules/ramda/es/pipe.js +++ /dev/null @@ -1,35 +0,0 @@ -import _arity from "./internal/_arity.js"; -import _pipe from "./internal/_pipe.js"; -import reduce from "./reduce.js"; -import tail from "./tail.js"; -/** - * Performs left-to-right function composition. The first argument may have - * any arity; the remaining arguments must be unary. - * - * In some libraries this function is named `sequence`. - * - * **Note:** The result of pipe is not automatically curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z) - * @param {...Function} functions - * @return {Function} - * @see R.compose - * @example - * - * const f = R.pipe(Math.pow, R.negate, R.inc); - * - * f(3, 4); // -(3^4) + 1 - * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b))) - */ - -export default function pipe() { - if (arguments.length === 0) { - throw new Error('pipe requires at least one argument'); - } - - return _arity(arguments[0].length, reduce(_pipe, arguments[0], tail(arguments))); -} \ No newline at end of file diff --git a/node_modules/ramda/es/pipeK.js b/node_modules/ramda/es/pipeK.js deleted file mode 100644 index 579e218..0000000 --- a/node_modules/ramda/es/pipeK.js +++ /dev/null @@ -1,45 +0,0 @@ -import composeK from "./composeK.js"; -import reverse from "./reverse.js"; -/** - * Returns the left-to-right Kleisli composition of the provided functions, - * each of which must return a value of a type supported by [`chain`](#chain). - * - * `R.pipeK(f, g, h)` is equivalent to `R.pipe(f, R.chain(g), R.chain(h))`. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Function - * @sig Chain m => ((a -> m b), (b -> m c), ..., (y -> m z)) -> (a -> m z) - * @param {...Function} - * @return {Function} - * @see R.composeK - * @deprecated since v0.26.0 - * @example - * - * // parseJson :: String -> Maybe * - * // get :: String -> Object -> Maybe * - * - * // getStateCode :: Maybe String -> Maybe String - * const getStateCode = R.pipeK( - * parseJson, - * get('user'), - * get('address'), - * get('state'), - * R.compose(Maybe.of, R.toUpper) - * ); - * - * getStateCode('{"user":{"address":{"state":"ny"}}}'); - * //=> Just('NY') - * getStateCode('[Invalid JSON]'); - * //=> Nothing() - * @symb R.pipeK(f, g, h)(a) = R.chain(h, R.chain(g, f(a))) - */ - -export default function pipeK() { - if (arguments.length === 0) { - throw new Error('pipeK requires at least one argument'); - } - - return composeK.apply(this, reverse(arguments)); -} \ No newline at end of file diff --git a/node_modules/ramda/es/pipeP.js b/node_modules/ramda/es/pipeP.js deleted file mode 100644 index 584b261..0000000 --- a/node_modules/ramda/es/pipeP.js +++ /dev/null @@ -1,31 +0,0 @@ -import _arity from "./internal/_arity.js"; -import _pipeP from "./internal/_pipeP.js"; -import reduce from "./reduce.js"; -import tail from "./tail.js"; -/** - * Performs left-to-right composition of one or more Promise-returning - * functions. The first argument may have any arity; the remaining arguments - * must be unary. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a -> Promise b), (b -> Promise c), ..., (y -> Promise z)) -> (a -> Promise z) - * @param {...Function} functions - * @return {Function} - * @see R.composeP - * @deprecated since v0.26.0 - * @example - * - * // followersForUser :: String -> Promise [User] - * const followersForUser = R.pipeP(db.getUserById, db.getFollowers); - */ - -export default function pipeP() { - if (arguments.length === 0) { - throw new Error('pipeP requires at least one argument'); - } - - return _arity(arguments[0].length, reduce(_pipeP, arguments[0], tail(arguments))); -} \ No newline at end of file diff --git a/node_modules/ramda/es/pipeWith.js b/node_modules/ramda/es/pipeWith.js deleted file mode 100644 index 7a84740..0000000 --- a/node_modules/ramda/es/pipeWith.js +++ /dev/null @@ -1,47 +0,0 @@ -import _arity from "./internal/_arity.js"; -import _curry2 from "./internal/_curry2.js"; -import head from "./head.js"; -import _reduce from "./internal/_reduce.js"; -import tail from "./tail.js"; -import identity from "./identity.js"; -/** - * Performs left-to-right function composition using transforming function. The first argument may have - * any arity; the remaining arguments must be unary. - * - * **Note:** The result of pipeWith is not automatically curried. Transforming function is not used on the - * first argument. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig ((* -> *), [((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)]) -> ((a, b, ..., n) -> z) - * @param {...Function} functions - * @return {Function} - * @see R.composeWith, R.pipe - * @example - * - * const pipeWhileNotNil = R.pipeWith((f, res) => R.isNil(res) ? res : f(res)); - * const f = pipeWhileNotNil([Math.pow, R.negate, R.inc]) - * - * f(3, 4); // -(3^4) + 1 - * @symb R.pipeWith(f)([g, h, i])(...args) = f(i, f(h, g(...args))) - */ - -var pipeWith = -/*#__PURE__*/ -_curry2(function pipeWith(xf, list) { - if (list.length <= 0) { - return identity; - } - - var headList = head(list); - var tailList = tail(list); - return _arity(headList.length, function () { - return _reduce(function (result, f) { - return xf.call(this, f, result); - }, headList.apply(this, arguments), tailList); - }); -}); - -export default pipeWith; \ No newline at end of file diff --git a/node_modules/ramda/es/pluck.js b/node_modules/ramda/es/pluck.js deleted file mode 100644 index b4b4dc5..0000000 --- a/node_modules/ramda/es/pluck.js +++ /dev/null @@ -1,38 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import map from "./map.js"; -import prop from "./prop.js"; -/** - * Returns a new list by plucking the same named property off all objects in - * the list supplied. - * - * `pluck` will work on - * any [functor](https://github.com/fantasyland/fantasy-land#functor) in - * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Functor f => k -> f {k: v} -> f v - * @param {Number|String} key The key name to pluck off of each object. - * @param {Array} f The array or functor to consider. - * @return {Array} The list of values for the given key. - * @see R.props - * @example - * - * var getAges = R.pluck('age'); - * getAges([{name: 'fred', age: 29}, {name: 'wilma', age: 27}]); //=> [29, 27] - * - * R.pluck(0, [[1, 2], [3, 4]]); //=> [1, 3] - * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5} - * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5] - * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5] - */ - -var pluck = -/*#__PURE__*/ -_curry2(function pluck(p, list) { - return map(prop(p), list); -}); - -export default pluck; \ No newline at end of file diff --git a/node_modules/ramda/es/prepend.js b/node_modules/ramda/es/prepend.js deleted file mode 100644 index f8de4a2..0000000 --- a/node_modules/ramda/es/prepend.js +++ /dev/null @@ -1,27 +0,0 @@ -import _concat from "./internal/_concat.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Returns a new list with the given element at the front, followed by the - * contents of the list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} el The item to add to the head of the output list. - * @param {Array} list The array to add to the tail of the output list. - * @return {Array} A new array. - * @see R.append - * @example - * - * R.prepend('fee', ['fi', 'fo', 'fum']); //=> ['fee', 'fi', 'fo', 'fum'] - */ - -var prepend = -/*#__PURE__*/ -_curry2(function prepend(el, list) { - return _concat([el], list); -}); - -export default prepend; \ No newline at end of file diff --git a/node_modules/ramda/es/product.js b/node_modules/ramda/es/product.js deleted file mode 100644 index 88d7492..0000000 --- a/node_modules/ramda/es/product.js +++ /dev/null @@ -1,22 +0,0 @@ -import multiply from "./multiply.js"; -import reduce from "./reduce.js"; -/** - * Multiplies together all the elements of a list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list An array of numbers - * @return {Number} The product of all the numbers in the list. - * @see R.reduce - * @example - * - * R.product([2,4,6,8,100,1]); //=> 38400 - */ - -var product = -/*#__PURE__*/ -reduce(multiply, 1); -export default product; \ No newline at end of file diff --git a/node_modules/ramda/es/project.js b/node_modules/ramda/es/project.js deleted file mode 100644 index d819b99..0000000 --- a/node_modules/ramda/es/project.js +++ /dev/null @@ -1,29 +0,0 @@ -import _map from "./internal/_map.js"; -import identity from "./identity.js"; -import pickAll from "./pickAll.js"; -import useWith from "./useWith.js"; -/** - * Reasonable analog to SQL `select` statement. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @category Relation - * @sig [k] -> [{k: v}] -> [{k: v}] - * @param {Array} props The property names to project - * @param {Array} objs The objects to query - * @return {Array} An array of objects with just the `props` properties. - * @example - * - * const abby = {name: 'Abby', age: 7, hair: 'blond', grade: 2}; - * const fred = {name: 'Fred', age: 12, hair: 'brown', grade: 7}; - * const kids = [abby, fred]; - * R.project(['name', 'grade'], kids); //=> [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}] - */ - -var project = -/*#__PURE__*/ -useWith(_map, [pickAll, identity]); // passing `identity` gives correct arity - -export default project; \ No newline at end of file diff --git a/node_modules/ramda/es/prop.js b/node_modules/ramda/es/prop.js deleted file mode 100644 index 9fa805f..0000000 --- a/node_modules/ramda/es/prop.js +++ /dev/null @@ -1,31 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import path from "./path.js"; -/** - * Returns a function that when supplied an object returns the indicated - * property of that object, if it exists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @typedefn Idx = String | Int - * @sig Idx -> {s: a} -> a | Undefined - * @param {String|Number} p The property name or array index - * @param {Object} obj The object to query - * @return {*} The value at `obj.p`. - * @see R.path, R.nth - * @example - * - * R.prop('x', {x: 100}); //=> 100 - * R.prop('x', {}); //=> undefined - * R.prop(0, [100]); //=> 100 - * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4 - */ - -var prop = -/*#__PURE__*/ -_curry2(function prop(p, obj) { - return path([p], obj); -}); - -export default prop; \ No newline at end of file diff --git a/node_modules/ramda/es/propEq.js b/node_modules/ramda/es/propEq.js deleted file mode 100644 index 43e889e..0000000 --- a/node_modules/ramda/es/propEq.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import equals from "./equals.js"; -/** - * Returns `true` if the specified object property is equal, in - * [`R.equals`](#equals) terms, to the given value; `false` otherwise. - * You can test multiple properties with [`R.whereEq`](#whereEq). - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig String -> a -> Object -> Boolean - * @param {String} name - * @param {*} val - * @param {*} obj - * @return {Boolean} - * @see R.whereEq, R.propSatisfies, R.equals - * @example - * - * const abby = {name: 'Abby', age: 7, hair: 'blond'}; - * const fred = {name: 'Fred', age: 12, hair: 'brown'}; - * const rusty = {name: 'Rusty', age: 10, hair: 'brown'}; - * const alois = {name: 'Alois', age: 15, disposition: 'surly'}; - * const kids = [abby, fred, rusty, alois]; - * const hasBrownHair = R.propEq('hair', 'brown'); - * R.filter(hasBrownHair, kids); //=> [fred, rusty] - */ - -var propEq = -/*#__PURE__*/ -_curry3(function propEq(name, val, obj) { - return equals(val, obj[name]); -}); - -export default propEq; \ No newline at end of file diff --git a/node_modules/ramda/es/propIs.js b/node_modules/ramda/es/propIs.js deleted file mode 100644 index 932bafb..0000000 --- a/node_modules/ramda/es/propIs.js +++ /dev/null @@ -1,30 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import is from "./is.js"; -/** - * Returns `true` if the specified object property is of the given type; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Type - * @sig Type -> String -> Object -> Boolean - * @param {Function} type - * @param {String} name - * @param {*} obj - * @return {Boolean} - * @see R.is, R.propSatisfies - * @example - * - * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true - * R.propIs(Number, 'x', {x: 'foo'}); //=> false - * R.propIs(Number, 'x', {}); //=> false - */ - -var propIs = -/*#__PURE__*/ -_curry3(function propIs(type, name, obj) { - return is(type, obj[name]); -}); - -export default propIs; \ No newline at end of file diff --git a/node_modules/ramda/es/propOr.js b/node_modules/ramda/es/propOr.js deleted file mode 100644 index 6793fb4..0000000 --- a/node_modules/ramda/es/propOr.js +++ /dev/null @@ -1,36 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import pathOr from "./pathOr.js"; -/** - * If the given, non-null object has an own property with the specified name, - * returns the value of that property. Otherwise returns the provided default - * value. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Object - * @sig a -> String -> Object -> a - * @param {*} val The default value. - * @param {String} p The name of the property to return. - * @param {Object} obj The object to query. - * @return {*} The value of given property of the supplied object or the default value. - * @example - * - * const alice = { - * name: 'ALICE', - * age: 101 - * }; - * const favorite = R.prop('favoriteLibrary'); - * const favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary'); - * - * favorite(alice); //=> undefined - * favoriteWithDefault(alice); //=> 'Ramda' - */ - -var propOr = -/*#__PURE__*/ -_curry3(function propOr(val, p, obj) { - return pathOr(val, [p], obj); -}); - -export default propOr; \ No newline at end of file diff --git a/node_modules/ramda/es/propSatisfies.js b/node_modules/ramda/es/propSatisfies.js deleted file mode 100644 index f48df46..0000000 --- a/node_modules/ramda/es/propSatisfies.js +++ /dev/null @@ -1,28 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Returns `true` if the specified object property satisfies the given - * predicate; `false` otherwise. You can test multiple properties with - * [`R.where`](#where). - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Logic - * @sig (a -> Boolean) -> String -> {String: a} -> Boolean - * @param {Function} pred - * @param {String} name - * @param {*} obj - * @return {Boolean} - * @see R.where, R.propEq, R.propIs - * @example - * - * R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true - */ - -var propSatisfies = -/*#__PURE__*/ -_curry3(function propSatisfies(pred, name, obj) { - return pred(obj[name]); -}); - -export default propSatisfies; \ No newline at end of file diff --git a/node_modules/ramda/es/props.js b/node_modules/ramda/es/props.js deleted file mode 100644 index 7605401..0000000 --- a/node_modules/ramda/es/props.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import path from "./path.js"; -/** - * Acts as multiple `prop`: array of keys in, array of values out. Preserves - * order. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> [v] - * @param {Array} ps The property names to fetch - * @param {Object} obj The object to query - * @return {Array} The corresponding values or partially applied function. - * @example - * - * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2] - * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2] - * - * const fullName = R.compose(R.join(' '), R.props(['first', 'last'])); - * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth' - */ - -var props = -/*#__PURE__*/ -_curry2(function props(ps, obj) { - return ps.map(function (p) { - return path([p], obj); - }); -}); - -export default props; \ No newline at end of file diff --git a/node_modules/ramda/es/range.js b/node_modules/ramda/es/range.js deleted file mode 100644 index 4fab10f..0000000 --- a/node_modules/ramda/es/range.js +++ /dev/null @@ -1,38 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _isNumber from "./internal/_isNumber.js"; -/** - * Returns a list of numbers from `from` (inclusive) to `to` (exclusive). - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> Number -> [Number] - * @param {Number} from The first number in the list. - * @param {Number} to One more than the last number in the list. - * @return {Array} The list of numbers in the set `[a, b)`. - * @example - * - * R.range(1, 5); //=> [1, 2, 3, 4] - * R.range(50, 53); //=> [50, 51, 52] - */ - -var range = -/*#__PURE__*/ -_curry2(function range(from, to) { - if (!(_isNumber(from) && _isNumber(to))) { - throw new TypeError('Both arguments to range must be numbers'); - } - - var result = []; - var n = from; - - while (n < to) { - result.push(n); - n += 1; - } - - return result; -}); - -export default range; \ No newline at end of file diff --git a/node_modules/ramda/es/reduce.js b/node_modules/ramda/es/reduce.js deleted file mode 100644 index 4d2adf6..0000000 --- a/node_modules/ramda/es/reduce.js +++ /dev/null @@ -1,54 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import _reduce from "./internal/_reduce.js"; -/** - * Returns a single item by iterating through the list, successively calling - * the iterator function and passing it an accumulator value and the current - * value from the array, and then passing the result to the next call. - * - * The iterator function receives two values: *(acc, value)*. It may use - * [`R.reduced`](#reduced) to shortcut the iteration. - * - * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function - * is *(value, acc)*. - * - * Note: `R.reduce` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.reduce` method. For more details - * on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description - * - * Dispatches to the `reduce` method of the third argument, if present. When - * doing so, it is up to the user to handle the [`R.reduced`](#reduced) - * shortcuting, as this is not implemented by `reduce`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, b) -> a) -> a -> [b] -> a - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduced, R.addIndex, R.reduceRight - * @example - * - * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10 - * // - -10 - * // / \ / \ - * // - 4 -6 4 - * // / \ / \ - * // - 3 ==> -3 3 - * // / \ / \ - * // - 2 -1 2 - * // / \ / \ - * // 0 1 0 1 - * - * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d) - */ - -var reduce = -/*#__PURE__*/ -_curry3(_reduce); - -export default reduce; \ No newline at end of file diff --git a/node_modules/ramda/es/reduceBy.js b/node_modules/ramda/es/reduceBy.js deleted file mode 100644 index 4c940dc..0000000 --- a/node_modules/ramda/es/reduceBy.js +++ /dev/null @@ -1,61 +0,0 @@ -import _clone from "./internal/_clone.js"; -import _curryN from "./internal/_curryN.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _has from "./internal/_has.js"; -import _reduce from "./internal/_reduce.js"; -import _xreduceBy from "./internal/_xreduceBy.js"; -/** - * Groups the elements of the list according to the result of calling - * the String-returning function `keyFn` on each element and reduces the elements - * of each group to a single value via the reducer function `valueFn`. - * - * This function is basically a more general [`groupBy`](#groupBy) function. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category List - * @sig ((a, b) -> a) -> a -> (b -> String) -> [b] -> {String: a} - * @param {Function} valueFn The function that reduces the elements of each group to a single - * value. Receives two values, accumulator for a particular group and the current element. - * @param {*} acc The (initial) accumulator value for each group. - * @param {Function} keyFn The function that maps the list's element into a key. - * @param {Array} list The array to group. - * @return {Object} An object with the output of `keyFn` for keys, mapped to the output of - * `valueFn` for elements which produced that key when passed to `keyFn`. - * @see R.groupBy, R.reduce - * @example - * - * const groupNames = (acc, {name}) => acc.concat(name) - * const toGrade = ({score}) => - * score < 65 ? 'F' : - * score < 70 ? 'D' : - * score < 80 ? 'C' : - * score < 90 ? 'B' : 'A' - * - * var students = [ - * {name: 'Abby', score: 83}, - * {name: 'Bart', score: 62}, - * {name: 'Curt', score: 88}, - * {name: 'Dora', score: 92}, - * ] - * - * reduceBy(groupNames, [], toGrade, students) - * //=> {"A": ["Dora"], "B": ["Abby", "Curt"], "F": ["Bart"]} - */ - -var reduceBy = -/*#__PURE__*/ -_curryN(4, [], -/*#__PURE__*/ -_dispatchable([], _xreduceBy, function reduceBy(valueFn, valueAcc, keyFn, list) { - return _reduce(function (acc, elt) { - var key = keyFn(elt); - acc[key] = valueFn(_has(key, acc) ? acc[key] : _clone(valueAcc, [], [], false), elt); - return acc; - }, {}, list); -})); - -export default reduceBy; \ No newline at end of file diff --git a/node_modules/ramda/es/reduceRight.js b/node_modules/ramda/es/reduceRight.js deleted file mode 100644 index 82e8bac..0000000 --- a/node_modules/ramda/es/reduceRight.js +++ /dev/null @@ -1,58 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Returns a single item by iterating through the list, successively calling - * the iterator function and passing it an accumulator value and the current - * value from the array, and then passing the result to the next call. - * - * Similar to [`reduce`](#reduce), except moves through the input list from the - * right to the left. - * - * The iterator function receives two values: *(value, acc)*, while the arguments' - * order of `reduce`'s iterator function is *(acc, value)*. - * - * Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.reduceRight` method. For more details - * on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, b) -> b) -> b -> [a] -> b - * @param {Function} fn The iterator function. Receives two values, the current element from the array - * and the accumulator. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.addIndex - * @example - * - * R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2 - * // - -2 - * // / \ / \ - * // 1 - 1 3 - * // / \ / \ - * // 2 - ==> 2 -1 - * // / \ / \ - * // 3 - 3 4 - * // / \ / \ - * // 4 0 4 0 - * - * @symb R.reduceRight(f, a, [b, c, d]) = f(b, f(c, f(d, a))) - */ - -var reduceRight = -/*#__PURE__*/ -_curry3(function reduceRight(fn, acc, list) { - var idx = list.length - 1; - - while (idx >= 0) { - acc = fn(list[idx], acc); - idx -= 1; - } - - return acc; -}); - -export default reduceRight; \ No newline at end of file diff --git a/node_modules/ramda/es/reduceWhile.js b/node_modules/ramda/es/reduceWhile.js deleted file mode 100644 index f8f29ad..0000000 --- a/node_modules/ramda/es/reduceWhile.js +++ /dev/null @@ -1,42 +0,0 @@ -import _curryN from "./internal/_curryN.js"; -import _reduce from "./internal/_reduce.js"; -import _reduced from "./internal/_reduced.js"; -/** - * Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating - * through the list, successively calling the iterator function. `reduceWhile` - * also takes a predicate that is evaluated before each step. If the predicate - * returns `false`, it "short-circuits" the iteration and returns the current - * value of the accumulator. - * - * @func - * @memberOf R - * @since v0.22.0 - * @category List - * @sig ((a, b) -> Boolean) -> ((a, b) -> a) -> a -> [b] -> a - * @param {Function} pred The predicate. It is passed the accumulator and the - * current element. - * @param {Function} fn The iterator function. Receives two values, the - * accumulator and the current element. - * @param {*} a The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.reduced - * @example - * - * const isOdd = (acc, x) => x % 2 === 1; - * const xs = [1, 3, 5, 60, 777, 800]; - * R.reduceWhile(isOdd, R.add, 0, xs); //=> 9 - * - * const ys = [2, 4, 6] - * R.reduceWhile(isOdd, R.add, 111, ys); //=> 111 - */ - -var reduceWhile = -/*#__PURE__*/ -_curryN(4, [], function _reduceWhile(pred, fn, a, list) { - return _reduce(function (acc, x) { - return pred(acc, x) ? fn(acc, x) : _reduced(acc); - }, a, list); -}); - -export default reduceWhile; \ No newline at end of file diff --git a/node_modules/ramda/es/reduced.js b/node_modules/ramda/es/reduced.js deleted file mode 100644 index 4e04afd..0000000 --- a/node_modules/ramda/es/reduced.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import _reduced from "./internal/_reduced.js"; -/** - * Returns a value wrapped to indicate that it is the final value of the reduce - * and transduce functions. The returned value should be considered a black - * box: the internal structure is not guaranteed to be stable. - * - * Note: this optimization is only available to the below functions: - * - [`reduce`](#reduce) - * - [`reduceWhile`](#reduceWhile) - * - [`transduce`](#transduce) - * - * @func - * @memberOf R - * @since v0.15.0 - * @category List - * @sig a -> * - * @param {*} x The final value of the reduce. - * @return {*} The wrapped value. - * @see R.reduce, R.reduceWhile, R.transduce - * @example - * - * R.reduce( - * (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item), - * [], - * [1, 2, 3, 4, 5]) // [1, 2, 3] - */ - -var reduced = -/*#__PURE__*/ -_curry1(_reduced); - -export default reduced; \ No newline at end of file diff --git a/node_modules/ramda/es/reject.js b/node_modules/ramda/es/reject.js deleted file mode 100644 index 1a5f361..0000000 --- a/node_modules/ramda/es/reject.js +++ /dev/null @@ -1,35 +0,0 @@ -import _complement from "./internal/_complement.js"; -import _curry2 from "./internal/_curry2.js"; -import filter from "./filter.js"; -/** - * The complement of [`filter`](#filter). - * - * Acts as a transducer if a transformer is given in list position. Filterable - * objects include plain objects or any object that has a filter method such - * as `Array`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> f a - * @param {Function} pred - * @param {Array} filterable - * @return {Array} - * @see R.filter, R.transduce, R.addIndex - * @example - * - * const isOdd = (n) => n % 2 === 1; - * - * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4] - * - * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} - */ - -var reject = -/*#__PURE__*/ -_curry2(function reject(pred, filterable) { - return filter(_complement(pred), filterable); -}); - -export default reject; \ No newline at end of file diff --git a/node_modules/ramda/es/remove.js b/node_modules/ramda/es/remove.js deleted file mode 100644 index fda6751..0000000 --- a/node_modules/ramda/es/remove.js +++ /dev/null @@ -1,31 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Removes the sub-list of `list` starting at index `start` and containing - * `count` elements. _Note that this is not destructive_: it returns a copy of - * the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.2.2 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @param {Number} start The position to start removing elements - * @param {Number} count The number of elements to remove - * @param {Array} list The list to remove from - * @return {Array} A new Array with `count` elements from `start` removed. - * @see R.without - * @example - * - * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8] - */ - -var remove = -/*#__PURE__*/ -_curry3(function remove(start, count, list) { - var result = Array.prototype.slice.call(list, 0); - result.splice(start, count); - return result; -}); - -export default remove; \ No newline at end of file diff --git a/node_modules/ramda/es/repeat.js b/node_modules/ramda/es/repeat.js deleted file mode 100644 index e2308d5..0000000 --- a/node_modules/ramda/es/repeat.js +++ /dev/null @@ -1,34 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import always from "./always.js"; -import times from "./times.js"; -/** - * Returns a fixed list of size `n` containing a specified identical value. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig a -> n -> [a] - * @param {*} value The value to repeat. - * @param {Number} n The desired size of the output list. - * @return {Array} A new array containing `n` `value`s. - * @see R.times - * @example - * - * R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi'] - * - * const obj = {}; - * const repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}] - * repeatedObjs[0] === repeatedObjs[1]; //=> true - * @symb R.repeat(a, 0) = [] - * @symb R.repeat(a, 1) = [a] - * @symb R.repeat(a, 2) = [a, a] - */ - -var repeat = -/*#__PURE__*/ -_curry2(function repeat(value, n) { - return times(always(value), n); -}); - -export default repeat; \ No newline at end of file diff --git a/node_modules/ramda/es/replace.js b/node_modules/ramda/es/replace.js deleted file mode 100644 index 43ba78e..0000000 --- a/node_modules/ramda/es/replace.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Replace a substring or regex match in a string with a replacement. - * - * The first two parameters correspond to the parameters of the - * `String.prototype.replace()` function, so the second parameter can also be a - * function. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category String - * @sig RegExp|String -> String -> String -> String - * @param {RegExp|String} pattern A regular expression or a substring to match. - * @param {String} replacement The string to replace the matches with. - * @param {String} str The String to do the search and replacement in. - * @return {String} The result. - * @example - * - * R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo' - * R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo' - * - * // Use the "g" (global) flag to replace all occurrences: - * R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar' - */ - -var replace = -/*#__PURE__*/ -_curry3(function replace(regex, replacement, str) { - return str.replace(regex, replacement); -}); - -export default replace; \ No newline at end of file diff --git a/node_modules/ramda/es/reverse.js b/node_modules/ramda/es/reverse.js deleted file mode 100644 index 7d4bd4d..0000000 --- a/node_modules/ramda/es/reverse.js +++ /dev/null @@ -1,34 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import _isString from "./internal/_isString.js"; -/** - * Returns a new list or string with the elements or characters in reverse - * order. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {Array|String} list - * @return {Array|String} - * @example - * - * R.reverse([1, 2, 3]); //=> [3, 2, 1] - * R.reverse([1, 2]); //=> [2, 1] - * R.reverse([1]); //=> [1] - * R.reverse([]); //=> [] - * - * R.reverse('abc'); //=> 'cba' - * R.reverse('ab'); //=> 'ba' - * R.reverse('a'); //=> 'a' - * R.reverse(''); //=> '' - */ - -var reverse = -/*#__PURE__*/ -_curry1(function reverse(list) { - return _isString(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse(); -}); - -export default reverse; \ No newline at end of file diff --git a/node_modules/ramda/es/scan.js b/node_modules/ramda/es/scan.js deleted file mode 100644 index fb6b908..0000000 --- a/node_modules/ramda/es/scan.js +++ /dev/null @@ -1,40 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Scan is similar to [`reduce`](#reduce), but returns a list of successively - * reduced values from the left - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig ((a, b) -> a) -> a -> [b] -> [a] - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {Array} A list of all intermediately reduced values. - * @see R.reduce, R.mapAccum - * @example - * - * const numbers = [1, 2, 3, 4]; - * const factorials = R.scan(R.multiply, 1, numbers); //=> [1, 1, 2, 6, 24] - * @symb R.scan(f, a, [b, c]) = [a, f(a, b), f(f(a, b), c)] - */ - -var scan = -/*#__PURE__*/ -_curry3(function scan(fn, acc, list) { - var idx = 0; - var len = list.length; - var result = [acc]; - - while (idx < len) { - acc = fn(acc, list[idx]); - result[idx + 1] = acc; - idx += 1; - } - - return result; -}); - -export default scan; \ No newline at end of file diff --git a/node_modules/ramda/es/sequence.js b/node_modules/ramda/es/sequence.js deleted file mode 100644 index 965f728..0000000 --- a/node_modules/ramda/es/sequence.js +++ /dev/null @@ -1,39 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import ap from "./ap.js"; -import map from "./map.js"; -import prepend from "./prepend.js"; -import reduceRight from "./reduceRight.js"; -/** - * Transforms a [Traversable](https://github.com/fantasyland/fantasy-land#traversable) - * of [Applicative](https://github.com/fantasyland/fantasy-land#applicative) into an - * Applicative of Traversable. - * - * Dispatches to the `sequence` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (Applicative f, Traversable t) => (a -> f a) -> t (f a) -> f (t a) - * @param {Function} of - * @param {*} traversable - * @return {*} - * @see R.traverse - * @example - * - * R.sequence(Maybe.of, [Just(1), Just(2), Just(3)]); //=> Just([1, 2, 3]) - * R.sequence(Maybe.of, [Just(1), Just(2), Nothing()]); //=> Nothing() - * - * R.sequence(R.of, Just([1, 2, 3])); //=> [Just(1), Just(2), Just(3)] - * R.sequence(R.of, Nothing()); //=> [Nothing()] - */ - -var sequence = -/*#__PURE__*/ -_curry2(function sequence(of, traversable) { - return typeof traversable.sequence === 'function' ? traversable.sequence(of) : reduceRight(function (x, acc) { - return ap(map(prepend, x), acc); - }, of([]), traversable); -}); - -export default sequence; \ No newline at end of file diff --git a/node_modules/ramda/es/set.js b/node_modules/ramda/es/set.js deleted file mode 100644 index aaabea3..0000000 --- a/node_modules/ramda/es/set.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import always from "./always.js"; -import over from "./over.js"; -/** - * Returns the result of "setting" the portion of the given data structure - * focused by the given lens to the given value. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> a -> s -> s - * @param {Lens} lens - * @param {*} v - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * const xLens = R.lensProp('x'); - * - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.set(xLens, 8, {x: 1, y: 2}); //=> {x: 8, y: 2} - */ - -var set = -/*#__PURE__*/ -_curry3(function set(lens, v, x) { - return over(lens, always(v), x); -}); - -export default set; \ No newline at end of file diff --git a/node_modules/ramda/es/slice.js b/node_modules/ramda/es/slice.js deleted file mode 100644 index 1f09feb..0000000 --- a/node_modules/ramda/es/slice.js +++ /dev/null @@ -1,36 +0,0 @@ -import _checkForMethod from "./internal/_checkForMethod.js"; -import _curry3 from "./internal/_curry3.js"; -/** - * Returns the elements of the given list or string (or object with a `slice` - * method) from `fromIndex` (inclusive) to `toIndex` (exclusive). - * - * Dispatches to the `slice` method of the third argument, if present. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @sig Number -> Number -> String -> String - * @param {Number} fromIndex The start index (inclusive). - * @param {Number} toIndex The end index (exclusive). - * @param {*} list - * @return {*} - * @example - * - * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] - * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd'] - * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c'] - * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] - * R.slice(0, 3, 'ramda'); //=> 'ram' - */ - -var slice = -/*#__PURE__*/ -_curry3( -/*#__PURE__*/ -_checkForMethod('slice', function slice(fromIndex, toIndex, list) { - return Array.prototype.slice.call(list, fromIndex, toIndex); -})); - -export default slice; \ No newline at end of file diff --git a/node_modules/ramda/es/sort.js b/node_modules/ramda/es/sort.js deleted file mode 100644 index 8995b34..0000000 --- a/node_modules/ramda/es/sort.js +++ /dev/null @@ -1,29 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Returns a copy of the list, sorted according to the comparator function, - * which should accept two values at a time and return a negative number if the - * first value is smaller, a positive number if it's larger, and zero if they - * are equal. Please note that this is a **copy** of the list. It does not - * modify the original. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, a) -> Number) -> [a] -> [a] - * @param {Function} comparator A sorting function :: a -> b -> Int - * @param {Array} list The list to sort - * @return {Array} a new array with its elements sorted by the comparator function. - * @example - * - * const diff = function(a, b) { return a - b; }; - * R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7] - */ - -var sort = -/*#__PURE__*/ -_curry2(function sort(comparator, list) { - return Array.prototype.slice.call(list, 0).sort(comparator); -}); - -export default sort; \ No newline at end of file diff --git a/node_modules/ramda/es/sortBy.js b/node_modules/ramda/es/sortBy.js deleted file mode 100644 index c3da03a..0000000 --- a/node_modules/ramda/es/sortBy.js +++ /dev/null @@ -1,46 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Sorts the list according to the supplied function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord b => (a -> b) -> [a] -> [a] - * @param {Function} fn - * @param {Array} list The list to sort. - * @return {Array} A new list sorted by the keys generated by `fn`. - * @example - * - * const sortByFirstItem = R.sortBy(R.prop(0)); - * const pairs = [[-1, 1], [-2, 2], [-3, 3]]; - * sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]] - * - * const sortByNameCaseInsensitive = R.sortBy(R.compose(R.toLower, R.prop('name'))); - * const alice = { - * name: 'ALICE', - * age: 101 - * }; - * const bob = { - * name: 'Bob', - * age: -10 - * }; - * const clara = { - * name: 'clara', - * age: 314.159 - * }; - * const people = [clara, bob, alice]; - * sortByNameCaseInsensitive(people); //=> [alice, bob, clara] - */ - -var sortBy = -/*#__PURE__*/ -_curry2(function sortBy(fn, list) { - return Array.prototype.slice.call(list, 0).sort(function (a, b) { - var aa = fn(a); - var bb = fn(b); - return aa < bb ? -1 : aa > bb ? 1 : 0; - }); -}); - -export default sortBy; \ No newline at end of file diff --git a/node_modules/ramda/es/sortWith.js b/node_modules/ramda/es/sortWith.js deleted file mode 100644 index d9d1f6c..0000000 --- a/node_modules/ramda/es/sortWith.js +++ /dev/null @@ -1,51 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Sorts a list according to a list of comparators. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Relation - * @sig [(a, a) -> Number] -> [a] -> [a] - * @param {Array} functions A list of comparator functions. - * @param {Array} list The list to sort. - * @return {Array} A new list sorted according to the comarator functions. - * @example - * - * const alice = { - * name: 'alice', - * age: 40 - * }; - * const bob = { - * name: 'bob', - * age: 30 - * }; - * const clara = { - * name: 'clara', - * age: 40 - * }; - * const people = [clara, bob, alice]; - * const ageNameSort = R.sortWith([ - * R.descend(R.prop('age')), - * R.ascend(R.prop('name')) - * ]); - * ageNameSort(people); //=> [alice, clara, bob] - */ - -var sortWith = -/*#__PURE__*/ -_curry2(function sortWith(fns, list) { - return Array.prototype.slice.call(list, 0).sort(function (a, b) { - var result = 0; - var i = 0; - - while (result === 0 && i < fns.length) { - result = fns[i](a, b); - i += 1; - } - - return result; - }); -}); - -export default sortWith; \ No newline at end of file diff --git a/node_modules/ramda/es/split.js b/node_modules/ramda/es/split.js deleted file mode 100644 index 2585985..0000000 --- a/node_modules/ramda/es/split.js +++ /dev/null @@ -1,26 +0,0 @@ -import invoker from "./invoker.js"; -/** - * Splits a string into an array of strings based on the given - * separator. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category String - * @sig (String | RegExp) -> String -> [String] - * @param {String|RegExp} sep The pattern. - * @param {String} str The string to separate into an array. - * @return {Array} The array of strings from `str` separated by `sep`. - * @see R.join - * @example - * - * const pathComponents = R.split('/'); - * R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node'] - * - * R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd'] - */ - -var split = -/*#__PURE__*/ -invoker(1, 'split'); -export default split; \ No newline at end of file diff --git a/node_modules/ramda/es/splitAt.js b/node_modules/ramda/es/splitAt.js deleted file mode 100644 index de54fe1..0000000 --- a/node_modules/ramda/es/splitAt.js +++ /dev/null @@ -1,29 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import length from "./length.js"; -import slice from "./slice.js"; -/** - * Splits a given list or string at a given index. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig Number -> [a] -> [[a], [a]] - * @sig Number -> String -> [String, String] - * @param {Number} index The index where the array/string is split. - * @param {Array|String} array The array/string to be split. - * @return {Array} - * @example - * - * R.splitAt(1, [1, 2, 3]); //=> [[1], [2, 3]] - * R.splitAt(5, 'hello world'); //=> ['hello', ' world'] - * R.splitAt(-1, 'foobar'); //=> ['fooba', 'r'] - */ - -var splitAt = -/*#__PURE__*/ -_curry2(function splitAt(index, array) { - return [slice(0, index, array), slice(index, length(array), array)]; -}); - -export default splitAt; \ No newline at end of file diff --git a/node_modules/ramda/es/splitEvery.js b/node_modules/ramda/es/splitEvery.js deleted file mode 100644 index 018650e..0000000 --- a/node_modules/ramda/es/splitEvery.js +++ /dev/null @@ -1,38 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import slice from "./slice.js"; -/** - * Splits a collection into slices of the specified length. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [[a]] - * @sig Number -> String -> [String] - * @param {Number} n - * @param {Array} list - * @return {Array} - * @example - * - * R.splitEvery(3, [1, 2, 3, 4, 5, 6, 7]); //=> [[1, 2, 3], [4, 5, 6], [7]] - * R.splitEvery(3, 'foobarbaz'); //=> ['foo', 'bar', 'baz'] - */ - -var splitEvery = -/*#__PURE__*/ -_curry2(function splitEvery(n, list) { - if (n <= 0) { - throw new Error('First argument to splitEvery must be a positive integer'); - } - - var result = []; - var idx = 0; - - while (idx < list.length) { - result.push(slice(idx, idx += n, list)); - } - - return result; -}); - -export default splitEvery; \ No newline at end of file diff --git a/node_modules/ramda/es/splitWhen.js b/node_modules/ramda/es/splitWhen.js deleted file mode 100644 index 6bc9baf..0000000 --- a/node_modules/ramda/es/splitWhen.js +++ /dev/null @@ -1,37 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Takes a list and a predicate and returns a pair of lists with the following properties: - * - * - the result of concatenating the two output lists is equivalent to the input list; - * - none of the elements of the first output list satisfies the predicate; and - * - if the second output list is non-empty, its first element satisfies the predicate. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [[a], [a]] - * @param {Function} pred The predicate that determines where the array is split. - * @param {Array} list The array to be split. - * @return {Array} - * @example - * - * R.splitWhen(R.equals(2), [1, 2, 3, 1, 2, 3]); //=> [[1], [2, 3, 1, 2, 3]] - */ - -var splitWhen = -/*#__PURE__*/ -_curry2(function splitWhen(pred, list) { - var idx = 0; - var len = list.length; - var prefix = []; - - while (idx < len && !pred(list[idx])) { - prefix.push(list[idx]); - idx += 1; - } - - return [prefix, Array.prototype.slice.call(list, idx)]; -}); - -export default splitWhen; \ No newline at end of file diff --git a/node_modules/ramda/es/startsWith.js b/node_modules/ramda/es/startsWith.js deleted file mode 100644 index dc3ec5b..0000000 --- a/node_modules/ramda/es/startsWith.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import equals from "./equals.js"; -import take from "./take.js"; -/** - * Checks if a list starts with the provided sublist. - * - * Similarly, checks if a string starts with the provided substring. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category List - * @sig [a] -> [a] -> Boolean - * @sig String -> String -> Boolean - * @param {*} prefix - * @param {*} list - * @return {Boolean} - * @see R.endsWith - * @example - * - * R.startsWith('a', 'abc') //=> true - * R.startsWith('b', 'abc') //=> false - * R.startsWith(['a'], ['a', 'b', 'c']) //=> true - * R.startsWith(['b'], ['a', 'b', 'c']) //=> false - */ - -var startsWith = -/*#__PURE__*/ -_curry2(function (prefix, list) { - return equals(take(prefix.length, list), prefix); -}); - -export default startsWith; \ No newline at end of file diff --git a/node_modules/ramda/es/subtract.js b/node_modules/ramda/es/subtract.js deleted file mode 100644 index 7d69372..0000000 --- a/node_modules/ramda/es/subtract.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Subtracts its second argument from its first argument. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a - b`. - * @see R.add - * @example - * - * R.subtract(10, 8); //=> 2 - * - * const minus5 = R.subtract(R.__, 5); - * minus5(17); //=> 12 - * - * const complementaryAngle = R.subtract(90); - * complementaryAngle(30); //=> 60 - * complementaryAngle(72); //=> 18 - */ - -var subtract = -/*#__PURE__*/ -_curry2(function subtract(a, b) { - return Number(a) - Number(b); -}); - -export default subtract; \ No newline at end of file diff --git a/node_modules/ramda/es/sum.js b/node_modules/ramda/es/sum.js deleted file mode 100644 index 483f1e2..0000000 --- a/node_modules/ramda/es/sum.js +++ /dev/null @@ -1,22 +0,0 @@ -import add from "./add.js"; -import reduce from "./reduce.js"; -/** - * Adds together all the elements of a list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list An array of numbers - * @return {Number} The sum of all the numbers in the list. - * @see R.reduce - * @example - * - * R.sum([2,4,6,8,100,1]); //=> 121 - */ - -var sum = -/*#__PURE__*/ -reduce(add, 0); -export default sum; \ No newline at end of file diff --git a/node_modules/ramda/es/symmetricDifference.js b/node_modules/ramda/es/symmetricDifference.js deleted file mode 100644 index 090d7c9..0000000 --- a/node_modules/ramda/es/symmetricDifference.js +++ /dev/null @@ -1,29 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import concat from "./concat.js"; -import difference from "./difference.js"; -/** - * Finds the set (i.e. no duplicates) of all elements contained in the first or - * second list, but not both. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` or `list2`, but not both. - * @see R.symmetricDifferenceWith, R.difference, R.differenceWith - * @example - * - * R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5] - * R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2] - */ - -var symmetricDifference = -/*#__PURE__*/ -_curry2(function symmetricDifference(list1, list2) { - return concat(difference(list1, list2), difference(list2, list1)); -}); - -export default symmetricDifference; \ No newline at end of file diff --git a/node_modules/ramda/es/symmetricDifferenceWith.js b/node_modules/ramda/es/symmetricDifferenceWith.js deleted file mode 100644 index b061398..0000000 --- a/node_modules/ramda/es/symmetricDifferenceWith.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import concat from "./concat.js"; -import differenceWith from "./differenceWith.js"; -/** - * Finds the set (i.e. no duplicates) of all elements contained in the first or - * second list, but not both. Duplication is determined according to the value - * returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` or `list2`, but not both. - * @see R.symmetricDifference, R.difference, R.differenceWith - * @example - * - * const eqA = R.eqBy(R.prop('a')); - * const l1 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; - * const l2 = [{a: 3}, {a: 4}, {a: 5}, {a: 6}]; - * R.symmetricDifferenceWith(eqA, l1, l2); //=> [{a: 1}, {a: 2}, {a: 5}, {a: 6}] - */ - -var symmetricDifferenceWith = -/*#__PURE__*/ -_curry3(function symmetricDifferenceWith(pred, list1, list2) { - return concat(differenceWith(pred, list1, list2), differenceWith(pred, list2, list1)); -}); - -export default symmetricDifferenceWith; \ No newline at end of file diff --git a/node_modules/ramda/es/tail.js b/node_modules/ramda/es/tail.js deleted file mode 100644 index 6729639..0000000 --- a/node_modules/ramda/es/tail.js +++ /dev/null @@ -1,40 +0,0 @@ -import _checkForMethod from "./internal/_checkForMethod.js"; -import _curry1 from "./internal/_curry1.js"; -import slice from "./slice.js"; -/** - * Returns all but the first element of the given list or string (or object - * with a `tail` method). - * - * Dispatches to the `slice` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.head, R.init, R.last - * @example - * - * R.tail([1, 2, 3]); //=> [2, 3] - * R.tail([1, 2]); //=> [2] - * R.tail([1]); //=> [] - * R.tail([]); //=> [] - * - * R.tail('abc'); //=> 'bc' - * R.tail('ab'); //=> 'b' - * R.tail('a'); //=> '' - * R.tail(''); //=> '' - */ - -var tail = -/*#__PURE__*/ -_curry1( -/*#__PURE__*/ -_checkForMethod('tail', -/*#__PURE__*/ -slice(1, Infinity))); - -export default tail; \ No newline at end of file diff --git a/node_modules/ramda/es/take.js b/node_modules/ramda/es/take.js deleted file mode 100644 index 5ef0968..0000000 --- a/node_modules/ramda/es/take.js +++ /dev/null @@ -1,57 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xtake from "./internal/_xtake.js"; -import slice from "./slice.js"; -/** - * Returns the first `n` elements of the given list, string, or - * transducer/transformer (or object with a `take` method). - * - * Dispatches to the `take` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n - * @param {*} list - * @return {*} - * @see R.drop - * @example - * - * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo'] - * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] - * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.take(3, 'ramda'); //=> 'ram' - * - * const personnel = [ - * 'Dave Brubeck', - * 'Paul Desmond', - * 'Eugene Wright', - * 'Joe Morello', - * 'Gerry Mulligan', - * 'Bob Bates', - * 'Joe Dodge', - * 'Ron Crotty' - * ]; - * - * const takeFive = R.take(5); - * takeFive(personnel); - * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan'] - * @symb R.take(-1, [a, b]) = [a, b] - * @symb R.take(0, [a, b]) = [] - * @symb R.take(1, [a, b]) = [a] - * @symb R.take(2, [a, b]) = [a, b] - */ - -var take = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['take'], _xtake, function take(n, xs) { - return slice(0, n < 0 ? Infinity : n, xs); -})); - -export default take; \ No newline at end of file diff --git a/node_modules/ramda/es/takeLast.js b/node_modules/ramda/es/takeLast.js deleted file mode 100644 index 5f5cf66..0000000 --- a/node_modules/ramda/es/takeLast.js +++ /dev/null @@ -1,32 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import drop from "./drop.js"; -/** - * Returns a new list containing the last `n` elements of the given list. - * If `n > list.length`, returns a list of `list.length` elements. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n The number of elements to return. - * @param {Array} xs The collection to consider. - * @return {Array} - * @see R.dropLast - * @example - * - * R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz'] - * R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] - * R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.takeLast(3, 'ramda'); //=> 'mda' - */ - -var takeLast = -/*#__PURE__*/ -_curry2(function takeLast(n, xs) { - return drop(n >= 0 ? xs.length - n : 0, xs); -}); - -export default takeLast; \ No newline at end of file diff --git a/node_modules/ramda/es/takeLastWhile.js b/node_modules/ramda/es/takeLastWhile.js deleted file mode 100644 index 2c65ca7..0000000 --- a/node_modules/ramda/es/takeLastWhile.js +++ /dev/null @@ -1,41 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import slice from "./slice.js"; -/** - * Returns a new list containing the last `n` elements of a given list, passing - * each value to the supplied predicate function, and terminating when the - * predicate function returns `false`. Excludes the element that caused the - * predicate function to fail. The predicate function is passed one argument: - * *(value)*. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @sig (a -> Boolean) -> String -> String - * @param {Function} fn The function called per iteration. - * @param {Array} xs The collection to iterate over. - * @return {Array} A new array. - * @see R.dropLastWhile, R.addIndex - * @example - * - * const isNotOne = x => x !== 1; - * - * R.takeLastWhile(isNotOne, [1, 2, 3, 4]); //=> [2, 3, 4] - * - * R.takeLastWhile(x => x !== 'R' , 'Ramda'); //=> 'amda' - */ - -var takeLastWhile = -/*#__PURE__*/ -_curry2(function takeLastWhile(fn, xs) { - var idx = xs.length - 1; - - while (idx >= 0 && fn(xs[idx])) { - idx -= 1; - } - - return slice(idx + 1, Infinity, xs); -}); - -export default takeLastWhile; \ No newline at end of file diff --git a/node_modules/ramda/es/takeWhile.js b/node_modules/ramda/es/takeWhile.js deleted file mode 100644 index ecf0b8d..0000000 --- a/node_modules/ramda/es/takeWhile.js +++ /dev/null @@ -1,50 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xtakeWhile from "./internal/_xtakeWhile.js"; -import slice from "./slice.js"; -/** - * Returns a new list containing the first `n` elements of a given list, - * passing each value to the supplied predicate function, and terminating when - * the predicate function returns `false`. Excludes the element that caused the - * predicate function to fail. The predicate function is passed one argument: - * *(value)*. - * - * Dispatches to the `takeWhile` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @sig (a -> Boolean) -> String -> String - * @param {Function} fn The function called per iteration. - * @param {Array} xs The collection to iterate over. - * @return {Array} A new array. - * @see R.dropWhile, R.transduce, R.addIndex - * @example - * - * const isNotFour = x => x !== 4; - * - * R.takeWhile(isNotFour, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3] - * - * R.takeWhile(x => x !== 'd' , 'Ramda'); //=> 'Ram' - */ - -var takeWhile = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['takeWhile'], _xtakeWhile, function takeWhile(fn, xs) { - var idx = 0; - var len = xs.length; - - while (idx < len && fn(xs[idx])) { - idx += 1; - } - - return slice(0, idx, xs); -})); - -export default takeWhile; \ No newline at end of file diff --git a/node_modules/ramda/es/tap.js b/node_modules/ramda/es/tap.js deleted file mode 100644 index acc9c66..0000000 --- a/node_modules/ramda/es/tap.js +++ /dev/null @@ -1,34 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _dispatchable from "./internal/_dispatchable.js"; -import _xtap from "./internal/_xtap.js"; -/** - * Runs the given function with the supplied object, then returns the object. - * - * Acts as a transducer if a transformer is given as second parameter. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a -> *) -> a -> a - * @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away. - * @param {*} x - * @return {*} `x`. - * @example - * - * const sayX = x => console.log('x is ' + x); - * R.tap(sayX, 100); //=> 100 - * // logs 'x is 100' - * @symb R.tap(f, a) = a - */ - -var tap = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xtap, function tap(fn, x) { - fn(x); - return x; -})); - -export default tap; \ No newline at end of file diff --git a/node_modules/ramda/es/test.js b/node_modules/ramda/es/test.js deleted file mode 100644 index 7644f09..0000000 --- a/node_modules/ramda/es/test.js +++ /dev/null @@ -1,33 +0,0 @@ -import _cloneRegExp from "./internal/_cloneRegExp.js"; -import _curry2 from "./internal/_curry2.js"; -import _isRegExp from "./internal/_isRegExp.js"; -import toString from "./toString.js"; -/** - * Determines whether a given string matches a given regular expression. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category String - * @sig RegExp -> String -> Boolean - * @param {RegExp} pattern - * @param {String} str - * @return {Boolean} - * @see R.match - * @example - * - * R.test(/^x/, 'xyz'); //=> true - * R.test(/^y/, 'xyz'); //=> false - */ - -var test = -/*#__PURE__*/ -_curry2(function test(pattern, str) { - if (!_isRegExp(pattern)) { - throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + toString(pattern)); - } - - return _cloneRegExp(pattern).test(str); -}); - -export default test; \ No newline at end of file diff --git a/node_modules/ramda/es/thunkify.js b/node_modules/ramda/es/thunkify.js deleted file mode 100644 index 8cf55a1..0000000 --- a/node_modules/ramda/es/thunkify.js +++ /dev/null @@ -1,33 +0,0 @@ -import curryN from "./curryN.js"; -import _curry1 from "./internal/_curry1.js"; -/** - * Creates a thunk out of a function. A thunk delays a calculation until - * its result is needed, providing lazy evaluation of arguments. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig ((a, b, ..., j) -> k) -> (a, b, ..., j) -> (() -> k) - * @param {Function} fn A function to wrap in a thunk - * @return {Function} Expects arguments for `fn` and returns a new function - * that, when called, applies those arguments to `fn`. - * @see R.partial, R.partialRight - * @example - * - * R.thunkify(R.identity)(42)(); //=> 42 - * R.thunkify((a, b) => a + b)(25, 17)(); //=> 42 - */ - -var thunkify = -/*#__PURE__*/ -_curry1(function thunkify(fn) { - return curryN(fn.length, function createThunk() { - var fnArgs = arguments; - return function invokeThunk() { - return fn.apply(this, fnArgs); - }; - }); -}); - -export default thunkify; \ No newline at end of file diff --git a/node_modules/ramda/es/times.js b/node_modules/ramda/es/times.js deleted file mode 100644 index 0b29379..0000000 --- a/node_modules/ramda/es/times.js +++ /dev/null @@ -1,47 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Calls an input function `n` times, returning an array containing the results - * of those function calls. - * - * `fn` is passed one argument: The current value of `n`, which begins at `0` - * and is gradually incremented to `n - 1`. - * - * @func - * @memberOf R - * @since v0.2.3 - * @category List - * @sig (Number -> a) -> Number -> [a] - * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`. - * @param {Number} n A value between `0` and `n - 1`. Increments after each function call. - * @return {Array} An array containing the return values of all calls to `fn`. - * @see R.repeat - * @example - * - * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4] - * @symb R.times(f, 0) = [] - * @symb R.times(f, 1) = [f(0)] - * @symb R.times(f, 2) = [f(0), f(1)] - */ - -var times = -/*#__PURE__*/ -_curry2(function times(fn, n) { - var len = Number(n); - var idx = 0; - var list; - - if (len < 0 || isNaN(len)) { - throw new RangeError('n must be a non-negative number'); - } - - list = new Array(len); - - while (idx < len) { - list[idx] = fn(idx); - idx += 1; - } - - return list; -}); - -export default times; \ No newline at end of file diff --git a/node_modules/ramda/es/toLower.js b/node_modules/ramda/es/toLower.js deleted file mode 100644 index ae4b2d6..0000000 --- a/node_modules/ramda/es/toLower.js +++ /dev/null @@ -1,21 +0,0 @@ -import invoker from "./invoker.js"; -/** - * The lower case version of a string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category String - * @sig String -> String - * @param {String} str The string to lower case. - * @return {String} The lower case version of `str`. - * @see R.toUpper - * @example - * - * R.toLower('XYZ'); //=> 'xyz' - */ - -var toLower = -/*#__PURE__*/ -invoker(0, 'toLowerCase'); -export default toLower; \ No newline at end of file diff --git a/node_modules/ramda/es/toPairs.js b/node_modules/ramda/es/toPairs.js deleted file mode 100644 index ac84839..0000000 --- a/node_modules/ramda/es/toPairs.js +++ /dev/null @@ -1,36 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import _has from "./internal/_has.js"; -/** - * Converts an object into an array of key, value arrays. Only the object's - * own properties are used. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Object - * @sig {String: *} -> [[String,*]] - * @param {Object} obj The object to extract from - * @return {Array} An array of key, value arrays from the object's own properties. - * @see R.fromPairs - * @example - * - * R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]] - */ - -var toPairs = -/*#__PURE__*/ -_curry1(function toPairs(obj) { - var pairs = []; - - for (var prop in obj) { - if (_has(prop, obj)) { - pairs[pairs.length] = [prop, obj[prop]]; - } - } - - return pairs; -}); - -export default toPairs; \ No newline at end of file diff --git a/node_modules/ramda/es/toPairsIn.js b/node_modules/ramda/es/toPairsIn.js deleted file mode 100644 index c73a66c..0000000 --- a/node_modules/ramda/es/toPairsIn.js +++ /dev/null @@ -1,36 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -/** - * Converts an object into an array of key, value arrays. The object's own - * properties and prototype properties are used. Note that the order of the - * output array is not guaranteed to be consistent across different JS - * platforms. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Object - * @sig {String: *} -> [[String,*]] - * @param {Object} obj The object to extract from - * @return {Array} An array of key, value arrays from the object's own - * and prototype properties. - * @example - * - * const F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * const f = new F(); - * R.toPairsIn(f); //=> [['x','X'], ['y','Y']] - */ - -var toPairsIn = -/*#__PURE__*/ -_curry1(function toPairsIn(obj) { - var pairs = []; - - for (var prop in obj) { - pairs[pairs.length] = [prop, obj[prop]]; - } - - return pairs; -}); - -export default toPairsIn; \ No newline at end of file diff --git a/node_modules/ramda/es/toString.js b/node_modules/ramda/es/toString.js deleted file mode 100644 index 553e47a..0000000 --- a/node_modules/ramda/es/toString.js +++ /dev/null @@ -1,46 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import _toString from "./internal/_toString.js"; -/** - * Returns the string representation of the given value. `eval`'ing the output - * should result in a value equivalent to the input value. Many of the built-in - * `toString` methods do not satisfy this requirement. - * - * If the given value is an `[object Object]` with a `toString` method other - * than `Object.prototype.toString`, this method is invoked with no arguments - * to produce the return value. This means user-defined constructor functions - * can provide a suitable `toString` method. For example: - * - * function Point(x, y) { - * this.x = x; - * this.y = y; - * } - * - * Point.prototype.toString = function() { - * return 'new Point(' + this.x + ', ' + this.y + ')'; - * }; - * - * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)' - * - * @func - * @memberOf R - * @since v0.14.0 - * @category String - * @sig * -> String - * @param {*} val - * @return {String} - * @example - * - * R.toString(42); //=> '42' - * R.toString('abc'); //=> '"abc"' - * R.toString([1, 2, 3]); //=> '[1, 2, 3]' - * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}' - * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")' - */ - -var toString = -/*#__PURE__*/ -_curry1(function toString(val) { - return _toString(val, []); -}); - -export default toString; \ No newline at end of file diff --git a/node_modules/ramda/es/toUpper.js b/node_modules/ramda/es/toUpper.js deleted file mode 100644 index 63ae014..0000000 --- a/node_modules/ramda/es/toUpper.js +++ /dev/null @@ -1,21 +0,0 @@ -import invoker from "./invoker.js"; -/** - * The upper case version of a string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category String - * @sig String -> String - * @param {String} str The string to upper case. - * @return {String} The upper case version of `str`. - * @see R.toLower - * @example - * - * R.toUpper('abc'); //=> 'ABC' - */ - -var toUpper = -/*#__PURE__*/ -invoker(0, 'toUpperCase'); -export default toUpper; \ No newline at end of file diff --git a/node_modules/ramda/es/transduce.js b/node_modules/ramda/es/transduce.js deleted file mode 100644 index 7e63894..0000000 --- a/node_modules/ramda/es/transduce.js +++ /dev/null @@ -1,57 +0,0 @@ -import _reduce from "./internal/_reduce.js"; -import _xwrap from "./internal/_xwrap.js"; -import curryN from "./curryN.js"; -/** - * Initializes a transducer using supplied iterator function. Returns a single - * item by iterating through the list, successively calling the transformed - * iterator function and passing it an accumulator value and the current value - * from the array, and then passing the result to the next call. - * - * The iterator function receives two values: *(acc, value)*. It will be - * wrapped as a transformer to initialize the transducer. A transformer can be - * passed directly in place of an iterator function. In both cases, iteration - * may be stopped early with the [`R.reduced`](#reduced) function. - * - * A transducer is a function that accepts a transformer and returns a - * transformer and can be composed directly. - * - * A transformer is an an object that provides a 2-arity reducing iterator - * function, step, 0-arity initial value function, init, and 1-arity result - * extraction function, result. The step function is used as the iterator - * function in reduce. The result function is used to convert the final - * accumulator into the return type and in most cases is - * [`R.identity`](#identity). The init function can be used to provide an - * initial accumulator, but is ignored by transduce. - * - * The iteration is performed with [`R.reduce`](#reduce) after initializing the transducer. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig (c -> c) -> ((a, b) -> a) -> a -> [b] -> a - * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array. Wrapped as transformer, if necessary, and used to - * initialize the transducer - * @param {*} acc The initial accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.reduced, R.into - * @example - * - * const numbers = [1, 2, 3, 4]; - * const transducer = R.compose(R.map(R.add(1)), R.take(2)); - * R.transduce(transducer, R.flip(R.append), [], numbers); //=> [2, 3] - * - * const isOdd = (x) => x % 2 === 1; - * const firstOddTransducer = R.compose(R.filter(isOdd), R.take(1)); - * R.transduce(firstOddTransducer, R.flip(R.append), [], R.range(0, 100)); //=> [1] - */ - -var transduce = -/*#__PURE__*/ -curryN(4, function transduce(xf, fn, acc, list) { - return _reduce(xf(typeof fn === 'function' ? _xwrap(fn) : fn), acc, list); -}); -export default transduce; \ No newline at end of file diff --git a/node_modules/ramda/es/transpose.js b/node_modules/ramda/es/transpose.js deleted file mode 100644 index c914186..0000000 --- a/node_modules/ramda/es/transpose.js +++ /dev/null @@ -1,52 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -/** - * Transposes the rows and columns of a 2D list. - * When passed a list of `n` lists of length `x`, - * returns a list of `x` lists of length `n`. - * - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig [[a]] -> [[a]] - * @param {Array} list A 2D list - * @return {Array} A 2D list - * @example - * - * R.transpose([[1, 'a'], [2, 'b'], [3, 'c']]) //=> [[1, 2, 3], ['a', 'b', 'c']] - * R.transpose([[1, 2, 3], ['a', 'b', 'c']]) //=> [[1, 'a'], [2, 'b'], [3, 'c']] - * - * // If some of the rows are shorter than the following rows, their elements are skipped: - * R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]] - * @symb R.transpose([[a], [b], [c]]) = [a, b, c] - * @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]] - * @symb R.transpose([[a, b], [c]]) = [[a, c], [b]] - */ - -var transpose = -/*#__PURE__*/ -_curry1(function transpose(outerlist) { - var i = 0; - var result = []; - - while (i < outerlist.length) { - var innerlist = outerlist[i]; - var j = 0; - - while (j < innerlist.length) { - if (typeof result[j] === 'undefined') { - result[j] = []; - } - - result[j].push(innerlist[j]); - j += 1; - } - - i += 1; - } - - return result; -}); - -export default transpose; \ No newline at end of file diff --git a/node_modules/ramda/es/traverse.js b/node_modules/ramda/es/traverse.js deleted file mode 100644 index 5080f2b..0000000 --- a/node_modules/ramda/es/traverse.js +++ /dev/null @@ -1,37 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import map from "./map.js"; -import sequence from "./sequence.js"; -/** - * Maps an [Applicative](https://github.com/fantasyland/fantasy-land#applicative)-returning - * function over a [Traversable](https://github.com/fantasyland/fantasy-land#traversable), - * then uses [`sequence`](#sequence) to transform the resulting Traversable of Applicative - * into an Applicative of Traversable. - * - * Dispatches to the `traverse` method of the third argument, if present. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (Applicative f, Traversable t) => (a -> f a) -> (a -> f b) -> t a -> f (t b) - * @param {Function} of - * @param {Function} f - * @param {*} traversable - * @return {*} - * @see R.sequence - * @example - * - * // Returns `Maybe.Nothing` if the given divisor is `0` - * const safeDiv = n => d => d === 0 ? Maybe.Nothing() : Maybe.Just(n / d) - * - * R.traverse(Maybe.of, safeDiv(10), [2, 4, 5]); //=> Maybe.Just([5, 2.5, 2]) - * R.traverse(Maybe.of, safeDiv(10), [2, 0, 5]); //=> Maybe.Nothing - */ - -var traverse = -/*#__PURE__*/ -_curry3(function traverse(of, f, traversable) { - return typeof traversable['fantasy-land/traverse'] === 'function' ? traversable['fantasy-land/traverse'](f, of) : sequence(of, map(f, traversable)); -}); - -export default traverse; \ No newline at end of file diff --git a/node_modules/ramda/es/trim.js b/node_modules/ramda/es/trim.js deleted file mode 100644 index 683d617..0000000 --- a/node_modules/ramda/es/trim.js +++ /dev/null @@ -1,36 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + '\u2029\uFEFF'; -var zeroWidth = '\u200b'; -var hasProtoTrim = typeof String.prototype.trim === 'function'; -/** - * Removes (strips) whitespace from both ends of the string. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category String - * @sig String -> String - * @param {String} str The string to trim. - * @return {String} Trimmed version of `str`. - * @example - * - * R.trim(' xyz '); //=> 'xyz' - * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z'] - */ - -var trim = !hasProtoTrim || -/*#__PURE__*/ -ws.trim() || ! -/*#__PURE__*/ -zeroWidth.trim() ? -/*#__PURE__*/ -_curry1(function trim(str) { - var beginRx = new RegExp('^[' + ws + '][' + ws + ']*'); - var endRx = new RegExp('[' + ws + '][' + ws + ']*$'); - return str.replace(beginRx, '').replace(endRx, ''); -}) : -/*#__PURE__*/ -_curry1(function trim(str) { - return str.trim(); -}); -export default trim; \ No newline at end of file diff --git a/node_modules/ramda/es/tryCatch.js b/node_modules/ramda/es/tryCatch.js deleted file mode 100644 index d91a937..0000000 --- a/node_modules/ramda/es/tryCatch.js +++ /dev/null @@ -1,40 +0,0 @@ -import _arity from "./internal/_arity.js"; -import _concat from "./internal/_concat.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * `tryCatch` takes two functions, a `tryer` and a `catcher`. The returned - * function evaluates the `tryer`; if it does not throw, it simply returns the - * result. If the `tryer` *does* throw, the returned function evaluates the - * `catcher` function and returns its result. Note that for effective - * composition with this function, both the `tryer` and `catcher` functions - * must return the same type of results. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Function - * @sig (...x -> a) -> ((e, ...x) -> a) -> (...x -> a) - * @param {Function} tryer The function that may throw. - * @param {Function} catcher The function that will be evaluated if `tryer` throws. - * @return {Function} A new function that will catch exceptions and send then to the catcher. - * @example - * - * R.tryCatch(R.prop('x'), R.F)({x: true}); //=> true - * R.tryCatch(() => { throw 'foo'}, R.always('catched'))('bar') // => 'catched' - * R.tryCatch(R.times(R.identity), R.always([]))('s') // => [] - * R.tryCatch(() => { throw 'this is not a valid value'}, (err, value)=>({error : err, value }))('bar') // => {'error': 'this is not a valid value', 'value': 'bar'} - */ - -var tryCatch = -/*#__PURE__*/ -_curry2(function _tryCatch(tryer, catcher) { - return _arity(tryer.length, function () { - try { - return tryer.apply(this, arguments); - } catch (e) { - return catcher.apply(this, _concat([e], arguments)); - } - }); -}); - -export default tryCatch; \ No newline at end of file diff --git a/node_modules/ramda/es/type.js b/node_modules/ramda/es/type.js deleted file mode 100644 index 0ab2aab..0000000 --- a/node_modules/ramda/es/type.js +++ /dev/null @@ -1,34 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -/** - * Gives a single-word string description of the (native) type of a value, - * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not - * attempt to distinguish user Object types any further, reporting them all as - * 'Object'. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Type - * @sig (* -> {*}) -> String - * @param {*} val The value to test - * @return {String} - * @example - * - * R.type({}); //=> "Object" - * R.type(1); //=> "Number" - * R.type(false); //=> "Boolean" - * R.type('s'); //=> "String" - * R.type(null); //=> "Null" - * R.type([]); //=> "Array" - * R.type(/[A-z]/); //=> "RegExp" - * R.type(() => {}); //=> "Function" - * R.type(undefined); //=> "Undefined" - */ - -var type = -/*#__PURE__*/ -_curry1(function type(val) { - return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1); -}); - -export default type; \ No newline at end of file diff --git a/node_modules/ramda/es/unapply.js b/node_modules/ramda/es/unapply.js deleted file mode 100644 index 9d90321..0000000 --- a/node_modules/ramda/es/unapply.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -/** - * Takes a function `fn`, which takes a single array argument, and returns a - * function which: - * - * - takes any number of positional arguments; - * - passes these arguments to `fn` as an array; and - * - returns the result. - * - * In other words, `R.unapply` derives a variadic function from a function which - * takes an array. `R.unapply` is the inverse of [`R.apply`](#apply). - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Function - * @sig ([*...] -> a) -> (*... -> a) - * @param {Function} fn - * @return {Function} - * @see R.apply - * @example - * - * R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]' - * @symb R.unapply(f)(a, b) = f([a, b]) - */ - -var unapply = -/*#__PURE__*/ -_curry1(function unapply(fn) { - return function () { - return fn(Array.prototype.slice.call(arguments, 0)); - }; -}); - -export default unapply; \ No newline at end of file diff --git a/node_modules/ramda/es/unary.js b/node_modules/ramda/es/unary.js deleted file mode 100644 index fd7d4f1..0000000 --- a/node_modules/ramda/es/unary.js +++ /dev/null @@ -1,38 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import nAry from "./nAry.js"; -/** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly 1 parameter. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Function - * @sig (* -> b) -> (a -> b) - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity 1. - * @see R.binary, R.nAry - * @example - * - * const takesTwoArgs = function(a, b) { - * return [a, b]; - * }; - * takesTwoArgs.length; //=> 2 - * takesTwoArgs(1, 2); //=> [1, 2] - * - * const takesOneArg = R.unary(takesTwoArgs); - * takesOneArg.length; //=> 1 - * // Only 1 argument is passed to the wrapped function - * takesOneArg(1, 2); //=> [1, undefined] - * @symb R.unary(f)(a, b, c) = f(a) - */ - -var unary = -/*#__PURE__*/ -_curry1(function unary(fn) { - return nAry(1, fn); -}); - -export default unary; \ No newline at end of file diff --git a/node_modules/ramda/es/uncurryN.js b/node_modules/ramda/es/uncurryN.js deleted file mode 100644 index 0bbcb03..0000000 --- a/node_modules/ramda/es/uncurryN.js +++ /dev/null @@ -1,43 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import curryN from "./curryN.js"; -/** - * Returns a function of arity `n` from a (manually) curried function. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Function - * @sig Number -> (a -> b) -> (a -> c) - * @param {Number} length The arity for the returned function. - * @param {Function} fn The function to uncurry. - * @return {Function} A new function. - * @see R.curry - * @example - * - * const addFour = a => b => c => d => a + b + c + d; - * - * const uncurriedAddFour = R.uncurryN(4, addFour); - * uncurriedAddFour(1, 2, 3, 4); //=> 10 - */ - -var uncurryN = -/*#__PURE__*/ -_curry2(function uncurryN(depth, fn) { - return curryN(depth, function () { - var currentDepth = 1; - var value = fn; - var idx = 0; - var endIdx; - - while (currentDepth <= depth && typeof value === 'function') { - endIdx = currentDepth === depth ? arguments.length : idx + value.length; - value = value.apply(this, Array.prototype.slice.call(arguments, idx, endIdx)); - currentDepth += 1; - idx = endIdx; - } - - return value; - }); -}); - -export default uncurryN; \ No newline at end of file diff --git a/node_modules/ramda/es/unfold.js b/node_modules/ramda/es/unfold.js deleted file mode 100644 index b4f7ca2..0000000 --- a/node_modules/ramda/es/unfold.js +++ /dev/null @@ -1,42 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Builds a list from a seed value. Accepts an iterator function, which returns - * either false to stop iteration or an array of length 2 containing the value - * to add to the resulting list and the seed to be used in the next call to the - * iterator function. - * - * The iterator function receives one argument: *(seed)*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig (a -> [b]) -> * -> [b] - * @param {Function} fn The iterator function. receives one argument, `seed`, and returns - * either false to quit iteration or an array of length two to proceed. The element - * at index 0 of this array will be added to the resulting array, and the element - * at index 1 will be passed to the next call to `fn`. - * @param {*} seed The seed value. - * @return {Array} The final list. - * @example - * - * const f = n => n > 50 ? false : [-n, n + 10]; - * R.unfold(f, 10); //=> [-10, -20, -30, -40, -50] - * @symb R.unfold(f, x) = [f(x)[0], f(f(x)[1])[0], f(f(f(x)[1])[1])[0], ...] - */ - -var unfold = -/*#__PURE__*/ -_curry2(function unfold(fn, seed) { - var pair = fn(seed); - var result = []; - - while (pair && pair.length) { - result[result.length] = pair[0]; - pair = fn(pair[1]); - } - - return result; -}); - -export default unfold; \ No newline at end of file diff --git a/node_modules/ramda/es/union.js b/node_modules/ramda/es/union.js deleted file mode 100644 index 15fd45d..0000000 --- a/node_modules/ramda/es/union.js +++ /dev/null @@ -1,29 +0,0 @@ -import _concat from "./internal/_concat.js"; -import _curry2 from "./internal/_curry2.js"; -import compose from "./compose.js"; -import uniq from "./uniq.js"; -/** - * Combines two lists into a set (i.e. no duplicates) composed of the elements - * of each list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} as The first list. - * @param {Array} bs The second list. - * @return {Array} The first and second lists concatenated, with - * duplicates removed. - * @example - * - * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4] - */ - -var union = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -compose(uniq, _concat)); - -export default union; \ No newline at end of file diff --git a/node_modules/ramda/es/unionWith.js b/node_modules/ramda/es/unionWith.js deleted file mode 100644 index c3f3ba0..0000000 --- a/node_modules/ramda/es/unionWith.js +++ /dev/null @@ -1,33 +0,0 @@ -import _concat from "./internal/_concat.js"; -import _curry3 from "./internal/_curry3.js"; -import uniqWith from "./uniqWith.js"; -/** - * Combines two lists into a set (i.e. no duplicates) composed of the elements - * of each list. Duplication is determined according to the value returned by - * applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [*] -> [*] -> [*] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The first and second lists concatenated, with - * duplicates removed. - * @see R.union - * @example - * - * const l1 = [{a: 1}, {a: 2}]; - * const l2 = [{a: 1}, {a: 4}]; - * R.unionWith(R.eqBy(R.prop('a')), l1, l2); //=> [{a: 1}, {a: 2}, {a: 4}] - */ - -var unionWith = -/*#__PURE__*/ -_curry3(function unionWith(pred, list1, list2) { - return uniqWith(pred, _concat(list1, list2)); -}); - -export default unionWith; \ No newline at end of file diff --git a/node_modules/ramda/es/uniq.js b/node_modules/ramda/es/uniq.js deleted file mode 100644 index 2b751bb..0000000 --- a/node_modules/ramda/es/uniq.js +++ /dev/null @@ -1,24 +0,0 @@ -import identity from "./identity.js"; -import uniqBy from "./uniqBy.js"; -/** - * Returns a new list containing only one copy of each element in the original - * list. [`R.equals`](#equals) is used to determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * R.uniq([1, 1, 2, 1]); //=> [1, 2] - * R.uniq([1, '1']); //=> [1, '1'] - * R.uniq([[42], [42]]); //=> [[42]] - */ - -var uniq = -/*#__PURE__*/ -uniqBy(identity); -export default uniq; \ No newline at end of file diff --git a/node_modules/ramda/es/uniqBy.js b/node_modules/ramda/es/uniqBy.js deleted file mode 100644 index 9dd0de7..0000000 --- a/node_modules/ramda/es/uniqBy.js +++ /dev/null @@ -1,44 +0,0 @@ -import _Set from "./internal/_Set.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Returns a new list containing only one copy of each element in the original - * list, based upon the value returned by applying the supplied function to - * each list element. Prefers the first item if the supplied function produces - * the same value on two items. [`R.equals`](#equals) is used for comparison. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> b) -> [a] -> [a] - * @param {Function} fn A function used to produce a value to use during comparisons. - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10] - */ - -var uniqBy = -/*#__PURE__*/ -_curry2(function uniqBy(fn, list) { - var set = new _Set(); - var result = []; - var idx = 0; - var appliedItem, item; - - while (idx < list.length) { - item = list[idx]; - appliedItem = fn(item); - - if (set.add(appliedItem)) { - result.push(item); - } - - idx += 1; - } - - return result; -}); - -export default uniqBy; \ No newline at end of file diff --git a/node_modules/ramda/es/uniqWith.js b/node_modules/ramda/es/uniqWith.js deleted file mode 100644 index 534a379..0000000 --- a/node_modules/ramda/es/uniqWith.js +++ /dev/null @@ -1,47 +0,0 @@ -import _includesWith from "./internal/_includesWith.js"; -import _curry2 from "./internal/_curry2.js"; -/** - * Returns a new list containing only one copy of each element in the original - * list, based upon the value returned by applying the supplied predicate to - * two list elements. Prefers the first item if two items compare equal based - * on the predicate. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category List - * @sig ((a, a) -> Boolean) -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * const strEq = R.eqBy(String); - * R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2] - * R.uniqWith(strEq)([{}, {}]); //=> [{}] - * R.uniqWith(strEq)([1, '1', 1]); //=> [1] - * R.uniqWith(strEq)(['1', 1, 1]); //=> ['1'] - */ - -var uniqWith = -/*#__PURE__*/ -_curry2(function uniqWith(pred, list) { - var idx = 0; - var len = list.length; - var result = []; - var item; - - while (idx < len) { - item = list[idx]; - - if (!_includesWith(pred, item, result)) { - result[result.length] = item; - } - - idx += 1; - } - - return result; -}); - -export default uniqWith; \ No newline at end of file diff --git a/node_modules/ramda/es/unless.js b/node_modules/ramda/es/unless.js deleted file mode 100644 index 8b63057..0000000 --- a/node_modules/ramda/es/unless.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Tests the final argument by passing it to the given predicate function. If - * the predicate is not satisfied, the function will return the result of - * calling the `whenFalseFn` function with the same argument. If the predicate - * is satisfied, the argument is returned as is. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} whenFalseFn A function to invoke when the `pred` evaluates - * to a falsy value. - * @param {*} x An object to test with the `pred` function and - * pass to `whenFalseFn` if necessary. - * @return {*} Either `x` or the result of applying `x` to `whenFalseFn`. - * @see R.ifElse, R.when, R.cond - * @example - * - * let safeInc = R.unless(R.isNil, R.inc); - * safeInc(null); //=> null - * safeInc(1); //=> 2 - */ - -var unless = -/*#__PURE__*/ -_curry3(function unless(pred, whenFalseFn, x) { - return pred(x) ? x : whenFalseFn(x); -}); - -export default unless; \ No newline at end of file diff --git a/node_modules/ramda/es/unnest.js b/node_modules/ramda/es/unnest.js deleted file mode 100644 index 718d010..0000000 --- a/node_modules/ramda/es/unnest.js +++ /dev/null @@ -1,24 +0,0 @@ -import _identity from "./internal/_identity.js"; -import chain from "./chain.js"; -/** - * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from - * any [Chain](https://github.com/fantasyland/fantasy-land#chain). - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig Chain c => c (c a) -> c a - * @param {*} list - * @return {*} - * @see R.flatten, R.chain - * @example - * - * R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]] - * R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6] - */ - -var unnest = -/*#__PURE__*/ -chain(_identity); -export default unnest; \ No newline at end of file diff --git a/node_modules/ramda/es/until.js b/node_modules/ramda/es/until.js deleted file mode 100644 index abb744e..0000000 --- a/node_modules/ramda/es/until.js +++ /dev/null @@ -1,34 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Takes a predicate, a transformation function, and an initial value, - * and returns a value of the same type as the initial value. - * It does so by applying the transformation until the predicate is satisfied, - * at which point it returns the satisfactory value. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} fn The iterator function - * @param {*} init Initial value - * @return {*} Final value that satisfies predicate - * @example - * - * R.until(R.gt(R.__, 100), R.multiply(2))(1) // => 128 - */ - -var until = -/*#__PURE__*/ -_curry3(function until(pred, fn, init) { - var val = init; - - while (!pred(val)) { - val = fn(val); - } - - return val; -}); - -export default until; \ No newline at end of file diff --git a/node_modules/ramda/es/update.js b/node_modules/ramda/es/update.js deleted file mode 100644 index 7f8a5bd..0000000 --- a/node_modules/ramda/es/update.js +++ /dev/null @@ -1,33 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -import adjust from "./adjust.js"; -import always from "./always.js"; -/** - * Returns a new copy of the array with the element at the provided index - * replaced with the given value. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig Number -> a -> [a] -> [a] - * @param {Number} idx The index to update. - * @param {*} x The value to exist at the given index of the returned array. - * @param {Array|Arguments} list The source array-like object to be updated. - * @return {Array} A copy of `list` with the value at index `idx` replaced with `x`. - * @see R.adjust - * @example - * - * R.update(1, '_', ['a', 'b', 'c']); //=> ['a', '_', 'c'] - * R.update(-1, '_', ['a', 'b', 'c']); //=> ['a', 'b', '_'] - * @symb R.update(-1, a, [b, c]) = [b, a] - * @symb R.update(0, a, [b, c]) = [a, c] - * @symb R.update(1, a, [b, c]) = [b, a] - */ - -var update = -/*#__PURE__*/ -_curry3(function update(idx, x, list) { - return adjust(idx, always(x), list); -}); - -export default update; \ No newline at end of file diff --git a/node_modules/ramda/es/useWith.js b/node_modules/ramda/es/useWith.js deleted file mode 100644 index 550c170..0000000 --- a/node_modules/ramda/es/useWith.js +++ /dev/null @@ -1,49 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import curryN from "./curryN.js"; -/** - * Accepts a function `fn` and a list of transformer functions and returns a - * new curried function. When the new function is invoked, it calls the - * function `fn` with parameters consisting of the result of calling each - * supplied handler on successive arguments to the new function. - * - * If more arguments are passed to the returned function than transformer - * functions, those arguments are passed directly to `fn` as additional - * parameters. If you expect additional arguments that don't need to be - * transformed, although you can ignore them, it's best to pass an identity - * function so that the new function reports the correct arity. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((x1, x2, ...) -> z) -> [(a -> x1), (b -> x2), ...] -> (a -> b -> ... -> z) - * @param {Function} fn The function to wrap. - * @param {Array} transformers A list of transformer functions - * @return {Function} The wrapped function. - * @see R.converge - * @example - * - * R.useWith(Math.pow, [R.identity, R.identity])(3, 4); //=> 81 - * R.useWith(Math.pow, [R.identity, R.identity])(3)(4); //=> 81 - * R.useWith(Math.pow, [R.dec, R.inc])(3, 4); //=> 32 - * R.useWith(Math.pow, [R.dec, R.inc])(3)(4); //=> 32 - * @symb R.useWith(f, [g, h])(a, b) = f(g(a), h(b)) - */ - -var useWith = -/*#__PURE__*/ -_curry2(function useWith(fn, transformers) { - return curryN(transformers.length, function () { - var args = []; - var idx = 0; - - while (idx < transformers.length) { - args.push(transformers[idx].call(this, arguments[idx])); - idx += 1; - } - - return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, transformers.length))); - }); -}); - -export default useWith; \ No newline at end of file diff --git a/node_modules/ramda/es/values.js b/node_modules/ramda/es/values.js deleted file mode 100644 index 432f019..0000000 --- a/node_modules/ramda/es/values.js +++ /dev/null @@ -1,37 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -import keys from "./keys.js"; -/** - * Returns a list of all the enumerable own properties of the supplied object. - * Note that the order of the output array is not guaranteed across different - * JS platforms. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> [v] - * @param {Object} obj The object to extract values from - * @return {Array} An array of the values of the object's own properties. - * @see R.valuesIn, R.keys - * @example - * - * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3] - */ - -var values = -/*#__PURE__*/ -_curry1(function values(obj) { - var props = keys(obj); - var len = props.length; - var vals = []; - var idx = 0; - - while (idx < len) { - vals[idx] = obj[props[idx]]; - idx += 1; - } - - return vals; -}); - -export default values; \ No newline at end of file diff --git a/node_modules/ramda/es/valuesIn.js b/node_modules/ramda/es/valuesIn.js deleted file mode 100644 index e419304..0000000 --- a/node_modules/ramda/es/valuesIn.js +++ /dev/null @@ -1,37 +0,0 @@ -import _curry1 from "./internal/_curry1.js"; -/** - * Returns a list of all the properties, including prototype properties, of the - * supplied object. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @sig {k: v} -> [v] - * @param {Object} obj The object to extract values from - * @return {Array} An array of the values of the object's own and prototype properties. - * @see R.values, R.keysIn - * @example - * - * const F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * const f = new F(); - * R.valuesIn(f); //=> ['X', 'Y'] - */ - -var valuesIn = -/*#__PURE__*/ -_curry1(function valuesIn(obj) { - var prop; - var vs = []; - - for (prop in obj) { - vs[vs.length] = obj[prop]; - } - - return vs; -}); - -export default valuesIn; \ No newline at end of file diff --git a/node_modules/ramda/es/view.js b/node_modules/ramda/es/view.js deleted file mode 100644 index c6a1374..0000000 --- a/node_modules/ramda/es/view.js +++ /dev/null @@ -1,42 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; // `Const` is a functor that effectively ignores the function given to `map`. - -var Const = function (x) { - return { - value: x, - 'fantasy-land/map': function () { - return this; - } - }; -}; -/** - * Returns a "view" of the given data structure, determined by the given lens. - * The lens's focus determines which portion of the data structure is visible. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> s -> a - * @param {Lens} lens - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * const xLens = R.lensProp('x'); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.view(xLens, {x: 4, y: 2}); //=> 4 - */ - - -var view = -/*#__PURE__*/ -_curry2(function view(lens, x) { - // Using `Const` effectively ignores the setter function of the `lens`, - // leaving the value returned by the getter function unmodified. - return lens(Const)(x).value; -}); - -export default view; \ No newline at end of file diff --git a/node_modules/ramda/es/when.js b/node_modules/ramda/es/when.js deleted file mode 100644 index e7b8796..0000000 --- a/node_modules/ramda/es/when.js +++ /dev/null @@ -1,37 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Tests the final argument by passing it to the given predicate function. If - * the predicate is satisfied, the function will return the result of calling - * the `whenTrueFn` function with the same argument. If the predicate is not - * satisfied, the argument is returned as is. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} whenTrueFn A function to invoke when the `condition` - * evaluates to a truthy value. - * @param {*} x An object to test with the `pred` function and - * pass to `whenTrueFn` if necessary. - * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`. - * @see R.ifElse, R.unless, R.cond - * @example - * - * // truncate :: String -> String - * const truncate = R.when( - * R.propSatisfies(R.gt(R.__, 10), 'length'), - * R.pipe(R.take(10), R.append('…'), R.join('')) - * ); - * truncate('12345'); //=> '12345' - * truncate('0123456789ABC'); //=> '0123456789…' - */ - -var when = -/*#__PURE__*/ -_curry3(function when(pred, whenTrueFn, x) { - return pred(x) ? whenTrueFn(x) : x; -}); - -export default when; \ No newline at end of file diff --git a/node_modules/ramda/es/where.js b/node_modules/ramda/es/where.js deleted file mode 100644 index deb4058..0000000 --- a/node_modules/ramda/es/where.js +++ /dev/null @@ -1,51 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import _has from "./internal/_has.js"; -/** - * Takes a spec object and a test object; returns true if the test satisfies - * the spec. Each of the spec's own properties must be a predicate function. - * Each predicate is applied to the value of the corresponding property of the - * test object. `where` returns true if all the predicates return true, false - * otherwise. - * - * `where` is well suited to declaratively expressing constraints for other - * functions such as [`filter`](#filter) and [`find`](#find). - * - * @func - * @memberOf R - * @since v0.1.1 - * @category Object - * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean - * @param {Object} spec - * @param {Object} testObj - * @return {Boolean} - * @see R.propSatisfies, R.whereEq - * @example - * - * // pred :: Object -> Boolean - * const pred = R.where({ - * a: R.equals('foo'), - * b: R.complement(R.equals('bar')), - * x: R.gt(R.__, 10), - * y: R.lt(R.__, 20) - * }); - * - * pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true - * pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false - * pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false - * pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false - * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false - */ - -var where = -/*#__PURE__*/ -_curry2(function where(spec, testObj) { - for (var prop in spec) { - if (_has(prop, spec) && !spec[prop](testObj[prop])) { - return false; - } - } - - return true; -}); - -export default where; \ No newline at end of file diff --git a/node_modules/ramda/es/whereEq.js b/node_modules/ramda/es/whereEq.js deleted file mode 100644 index 60ec210..0000000 --- a/node_modules/ramda/es/whereEq.js +++ /dev/null @@ -1,40 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -import equals from "./equals.js"; -import map from "./map.js"; -import where from "./where.js"; -/** - * Takes a spec object and a test object; returns true if the test satisfies - * the spec, false otherwise. An object satisfies the spec if, for each of the - * spec's own properties, accessing that property of the object gives the same - * value (in [`R.equals`](#equals) terms) as accessing that property of the - * spec. - * - * `whereEq` is a specialization of [`where`](#where). - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @sig {String: *} -> {String: *} -> Boolean - * @param {Object} spec - * @param {Object} testObj - * @return {Boolean} - * @see R.propEq, R.where - * @example - * - * // pred :: Object -> Boolean - * const pred = R.whereEq({a: 1, b: 2}); - * - * pred({a: 1}); //=> false - * pred({a: 1, b: 2}); //=> true - * pred({a: 1, b: 2, c: 3}); //=> true - * pred({a: 1, b: 1}); //=> false - */ - -var whereEq = -/*#__PURE__*/ -_curry2(function whereEq(spec, testObj) { - return where(map(equals, spec), testObj); -}); - -export default whereEq; \ No newline at end of file diff --git a/node_modules/ramda/es/without.js b/node_modules/ramda/es/without.js deleted file mode 100644 index 695bd29..0000000 --- a/node_modules/ramda/es/without.js +++ /dev/null @@ -1,31 +0,0 @@ -import _includes from "./internal/_includes.js"; -import _curry2 from "./internal/_curry2.js"; -import flip from "./flip.js"; -import reject from "./reject.js"; -/** - * Returns a new list without values in the first argument. - * [`R.equals`](#equals) is used to determine equality. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig [a] -> [a] -> [a] - * @param {Array} list1 The values to be removed from `list2`. - * @param {Array} list2 The array to remove values from. - * @return {Array} The new array without values in `list1`. - * @see R.transduce, R.difference, R.remove - * @example - * - * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4] - */ - -var without = -/*#__PURE__*/ -_curry2(function (xs, list) { - return reject(flip(_includes)(xs), list); -}); - -export default without; \ No newline at end of file diff --git a/node_modules/ramda/es/xor.js b/node_modules/ramda/es/xor.js deleted file mode 100644 index 6d63a7e..0000000 --- a/node_modules/ramda/es/xor.js +++ /dev/null @@ -1,30 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Exclusive disjunction logical operation. - * Returns `true` if one of the arguments is truthy and the other is falsy. - * Otherwise, it returns `false`. - * - * @func - * @memberOf R - * @since v0.27.1 - * @category Logic - * @sig a -> b -> Boolean - * @param {Any} a - * @param {Any} b - * @return {Boolean} true if one of the arguments is truthy and the other is falsy - * @see R.or, R.and - * @example - * - * R.xor(true, true); //=> false - * R.xor(true, false); //=> true - * R.xor(false, true); //=> true - * R.xor(false, false); //=> false - */ - -var xor = -/*#__PURE__*/ -_curry2(function xor(a, b) { - return Boolean(!a ^ !b); -}); - -export default xor; \ No newline at end of file diff --git a/node_modules/ramda/es/xprod.js b/node_modules/ramda/es/xprod.js deleted file mode 100644 index c831017..0000000 --- a/node_modules/ramda/es/xprod.js +++ /dev/null @@ -1,45 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Creates a new list out of the two supplied by creating each possible pair - * from the lists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] -> [[a,b]] - * @param {Array} as The first list. - * @param {Array} bs The second list. - * @return {Array} The list made by combining each possible pair from - * `as` and `bs` into pairs (`[a, b]`). - * @example - * - * R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] - * @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]] - */ - -var xprod = -/*#__PURE__*/ -_curry2(function xprod(a, b) { - // = xprodWith(prepend); (takes about 3 times as long...) - var idx = 0; - var ilen = a.length; - var j; - var jlen = b.length; - var result = []; - - while (idx < ilen) { - j = 0; - - while (j < jlen) { - result[result.length] = [a[idx], b[j]]; - j += 1; - } - - idx += 1; - } - - return result; -}); - -export default xprod; \ No newline at end of file diff --git a/node_modules/ramda/es/zip.js b/node_modules/ramda/es/zip.js deleted file mode 100644 index 22da39c..0000000 --- a/node_modules/ramda/es/zip.js +++ /dev/null @@ -1,37 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Creates a new list out of the two supplied by pairing up equally-positioned - * items from both lists. The returned list is truncated to the length of the - * shorter of the two input lists. - * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] -> [[a,b]] - * @param {Array} list1 The first array to consider. - * @param {Array} list2 The second array to consider. - * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`. - * @example - * - * R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']] - * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]] - */ - -var zip = -/*#__PURE__*/ -_curry2(function zip(a, b) { - var rv = []; - var idx = 0; - var len = Math.min(a.length, b.length); - - while (idx < len) { - rv[idx] = [a[idx], b[idx]]; - idx += 1; - } - - return rv; -}); - -export default zip; \ No newline at end of file diff --git a/node_modules/ramda/es/zipObj.js b/node_modules/ramda/es/zipObj.js deleted file mode 100644 index e8aca45..0000000 --- a/node_modules/ramda/es/zipObj.js +++ /dev/null @@ -1,35 +0,0 @@ -import _curry2 from "./internal/_curry2.js"; -/** - * Creates a new object out of a list of keys and a list of values. - * Key/value pairing is truncated to the length of the shorter of the two lists. - * Note: `zipObj` is equivalent to `pipe(zip, fromPairs)`. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [String] -> [*] -> {String: *} - * @param {Array} keys The array that will be properties on the output object. - * @param {Array} values The list of values on the output object. - * @return {Object} The object made by pairing up same-indexed elements of `keys` and `values`. - * @example - * - * R.zipObj(['a', 'b', 'c'], [1, 2, 3]); //=> {a: 1, b: 2, c: 3} - */ - -var zipObj = -/*#__PURE__*/ -_curry2(function zipObj(keys, values) { - var idx = 0; - var len = Math.min(keys.length, values.length); - var out = {}; - - while (idx < len) { - out[keys[idx]] = values[idx]; - idx += 1; - } - - return out; -}); - -export default zipObj; \ No newline at end of file diff --git a/node_modules/ramda/es/zipWith.js b/node_modules/ramda/es/zipWith.js deleted file mode 100644 index 4901cd5..0000000 --- a/node_modules/ramda/es/zipWith.js +++ /dev/null @@ -1,42 +0,0 @@ -import _curry3 from "./internal/_curry3.js"; -/** - * Creates a new list out of the two supplied by applying the function to each - * equally-positioned pair in the lists. The returned list is truncated to the - * length of the shorter of the two input lists. - * - * @function - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, b) -> c) -> [a] -> [b] -> [c] - * @param {Function} fn The function used to combine the two elements into one value. - * @param {Array} list1 The first array to consider. - * @param {Array} list2 The second array to consider. - * @return {Array} The list made by combining same-indexed elements of `list1` and `list2` - * using `fn`. - * @example - * - * const f = (x, y) => { - * // ... - * }; - * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']); - * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')] - * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)] - */ - -var zipWith = -/*#__PURE__*/ -_curry3(function zipWith(fn, a, b) { - var rv = []; - var idx = 0; - var len = Math.min(a.length, b.length); - - while (idx < len) { - rv[idx] = fn(a[idx], b[idx]); - idx += 1; - } - - return rv; -}); - -export default zipWith; \ No newline at end of file diff --git a/node_modules/ramda/package.json b/node_modules/ramda/package.json deleted file mode 100644 index 145995b..0000000 --- a/node_modules/ramda/package.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "_from": "ramda@0.27.1", - "_id": "ramda@0.27.1", - "_inBundle": false, - "_integrity": "sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==", - "_location": "/ramda", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "ramda@0.27.1", - "name": "ramda", - "escapedName": "ramda", - "rawSpec": "0.27.1", - "saveSpec": null, - "fetchSpec": "0.27.1" - }, - "_requiredBy": [ - "/docker-hub-utils" - ], - "_resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.1.tgz", - "_shasum": "66fc2df3ef873874ffc2da6aa8984658abacf5c9", - "_spec": "ramda@0.27.1", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/docker-hub-utils", - "author": { - "name": "Scott Sauyet", - "email": "scott@sauyet.com", - "url": "scott.sauyet.com" - }, - "bugs": { - "url": "https://github.com/ramda/ramda/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Michael Hurley", - "email": "mh@buzzdecafe.com", - "url": "http://buzzdecafe.com" - }, - { - "name": "Scott Sauyet", - "email": "scott@sauyet.com", - "url": "http://fr.umio.us" - }, - { - "name": "David Chambers", - "email": "dc@davidchambers.me", - "url": "http://davidchambers.me" - }, - { - "name": "Graeme Yeates", - "email": "yeatesgraeme@gmail.com", - "url": "https://github.com/megawac" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "A practical functional library for JavaScript programmers.", - "devDependencies": { - "@babel/cli": "^7.4.4", - "@babel/core": "^7.4.5", - "@babel/register": "^7.4.4", - "@babel/types": "^7.4.4", - "babel-plugin-annotate-pure-calls": "^0.4.0", - "babel-plugin-import-export-rename": "^1.0.1", - "babelify": "^10.0.0", - "benchmark": "~1.0.0", - "browserify": "https://api.github.com/repos/browserify/browserify/tarball/9ff7c55cc67a7ddbc64f8e7270bcd75fcc72ce2f", - "cli-table": "0.3.x", - "cross-env": "^5.2.0", - "dox": "latest", - "envvar": "^2.0.0", - "eslint": "^5.16.0", - "handlebars": ">=4.1.2", - "istanbul": "^0.4.x", - "js-yaml": "^3.13.1", - "jsverify": "^0.8.4", - "mocha": "^6.1.4", - "ramda": "0.17.x", - "rimraf": "^2.6.3", - "rollup": "^0.68.2", - "rollup-plugin-uglify": "^6.0.2", - "sanctuary": "0.7.x", - "sinon": "^7.3.2", - "testem": "^2.16.0", - "xyz": "^3.0.0" - }, - "files": [ - "es", - "src", - "dist" - ], - "homepage": "https://ramdajs.com/", - "jsdelivr": "dist/ramda.min.js", - "keywords": [ - "ramda", - "functional", - "utils", - "utilities", - "toolkit", - "fp", - "tacit", - "point-free", - "curried", - "pure", - "fantasy-land" - ], - "license": "MIT", - "main": "src/index", - "module": "es/index.js", - "name": "ramda", - "repository": { - "type": "git", - "url": "git://github.com/ramda/ramda.git" - }, - "scripts": { - "bench": "node scripts/benchRunner", - "bookmarklet": "node scripts/bookmarklet", - "browser_test": "testem ci", - "build": "npm run build:es && npm run build:cjs && npm run build:umd && npm run build:umd:min && npm run build:mjs", - "build:cjs": "cross-env BABEL_ENV=cjs babel source --out-dir src", - "build:es": "cross-env BABEL_ENV=es babel source --out-dir es", - "build:mjs": "cross-env BABEL_ENV=es babel source/index.js --out-file src/index.mjs", - "build:umd": "cross-env NODE_ENV=development rollup -c -o dist/ramda.js", - "build:umd:min": "cross-env NODE_ENV=production rollup -c -o dist/ramda.min.js", - "clean": "rimraf es/* src/* dist/* coverage/*", - "coverage": "istanbul cover node_modules/.bin/_mocha -- --reporter spec", - "lint": "eslint scripts/bookmarklet scripts/*.js source/*.js source/internal/*.js test/*.js test/**/*.js lib/sauce/*.js lib/bench/*.js", - "partial-build": "node ./scripts/partialBuild", - "prebench": "npm run --silent build:cjs", - "prepare": "npm run clean && npm run build", - "test": "cross-env BABEL_ENV=cjs mocha --require @babel/register --reporter spec" - }, - "sideEffects": false, - "unpkg": "dist/ramda.min.js", - "version": "0.27.1" -} diff --git a/node_modules/ramda/src/F.js b/node_modules/ramda/src/F.js deleted file mode 100644 index 25aa99e..0000000 --- a/node_modules/ramda/src/F.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * A function that always returns `false`. Any passed in parameters are ignored. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig * -> Boolean - * @param {*} - * @return {Boolean} - * @see R.T - * @example - * - * R.F(); //=> false - */ -var F = function () { - return false; -}; - -module.exports = F; \ No newline at end of file diff --git a/node_modules/ramda/src/T.js b/node_modules/ramda/src/T.js deleted file mode 100644 index 74df5e7..0000000 --- a/node_modules/ramda/src/T.js +++ /dev/null @@ -1,20 +0,0 @@ -/** - * A function that always returns `true`. Any passed in parameters are ignored. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig * -> Boolean - * @param {*} - * @return {Boolean} - * @see R.F - * @example - * - * R.T(); //=> true - */ -var T = function () { - return true; -}; - -module.exports = T; \ No newline at end of file diff --git a/node_modules/ramda/src/__.js b/node_modules/ramda/src/__.js deleted file mode 100644 index 539415e..0000000 --- a/node_modules/ramda/src/__.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * A special placeholder value used to specify "gaps" within curried functions, - * allowing partial application of any combination of arguments, regardless of - * their positions. - * - * If `g` is a curried ternary function and `_` is `R.__`, the following are - * equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2, _)(1, 3)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @name __ - * @constant - * @memberOf R - * @since v0.6.0 - * @category Function - * @example - * - * const greet = R.replace('{name}', R.__, 'Hello, {name}!'); - * greet('Alice'); //=> 'Hello, Alice!' - */ -module.exports = { - '@@functional/placeholder': true -}; \ No newline at end of file diff --git a/node_modules/ramda/src/add.js b/node_modules/ramda/src/add.js deleted file mode 100644 index 30bb37c..0000000 --- a/node_modules/ramda/src/add.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Adds two values. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a - * @param {Number} b - * @return {Number} - * @see R.subtract - * @example - * - * R.add(2, 3); //=> 5 - * R.add(7)(10); //=> 17 - */ - - -var add = -/*#__PURE__*/ -_curry2(function add(a, b) { - return Number(a) + Number(b); -}); - -module.exports = add; \ No newline at end of file diff --git a/node_modules/ramda/src/addIndex.js b/node_modules/ramda/src/addIndex.js deleted file mode 100644 index 2df4dfd..0000000 --- a/node_modules/ramda/src/addIndex.js +++ /dev/null @@ -1,57 +0,0 @@ -var _concat = -/*#__PURE__*/ -require("./internal/_concat"); - -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); -/** - * Creates a new list iteration function from an existing one by adding two new - * parameters to its callback function: the current index, and the entire list. - * - * This would turn, for instance, [`R.map`](#map) function into one that - * more closely resembles `Array.prototype.map`. Note that this will only work - * for functions in which the iteration callback function is the first - * parameter, and where the list is the last parameter. (This latter might be - * unimportant if the list parameter is not used.) - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Function - * @category List - * @sig ((a ... -> b) ... -> [a] -> *) -> ((a ..., Int, [a] -> b) ... -> [a] -> *) - * @param {Function} fn A list iteration function that does not pass index or list to its callback - * @return {Function} An altered list iteration function that passes (item, index, list) to its callback - * @example - * - * const mapIndexed = R.addIndex(R.map); - * mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']); - * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r'] - */ - - -var addIndex = -/*#__PURE__*/ -_curry1(function addIndex(fn) { - return curryN(fn.length, function () { - var idx = 0; - var origFn = arguments[0]; - var list = arguments[arguments.length - 1]; - var args = Array.prototype.slice.call(arguments, 0); - - args[0] = function () { - var result = origFn.apply(this, _concat(arguments, [idx, list])); - idx += 1; - return result; - }; - - return fn.apply(this, args); - }); -}); - -module.exports = addIndex; \ No newline at end of file diff --git a/node_modules/ramda/src/adjust.js b/node_modules/ramda/src/adjust.js deleted file mode 100644 index 0034da7..0000000 --- a/node_modules/ramda/src/adjust.js +++ /dev/null @@ -1,52 +0,0 @@ -var _concat = -/*#__PURE__*/ -require("./internal/_concat"); - -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Applies a function to the value at the given index of an array, returning a - * new copy of the array with the element at the given index replaced with the - * result of the function application. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig Number -> (a -> a) -> [a] -> [a] - * @param {Number} idx The index. - * @param {Function} fn The function to apply. - * @param {Array|Arguments} list An array-like object whose value - * at the supplied index will be replaced. - * @return {Array} A copy of the supplied array-like object with - * the element at index `idx` replaced with the value - * returned by applying `fn` to the existing element. - * @see R.update - * @example - * - * R.adjust(1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'B', 'c', 'd'] - * R.adjust(-1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c', 'D'] - * @symb R.adjust(-1, f, [a, b]) = [a, f(b)] - * @symb R.adjust(0, f, [a, b]) = [f(a), b] - */ - - -var adjust = -/*#__PURE__*/ -_curry3(function adjust(idx, fn, list) { - if (idx >= list.length || idx < -list.length) { - return list; - } - - var start = idx < 0 ? list.length : 0; - - var _idx = start + idx; - - var _list = _concat(list); - - _list[_idx] = fn(list[_idx]); - return _list; -}); - -module.exports = adjust; \ No newline at end of file diff --git a/node_modules/ramda/src/all.js b/node_modules/ramda/src/all.js deleted file mode 100644 index 00ec4b7..0000000 --- a/node_modules/ramda/src/all.js +++ /dev/null @@ -1,56 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xall = -/*#__PURE__*/ -require("./internal/_xall"); -/** - * Returns `true` if all elements of the list match the predicate, `false` if - * there are any that don't. - * - * Dispatches to the `all` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is satisfied by every element, `false` - * otherwise. - * @see R.any, R.none, R.transduce - * @example - * - * const equals3 = R.equals(3); - * R.all(equals3)([3, 3, 3, 3]); //=> true - * R.all(equals3)([3, 3, 1, 3]); //=> false - */ - - -var all = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['all'], _xall, function all(fn, list) { - var idx = 0; - - while (idx < list.length) { - if (!fn(list[idx])) { - return false; - } - - idx += 1; - } - - return true; -})); - -module.exports = all; \ No newline at end of file diff --git a/node_modules/ramda/src/allPass.js b/node_modules/ramda/src/allPass.js deleted file mode 100644 index 6481d2b..0000000 --- a/node_modules/ramda/src/allPass.js +++ /dev/null @@ -1,66 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); - -var max = -/*#__PURE__*/ -require("./max"); - -var pluck = -/*#__PURE__*/ -require("./pluck"); - -var reduce = -/*#__PURE__*/ -require("./reduce"); -/** - * Takes a list of predicates and returns a predicate that returns true for a - * given list of arguments if every one of the provided predicates is satisfied - * by those arguments. - * - * The function returned is a curried function whose arity matches that of the - * highest-arity predicate. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Logic - * @sig [(*... -> Boolean)] -> (*... -> Boolean) - * @param {Array} predicates An array of predicates to check - * @return {Function} The combined predicate - * @see R.anyPass - * @example - * - * const isQueen = R.propEq('rank', 'Q'); - * const isSpade = R.propEq('suit', '♠︎'); - * const isQueenOfSpades = R.allPass([isQueen, isSpade]); - * - * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false - * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true - */ - - -var allPass = -/*#__PURE__*/ -_curry1(function allPass(preds) { - return curryN(reduce(max, 0, pluck('length', preds)), function () { - var idx = 0; - var len = preds.length; - - while (idx < len) { - if (!preds[idx].apply(this, arguments)) { - return false; - } - - idx += 1; - } - - return true; - }); -}); - -module.exports = allPass; \ No newline at end of file diff --git a/node_modules/ramda/src/always.js b/node_modules/ramda/src/always.js deleted file mode 100644 index 3971395..0000000 --- a/node_modules/ramda/src/always.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Returns a function that always returns the given value. Note that for - * non-primitives the value returned is a reference to the original value. - * - * This function is known as `const`, `constant`, or `K` (for K combinator) in - * other languages and libraries. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig a -> (* -> a) - * @param {*} val The value to wrap in a function - * @return {Function} A Function :: * -> val. - * @example - * - * const t = R.always('Tee'); - * t(); //=> 'Tee' - */ - - -var always = -/*#__PURE__*/ -_curry1(function always(val) { - return function () { - return val; - }; -}); - -module.exports = always; \ No newline at end of file diff --git a/node_modules/ramda/src/and.js b/node_modules/ramda/src/and.js deleted file mode 100644 index ecca064..0000000 --- a/node_modules/ramda/src/and.js +++ /dev/null @@ -1,31 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns `true` if both arguments are `true`; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> b -> a | b - * @param {Any} a - * @param {Any} b - * @return {Any} the first argument if it is falsy, otherwise the second argument. - * @see R.both, R.xor - * @example - * - * R.and(true, true); //=> true - * R.and(true, false); //=> false - * R.and(false, true); //=> false - * R.and(false, false); //=> false - */ - - -var and = -/*#__PURE__*/ -_curry2(function and(a, b) { - return a && b; -}); - -module.exports = and; \ No newline at end of file diff --git a/node_modules/ramda/src/andThen.js b/node_modules/ramda/src/andThen.js deleted file mode 100644 index ac85028..0000000 --- a/node_modules/ramda/src/andThen.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _assertPromise = -/*#__PURE__*/ -require("./internal/_assertPromise"); -/** - * Returns the result of applying the onSuccess function to the value inside - * a successfully resolved promise. This is useful for working with promises - * inside function compositions. - * - * @func - * @memberOf R - * @since v0.27.1 - * @category Function - * @sig (a -> b) -> (Promise e a) -> (Promise e b) - * @sig (a -> (Promise e b)) -> (Promise e a) -> (Promise e b) - * @param {Function} onSuccess The function to apply. Can return a value or a promise of a value. - * @param {Promise} p - * @return {Promise} The result of calling `p.then(onSuccess)` - * @see R.otherwise - * @example - * - * var makeQuery = (email) => ({ query: { email }}); - * - * //getMemberName :: String -> Promise ({firstName, lastName}) - * var getMemberName = R.pipe( - * makeQuery, - * fetchMember, - * R.andThen(R.pick(['firstName', 'lastName'])) - * ); - */ - - -var andThen = -/*#__PURE__*/ -_curry2(function andThen(f, p) { - _assertPromise('andThen', p); - - return p.then(f); -}); - -module.exports = andThen; \ No newline at end of file diff --git a/node_modules/ramda/src/any.js b/node_modules/ramda/src/any.js deleted file mode 100644 index c3ae099..0000000 --- a/node_modules/ramda/src/any.js +++ /dev/null @@ -1,57 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xany = -/*#__PURE__*/ -require("./internal/_xany"); -/** - * Returns `true` if at least one of the elements of the list match the predicate, - * `false` otherwise. - * - * Dispatches to the `any` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false` - * otherwise. - * @see R.all, R.none, R.transduce - * @example - * - * const lessThan0 = R.flip(R.lt)(0); - * const lessThan2 = R.flip(R.lt)(2); - * R.any(lessThan0)([1, 2]); //=> false - * R.any(lessThan2)([1, 2]); //=> true - */ - - -var any = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['any'], _xany, function any(fn, list) { - var idx = 0; - - while (idx < list.length) { - if (fn(list[idx])) { - return true; - } - - idx += 1; - } - - return false; -})); - -module.exports = any; \ No newline at end of file diff --git a/node_modules/ramda/src/anyPass.js b/node_modules/ramda/src/anyPass.js deleted file mode 100644 index 44951c3..0000000 --- a/node_modules/ramda/src/anyPass.js +++ /dev/null @@ -1,67 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); - -var max = -/*#__PURE__*/ -require("./max"); - -var pluck = -/*#__PURE__*/ -require("./pluck"); - -var reduce = -/*#__PURE__*/ -require("./reduce"); -/** - * Takes a list of predicates and returns a predicate that returns true for a - * given list of arguments if at least one of the provided predicates is - * satisfied by those arguments. - * - * The function returned is a curried function whose arity matches that of the - * highest-arity predicate. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Logic - * @sig [(*... -> Boolean)] -> (*... -> Boolean) - * @param {Array} predicates An array of predicates to check - * @return {Function} The combined predicate - * @see R.allPass - * @example - * - * const isClub = R.propEq('suit', '♣'); - * const isSpade = R.propEq('suit', '♠'); - * const isBlackCard = R.anyPass([isClub, isSpade]); - * - * isBlackCard({rank: '10', suit: '♣'}); //=> true - * isBlackCard({rank: 'Q', suit: '♠'}); //=> true - * isBlackCard({rank: 'Q', suit: '♦'}); //=> false - */ - - -var anyPass = -/*#__PURE__*/ -_curry1(function anyPass(preds) { - return curryN(reduce(max, 0, pluck('length', preds)), function () { - var idx = 0; - var len = preds.length; - - while (idx < len) { - if (preds[idx].apply(this, arguments)) { - return true; - } - - idx += 1; - } - - return false; - }); -}); - -module.exports = anyPass; \ No newline at end of file diff --git a/node_modules/ramda/src/ap.js b/node_modules/ramda/src/ap.js deleted file mode 100644 index 7adc7ba..0000000 --- a/node_modules/ramda/src/ap.js +++ /dev/null @@ -1,54 +0,0 @@ -var _concat = -/*#__PURE__*/ -require("./internal/_concat"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _reduce = -/*#__PURE__*/ -require("./internal/_reduce"); - -var map = -/*#__PURE__*/ -require("./map"); -/** - * ap applies a list of functions to a list of values. - * - * Dispatches to the `ap` method of the second argument, if present. Also - * treats curried functions as applicatives. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig [a -> b] -> [a] -> [b] - * @sig Apply f => f (a -> b) -> f a -> f b - * @sig (r -> a -> b) -> (r -> a) -> (r -> b) - * @param {*} applyF - * @param {*} applyX - * @return {*} - * @example - * - * R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6] - * R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> ["tasty pizza", "tasty salad", "PIZZA", "SALAD"] - * - * // R.ap can also be used as S combinator - * // when only two functions are passed - * R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA' - * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)] - */ - - -var ap = -/*#__PURE__*/ -_curry2(function ap(applyF, applyX) { - return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) { - return applyF(x)(applyX(x)); - } : _reduce(function (acc, f) { - return _concat(acc, map(f, applyX)); - }, [], applyF); -}); - -module.exports = ap; \ No newline at end of file diff --git a/node_modules/ramda/src/aperture.js b/node_modules/ramda/src/aperture.js deleted file mode 100644 index d94314e..0000000 --- a/node_modules/ramda/src/aperture.js +++ /dev/null @@ -1,45 +0,0 @@ -var _aperture = -/*#__PURE__*/ -require("./internal/_aperture"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xaperture = -/*#__PURE__*/ -require("./internal/_xaperture"); -/** - * Returns a new list, composed of n-tuples of consecutive elements. If `n` is - * greater than the length of the list, an empty list is returned. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig Number -> [a] -> [[a]] - * @param {Number} n The size of the tuples to create - * @param {Array} list The list to split into `n`-length tuples - * @return {Array} The resulting list of `n`-length tuples - * @see R.transduce - * @example - * - * R.aperture(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [2, 3], [3, 4], [4, 5]] - * R.aperture(3, [1, 2, 3, 4, 5]); //=> [[1, 2, 3], [2, 3, 4], [3, 4, 5]] - * R.aperture(7, [1, 2, 3, 4, 5]); //=> [] - */ - - -var aperture = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xaperture, _aperture)); - -module.exports = aperture; \ No newline at end of file diff --git a/node_modules/ramda/src/append.js b/node_modules/ramda/src/append.js deleted file mode 100644 index 24f2fa1..0000000 --- a/node_modules/ramda/src/append.js +++ /dev/null @@ -1,36 +0,0 @@ -var _concat = -/*#__PURE__*/ -require("./internal/_concat"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns a new list containing the contents of the given list, followed by - * the given element. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} el The element to add to the end of the new list. - * @param {Array} list The list of elements to add a new item to. - * list. - * @return {Array} A new list containing the elements of the old list followed by `el`. - * @see R.prepend - * @example - * - * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests'] - * R.append('tests', []); //=> ['tests'] - * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']] - */ - - -var append = -/*#__PURE__*/ -_curry2(function append(el, list) { - return _concat(list, [el]); -}); - -module.exports = append; \ No newline at end of file diff --git a/node_modules/ramda/src/apply.js b/node_modules/ramda/src/apply.js deleted file mode 100644 index 7ca7961..0000000 --- a/node_modules/ramda/src/apply.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Applies function `fn` to the argument list `args`. This is useful for - * creating a fixed-arity function from a variadic function. `fn` should be a - * bound function if context is significant. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig (*... -> a) -> [*] -> a - * @param {Function} fn The function which will be called with `args` - * @param {Array} args The arguments to call `fn` with - * @return {*} result The result, equivalent to `fn(...args)` - * @see R.call, R.unapply - * @example - * - * const nums = [1, 2, 3, -99, 42, 6, 7]; - * R.apply(Math.max, nums); //=> 42 - * @symb R.apply(f, [a, b, c]) = f(a, b, c) - */ - - -var apply = -/*#__PURE__*/ -_curry2(function apply(fn, args) { - return fn.apply(this, args); -}); - -module.exports = apply; \ No newline at end of file diff --git a/node_modules/ramda/src/applySpec.js b/node_modules/ramda/src/applySpec.js deleted file mode 100644 index aea5a93..0000000 --- a/node_modules/ramda/src/applySpec.js +++ /dev/null @@ -1,82 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var apply = -/*#__PURE__*/ -require("./apply"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); - -var max = -/*#__PURE__*/ -require("./max"); - -var pluck = -/*#__PURE__*/ -require("./pluck"); - -var reduce = -/*#__PURE__*/ -require("./reduce"); - -var keys = -/*#__PURE__*/ -require("./keys"); - -var values = -/*#__PURE__*/ -require("./values"); // Use custom mapValues function to avoid issues with specs that include a "map" key and R.map -// delegating calls to .map - - -function mapValues(fn, obj) { - return keys(obj).reduce(function (acc, key) { - acc[key] = fn(obj[key]); - return acc; - }, {}); -} -/** - * Given a spec object recursively mapping properties to functions, creates a - * function producing an object of the same structure, by mapping each property - * to the result of calling its associated function with the supplied arguments. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Function - * @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v}) - * @param {Object} spec an object recursively mapping properties to functions for - * producing the values for these properties. - * @return {Function} A function that returns an object of the same structure - * as `spec', with each property set to the value returned by calling its - * associated function with the supplied arguments. - * @see R.converge, R.juxt - * @example - * - * const getMetrics = R.applySpec({ - * sum: R.add, - * nested: { mul: R.multiply } - * }); - * getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } } - * @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } } - */ - - -var applySpec = -/*#__PURE__*/ -_curry1(function applySpec(spec) { - spec = mapValues(function (v) { - return typeof v == 'function' ? v : applySpec(v); - }, spec); - return curryN(reduce(max, 0, pluck('length', values(spec))), function () { - var args = arguments; - return mapValues(function (f) { - return apply(f, args); - }, spec); - }); -}); - -module.exports = applySpec; \ No newline at end of file diff --git a/node_modules/ramda/src/applyTo.js b/node_modules/ramda/src/applyTo.js deleted file mode 100644 index 05a3187..0000000 --- a/node_modules/ramda/src/applyTo.js +++ /dev/null @@ -1,31 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Takes a value and applies a function to it. - * - * This function is also known as the `thrush` combinator. - * - * @func - * @memberOf R - * @since v0.25.0 - * @category Function - * @sig a -> (a -> b) -> b - * @param {*} x The value - * @param {Function} f The function to apply - * @return {*} The result of applying `f` to `x` - * @example - * - * const t42 = R.applyTo(42); - * t42(R.identity); //=> 42 - * t42(R.add(1)); //=> 43 - */ - - -var applyTo = -/*#__PURE__*/ -_curry2(function applyTo(x, f) { - return f(x); -}); - -module.exports = applyTo; \ No newline at end of file diff --git a/node_modules/ramda/src/ascend.js b/node_modules/ramda/src/ascend.js deleted file mode 100644 index 3f0f8f2..0000000 --- a/node_modules/ramda/src/ascend.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Makes an ascending comparator function out of a function that returns a value - * that can be compared with `<` and `>`. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Function - * @sig Ord b => (a -> b) -> a -> a -> Number - * @param {Function} fn A function of arity one that returns a value that can be compared - * @param {*} a The first item to be compared. - * @param {*} b The second item to be compared. - * @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0` - * @see R.descend - * @example - * - * const byAge = R.ascend(R.prop('age')); - * const people = [ - * { name: 'Emma', age: 70 }, - * { name: 'Peter', age: 78 }, - * { name: 'Mikhail', age: 62 }, - * ]; - * const peopleByYoungestFirst = R.sort(byAge, people); - * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }] - */ - - -var ascend = -/*#__PURE__*/ -_curry3(function ascend(fn, a, b) { - var aa = fn(a); - var bb = fn(b); - return aa < bb ? -1 : aa > bb ? 1 : 0; -}); - -module.exports = ascend; \ No newline at end of file diff --git a/node_modules/ramda/src/assoc.js b/node_modules/ramda/src/assoc.js deleted file mode 100644 index 1df01ef..0000000 --- a/node_modules/ramda/src/assoc.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Makes a shallow clone of an object, setting or overriding the specified - * property with the given value. Note that this copies and flattens prototype - * properties onto the new object as well. All non-primitive properties are - * copied by reference. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @sig String -> a -> {k: v} -> {k: v} - * @param {String} prop The property name to set - * @param {*} val The new value - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original except for the changed property. - * @see R.dissoc, R.pick - * @example - * - * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3} - */ - - -var assoc = -/*#__PURE__*/ -_curry3(function assoc(prop, val, obj) { - var result = {}; - - for (var p in obj) { - result[p] = obj[p]; - } - - result[prop] = val; - return result; -}); - -module.exports = assoc; \ No newline at end of file diff --git a/node_modules/ramda/src/assocPath.js b/node_modules/ramda/src/assocPath.js deleted file mode 100644 index af82c33..0000000 --- a/node_modules/ramda/src/assocPath.js +++ /dev/null @@ -1,73 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var _has = -/*#__PURE__*/ -require("./internal/_has"); - -var _isArray = -/*#__PURE__*/ -require("./internal/_isArray"); - -var _isInteger = -/*#__PURE__*/ -require("./internal/_isInteger"); - -var assoc = -/*#__PURE__*/ -require("./assoc"); - -var isNil = -/*#__PURE__*/ -require("./isNil"); -/** - * Makes a shallow clone of an object, setting or overriding the nodes required - * to create the given path, and placing the specific value at the tail end of - * that path. Note that this copies and flattens prototype properties onto the - * new object as well. All non-primitive properties are copied by reference. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> a -> {a} -> {a} - * @param {Array} path the path to set - * @param {*} val The new value - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original except along the specified path. - * @see R.dissocPath - * @example - * - * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} - * - * // Any missing or non-object keys in path will be overridden - * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} - */ - - -var assocPath = -/*#__PURE__*/ -_curry3(function assocPath(path, val, obj) { - if (path.length === 0) { - return val; - } - - var idx = path[0]; - - if (path.length > 1) { - var nextObj = !isNil(obj) && _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {}; - val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); - } - - if (_isInteger(idx) && _isArray(obj)) { - var arr = [].concat(obj); - arr[idx] = val; - return arr; - } else { - return assoc(idx, val, obj); - } -}); - -module.exports = assocPath; \ No newline at end of file diff --git a/node_modules/ramda/src/binary.js b/node_modules/ramda/src/binary.js deleted file mode 100644 index 2af9722..0000000 --- a/node_modules/ramda/src/binary.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var nAry = -/*#__PURE__*/ -require("./nAry"); -/** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly 2 parameters. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Function - * @sig (* -> c) -> (a, b -> c) - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity 2. - * @see R.nAry, R.unary - * @example - * - * const takesThreeArgs = function(a, b, c) { - * return [a, b, c]; - * }; - * takesThreeArgs.length; //=> 3 - * takesThreeArgs(1, 2, 3); //=> [1, 2, 3] - * - * const takesTwoArgs = R.binary(takesThreeArgs); - * takesTwoArgs.length; //=> 2 - * // Only 2 arguments are passed to the wrapped function - * takesTwoArgs(1, 2, 3); //=> [1, 2, undefined] - * @symb R.binary(f)(a, b, c) = f(a, b) - */ - - -var binary = -/*#__PURE__*/ -_curry1(function binary(fn) { - return nAry(2, fn); -}); - -module.exports = binary; \ No newline at end of file diff --git a/node_modules/ramda/src/bind.js b/node_modules/ramda/src/bind.js deleted file mode 100644 index 2195b8c..0000000 --- a/node_modules/ramda/src/bind.js +++ /dev/null @@ -1,40 +0,0 @@ -var _arity = -/*#__PURE__*/ -require("./internal/_arity"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Creates a function that is bound to a context. - * Note: `R.bind` does not provide the additional argument-binding capabilities of - * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Function - * @category Object - * @sig (* -> *) -> {*} -> (* -> *) - * @param {Function} fn The function to bind to context - * @param {Object} thisObj The context to bind `fn` to - * @return {Function} A function that will execute in the context of `thisObj`. - * @see R.partial - * @example - * - * const log = R.bind(console.log, console); - * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3} - * // logs {a: 2} - * @symb R.bind(f, o)(a, b) = f.call(o, a, b) - */ - - -var bind = -/*#__PURE__*/ -_curry2(function bind(fn, thisObj) { - return _arity(fn.length, function () { - return fn.apply(thisObj, arguments); - }); -}); - -module.exports = bind; \ No newline at end of file diff --git a/node_modules/ramda/src/both.js b/node_modules/ramda/src/both.js deleted file mode 100644 index 187eb4e..0000000 --- a/node_modules/ramda/src/both.js +++ /dev/null @@ -1,57 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _isFunction = -/*#__PURE__*/ -require("./internal/_isFunction"); - -var and = -/*#__PURE__*/ -require("./and"); - -var lift = -/*#__PURE__*/ -require("./lift"); -/** - * A function which calls the two provided functions and returns the `&&` - * of the results. - * It returns the result of the first function if it is false-y and the result - * of the second function otherwise. Note that this is short-circuited, - * meaning that the second function will not be invoked if the first returns a - * false-y value. - * - * In addition to functions, `R.both` also accepts any fantasy-land compatible - * applicative functor. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) - * @param {Function} f A predicate - * @param {Function} g Another predicate - * @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together. - * @see R.and - * @example - * - * const gt10 = R.gt(R.__, 10) - * const lt20 = R.lt(R.__, 20) - * const f = R.both(gt10, lt20); - * f(15); //=> true - * f(30); //=> false - * - * R.both(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(false) - * R.both([false, false, 'a'], [11]); //=> [false, false, 11] - */ - - -var both = -/*#__PURE__*/ -_curry2(function both(f, g) { - return _isFunction(f) ? function _both() { - return f.apply(this, arguments) && g.apply(this, arguments); - } : lift(and)(f, g); -}); - -module.exports = both; \ No newline at end of file diff --git a/node_modules/ramda/src/call.js b/node_modules/ramda/src/call.js deleted file mode 100644 index b0f668f..0000000 --- a/node_modules/ramda/src/call.js +++ /dev/null @@ -1,43 +0,0 @@ -var curry = -/*#__PURE__*/ -require("./curry"); -/** - * Returns the result of calling its first argument with the remaining - * arguments. This is occasionally useful as a converging function for - * [`R.converge`](#converge): the first branch can produce a function while the - * remaining branches produce values to be passed to that function as its - * arguments. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig (*... -> a),*... -> a - * @param {Function} fn The function to apply to the remaining arguments. - * @param {...*} args Any number of positional arguments. - * @return {*} - * @see R.apply - * @example - * - * R.call(R.add, 1, 2); //=> 3 - * - * const indentN = R.pipe(R.repeat(' '), - * R.join(''), - * R.replace(/^(?!$)/gm)); - * - * const format = R.converge(R.call, [ - * R.pipe(R.prop('indent'), indentN), - * R.prop('value') - * ]); - * - * format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n' - * @symb R.call(f, a, b) = f(a, b) - */ - - -var call = -/*#__PURE__*/ -curry(function call(fn) { - return fn.apply(this, Array.prototype.slice.call(arguments, 1)); -}); -module.exports = call; \ No newline at end of file diff --git a/node_modules/ramda/src/chain.js b/node_modules/ramda/src/chain.js deleted file mode 100644 index 9731489..0000000 --- a/node_modules/ramda/src/chain.js +++ /dev/null @@ -1,62 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _makeFlat = -/*#__PURE__*/ -require("./internal/_makeFlat"); - -var _xchain = -/*#__PURE__*/ -require("./internal/_xchain"); - -var map = -/*#__PURE__*/ -require("./map"); -/** - * `chain` maps a function over a list and concatenates the results. `chain` - * is also known as `flatMap` in some libraries. - * - * Dispatches to the `chain` method of the second argument, if present, - * according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain). - * - * If second argument is a function, `chain(f, g)(x)` is equivalent to `f(g(x), x)`. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig Chain m => (a -> m b) -> m a -> m b - * @param {Function} fn The function to map with - * @param {Array} list The list to map over - * @return {Array} The result of flat-mapping `list` with `fn` - * @example - * - * const duplicate = n => [n, n]; - * R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3] - * - * R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1] - */ - - -var chain = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['fantasy-land/chain', 'chain'], _xchain, function chain(fn, monad) { - if (typeof monad === 'function') { - return function (x) { - return fn(monad(x))(x); - }; - } - - return _makeFlat(false)(map(fn, monad)); -})); - -module.exports = chain; \ No newline at end of file diff --git a/node_modules/ramda/src/clamp.js b/node_modules/ramda/src/clamp.js deleted file mode 100644 index 6b3f90c..0000000 --- a/node_modules/ramda/src/clamp.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Restricts a number to be within a range. - * - * Also works for other ordered types such as Strings and Dates. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Relation - * @sig Ord a => a -> a -> a -> a - * @param {Number} minimum The lower limit of the clamp (inclusive) - * @param {Number} maximum The upper limit of the clamp (inclusive) - * @param {Number} value Value to be clamped - * @return {Number} Returns `minimum` when `val < minimum`, `maximum` when `val > maximum`, returns `val` otherwise - * @example - * - * R.clamp(1, 10, -5) // => 1 - * R.clamp(1, 10, 15) // => 10 - * R.clamp(1, 10, 4) // => 4 - */ - - -var clamp = -/*#__PURE__*/ -_curry3(function clamp(min, max, value) { - if (min > max) { - throw new Error('min must not be greater than max in clamp(min, max, value)'); - } - - return value < min ? min : value > max ? max : value; -}); - -module.exports = clamp; \ No newline at end of file diff --git a/node_modules/ramda/src/clone.js b/node_modules/ramda/src/clone.js deleted file mode 100644 index 660a899..0000000 --- a/node_modules/ramda/src/clone.js +++ /dev/null @@ -1,37 +0,0 @@ -var _clone = -/*#__PURE__*/ -require("./internal/_clone"); - -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Creates a deep copy of the value which may contain (nested) `Array`s and - * `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are - * assigned by reference rather than copied - * - * Dispatches to a `clone` method if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {*} -> {*} - * @param {*} value The object or array to clone - * @return {*} A deeply cloned copy of `val` - * @example - * - * const objects = [{}, {}, {}]; - * const objectsClone = R.clone(objects); - * objects === objectsClone; //=> false - * objects[0] === objectsClone[0]; //=> false - */ - - -var clone = -/*#__PURE__*/ -_curry1(function clone(value) { - return value != null && typeof value.clone === 'function' ? value.clone() : _clone(value, [], [], true); -}); - -module.exports = clone; \ No newline at end of file diff --git a/node_modules/ramda/src/comparator.js b/node_modules/ramda/src/comparator.js deleted file mode 100644 index 7b78ce3..0000000 --- a/node_modules/ramda/src/comparator.js +++ /dev/null @@ -1,37 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Makes a comparator function out of a function that reports whether the first - * element is less than the second. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((a, b) -> Boolean) -> ((a, b) -> Number) - * @param {Function} pred A predicate function of arity two which will return `true` if the first argument - * is less than the second, `false` otherwise - * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0` - * @example - * - * const byAge = R.comparator((a, b) => a.age < b.age); - * const people = [ - * { name: 'Emma', age: 70 }, - * { name: 'Peter', age: 78 }, - * { name: 'Mikhail', age: 62 }, - * ]; - * const peopleByIncreasingAge = R.sort(byAge, people); - * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }] - */ - - -var comparator = -/*#__PURE__*/ -_curry1(function comparator(pred) { - return function (a, b) { - return pred(a, b) ? -1 : pred(b, a) ? 1 : 0; - }; -}); - -module.exports = comparator; \ No newline at end of file diff --git a/node_modules/ramda/src/complement.js b/node_modules/ramda/src/complement.js deleted file mode 100644 index 1c15140..0000000 --- a/node_modules/ramda/src/complement.js +++ /dev/null @@ -1,35 +0,0 @@ -var lift = -/*#__PURE__*/ -require("./lift"); - -var not = -/*#__PURE__*/ -require("./not"); -/** - * Takes a function `f` and returns a function `g` such that if called with the same arguments - * when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`. - * - * `R.complement` may be applied to any functor - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> *) -> (*... -> Boolean) - * @param {Function} f - * @return {Function} - * @see R.not - * @example - * - * const isNotNil = R.complement(R.isNil); - * isNil(null); //=> true - * isNotNil(null); //=> false - * isNil(7); //=> false - * isNotNil(7); //=> true - */ - - -var complement = -/*#__PURE__*/ -lift(not); -module.exports = complement; \ No newline at end of file diff --git a/node_modules/ramda/src/compose.js b/node_modules/ramda/src/compose.js deleted file mode 100644 index 7932eb8..0000000 --- a/node_modules/ramda/src/compose.js +++ /dev/null @@ -1,42 +0,0 @@ -var pipe = -/*#__PURE__*/ -require("./pipe"); - -var reverse = -/*#__PURE__*/ -require("./reverse"); -/** - * Performs right-to-left function composition. The last argument may have - * any arity; the remaining arguments must be unary. - * - * **Note:** The result of compose is not automatically curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.pipe - * @example - * - * const classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName - * const yellGreeting = R.compose(R.toUpper, classyGreeting); - * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND" - * - * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7 - * - * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b))) - */ - - -function compose() { - if (arguments.length === 0) { - throw new Error('compose requires at least one argument'); - } - - return pipe.apply(this, reverse(arguments)); -} - -module.exports = compose; \ No newline at end of file diff --git a/node_modules/ramda/src/composeK.js b/node_modules/ramda/src/composeK.js deleted file mode 100644 index 8aad0ac..0000000 --- a/node_modules/ramda/src/composeK.js +++ /dev/null @@ -1,55 +0,0 @@ -var chain = -/*#__PURE__*/ -require("./chain"); - -var compose = -/*#__PURE__*/ -require("./compose"); - -var map = -/*#__PURE__*/ -require("./map"); -/** - * Returns the right-to-left Kleisli composition of the provided functions, - * each of which must return a value of a type supported by [`chain`](#chain). - * - * `R.composeK(h, g, f)` is equivalent to `R.compose(R.chain(h), R.chain(g), f)`. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Function - * @sig Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> (a -> m z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.pipeK - * @deprecated since v0.26.0 - * @example - * - * // get :: String -> Object -> Maybe * - * const get = R.curry((propName, obj) => Maybe(obj[propName])) - * - * // getStateCode :: Maybe String -> Maybe String - * const getStateCode = R.composeK( - * R.compose(Maybe.of, R.toUpper), - * get('state'), - * get('address'), - * get('user'), - * ); - * getStateCode({"user":{"address":{"state":"ny"}}}); //=> Maybe.Just("NY") - * getStateCode({}); //=> Maybe.Nothing() - * @symb R.composeK(f, g, h)(a) = R.chain(f, R.chain(g, h(a))) - */ - - -function composeK() { - if (arguments.length === 0) { - throw new Error('composeK requires at least one argument'); - } - - var init = Array.prototype.slice.call(arguments); - var last = init.pop(); - return compose(compose.apply(this, map(chain, init)), last); -} - -module.exports = composeK; \ No newline at end of file diff --git a/node_modules/ramda/src/composeP.js b/node_modules/ramda/src/composeP.js deleted file mode 100644 index 6774c80..0000000 --- a/node_modules/ramda/src/composeP.js +++ /dev/null @@ -1,53 +0,0 @@ -var pipeP = -/*#__PURE__*/ -require("./pipeP"); - -var reverse = -/*#__PURE__*/ -require("./reverse"); -/** - * Performs right-to-left composition of one or more Promise-returning - * functions. The last arguments may have any arity; the remaining - * arguments must be unary. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((y -> Promise z), (x -> Promise y), ..., (a -> Promise b)) -> (a -> Promise z) - * @param {...Function} functions The functions to compose - * @return {Function} - * @see R.pipeP - * @deprecated since v0.26.0 - * @example - * - * const db = { - * users: { - * JOE: { - * name: 'Joe', - * followers: ['STEVE', 'SUZY'] - * } - * } - * } - * - * // We'll pretend to do a db lookup which returns a promise - * const lookupUser = (userId) => Promise.resolve(db.users[userId]) - * const lookupFollowers = (user) => Promise.resolve(user.followers) - * lookupUser('JOE').then(lookupFollowers) - * - * // followersForUser :: String -> Promise [UserId] - * const followersForUser = R.composeP(lookupFollowers, lookupUser); - * followersForUser('JOE').then(followers => console.log('Followers:', followers)) - * // Followers: ["STEVE","SUZY"] - */ - - -function composeP() { - if (arguments.length === 0) { - throw new Error('composeP requires at least one argument'); - } - - return pipeP.apply(this, reverse(arguments)); -} - -module.exports = composeP; \ No newline at end of file diff --git a/node_modules/ramda/src/composeWith.js b/node_modules/ramda/src/composeWith.js deleted file mode 100644 index 4edf088..0000000 --- a/node_modules/ramda/src/composeWith.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var pipeWith = -/*#__PURE__*/ -require("./pipeWith"); - -var reverse = -/*#__PURE__*/ -require("./reverse"); -/** - * Performs right-to-left function composition using transforming function. The last argument may have - * any arity; the remaining arguments must be unary. - * - * **Note:** The result of compose is not automatically curried. Transforming function is not used on the - * last argument. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig ((* -> *), [(y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)]) -> ((a, b, ..., n) -> z) - * @param {...Function} ...functions The functions to compose - * @return {Function} - * @see R.compose, R.pipeWith - * @example - * - * const composeWhileNotNil = R.composeWith((f, res) => R.isNil(res) ? res : f(res)); - * - * composeWhileNotNil([R.inc, R.prop('age')])({age: 1}) //=> 2 - * composeWhileNotNil([R.inc, R.prop('age')])({}) //=> undefined - * - * @symb R.composeWith(f)([g, h, i])(...args) = f(g, f(h, i(...args))) - */ - - -var composeWith = -/*#__PURE__*/ -_curry2(function composeWith(xf, list) { - return pipeWith.apply(this, [xf, reverse(list)]); -}); - -module.exports = composeWith; \ No newline at end of file diff --git a/node_modules/ramda/src/concat.js b/node_modules/ramda/src/concat.js deleted file mode 100644 index 4a290e9..0000000 --- a/node_modules/ramda/src/concat.js +++ /dev/null @@ -1,80 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _isArray = -/*#__PURE__*/ -require("./internal/_isArray"); - -var _isFunction = -/*#__PURE__*/ -require("./internal/_isFunction"); - -var _isString = -/*#__PURE__*/ -require("./internal/_isString"); - -var toString = -/*#__PURE__*/ -require("./toString"); -/** - * Returns the result of concatenating the given lists or strings. - * - * Note: `R.concat` expects both arguments to be of the same type, - * unlike the native `Array.prototype.concat` method. It will throw - * an error if you `concat` an Array with a non-Array value. - * - * Dispatches to the `concat` method of the first argument, if present. - * Can also concatenate two members of a [fantasy-land - * compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup). - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] -> [a] - * @sig String -> String -> String - * @param {Array|String} firstList The first list - * @param {Array|String} secondList The second list - * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of - * `secondList`. - * - * @example - * - * R.concat('ABC', 'DEF'); // 'ABCDEF' - * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] - * R.concat([], []); //=> [] - */ - - -var concat = -/*#__PURE__*/ -_curry2(function concat(a, b) { - if (_isArray(a)) { - if (_isArray(b)) { - return a.concat(b); - } - - throw new TypeError(toString(b) + ' is not an array'); - } - - if (_isString(a)) { - if (_isString(b)) { - return a + b; - } - - throw new TypeError(toString(b) + ' is not a string'); - } - - if (a != null && _isFunction(a['fantasy-land/concat'])) { - return a['fantasy-land/concat'](b); - } - - if (a != null && _isFunction(a.concat)) { - return a.concat(b); - } - - throw new TypeError(toString(a) + ' does not have a method named "concat" or "fantasy-land/concat"'); -}); - -module.exports = concat; \ No newline at end of file diff --git a/node_modules/ramda/src/cond.js b/node_modules/ramda/src/cond.js deleted file mode 100644 index 11acc96..0000000 --- a/node_modules/ramda/src/cond.js +++ /dev/null @@ -1,68 +0,0 @@ -var _arity = -/*#__PURE__*/ -require("./internal/_arity"); - -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var map = -/*#__PURE__*/ -require("./map"); - -var max = -/*#__PURE__*/ -require("./max"); - -var reduce = -/*#__PURE__*/ -require("./reduce"); -/** - * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic. - * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments - * to `fn` are applied to each of the predicates in turn until one returns a - * "truthy" value, at which point `fn` returns the result of applying its - * arguments to the corresponding transformer. If none of the predicates - * matches, `fn` returns undefined. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Logic - * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *) - * @param {Array} pairs A list of [predicate, transformer] - * @return {Function} - * @see R.ifElse, R.unless, R.when - * @example - * - * const fn = R.cond([ - * [R.equals(0), R.always('water freezes at 0°C')], - * [R.equals(100), R.always('water boils at 100°C')], - * [R.T, temp => 'nothing special happens at ' + temp + '°C'] - * ]); - * fn(0); //=> 'water freezes at 0°C' - * fn(50); //=> 'nothing special happens at 50°C' - * fn(100); //=> 'water boils at 100°C' - */ - - -var cond = -/*#__PURE__*/ -_curry1(function cond(pairs) { - var arity = reduce(max, 0, map(function (pair) { - return pair[0].length; - }, pairs)); - return _arity(arity, function () { - var idx = 0; - - while (idx < pairs.length) { - if (pairs[idx][0].apply(this, arguments)) { - return pairs[idx][1].apply(this, arguments); - } - - idx += 1; - } - }); -}); - -module.exports = cond; \ No newline at end of file diff --git a/node_modules/ramda/src/construct.js b/node_modules/ramda/src/construct.js deleted file mode 100644 index 72c0e78..0000000 --- a/node_modules/ramda/src/construct.js +++ /dev/null @@ -1,48 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var constructN = -/*#__PURE__*/ -require("./constructN"); -/** - * Wraps a constructor function inside a curried function that can be called - * with the same arguments and returns the same type. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (* -> {*}) -> (* -> {*}) - * @param {Function} fn The constructor function to wrap. - * @return {Function} A wrapped, curried constructor function. - * @see R.invoker - * @example - * - * // Constructor function - * function Animal(kind) { - * this.kind = kind; - * }; - * Animal.prototype.sighting = function() { - * return "It's a " + this.kind + "!"; - * } - * - * const AnimalConstructor = R.construct(Animal) - * - * // Notice we no longer need the 'new' keyword: - * AnimalConstructor('Pig'); //=> {"kind": "Pig", "sighting": function (){...}}; - * - * const animalTypes = ["Lion", "Tiger", "Bear"]; - * const animalSighting = R.invoker(0, 'sighting'); - * const sightNewAnimal = R.compose(animalSighting, AnimalConstructor); - * R.map(sightNewAnimal, animalTypes); //=> ["It's a Lion!", "It's a Tiger!", "It's a Bear!"] - */ - - -var construct = -/*#__PURE__*/ -_curry1(function construct(Fn) { - return constructN(Fn.length, Fn); -}); - -module.exports = construct; \ No newline at end of file diff --git a/node_modules/ramda/src/constructN.js b/node_modules/ramda/src/constructN.js deleted file mode 100644 index c3ecbf0..0000000 --- a/node_modules/ramda/src/constructN.js +++ /dev/null @@ -1,97 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var curry = -/*#__PURE__*/ -require("./curry"); - -var nAry = -/*#__PURE__*/ -require("./nAry"); -/** - * Wraps a constructor function inside a curried function that can be called - * with the same arguments and returns the same type. The arity of the function - * returned is specified to allow using variadic constructor functions. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Function - * @sig Number -> (* -> {*}) -> (* -> {*}) - * @param {Number} n The arity of the constructor function. - * @param {Function} Fn The constructor function to wrap. - * @return {Function} A wrapped, curried constructor function. - * @example - * - * // Variadic Constructor function - * function Salad() { - * this.ingredients = arguments; - * } - * - * Salad.prototype.recipe = function() { - * const instructions = R.map(ingredient => 'Add a dollop of ' + ingredient, this.ingredients); - * return R.join('\n', instructions); - * }; - * - * const ThreeLayerSalad = R.constructN(3, Salad); - * - * // Notice we no longer need the 'new' keyword, and the constructor is curried for 3 arguments. - * const salad = ThreeLayerSalad('Mayonnaise')('Potato Chips')('Ketchup'); - * - * console.log(salad.recipe()); - * // Add a dollop of Mayonnaise - * // Add a dollop of Potato Chips - * // Add a dollop of Ketchup - */ - - -var constructN = -/*#__PURE__*/ -_curry2(function constructN(n, Fn) { - if (n > 10) { - throw new Error('Constructor with greater than ten arguments'); - } - - if (n === 0) { - return function () { - return new Fn(); - }; - } - - return curry(nAry(n, function ($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) { - switch (arguments.length) { - case 1: - return new Fn($0); - - case 2: - return new Fn($0, $1); - - case 3: - return new Fn($0, $1, $2); - - case 4: - return new Fn($0, $1, $2, $3); - - case 5: - return new Fn($0, $1, $2, $3, $4); - - case 6: - return new Fn($0, $1, $2, $3, $4, $5); - - case 7: - return new Fn($0, $1, $2, $3, $4, $5, $6); - - case 8: - return new Fn($0, $1, $2, $3, $4, $5, $6, $7); - - case 9: - return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8); - - case 10: - return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8, $9); - } - })); -}); - -module.exports = constructN; \ No newline at end of file diff --git a/node_modules/ramda/src/contains.js b/node_modules/ramda/src/contains.js deleted file mode 100644 index 018e94f..0000000 --- a/node_modules/ramda/src/contains.js +++ /dev/null @@ -1,37 +0,0 @@ -var _includes = -/*#__PURE__*/ -require("./internal/_includes"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns `true` if the specified value is equal, in [`R.equals`](#equals) - * terms, to at least one element of the given list; `false` otherwise. - * Works also with strings. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Boolean - * @param {Object} a The item to compare against. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. - * @see R.includes - * @deprecated since v0.26.0 - * @example - * - * R.contains(3, [1, 2, 3]); //=> true - * R.contains(4, [1, 2, 3]); //=> false - * R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true - * R.contains([42], [[42]]); //=> true - * R.contains('ba', 'banana'); //=>true - */ - - -var contains = -/*#__PURE__*/ -_curry2(_includes); - -module.exports = contains; \ No newline at end of file diff --git a/node_modules/ramda/src/converge.js b/node_modules/ramda/src/converge.js deleted file mode 100644 index 0173f99..0000000 --- a/node_modules/ramda/src/converge.js +++ /dev/null @@ -1,66 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _map = -/*#__PURE__*/ -require("./internal/_map"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); - -var max = -/*#__PURE__*/ -require("./max"); - -var pluck = -/*#__PURE__*/ -require("./pluck"); - -var reduce = -/*#__PURE__*/ -require("./reduce"); -/** - * Accepts a converging function and a list of branching functions and returns - * a new function. The arity of the new function is the same as the arity of - * the longest branching function. When invoked, this new function is applied - * to some arguments, and each branching function is applied to those same - * arguments. The results of each branching function are passed as arguments - * to the converging function to produce the return value. - * - * @func - * @memberOf R - * @since v0.4.2 - * @category Function - * @sig ((x1, x2, ...) -> z) -> [((a, b, ...) -> x1), ((a, b, ...) -> x2), ...] -> (a -> b -> ... -> z) - * @param {Function} after A function. `after` will be invoked with the return values of - * `fn1` and `fn2` as its arguments. - * @param {Array} functions A list of functions. - * @return {Function} A new function. - * @see R.useWith - * @example - * - * const average = R.converge(R.divide, [R.sum, R.length]) - * average([1, 2, 3, 4, 5, 6, 7]) //=> 4 - * - * const strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower]) - * strangeConcat("Yodel") //=> "YODELyodel" - * - * @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b)) - */ - - -var converge = -/*#__PURE__*/ -_curry2(function converge(after, fns) { - return curryN(reduce(max, 0, pluck('length', fns)), function () { - var args = arguments; - var context = this; - return after.apply(context, _map(function (fn) { - return fn.apply(context, args); - }, fns)); - }); -}); - -module.exports = converge; \ No newline at end of file diff --git a/node_modules/ramda/src/countBy.js b/node_modules/ramda/src/countBy.js deleted file mode 100644 index 88f51eb..0000000 --- a/node_modules/ramda/src/countBy.js +++ /dev/null @@ -1,35 +0,0 @@ -var reduceBy = -/*#__PURE__*/ -require("./reduceBy"); -/** - * Counts the elements of a list according to how many match each value of a - * key generated by the supplied function. Returns an object mapping the keys - * produced by `fn` to the number of occurrences in the list. Note that all - * keys are coerced to strings because of how JavaScript objects work. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig (a -> String) -> [a] -> {*} - * @param {Function} fn The function used to map values to keys. - * @param {Array} list The list to count elements from. - * @return {Object} An object mapping keys to number of occurrences in the list. - * @example - * - * const numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2]; - * R.countBy(Math.floor)(numbers); //=> {'1': 3, '2': 2, '3': 1} - * - * const letters = ['a', 'b', 'A', 'a', 'B', 'c']; - * R.countBy(R.toLower)(letters); //=> {'a': 3, 'b': 2, 'c': 1} - */ - - -var countBy = -/*#__PURE__*/ -reduceBy(function (acc, elem) { - return acc + 1; -}, 0); -module.exports = countBy; \ No newline at end of file diff --git a/node_modules/ramda/src/curry.js b/node_modules/ramda/src/curry.js deleted file mode 100644 index a8a5c41..0000000 --- a/node_modules/ramda/src/curry.js +++ /dev/null @@ -1,57 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); -/** - * Returns a curried equivalent of the provided function. The curried function - * has two unusual capabilities. First, its arguments needn't be provided one - * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the - * following are equivalent: - * - * - `g(1)(2)(3)` - * - `g(1)(2, 3)` - * - `g(1, 2)(3)` - * - `g(1, 2, 3)` - * - * Secondly, the special placeholder value [`R.__`](#__) may be used to specify - * "gaps", allowing partial application of any combination of arguments, - * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), - * the following are equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (* -> a) -> (* -> a) - * @param {Function} fn The function to curry. - * @return {Function} A new, curried function. - * @see R.curryN, R.partial - * @example - * - * const addFourNumbers = (a, b, c, d) => a + b + c + d; - * - * const curriedAddFourNumbers = R.curry(addFourNumbers); - * const f = curriedAddFourNumbers(1, 2); - * const g = f(3); - * g(4); //=> 10 - */ - - -var curry = -/*#__PURE__*/ -_curry1(function curry(fn) { - return curryN(fn.length, fn); -}); - -module.exports = curry; \ No newline at end of file diff --git a/node_modules/ramda/src/curryN.js b/node_modules/ramda/src/curryN.js deleted file mode 100644 index d168f40..0000000 --- a/node_modules/ramda/src/curryN.js +++ /dev/null @@ -1,70 +0,0 @@ -var _arity = -/*#__PURE__*/ -require("./internal/_arity"); - -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _curryN = -/*#__PURE__*/ -require("./internal/_curryN"); -/** - * Returns a curried equivalent of the provided function, with the specified - * arity. The curried function has two unusual capabilities. First, its - * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the - * following are equivalent: - * - * - `g(1)(2)(3)` - * - `g(1)(2, 3)` - * - `g(1, 2)(3)` - * - `g(1, 2, 3)` - * - * Secondly, the special placeholder value [`R.__`](#__) may be used to specify - * "gaps", allowing partial application of any combination of arguments, - * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), - * the following are equivalent: - * - * - `g(1, 2, 3)` - * - `g(_, 2, 3)(1)` - * - `g(_, _, 3)(1)(2)` - * - `g(_, _, 3)(1, 2)` - * - `g(_, 2)(1)(3)` - * - `g(_, 2)(1, 3)` - * - `g(_, 2)(_, 3)(1)` - * - * @func - * @memberOf R - * @since v0.5.0 - * @category Function - * @sig Number -> (* -> a) -> (* -> a) - * @param {Number} length The arity for the returned function. - * @param {Function} fn The function to curry. - * @return {Function} A new, curried function. - * @see R.curry - * @example - * - * const sumArgs = (...args) => R.sum(args); - * - * const curriedAddFourNumbers = R.curryN(4, sumArgs); - * const f = curriedAddFourNumbers(1, 2); - * const g = f(3); - * g(4); //=> 10 - */ - - -var curryN = -/*#__PURE__*/ -_curry2(function curryN(length, fn) { - if (length === 1) { - return _curry1(fn); - } - - return _arity(length, _curryN(length, [], fn)); -}); - -module.exports = curryN; \ No newline at end of file diff --git a/node_modules/ramda/src/dec.js b/node_modules/ramda/src/dec.js deleted file mode 100644 index a48daae..0000000 --- a/node_modules/ramda/src/dec.js +++ /dev/null @@ -1,24 +0,0 @@ -var add = -/*#__PURE__*/ -require("./add"); -/** - * Decrements its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} n - 1 - * @see R.inc - * @example - * - * R.dec(42); //=> 41 - */ - - -var dec = -/*#__PURE__*/ -add(-1); -module.exports = dec; \ No newline at end of file diff --git a/node_modules/ramda/src/defaultTo.js b/node_modules/ramda/src/defaultTo.js deleted file mode 100644 index 5f46bf9..0000000 --- a/node_modules/ramda/src/defaultTo.js +++ /dev/null @@ -1,35 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns the second argument if it is not `null`, `undefined` or `NaN`; - * otherwise the first argument is returned. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Logic - * @sig a -> b -> a | b - * @param {a} default The default value. - * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`. - * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value - * @example - * - * const defaultTo42 = R.defaultTo(42); - * - * defaultTo42(null); //=> 42 - * defaultTo42(undefined); //=> 42 - * defaultTo42(false); //=> false - * defaultTo42('Ramda'); //=> 'Ramda' - * // parseInt('string') results in NaN - * defaultTo42(parseInt('string')); //=> 42 - */ - - -var defaultTo = -/*#__PURE__*/ -_curry2(function defaultTo(d, v) { - return v == null || v !== v ? d : v; -}); - -module.exports = defaultTo; \ No newline at end of file diff --git a/node_modules/ramda/src/descend.js b/node_modules/ramda/src/descend.js deleted file mode 100644 index 4fac1ee..0000000 --- a/node_modules/ramda/src/descend.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Makes a descending comparator function out of a function that returns a value - * that can be compared with `<` and `>`. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Function - * @sig Ord b => (a -> b) -> a -> a -> Number - * @param {Function} fn A function of arity one that returns a value that can be compared - * @param {*} a The first item to be compared. - * @param {*} b The second item to be compared. - * @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0` - * @see R.ascend - * @example - * - * const byAge = R.descend(R.prop('age')); - * const people = [ - * { name: 'Emma', age: 70 }, - * { name: 'Peter', age: 78 }, - * { name: 'Mikhail', age: 62 }, - * ]; - * const peopleByOldestFirst = R.sort(byAge, people); - * //=> [{ name: 'Peter', age: 78 }, { name: 'Emma', age: 70 }, { name: 'Mikhail', age: 62 }] - */ - - -var descend = -/*#__PURE__*/ -_curry3(function descend(fn, a, b) { - var aa = fn(a); - var bb = fn(b); - return aa > bb ? -1 : aa < bb ? 1 : 0; -}); - -module.exports = descend; \ No newline at end of file diff --git a/node_modules/ramda/src/difference.js b/node_modules/ramda/src/difference.js deleted file mode 100644 index 675f1c6..0000000 --- a/node_modules/ramda/src/difference.js +++ /dev/null @@ -1,54 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _Set = -/*#__PURE__*/ -require("./internal/_Set"); -/** - * Finds the set (i.e. no duplicates) of all elements in the first list not - * contained in the second list. Objects and Arrays are compared in terms of - * value equality, not reference equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` that are not in `list2`. - * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without - * @example - * - * R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2] - * R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5] - * R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}] - */ - - -var difference = -/*#__PURE__*/ -_curry2(function difference(first, second) { - var out = []; - var idx = 0; - var firstLen = first.length; - var secondLen = second.length; - var toFilterOut = new _Set(); - - for (var i = 0; i < secondLen; i += 1) { - toFilterOut.add(second[i]); - } - - while (idx < firstLen) { - if (toFilterOut.add(first[idx])) { - out[out.length] = first[idx]; - } - - idx += 1; - } - - return out; -}); - -module.exports = difference; \ No newline at end of file diff --git a/node_modules/ramda/src/differenceWith.js b/node_modules/ramda/src/differenceWith.js deleted file mode 100644 index f8b6962..0000000 --- a/node_modules/ramda/src/differenceWith.js +++ /dev/null @@ -1,50 +0,0 @@ -var _includesWith = -/*#__PURE__*/ -require("./internal/_includesWith"); - -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Finds the set (i.e. no duplicates) of all elements in the first list not - * contained in the second list. Duplication is determined according to the - * value returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` that are not in `list2`. - * @see R.difference, R.symmetricDifference, R.symmetricDifferenceWith - * @example - * - * const cmp = (x, y) => x.a === y.a; - * const l1 = [{a: 1}, {a: 2}, {a: 3}]; - * const l2 = [{a: 3}, {a: 4}]; - * R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}] - */ - - -var differenceWith = -/*#__PURE__*/ -_curry3(function differenceWith(pred, first, second) { - var out = []; - var idx = 0; - var firstLen = first.length; - - while (idx < firstLen) { - if (!_includesWith(pred, first[idx], second) && !_includesWith(pred, first[idx], out)) { - out.push(first[idx]); - } - - idx += 1; - } - - return out; -}); - -module.exports = differenceWith; \ No newline at end of file diff --git a/node_modules/ramda/src/dissoc.js b/node_modules/ramda/src/dissoc.js deleted file mode 100644 index 393e312..0000000 --- a/node_modules/ramda/src/dissoc.js +++ /dev/null @@ -1,35 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns a new object that does not contain a `prop` property. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Object - * @sig String -> {k: v} -> {k: v} - * @param {String} prop The name of the property to dissociate - * @param {Object} obj The object to clone - * @return {Object} A new object equivalent to the original but without the specified property - * @see R.assoc, R.omit - * @example - * - * R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3} - */ - - -var dissoc = -/*#__PURE__*/ -_curry2(function dissoc(prop, obj) { - var result = {}; - - for (var p in obj) { - result[p] = obj[p]; - } - - delete result[prop]; - return result; -}); - -module.exports = dissoc; \ No newline at end of file diff --git a/node_modules/ramda/src/dissocPath.js b/node_modules/ramda/src/dissocPath.js deleted file mode 100644 index ad5319e..0000000 --- a/node_modules/ramda/src/dissocPath.js +++ /dev/null @@ -1,74 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _isInteger = -/*#__PURE__*/ -require("./internal/_isInteger"); - -var _isArray = -/*#__PURE__*/ -require("./internal/_isArray"); - -var assoc = -/*#__PURE__*/ -require("./assoc"); - -var dissoc = -/*#__PURE__*/ -require("./dissoc"); - -var remove = -/*#__PURE__*/ -require("./remove"); - -var update = -/*#__PURE__*/ -require("./update"); -/** - * Makes a shallow clone of an object, omitting the property at the given path. - * Note that this copies and flattens prototype properties onto the new object - * as well. All non-primitive properties are copied by reference. - * - * @func - * @memberOf R - * @since v0.11.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {k: v} -> {k: v} - * @param {Array} path The path to the value to omit - * @param {Object} obj The object to clone - * @return {Object} A new object without the property at path - * @see R.assocPath - * @example - * - * R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}} - */ - - -var dissocPath = -/*#__PURE__*/ -_curry2(function dissocPath(path, obj) { - switch (path.length) { - case 0: - return obj; - - case 1: - return _isInteger(path[0]) && _isArray(obj) ? remove(path[0], 1, obj) : dissoc(path[0], obj); - - default: - var head = path[0]; - var tail = Array.prototype.slice.call(path, 1); - - if (obj[head] == null) { - return obj; - } else if (_isInteger(head) && _isArray(obj)) { - return update(head, dissocPath(tail, obj[head]), obj); - } else { - return assoc(head, dissocPath(tail, obj[head]), obj); - } - - } -}); - -module.exports = dissocPath; \ No newline at end of file diff --git a/node_modules/ramda/src/divide.js b/node_modules/ramda/src/divide.js deleted file mode 100644 index ff2475f..0000000 --- a/node_modules/ramda/src/divide.js +++ /dev/null @@ -1,34 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Divides two numbers. Equivalent to `a / b`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a / b`. - * @see R.multiply - * @example - * - * R.divide(71, 100); //=> 0.71 - * - * const half = R.divide(R.__, 2); - * half(42); //=> 21 - * - * const reciprocal = R.divide(1); - * reciprocal(4); //=> 0.25 - */ - - -var divide = -/*#__PURE__*/ -_curry2(function divide(a, b) { - return a / b; -}); - -module.exports = divide; \ No newline at end of file diff --git a/node_modules/ramda/src/drop.js b/node_modules/ramda/src/drop.js deleted file mode 100644 index 786d112..0000000 --- a/node_modules/ramda/src/drop.js +++ /dev/null @@ -1,50 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xdrop = -/*#__PURE__*/ -require("./internal/_xdrop"); - -var slice = -/*#__PURE__*/ -require("./slice"); -/** - * Returns all but the first `n` elements of the given list, string, or - * transducer/transformer (or object with a `drop` method). - * - * Dispatches to the `drop` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n - * @param {*} list - * @return {*} A copy of list without the first `n` elements - * @see R.take, R.transduce, R.dropLast, R.dropWhile - * @example - * - * R.drop(1, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] - * R.drop(2, ['foo', 'bar', 'baz']); //=> ['baz'] - * R.drop(3, ['foo', 'bar', 'baz']); //=> [] - * R.drop(4, ['foo', 'bar', 'baz']); //=> [] - * R.drop(3, 'ramda'); //=> 'da' - */ - - -var drop = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['drop'], _xdrop, function drop(n, xs) { - return slice(Math.max(0, n), Infinity, xs); -})); - -module.exports = drop; \ No newline at end of file diff --git a/node_modules/ramda/src/dropLast.js b/node_modules/ramda/src/dropLast.js deleted file mode 100644 index 37b878e..0000000 --- a/node_modules/ramda/src/dropLast.js +++ /dev/null @@ -1,47 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _dropLast = -/*#__PURE__*/ -require("./internal/_dropLast"); - -var _xdropLast = -/*#__PURE__*/ -require("./internal/_xdropLast"); -/** - * Returns a list containing all but the last `n` elements of the given `list`. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n The number of elements of `list` to skip. - * @param {Array} list The list of elements to consider. - * @return {Array} A copy of the list with only the first `list.length - n` elements - * @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile - * @example - * - * R.dropLast(1, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] - * R.dropLast(2, ['foo', 'bar', 'baz']); //=> ['foo'] - * R.dropLast(3, ['foo', 'bar', 'baz']); //=> [] - * R.dropLast(4, ['foo', 'bar', 'baz']); //=> [] - * R.dropLast(3, 'ramda'); //=> 'ra' - */ - - -var dropLast = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xdropLast, _dropLast)); - -module.exports = dropLast; \ No newline at end of file diff --git a/node_modules/ramda/src/dropLastWhile.js b/node_modules/ramda/src/dropLastWhile.js deleted file mode 100644 index cfacd80..0000000 --- a/node_modules/ramda/src/dropLastWhile.js +++ /dev/null @@ -1,51 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _dropLastWhile = -/*#__PURE__*/ -require("./internal/_dropLastWhile"); - -var _xdropLastWhile = -/*#__PURE__*/ -require("./internal/_xdropLastWhile"); -/** - * Returns a new list excluding all the tailing elements of a given list which - * satisfy the supplied predicate function. It passes each value from the right - * to the supplied predicate function, skipping elements until the predicate - * function returns a `falsy` value. The predicate function is applied to one argument: - * *(value)*. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @sig (a -> Boolean) -> String -> String - * @param {Function} predicate The function to be called on each element - * @param {Array} xs The collection to iterate over. - * @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`. - * @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile - * @example - * - * const lteThree = x => x <= 3; - * - * R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4] - * - * R.dropLastWhile(x => x !== 'd' , 'Ramda'); //=> 'Ramd' - */ - - -var dropLastWhile = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xdropLastWhile, _dropLastWhile)); - -module.exports = dropLastWhile; \ No newline at end of file diff --git a/node_modules/ramda/src/dropRepeats.js b/node_modules/ramda/src/dropRepeats.js deleted file mode 100644 index f8fd651..0000000 --- a/node_modules/ramda/src/dropRepeats.js +++ /dev/null @@ -1,50 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xdropRepeatsWith = -/*#__PURE__*/ -require("./internal/_xdropRepeatsWith"); - -var dropRepeatsWith = -/*#__PURE__*/ -require("./dropRepeatsWith"); - -var equals = -/*#__PURE__*/ -require("./equals"); -/** - * Returns a new list without any consecutively repeating elements. - * [`R.equals`](#equals) is used to determine equality. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig [a] -> [a] - * @param {Array} list The array to consider. - * @return {Array} `list` without repeating elements. - * @see R.transduce - * @example - * - * R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2] - */ - - -var dropRepeats = -/*#__PURE__*/ -_curry1( -/*#__PURE__*/ -_dispatchable([], -/*#__PURE__*/ -_xdropRepeatsWith(equals), -/*#__PURE__*/ -dropRepeatsWith(equals))); - -module.exports = dropRepeats; \ No newline at end of file diff --git a/node_modules/ramda/src/dropRepeatsWith.js b/node_modules/ramda/src/dropRepeatsWith.js deleted file mode 100644 index c6b11dd..0000000 --- a/node_modules/ramda/src/dropRepeatsWith.js +++ /dev/null @@ -1,63 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xdropRepeatsWith = -/*#__PURE__*/ -require("./internal/_xdropRepeatsWith"); - -var last = -/*#__PURE__*/ -require("./last"); -/** - * Returns a new list without any consecutively repeating elements. Equality is - * determined by applying the supplied predicate to each pair of consecutive elements. The - * first element in a series of equal elements will be preserved. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig ((a, a) -> Boolean) -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list The array to consider. - * @return {Array} `list` without repeating elements. - * @see R.transduce - * @example - * - * const l = [1, -1, 1, 3, 4, -4, -4, -5, 5, 3, 3]; - * R.dropRepeatsWith(R.eqBy(Math.abs), l); //=> [1, 3, 4, -5, 3] - */ - - -var dropRepeatsWith = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xdropRepeatsWith, function dropRepeatsWith(pred, list) { - var result = []; - var idx = 1; - var len = list.length; - - if (len !== 0) { - result[0] = list[0]; - - while (idx < len) { - if (!pred(last(result), list[idx])) { - result[result.length] = list[idx]; - } - - idx += 1; - } - } - - return result; -})); - -module.exports = dropRepeatsWith; \ No newline at end of file diff --git a/node_modules/ramda/src/dropWhile.js b/node_modules/ramda/src/dropWhile.js deleted file mode 100644 index 61206c9..0000000 --- a/node_modules/ramda/src/dropWhile.js +++ /dev/null @@ -1,61 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xdropWhile = -/*#__PURE__*/ -require("./internal/_xdropWhile"); - -var slice = -/*#__PURE__*/ -require("./slice"); -/** - * Returns a new list excluding the leading elements of a given list which - * satisfy the supplied predicate function. It passes each value to the supplied - * predicate function, skipping elements while the predicate function returns - * `true`. The predicate function is applied to one argument: *(value)*. - * - * Dispatches to the `dropWhile` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @sig (a -> Boolean) -> String -> String - * @param {Function} fn The function called per iteration. - * @param {Array} xs The collection to iterate over. - * @return {Array} A new array. - * @see R.takeWhile, R.transduce, R.addIndex - * @example - * - * const lteTwo = x => x <= 2; - * - * R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1] - * - * R.dropWhile(x => x !== 'd' , 'Ramda'); //=> 'da' - */ - - -var dropWhile = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['dropWhile'], _xdropWhile, function dropWhile(pred, xs) { - var idx = 0; - var len = xs.length; - - while (idx < len && pred(xs[idx])) { - idx += 1; - } - - return slice(idx, Infinity, xs); -})); - -module.exports = dropWhile; \ No newline at end of file diff --git a/node_modules/ramda/src/either.js b/node_modules/ramda/src/either.js deleted file mode 100644 index b0fbcf8..0000000 --- a/node_modules/ramda/src/either.js +++ /dev/null @@ -1,56 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _isFunction = -/*#__PURE__*/ -require("./internal/_isFunction"); - -var lift = -/*#__PURE__*/ -require("./lift"); - -var or = -/*#__PURE__*/ -require("./or"); -/** - * A function wrapping calls to the two functions in an `||` operation, - * returning the result of the first function if it is truth-y and the result - * of the second function otherwise. Note that this is short-circuited, - * meaning that the second function will not be invoked if the first returns a - * truth-y value. - * - * In addition to functions, `R.either` also accepts any fantasy-land compatible - * applicative functor. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) - * @param {Function} f a predicate - * @param {Function} g another predicate - * @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together. - * @see R.or - * @example - * - * const gt10 = x => x > 10; - * const even = x => x % 2 === 0; - * const f = R.either(gt10, even); - * f(101); //=> true - * f(8); //=> true - * - * R.either(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(55) - * R.either([false, false, 'a'], [11]) // => [11, 11, "a"] - */ - - -var either = -/*#__PURE__*/ -_curry2(function either(f, g) { - return _isFunction(f) ? function _either() { - return f.apply(this, arguments) || g.apply(this, arguments); - } : lift(or)(f, g); -}); - -module.exports = either; \ No newline at end of file diff --git a/node_modules/ramda/src/empty.js b/node_modules/ramda/src/empty.js deleted file mode 100644 index 70346e7..0000000 --- a/node_modules/ramda/src/empty.js +++ /dev/null @@ -1,54 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _isArguments = -/*#__PURE__*/ -require("./internal/_isArguments"); - -var _isArray = -/*#__PURE__*/ -require("./internal/_isArray"); - -var _isObject = -/*#__PURE__*/ -require("./internal/_isObject"); - -var _isString = -/*#__PURE__*/ -require("./internal/_isString"); -/** - * Returns the empty value of its argument's type. Ramda defines the empty - * value of Array (`[]`), Object (`{}`), String (`''`), and Arguments. Other - * types are supported if they define `.empty`, - * `.prototype.empty` or implement the - * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid). - * - * Dispatches to the `empty` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig a -> a - * @param {*} x - * @return {*} - * @example - * - * R.empty(Just(42)); //=> Nothing() - * R.empty([1, 2, 3]); //=> [] - * R.empty('unicorns'); //=> '' - * R.empty({x: 1, y: 2}); //=> {} - */ - - -var empty = -/*#__PURE__*/ -_curry1(function empty(x) { - return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments(x) ? function () { - return arguments; - }() : void 0 // else - ; -}); - -module.exports = empty; \ No newline at end of file diff --git a/node_modules/ramda/src/endsWith.js b/node_modules/ramda/src/endsWith.js deleted file mode 100644 index b8a5c1b..0000000 --- a/node_modules/ramda/src/endsWith.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var equals = -/*#__PURE__*/ -require("./equals"); - -var takeLast = -/*#__PURE__*/ -require("./takeLast"); -/** - * Checks if a list ends with the provided sublist. - * - * Similarly, checks if a string ends with the provided substring. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category List - * @sig [a] -> [a] -> Boolean - * @sig String -> String -> Boolean - * @param {*} suffix - * @param {*} list - * @return {Boolean} - * @see R.startsWith - * @example - * - * R.endsWith('c', 'abc') //=> true - * R.endsWith('b', 'abc') //=> false - * R.endsWith(['c'], ['a', 'b', 'c']) //=> true - * R.endsWith(['b'], ['a', 'b', 'c']) //=> false - */ - - -var endsWith = -/*#__PURE__*/ -_curry2(function (suffix, list) { - return equals(takeLast(suffix.length, list), suffix); -}); - -module.exports = endsWith; \ No newline at end of file diff --git a/node_modules/ramda/src/eqBy.js b/node_modules/ramda/src/eqBy.js deleted file mode 100644 index 18f9956..0000000 --- a/node_modules/ramda/src/eqBy.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var equals = -/*#__PURE__*/ -require("./equals"); -/** - * Takes a function and two values in its domain and returns `true` if the - * values map to the same value in the codomain; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Relation - * @sig (a -> b) -> a -> a -> Boolean - * @param {Function} f - * @param {*} x - * @param {*} y - * @return {Boolean} - * @example - * - * R.eqBy(Math.abs, 5, -5); //=> true - */ - - -var eqBy = -/*#__PURE__*/ -_curry3(function eqBy(f, x, y) { - return equals(f(x), f(y)); -}); - -module.exports = eqBy; \ No newline at end of file diff --git a/node_modules/ramda/src/eqProps.js b/node_modules/ramda/src/eqProps.js deleted file mode 100644 index 7aec035..0000000 --- a/node_modules/ramda/src/eqProps.js +++ /dev/null @@ -1,37 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var equals = -/*#__PURE__*/ -require("./equals"); -/** - * Reports whether two objects have the same value, in [`R.equals`](#equals) - * terms, for the specified property. Useful as a curried predicate. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig k -> {k: v} -> {k: v} -> Boolean - * @param {String} prop The name of the property to compare - * @param {Object} obj1 - * @param {Object} obj2 - * @return {Boolean} - * - * @example - * - * const o1 = { a: 1, b: 2, c: 3, d: 4 }; - * const o2 = { a: 10, b: 20, c: 3, d: 40 }; - * R.eqProps('a', o1, o2); //=> false - * R.eqProps('c', o1, o2); //=> true - */ - - -var eqProps = -/*#__PURE__*/ -_curry3(function eqProps(prop, obj1, obj2) { - return equals(obj1[prop], obj2[prop]); -}); - -module.exports = eqProps; \ No newline at end of file diff --git a/node_modules/ramda/src/equals.js b/node_modules/ramda/src/equals.js deleted file mode 100644 index 5b6aabc..0000000 --- a/node_modules/ramda/src/equals.js +++ /dev/null @@ -1,41 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _equals = -/*#__PURE__*/ -require("./internal/_equals"); -/** - * Returns `true` if its arguments are equivalent, `false` otherwise. Handles - * cyclical data structures. - * - * Dispatches symmetrically to the `equals` methods of both arguments, if - * present. - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Relation - * @sig a -> b -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @example - * - * R.equals(1, 1); //=> true - * R.equals(1, '1'); //=> false - * R.equals([1, 2, 3], [1, 2, 3]); //=> true - * - * const a = {}; a.v = a; - * const b = {}; b.v = b; - * R.equals(a, b); //=> true - */ - - -var equals = -/*#__PURE__*/ -_curry2(function equals(a, b) { - return _equals(a, b, [], []); -}); - -module.exports = equals; \ No newline at end of file diff --git a/node_modules/ramda/src/evolve.js b/node_modules/ramda/src/evolve.js deleted file mode 100644 index dd2f5b8..0000000 --- a/node_modules/ramda/src/evolve.js +++ /dev/null @@ -1,48 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Creates a new object by recursively evolving a shallow copy of `object`, - * according to the `transformation` functions. All non-primitive properties - * are copied by reference. - * - * A `transformation` function will not be invoked if its corresponding key - * does not exist in the evolved object. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {k: (v -> v)} -> {k: v} -> {k: v} - * @param {Object} transformations The object specifying transformation functions to apply - * to the object. - * @param {Object} object The object to be transformed. - * @return {Object} The transformed object. - * @example - * - * const tomato = {firstName: ' Tomato ', data: {elapsed: 100, remaining: 1400}, id:123}; - * const transformations = { - * firstName: R.trim, - * lastName: R.trim, // Will not get invoked. - * data: {elapsed: R.add(1), remaining: R.add(-1)} - * }; - * R.evolve(transformations, tomato); //=> {firstName: 'Tomato', data: {elapsed: 101, remaining: 1399}, id:123} - */ - - -var evolve = -/*#__PURE__*/ -_curry2(function evolve(transformations, object) { - var result = object instanceof Array ? [] : {}; - var transformation, key, type; - - for (key in object) { - transformation = transformations[key]; - type = typeof transformation; - result[key] = type === 'function' ? transformation(object[key]) : transformation && type === 'object' ? evolve(transformation, object[key]) : object[key]; - } - - return result; -}); - -module.exports = evolve; \ No newline at end of file diff --git a/node_modules/ramda/src/filter.js b/node_modules/ramda/src/filter.js deleted file mode 100644 index b8537a8..0000000 --- a/node_modules/ramda/src/filter.js +++ /dev/null @@ -1,72 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _filter = -/*#__PURE__*/ -require("./internal/_filter"); - -var _isObject = -/*#__PURE__*/ -require("./internal/_isObject"); - -var _reduce = -/*#__PURE__*/ -require("./internal/_reduce"); - -var _xfilter = -/*#__PURE__*/ -require("./internal/_xfilter"); - -var keys = -/*#__PURE__*/ -require("./keys"); -/** - * Takes a predicate and a `Filterable`, and returns a new filterable of the - * same type containing the members of the given filterable which satisfy the - * given predicate. Filterable objects include plain objects or any object - * that has a filter method such as `Array`. - * - * Dispatches to the `filter` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> f a - * @param {Function} pred - * @param {Array} filterable - * @return {Array} Filterable - * @see R.reject, R.transduce, R.addIndex - * @example - * - * const isEven = n => n % 2 === 0; - * - * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4] - * - * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} - */ - - -var filter = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['filter'], _xfilter, function (pred, filterable) { - return _isObject(filterable) ? _reduce(function (acc, key) { - if (pred(filterable[key])) { - acc[key] = filterable[key]; - } - - return acc; - }, {}, keys(filterable)) : // else - _filter(pred, filterable); -})); - -module.exports = filter; \ No newline at end of file diff --git a/node_modules/ramda/src/find.js b/node_modules/ramda/src/find.js deleted file mode 100644 index 084b4ce..0000000 --- a/node_modules/ramda/src/find.js +++ /dev/null @@ -1,55 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xfind = -/*#__PURE__*/ -require("./internal/_xfind"); -/** - * Returns the first element of the list which matches the predicate, or - * `undefined` if no element matches. - * - * Dispatches to the `find` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> a | undefined - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Object} The element found, or `undefined`. - * @see R.transduce - * @example - * - * const xs = [{a: 1}, {a: 2}, {a: 3}]; - * R.find(R.propEq('a', 2))(xs); //=> {a: 2} - * R.find(R.propEq('a', 4))(xs); //=> undefined - */ - - -var find = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['find'], _xfind, function find(fn, list) { - var idx = 0; - var len = list.length; - - while (idx < len) { - if (fn(list[idx])) { - return list[idx]; - } - - idx += 1; - } -})); - -module.exports = find; \ No newline at end of file diff --git a/node_modules/ramda/src/findIndex.js b/node_modules/ramda/src/findIndex.js deleted file mode 100644 index d9b9f38..0000000 --- a/node_modules/ramda/src/findIndex.js +++ /dev/null @@ -1,55 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xfindIndex = -/*#__PURE__*/ -require("./internal/_xfindIndex"); -/** - * Returns the index of the first element of the list which matches the - * predicate, or `-1` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> Number - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Number} The index of the element found, or `-1`. - * @see R.transduce - * @example - * - * const xs = [{a: 1}, {a: 2}, {a: 3}]; - * R.findIndex(R.propEq('a', 2))(xs); //=> 1 - * R.findIndex(R.propEq('a', 4))(xs); //=> -1 - */ - - -var findIndex = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xfindIndex, function findIndex(fn, list) { - var idx = 0; - var len = list.length; - - while (idx < len) { - if (fn(list[idx])) { - return idx; - } - - idx += 1; - } - - return -1; -})); - -module.exports = findIndex; \ No newline at end of file diff --git a/node_modules/ramda/src/findLast.js b/node_modules/ramda/src/findLast.js deleted file mode 100644 index eafc964..0000000 --- a/node_modules/ramda/src/findLast.js +++ /dev/null @@ -1,52 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xfindLast = -/*#__PURE__*/ -require("./internal/_xfindLast"); -/** - * Returns the last element of the list which matches the predicate, or - * `undefined` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> a | undefined - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Object} The element found, or `undefined`. - * @see R.transduce - * @example - * - * const xs = [{a: 1, b: 0}, {a:1, b: 1}]; - * R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1} - * R.findLast(R.propEq('a', 4))(xs); //=> undefined - */ - - -var findLast = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xfindLast, function findLast(fn, list) { - var idx = list.length - 1; - - while (idx >= 0) { - if (fn(list[idx])) { - return list[idx]; - } - - idx -= 1; - } -})); - -module.exports = findLast; \ No newline at end of file diff --git a/node_modules/ramda/src/findLastIndex.js b/node_modules/ramda/src/findLastIndex.js deleted file mode 100644 index 084b85f..0000000 --- a/node_modules/ramda/src/findLastIndex.js +++ /dev/null @@ -1,54 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xfindLastIndex = -/*#__PURE__*/ -require("./internal/_xfindLastIndex"); -/** - * Returns the index of the last element of the list which matches the - * predicate, or `-1` if no element matches. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> Boolean) -> [a] -> Number - * @param {Function} fn The predicate function used to determine if the element is the - * desired one. - * @param {Array} list The array to consider. - * @return {Number} The index of the element found, or `-1`. - * @see R.transduce - * @example - * - * const xs = [{a: 1, b: 0}, {a:1, b: 1}]; - * R.findLastIndex(R.propEq('a', 1))(xs); //=> 1 - * R.findLastIndex(R.propEq('a', 4))(xs); //=> -1 - */ - - -var findLastIndex = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xfindLastIndex, function findLastIndex(fn, list) { - var idx = list.length - 1; - - while (idx >= 0) { - if (fn(list[idx])) { - return idx; - } - - idx -= 1; - } - - return -1; -})); - -module.exports = findLastIndex; \ No newline at end of file diff --git a/node_modules/ramda/src/flatten.js b/node_modules/ramda/src/flatten.js deleted file mode 100644 index 620f487..0000000 --- a/node_modules/ramda/src/flatten.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _makeFlat = -/*#__PURE__*/ -require("./internal/_makeFlat"); -/** - * Returns a new list by pulling every item out of it (and all its sub-arrays) - * and putting them in a new array, depth-first. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] - * @param {Array} list The array to consider. - * @return {Array} The flattened list. - * @see R.unnest - * @example - * - * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]); - * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] - */ - - -var flatten = -/*#__PURE__*/ -_curry1( -/*#__PURE__*/ -_makeFlat(true)); - -module.exports = flatten; \ No newline at end of file diff --git a/node_modules/ramda/src/flip.js b/node_modules/ramda/src/flip.js deleted file mode 100644 index 600d703..0000000 --- a/node_modules/ramda/src/flip.js +++ /dev/null @@ -1,41 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); -/** - * Returns a new function much like the supplied one, except that the first two - * arguments' order is reversed. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z) - * @param {Function} fn The function to invoke with its first two parameters reversed. - * @return {*} The result of invoking `fn` with its first two parameters' order reversed. - * @example - * - * const mergeThree = (a, b, c) => [].concat(a, b, c); - * - * mergeThree(1, 2, 3); //=> [1, 2, 3] - * - * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3] - * @symb R.flip(f)(a, b, c) = f(b, a, c) - */ - - -var flip = -/*#__PURE__*/ -_curry1(function flip(fn) { - return curryN(fn.length, function (a, b) { - var args = Array.prototype.slice.call(arguments, 0); - args[0] = b; - args[1] = a; - return fn.apply(this, args); - }); -}); - -module.exports = flip; \ No newline at end of file diff --git a/node_modules/ramda/src/forEach.js b/node_modules/ramda/src/forEach.js deleted file mode 100644 index 8997268..0000000 --- a/node_modules/ramda/src/forEach.js +++ /dev/null @@ -1,60 +0,0 @@ -var _checkForMethod = -/*#__PURE__*/ -require("./internal/_checkForMethod"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Iterate over an input `list`, calling a provided function `fn` for each - * element in the list. - * - * `fn` receives one argument: *(value)*. - * - * Note: `R.forEach` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.forEach` method. For more - * details on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description - * - * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns - * the original array. In some libraries this function is named `each`. - * - * Dispatches to the `forEach` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig (a -> *) -> [a] -> [a] - * @param {Function} fn The function to invoke. Receives one argument, `value`. - * @param {Array} list The list to iterate over. - * @return {Array} The original list. - * @see R.addIndex - * @example - * - * const printXPlusFive = x => console.log(x + 5); - * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3] - * // logs 6 - * // logs 7 - * // logs 8 - * @symb R.forEach(f, [a, b, c]) = [a, b, c] - */ - - -var forEach = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_checkForMethod('forEach', function forEach(fn, list) { - var len = list.length; - var idx = 0; - - while (idx < len) { - fn(list[idx]); - idx += 1; - } - - return list; -})); - -module.exports = forEach; \ No newline at end of file diff --git a/node_modules/ramda/src/forEachObjIndexed.js b/node_modules/ramda/src/forEachObjIndexed.js deleted file mode 100644 index 14e270c..0000000 --- a/node_modules/ramda/src/forEachObjIndexed.js +++ /dev/null @@ -1,47 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var keys = -/*#__PURE__*/ -require("./keys"); -/** - * Iterate over an input `object`, calling a provided function `fn` for each - * key and value in the object. - * - * `fn` receives three argument: *(value, key, obj)*. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Object - * @sig ((a, String, StrMap a) -> Any) -> StrMap a -> StrMap a - * @param {Function} fn The function to invoke. Receives three argument, `value`, `key`, `obj`. - * @param {Object} obj The object to iterate over. - * @return {Object} The original object. - * @example - * - * const printKeyConcatValue = (value, key) => console.log(key + ':' + value); - * R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2} - * // logs x:1 - * // logs y:2 - * @symb R.forEachObjIndexed(f, {x: a, y: b}) = {x: a, y: b} - */ - - -var forEachObjIndexed = -/*#__PURE__*/ -_curry2(function forEachObjIndexed(fn, obj) { - var keyList = keys(obj); - var idx = 0; - - while (idx < keyList.length) { - var key = keyList[idx]; - fn(obj[key], key, obj); - idx += 1; - } - - return obj; -}); - -module.exports = forEachObjIndexed; \ No newline at end of file diff --git a/node_modules/ramda/src/fromPairs.js b/node_modules/ramda/src/fromPairs.js deleted file mode 100644 index 504d612..0000000 --- a/node_modules/ramda/src/fromPairs.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Creates a new object from a list key-value pairs. If a key appears in - * multiple pairs, the rightmost pair is included in the object. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [[k,v]] -> {k: v} - * @param {Array} pairs An array of two-element arrays that will be the keys and values of the output object. - * @return {Object} The object made by pairing up `keys` and `values`. - * @see R.toPairs, R.pair - * @example - * - * R.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3} - */ - - -var fromPairs = -/*#__PURE__*/ -_curry1(function fromPairs(pairs) { - var result = {}; - var idx = 0; - - while (idx < pairs.length) { - result[pairs[idx][0]] = pairs[idx][1]; - idx += 1; - } - - return result; -}); - -module.exports = fromPairs; \ No newline at end of file diff --git a/node_modules/ramda/src/groupBy.js b/node_modules/ramda/src/groupBy.js deleted file mode 100644 index 8fcd0e5..0000000 --- a/node_modules/ramda/src/groupBy.js +++ /dev/null @@ -1,69 +0,0 @@ -var _checkForMethod = -/*#__PURE__*/ -require("./internal/_checkForMethod"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var reduceBy = -/*#__PURE__*/ -require("./reduceBy"); -/** - * Splits a list into sub-lists stored in an object, based on the result of - * calling a String-returning function on each element, and grouping the - * results according to values returned. - * - * Dispatches to the `groupBy` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> String) -> [a] -> {String: [a]} - * @param {Function} fn Function :: a -> String - * @param {Array} list The array to group - * @return {Object} An object with the output of `fn` for keys, mapped to arrays of elements - * that produced that key when passed to `fn`. - * @see R.reduceBy, R.transduce - * @example - * - * const byGrade = R.groupBy(function(student) { - * const score = student.score; - * return score < 65 ? 'F' : - * score < 70 ? 'D' : - * score < 80 ? 'C' : - * score < 90 ? 'B' : 'A'; - * }); - * const students = [{name: 'Abby', score: 84}, - * {name: 'Eddy', score: 58}, - * // ... - * {name: 'Jack', score: 69}]; - * byGrade(students); - * // { - * // 'A': [{name: 'Dianne', score: 99}], - * // 'B': [{name: 'Abby', score: 84}] - * // // ..., - * // 'F': [{name: 'Eddy', score: 58}] - * // } - */ - - -var groupBy = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_checkForMethod('groupBy', -/*#__PURE__*/ -reduceBy(function (acc, item) { - if (acc == null) { - acc = []; - } - - acc.push(item); - return acc; -}, null))); - -module.exports = groupBy; \ No newline at end of file diff --git a/node_modules/ramda/src/groupWith.js b/node_modules/ramda/src/groupWith.js deleted file mode 100644 index 1e0786c..0000000 --- a/node_modules/ramda/src/groupWith.js +++ /dev/null @@ -1,57 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Takes a list and returns a list of lists where each sublist's elements are - * all satisfied pairwise comparison according to the provided function. - * Only adjacent elements are passed to the comparison function. - * - * @func - * @memberOf R - * @since v0.21.0 - * @category List - * @sig ((a, a) → Boolean) → [a] → [[a]] - * @param {Function} fn Function for determining whether two given (adjacent) - * elements should be in the same group - * @param {Array} list The array to group. Also accepts a string, which will be - * treated as a list of characters. - * @return {List} A list that contains sublists of elements, - * whose concatenations are equal to the original list. - * @example - * - * R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]] - * - * R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]] - * - * R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21]) - * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]] - * - * R.groupWith(R.eqBy(isVowel), 'aestiou') - * //=> ['ae', 'st', 'iou'] - */ - - -var groupWith = -/*#__PURE__*/ -_curry2(function (fn, list) { - var res = []; - var idx = 0; - var len = list.length; - - while (idx < len) { - var nextidx = idx + 1; - - while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) { - nextidx += 1; - } - - res.push(list.slice(idx, nextidx)); - idx = nextidx; - } - - return res; -}); - -module.exports = groupWith; \ No newline at end of file diff --git a/node_modules/ramda/src/gt.js b/node_modules/ramda/src/gt.js deleted file mode 100644 index e757ae5..0000000 --- a/node_modules/ramda/src/gt.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns `true` if the first argument is greater than the second; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @see R.lt - * @example - * - * R.gt(2, 1); //=> true - * R.gt(2, 2); //=> false - * R.gt(2, 3); //=> false - * R.gt('a', 'z'); //=> false - * R.gt('z', 'a'); //=> true - */ - - -var gt = -/*#__PURE__*/ -_curry2(function gt(a, b) { - return a > b; -}); - -module.exports = gt; \ No newline at end of file diff --git a/node_modules/ramda/src/gte.js b/node_modules/ramda/src/gte.js deleted file mode 100644 index 0ce3bef..0000000 --- a/node_modules/ramda/src/gte.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns `true` if the first argument is greater than or equal to the second; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {Number} a - * @param {Number} b - * @return {Boolean} - * @see R.lte - * @example - * - * R.gte(2, 1); //=> true - * R.gte(2, 2); //=> true - * R.gte(2, 3); //=> false - * R.gte('a', 'z'); //=> false - * R.gte('z', 'a'); //=> true - */ - - -var gte = -/*#__PURE__*/ -_curry2(function gte(a, b) { - return a >= b; -}); - -module.exports = gte; \ No newline at end of file diff --git a/node_modules/ramda/src/has.js b/node_modules/ramda/src/has.js deleted file mode 100644 index 76acb13..0000000 --- a/node_modules/ramda/src/has.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var hasPath = -/*#__PURE__*/ -require("./hasPath"); -/** - * Returns whether or not an object has an own property with the specified name - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Object - * @sig s -> {s: x} -> Boolean - * @param {String} prop The name of the property to check for. - * @param {Object} obj The object to query. - * @return {Boolean} Whether the property exists. - * @example - * - * const hasName = R.has('name'); - * hasName({name: 'alice'}); //=> true - * hasName({name: 'bob'}); //=> true - * hasName({}); //=> false - * - * const point = {x: 0, y: 0}; - * const pointHas = R.has(R.__, point); - * pointHas('x'); //=> true - * pointHas('y'); //=> true - * pointHas('z'); //=> false - */ - - -var has = -/*#__PURE__*/ -_curry2(function has(prop, obj) { - return hasPath([prop], obj); -}); - -module.exports = has; \ No newline at end of file diff --git a/node_modules/ramda/src/hasIn.js b/node_modules/ramda/src/hasIn.js deleted file mode 100644 index efbe133..0000000 --- a/node_modules/ramda/src/hasIn.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns whether or not an object or its prototype chain has a property with - * the specified name - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Object - * @sig s -> {s: x} -> Boolean - * @param {String} prop The name of the property to check for. - * @param {Object} obj The object to query. - * @return {Boolean} Whether the property exists. - * @example - * - * function Rectangle(width, height) { - * this.width = width; - * this.height = height; - * } - * Rectangle.prototype.area = function() { - * return this.width * this.height; - * }; - * - * const square = new Rectangle(2, 2); - * R.hasIn('width', square); //=> true - * R.hasIn('area', square); //=> true - */ - - -var hasIn = -/*#__PURE__*/ -_curry2(function hasIn(prop, obj) { - return prop in obj; -}); - -module.exports = hasIn; \ No newline at end of file diff --git a/node_modules/ramda/src/hasPath.js b/node_modules/ramda/src/hasPath.js deleted file mode 100644 index d820200..0000000 --- a/node_modules/ramda/src/hasPath.js +++ /dev/null @@ -1,57 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _has = -/*#__PURE__*/ -require("./internal/_has"); - -var isNil = -/*#__PURE__*/ -require("./isNil"); -/** - * Returns whether or not a path exists in an object. Only the object's - * own properties are checked. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {a} -> Boolean - * @param {Array} path The path to use. - * @param {Object} obj The object to check the path in. - * @return {Boolean} Whether the path exists. - * @see R.has - * @example - * - * R.hasPath(['a', 'b'], {a: {b: 2}}); // => true - * R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true - * R.hasPath(['a', 'b'], {a: {c: 2}}); // => false - * R.hasPath(['a', 'b'], {}); // => false - */ - - -var hasPath = -/*#__PURE__*/ -_curry2(function hasPath(_path, obj) { - if (_path.length === 0 || isNil(obj)) { - return false; - } - - var val = obj; - var idx = 0; - - while (idx < _path.length) { - if (!isNil(val) && _has(_path[idx], val)) { - val = val[_path[idx]]; - idx += 1; - } else { - return false; - } - } - - return true; -}); - -module.exports = hasPath; \ No newline at end of file diff --git a/node_modules/ramda/src/head.js b/node_modules/ramda/src/head.js deleted file mode 100644 index 390ba9b..0000000 --- a/node_modules/ramda/src/head.js +++ /dev/null @@ -1,30 +0,0 @@ -var nth = -/*#__PURE__*/ -require("./nth"); -/** - * Returns the first element of the given list or string. In some libraries - * this function is named `first`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> a | Undefined - * @sig String -> String - * @param {Array|String} list - * @return {*} - * @see R.tail, R.init, R.last - * @example - * - * R.head(['fi', 'fo', 'fum']); //=> 'fi' - * R.head([]); //=> undefined - * - * R.head('abc'); //=> 'a' - * R.head(''); //=> '' - */ - - -var head = -/*#__PURE__*/ -nth(0); -module.exports = head; \ No newline at end of file diff --git a/node_modules/ramda/src/identical.js b/node_modules/ramda/src/identical.js deleted file mode 100644 index dddafcd..0000000 --- a/node_modules/ramda/src/identical.js +++ /dev/null @@ -1,39 +0,0 @@ -var _objectIs = -/*#__PURE__*/ -require("./internal/_objectIs"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns true if its arguments are identical, false otherwise. Values are - * identical if they reference the same memory. `NaN` is identical to `NaN`; - * `0` and `-0` are not identical. - * - * Note this is merely a curried version of ES6 `Object.is`. - * - * @func - * @memberOf R - * @since v0.15.0 - * @category Relation - * @sig a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @example - * - * const o = {}; - * R.identical(o, o); //=> true - * R.identical(1, 1); //=> true - * R.identical(1, '1'); //=> false - * R.identical([], []); //=> false - * R.identical(0, -0); //=> false - * R.identical(NaN, NaN); //=> true - */ - - -var identical = -/*#__PURE__*/ -_curry2(_objectIs); - -module.exports = identical; \ No newline at end of file diff --git a/node_modules/ramda/src/identity.js b/node_modules/ramda/src/identity.js deleted file mode 100644 index 5a1be71..0000000 --- a/node_modules/ramda/src/identity.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _identity = -/*#__PURE__*/ -require("./internal/_identity"); -/** - * A function that does nothing but return the parameter supplied to it. Good - * as a default or placeholder function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig a -> a - * @param {*} x The value to return. - * @return {*} The input value, `x`. - * @example - * - * R.identity(1); //=> 1 - * - * const obj = {}; - * R.identity(obj) === obj; //=> true - * @symb R.identity(a) = a - */ - - -var identity = -/*#__PURE__*/ -_curry1(_identity); - -module.exports = identity; \ No newline at end of file diff --git a/node_modules/ramda/src/ifElse.js b/node_modules/ramda/src/ifElse.js deleted file mode 100644 index 1971eb3..0000000 --- a/node_modules/ramda/src/ifElse.js +++ /dev/null @@ -1,43 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); -/** - * Creates a function that will process either the `onTrue` or the `onFalse` - * function depending upon the result of the `condition` predicate. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Logic - * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *) - * @param {Function} condition A predicate function - * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value. - * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value. - * @return {Function} A new function that will process either the `onTrue` or the `onFalse` - * function depending upon the result of the `condition` predicate. - * @see R.unless, R.when, R.cond - * @example - * - * const incCount = R.ifElse( - * R.has('count'), - * R.over(R.lensProp('count'), R.inc), - * R.assoc('count', 1) - * ); - * incCount({}); //=> { count: 1 } - * incCount({ count: 1 }); //=> { count: 2 } - */ - - -var ifElse = -/*#__PURE__*/ -_curry3(function ifElse(condition, onTrue, onFalse) { - return curryN(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() { - return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments); - }); -}); - -module.exports = ifElse; \ No newline at end of file diff --git a/node_modules/ramda/src/inc.js b/node_modules/ramda/src/inc.js deleted file mode 100644 index c4b9112..0000000 --- a/node_modules/ramda/src/inc.js +++ /dev/null @@ -1,24 +0,0 @@ -var add = -/*#__PURE__*/ -require("./add"); -/** - * Increments its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} n + 1 - * @see R.dec - * @example - * - * R.inc(42); //=> 43 - */ - - -var inc = -/*#__PURE__*/ -add(1); -module.exports = inc; \ No newline at end of file diff --git a/node_modules/ramda/src/includes.js b/node_modules/ramda/src/includes.js deleted file mode 100644 index 39c5610..0000000 --- a/node_modules/ramda/src/includes.js +++ /dev/null @@ -1,36 +0,0 @@ -var _includes = -/*#__PURE__*/ -require("./internal/_includes"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns `true` if the specified value is equal, in [`R.equals`](#equals) - * terms, to at least one element of the given list; `false` otherwise. - * Works also with strings. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category List - * @sig a -> [a] -> Boolean - * @param {Object} a The item to compare against. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. - * @see R.any - * @example - * - * R.includes(3, [1, 2, 3]); //=> true - * R.includes(4, [1, 2, 3]); //=> false - * R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true - * R.includes([42], [[42]]); //=> true - * R.includes('ba', 'banana'); //=>true - */ - - -var includes = -/*#__PURE__*/ -_curry2(_includes); - -module.exports = includes; \ No newline at end of file diff --git a/node_modules/ramda/src/index.js b/node_modules/ramda/src/index.js deleted file mode 100644 index 3213efb..0000000 --- a/node_modules/ramda/src/index.js +++ /dev/null @@ -1,772 +0,0 @@ -module.exports = {}; -module.exports.F = -/*#__PURE__*/ -require("./F"); -module.exports.T = -/*#__PURE__*/ -require("./T"); -module.exports.__ = -/*#__PURE__*/ -require("./__"); -module.exports.add = -/*#__PURE__*/ -require("./add"); -module.exports.addIndex = -/*#__PURE__*/ -require("./addIndex"); -module.exports.adjust = -/*#__PURE__*/ -require("./adjust"); -module.exports.all = -/*#__PURE__*/ -require("./all"); -module.exports.allPass = -/*#__PURE__*/ -require("./allPass"); -module.exports.always = -/*#__PURE__*/ -require("./always"); -module.exports.and = -/*#__PURE__*/ -require("./and"); -module.exports.any = -/*#__PURE__*/ -require("./any"); -module.exports.anyPass = -/*#__PURE__*/ -require("./anyPass"); -module.exports.ap = -/*#__PURE__*/ -require("./ap"); -module.exports.aperture = -/*#__PURE__*/ -require("./aperture"); -module.exports.append = -/*#__PURE__*/ -require("./append"); -module.exports.apply = -/*#__PURE__*/ -require("./apply"); -module.exports.applySpec = -/*#__PURE__*/ -require("./applySpec"); -module.exports.applyTo = -/*#__PURE__*/ -require("./applyTo"); -module.exports.ascend = -/*#__PURE__*/ -require("./ascend"); -module.exports.assoc = -/*#__PURE__*/ -require("./assoc"); -module.exports.assocPath = -/*#__PURE__*/ -require("./assocPath"); -module.exports.binary = -/*#__PURE__*/ -require("./binary"); -module.exports.bind = -/*#__PURE__*/ -require("./bind"); -module.exports.both = -/*#__PURE__*/ -require("./both"); -module.exports.call = -/*#__PURE__*/ -require("./call"); -module.exports.chain = -/*#__PURE__*/ -require("./chain"); -module.exports.clamp = -/*#__PURE__*/ -require("./clamp"); -module.exports.clone = -/*#__PURE__*/ -require("./clone"); -module.exports.comparator = -/*#__PURE__*/ -require("./comparator"); -module.exports.complement = -/*#__PURE__*/ -require("./complement"); -module.exports.compose = -/*#__PURE__*/ -require("./compose"); -module.exports.composeK = -/*#__PURE__*/ -require("./composeK"); -module.exports.composeP = -/*#__PURE__*/ -require("./composeP"); -module.exports.composeWith = -/*#__PURE__*/ -require("./composeWith"); -module.exports.concat = -/*#__PURE__*/ -require("./concat"); -module.exports.cond = -/*#__PURE__*/ -require("./cond"); -module.exports.construct = -/*#__PURE__*/ -require("./construct"); -module.exports.constructN = -/*#__PURE__*/ -require("./constructN"); -module.exports.contains = -/*#__PURE__*/ -require("./contains"); -module.exports.converge = -/*#__PURE__*/ -require("./converge"); -module.exports.countBy = -/*#__PURE__*/ -require("./countBy"); -module.exports.curry = -/*#__PURE__*/ -require("./curry"); -module.exports.curryN = -/*#__PURE__*/ -require("./curryN"); -module.exports.dec = -/*#__PURE__*/ -require("./dec"); -module.exports.defaultTo = -/*#__PURE__*/ -require("./defaultTo"); -module.exports.descend = -/*#__PURE__*/ -require("./descend"); -module.exports.difference = -/*#__PURE__*/ -require("./difference"); -module.exports.differenceWith = -/*#__PURE__*/ -require("./differenceWith"); -module.exports.dissoc = -/*#__PURE__*/ -require("./dissoc"); -module.exports.dissocPath = -/*#__PURE__*/ -require("./dissocPath"); -module.exports.divide = -/*#__PURE__*/ -require("./divide"); -module.exports.drop = -/*#__PURE__*/ -require("./drop"); -module.exports.dropLast = -/*#__PURE__*/ -require("./dropLast"); -module.exports.dropLastWhile = -/*#__PURE__*/ -require("./dropLastWhile"); -module.exports.dropRepeats = -/*#__PURE__*/ -require("./dropRepeats"); -module.exports.dropRepeatsWith = -/*#__PURE__*/ -require("./dropRepeatsWith"); -module.exports.dropWhile = -/*#__PURE__*/ -require("./dropWhile"); -module.exports.either = -/*#__PURE__*/ -require("./either"); -module.exports.empty = -/*#__PURE__*/ -require("./empty"); -module.exports.endsWith = -/*#__PURE__*/ -require("./endsWith"); -module.exports.eqBy = -/*#__PURE__*/ -require("./eqBy"); -module.exports.eqProps = -/*#__PURE__*/ -require("./eqProps"); -module.exports.equals = -/*#__PURE__*/ -require("./equals"); -module.exports.evolve = -/*#__PURE__*/ -require("./evolve"); -module.exports.filter = -/*#__PURE__*/ -require("./filter"); -module.exports.find = -/*#__PURE__*/ -require("./find"); -module.exports.findIndex = -/*#__PURE__*/ -require("./findIndex"); -module.exports.findLast = -/*#__PURE__*/ -require("./findLast"); -module.exports.findLastIndex = -/*#__PURE__*/ -require("./findLastIndex"); -module.exports.flatten = -/*#__PURE__*/ -require("./flatten"); -module.exports.flip = -/*#__PURE__*/ -require("./flip"); -module.exports.forEach = -/*#__PURE__*/ -require("./forEach"); -module.exports.forEachObjIndexed = -/*#__PURE__*/ -require("./forEachObjIndexed"); -module.exports.fromPairs = -/*#__PURE__*/ -require("./fromPairs"); -module.exports.groupBy = -/*#__PURE__*/ -require("./groupBy"); -module.exports.groupWith = -/*#__PURE__*/ -require("./groupWith"); -module.exports.gt = -/*#__PURE__*/ -require("./gt"); -module.exports.gte = -/*#__PURE__*/ -require("./gte"); -module.exports.has = -/*#__PURE__*/ -require("./has"); -module.exports.hasIn = -/*#__PURE__*/ -require("./hasIn"); -module.exports.hasPath = -/*#__PURE__*/ -require("./hasPath"); -module.exports.head = -/*#__PURE__*/ -require("./head"); -module.exports.identical = -/*#__PURE__*/ -require("./identical"); -module.exports.identity = -/*#__PURE__*/ -require("./identity"); -module.exports.ifElse = -/*#__PURE__*/ -require("./ifElse"); -module.exports.inc = -/*#__PURE__*/ -require("./inc"); -module.exports.includes = -/*#__PURE__*/ -require("./includes"); -module.exports.indexBy = -/*#__PURE__*/ -require("./indexBy"); -module.exports.indexOf = -/*#__PURE__*/ -require("./indexOf"); -module.exports.init = -/*#__PURE__*/ -require("./init"); -module.exports.innerJoin = -/*#__PURE__*/ -require("./innerJoin"); -module.exports.insert = -/*#__PURE__*/ -require("./insert"); -module.exports.insertAll = -/*#__PURE__*/ -require("./insertAll"); -module.exports.intersection = -/*#__PURE__*/ -require("./intersection"); -module.exports.intersperse = -/*#__PURE__*/ -require("./intersperse"); -module.exports.into = -/*#__PURE__*/ -require("./into"); -module.exports.invert = -/*#__PURE__*/ -require("./invert"); -module.exports.invertObj = -/*#__PURE__*/ -require("./invertObj"); -module.exports.invoker = -/*#__PURE__*/ -require("./invoker"); -module.exports.is = -/*#__PURE__*/ -require("./is"); -module.exports.isEmpty = -/*#__PURE__*/ -require("./isEmpty"); -module.exports.isNil = -/*#__PURE__*/ -require("./isNil"); -module.exports.join = -/*#__PURE__*/ -require("./join"); -module.exports.juxt = -/*#__PURE__*/ -require("./juxt"); -module.exports.keys = -/*#__PURE__*/ -require("./keys"); -module.exports.keysIn = -/*#__PURE__*/ -require("./keysIn"); -module.exports.last = -/*#__PURE__*/ -require("./last"); -module.exports.lastIndexOf = -/*#__PURE__*/ -require("./lastIndexOf"); -module.exports.length = -/*#__PURE__*/ -require("./length"); -module.exports.lens = -/*#__PURE__*/ -require("./lens"); -module.exports.lensIndex = -/*#__PURE__*/ -require("./lensIndex"); -module.exports.lensPath = -/*#__PURE__*/ -require("./lensPath"); -module.exports.lensProp = -/*#__PURE__*/ -require("./lensProp"); -module.exports.lift = -/*#__PURE__*/ -require("./lift"); -module.exports.liftN = -/*#__PURE__*/ -require("./liftN"); -module.exports.lt = -/*#__PURE__*/ -require("./lt"); -module.exports.lte = -/*#__PURE__*/ -require("./lte"); -module.exports.map = -/*#__PURE__*/ -require("./map"); -module.exports.mapAccum = -/*#__PURE__*/ -require("./mapAccum"); -module.exports.mapAccumRight = -/*#__PURE__*/ -require("./mapAccumRight"); -module.exports.mapObjIndexed = -/*#__PURE__*/ -require("./mapObjIndexed"); -module.exports.match = -/*#__PURE__*/ -require("./match"); -module.exports.mathMod = -/*#__PURE__*/ -require("./mathMod"); -module.exports.max = -/*#__PURE__*/ -require("./max"); -module.exports.maxBy = -/*#__PURE__*/ -require("./maxBy"); -module.exports.mean = -/*#__PURE__*/ -require("./mean"); -module.exports.median = -/*#__PURE__*/ -require("./median"); -module.exports.memoizeWith = -/*#__PURE__*/ -require("./memoizeWith"); -module.exports.merge = -/*#__PURE__*/ -require("./merge"); -module.exports.mergeAll = -/*#__PURE__*/ -require("./mergeAll"); -module.exports.mergeDeepLeft = -/*#__PURE__*/ -require("./mergeDeepLeft"); -module.exports.mergeDeepRight = -/*#__PURE__*/ -require("./mergeDeepRight"); -module.exports.mergeDeepWith = -/*#__PURE__*/ -require("./mergeDeepWith"); -module.exports.mergeDeepWithKey = -/*#__PURE__*/ -require("./mergeDeepWithKey"); -module.exports.mergeLeft = -/*#__PURE__*/ -require("./mergeLeft"); -module.exports.mergeRight = -/*#__PURE__*/ -require("./mergeRight"); -module.exports.mergeWith = -/*#__PURE__*/ -require("./mergeWith"); -module.exports.mergeWithKey = -/*#__PURE__*/ -require("./mergeWithKey"); -module.exports.min = -/*#__PURE__*/ -require("./min"); -module.exports.minBy = -/*#__PURE__*/ -require("./minBy"); -module.exports.modulo = -/*#__PURE__*/ -require("./modulo"); -module.exports.move = -/*#__PURE__*/ -require("./move"); -module.exports.multiply = -/*#__PURE__*/ -require("./multiply"); -module.exports.nAry = -/*#__PURE__*/ -require("./nAry"); -module.exports.negate = -/*#__PURE__*/ -require("./negate"); -module.exports.none = -/*#__PURE__*/ -require("./none"); -module.exports.not = -/*#__PURE__*/ -require("./not"); -module.exports.nth = -/*#__PURE__*/ -require("./nth"); -module.exports.nthArg = -/*#__PURE__*/ -require("./nthArg"); -module.exports.o = -/*#__PURE__*/ -require("./o"); -module.exports.objOf = -/*#__PURE__*/ -require("./objOf"); -module.exports.of = -/*#__PURE__*/ -require("./of"); -module.exports.omit = -/*#__PURE__*/ -require("./omit"); -module.exports.once = -/*#__PURE__*/ -require("./once"); -module.exports.or = -/*#__PURE__*/ -require("./or"); -module.exports.otherwise = -/*#__PURE__*/ -require("./otherwise"); -module.exports.over = -/*#__PURE__*/ -require("./over"); -module.exports.pair = -/*#__PURE__*/ -require("./pair"); -module.exports.partial = -/*#__PURE__*/ -require("./partial"); -module.exports.partialRight = -/*#__PURE__*/ -require("./partialRight"); -module.exports.partition = -/*#__PURE__*/ -require("./partition"); -module.exports.path = -/*#__PURE__*/ -require("./path"); -module.exports.paths = -/*#__PURE__*/ -require("./paths"); -module.exports.pathEq = -/*#__PURE__*/ -require("./pathEq"); -module.exports.pathOr = -/*#__PURE__*/ -require("./pathOr"); -module.exports.pathSatisfies = -/*#__PURE__*/ -require("./pathSatisfies"); -module.exports.pick = -/*#__PURE__*/ -require("./pick"); -module.exports.pickAll = -/*#__PURE__*/ -require("./pickAll"); -module.exports.pickBy = -/*#__PURE__*/ -require("./pickBy"); -module.exports.pipe = -/*#__PURE__*/ -require("./pipe"); -module.exports.pipeK = -/*#__PURE__*/ -require("./pipeK"); -module.exports.pipeP = -/*#__PURE__*/ -require("./pipeP"); -module.exports.pipeWith = -/*#__PURE__*/ -require("./pipeWith"); -module.exports.pluck = -/*#__PURE__*/ -require("./pluck"); -module.exports.prepend = -/*#__PURE__*/ -require("./prepend"); -module.exports.product = -/*#__PURE__*/ -require("./product"); -module.exports.project = -/*#__PURE__*/ -require("./project"); -module.exports.prop = -/*#__PURE__*/ -require("./prop"); -module.exports.propEq = -/*#__PURE__*/ -require("./propEq"); -module.exports.propIs = -/*#__PURE__*/ -require("./propIs"); -module.exports.propOr = -/*#__PURE__*/ -require("./propOr"); -module.exports.propSatisfies = -/*#__PURE__*/ -require("./propSatisfies"); -module.exports.props = -/*#__PURE__*/ -require("./props"); -module.exports.range = -/*#__PURE__*/ -require("./range"); -module.exports.reduce = -/*#__PURE__*/ -require("./reduce"); -module.exports.reduceBy = -/*#__PURE__*/ -require("./reduceBy"); -module.exports.reduceRight = -/*#__PURE__*/ -require("./reduceRight"); -module.exports.reduceWhile = -/*#__PURE__*/ -require("./reduceWhile"); -module.exports.reduced = -/*#__PURE__*/ -require("./reduced"); -module.exports.reject = -/*#__PURE__*/ -require("./reject"); -module.exports.remove = -/*#__PURE__*/ -require("./remove"); -module.exports.repeat = -/*#__PURE__*/ -require("./repeat"); -module.exports.replace = -/*#__PURE__*/ -require("./replace"); -module.exports.reverse = -/*#__PURE__*/ -require("./reverse"); -module.exports.scan = -/*#__PURE__*/ -require("./scan"); -module.exports.sequence = -/*#__PURE__*/ -require("./sequence"); -module.exports.set = -/*#__PURE__*/ -require("./set"); -module.exports.slice = -/*#__PURE__*/ -require("./slice"); -module.exports.sort = -/*#__PURE__*/ -require("./sort"); -module.exports.sortBy = -/*#__PURE__*/ -require("./sortBy"); -module.exports.sortWith = -/*#__PURE__*/ -require("./sortWith"); -module.exports.split = -/*#__PURE__*/ -require("./split"); -module.exports.splitAt = -/*#__PURE__*/ -require("./splitAt"); -module.exports.splitEvery = -/*#__PURE__*/ -require("./splitEvery"); -module.exports.splitWhen = -/*#__PURE__*/ -require("./splitWhen"); -module.exports.startsWith = -/*#__PURE__*/ -require("./startsWith"); -module.exports.subtract = -/*#__PURE__*/ -require("./subtract"); -module.exports.sum = -/*#__PURE__*/ -require("./sum"); -module.exports.symmetricDifference = -/*#__PURE__*/ -require("./symmetricDifference"); -module.exports.symmetricDifferenceWith = -/*#__PURE__*/ -require("./symmetricDifferenceWith"); -module.exports.tail = -/*#__PURE__*/ -require("./tail"); -module.exports.take = -/*#__PURE__*/ -require("./take"); -module.exports.takeLast = -/*#__PURE__*/ -require("./takeLast"); -module.exports.takeLastWhile = -/*#__PURE__*/ -require("./takeLastWhile"); -module.exports.takeWhile = -/*#__PURE__*/ -require("./takeWhile"); -module.exports.tap = -/*#__PURE__*/ -require("./tap"); -module.exports.test = -/*#__PURE__*/ -require("./test"); -module.exports.andThen = -/*#__PURE__*/ -require("./andThen"); -module.exports.times = -/*#__PURE__*/ -require("./times"); -module.exports.toLower = -/*#__PURE__*/ -require("./toLower"); -module.exports.toPairs = -/*#__PURE__*/ -require("./toPairs"); -module.exports.toPairsIn = -/*#__PURE__*/ -require("./toPairsIn"); -module.exports.toString = -/*#__PURE__*/ -require("./toString"); -module.exports.toUpper = -/*#__PURE__*/ -require("./toUpper"); -module.exports.transduce = -/*#__PURE__*/ -require("./transduce"); -module.exports.transpose = -/*#__PURE__*/ -require("./transpose"); -module.exports.traverse = -/*#__PURE__*/ -require("./traverse"); -module.exports.trim = -/*#__PURE__*/ -require("./trim"); -module.exports.tryCatch = -/*#__PURE__*/ -require("./tryCatch"); -module.exports.type = -/*#__PURE__*/ -require("./type"); -module.exports.unapply = -/*#__PURE__*/ -require("./unapply"); -module.exports.unary = -/*#__PURE__*/ -require("./unary"); -module.exports.uncurryN = -/*#__PURE__*/ -require("./uncurryN"); -module.exports.unfold = -/*#__PURE__*/ -require("./unfold"); -module.exports.union = -/*#__PURE__*/ -require("./union"); -module.exports.unionWith = -/*#__PURE__*/ -require("./unionWith"); -module.exports.uniq = -/*#__PURE__*/ -require("./uniq"); -module.exports.uniqBy = -/*#__PURE__*/ -require("./uniqBy"); -module.exports.uniqWith = -/*#__PURE__*/ -require("./uniqWith"); -module.exports.unless = -/*#__PURE__*/ -require("./unless"); -module.exports.unnest = -/*#__PURE__*/ -require("./unnest"); -module.exports.until = -/*#__PURE__*/ -require("./until"); -module.exports.update = -/*#__PURE__*/ -require("./update"); -module.exports.useWith = -/*#__PURE__*/ -require("./useWith"); -module.exports.values = -/*#__PURE__*/ -require("./values"); -module.exports.valuesIn = -/*#__PURE__*/ -require("./valuesIn"); -module.exports.view = -/*#__PURE__*/ -require("./view"); -module.exports.when = -/*#__PURE__*/ -require("./when"); -module.exports.where = -/*#__PURE__*/ -require("./where"); -module.exports.whereEq = -/*#__PURE__*/ -require("./whereEq"); -module.exports.without = -/*#__PURE__*/ -require("./without"); -module.exports.xor = -/*#__PURE__*/ -require("./xor"); -module.exports.xprod = -/*#__PURE__*/ -require("./xprod"); -module.exports.zip = -/*#__PURE__*/ -require("./zip"); -module.exports.zipObj = -/*#__PURE__*/ -require("./zipObj"); -module.exports.zipWith = -/*#__PURE__*/ -require("./zipWith"); -module.exports.thunkify = -/*#__PURE__*/ -require("./thunkify"); \ No newline at end of file diff --git a/node_modules/ramda/src/index.mjs b/node_modules/ramda/src/index.mjs deleted file mode 100644 index 0f80dd8..0000000 --- a/node_modules/ramda/src/index.mjs +++ /dev/null @@ -1,257 +0,0 @@ -export { default as F } from "./F.js"; -export { default as T } from "./T.js"; -export { default as __ } from "./__.js"; -export { default as add } from "./add.js"; -export { default as addIndex } from "./addIndex.js"; -export { default as adjust } from "./adjust.js"; -export { default as all } from "./all.js"; -export { default as allPass } from "./allPass.js"; -export { default as always } from "./always.js"; -export { default as and } from "./and.js"; -export { default as any } from "./any.js"; -export { default as anyPass } from "./anyPass.js"; -export { default as ap } from "./ap.js"; -export { default as aperture } from "./aperture.js"; -export { default as append } from "./append.js"; -export { default as apply } from "./apply.js"; -export { default as applySpec } from "./applySpec.js"; -export { default as applyTo } from "./applyTo.js"; -export { default as ascend } from "./ascend.js"; -export { default as assoc } from "./assoc.js"; -export { default as assocPath } from "./assocPath.js"; -export { default as binary } from "./binary.js"; -export { default as bind } from "./bind.js"; -export { default as both } from "./both.js"; -export { default as call } from "./call.js"; -export { default as chain } from "./chain.js"; -export { default as clamp } from "./clamp.js"; -export { default as clone } from "./clone.js"; -export { default as comparator } from "./comparator.js"; -export { default as complement } from "./complement.js"; -export { default as compose } from "./compose.js"; -export { default as composeK } from "./composeK.js"; -export { default as composeP } from "./composeP.js"; -export { default as composeWith } from "./composeWith.js"; -export { default as concat } from "./concat.js"; -export { default as cond } from "./cond.js"; -export { default as construct } from "./construct.js"; -export { default as constructN } from "./constructN.js"; -export { default as contains } from "./contains.js"; -export { default as converge } from "./converge.js"; -export { default as countBy } from "./countBy.js"; -export { default as curry } from "./curry.js"; -export { default as curryN } from "./curryN.js"; -export { default as dec } from "./dec.js"; -export { default as defaultTo } from "./defaultTo.js"; -export { default as descend } from "./descend.js"; -export { default as difference } from "./difference.js"; -export { default as differenceWith } from "./differenceWith.js"; -export { default as dissoc } from "./dissoc.js"; -export { default as dissocPath } from "./dissocPath.js"; -export { default as divide } from "./divide.js"; -export { default as drop } from "./drop.js"; -export { default as dropLast } from "./dropLast.js"; -export { default as dropLastWhile } from "./dropLastWhile.js"; -export { default as dropRepeats } from "./dropRepeats.js"; -export { default as dropRepeatsWith } from "./dropRepeatsWith.js"; -export { default as dropWhile } from "./dropWhile.js"; -export { default as either } from "./either.js"; -export { default as empty } from "./empty.js"; -export { default as endsWith } from "./endsWith.js"; -export { default as eqBy } from "./eqBy.js"; -export { default as eqProps } from "./eqProps.js"; -export { default as equals } from "./equals.js"; -export { default as evolve } from "./evolve.js"; -export { default as filter } from "./filter.js"; -export { default as find } from "./find.js"; -export { default as findIndex } from "./findIndex.js"; -export { default as findLast } from "./findLast.js"; -export { default as findLastIndex } from "./findLastIndex.js"; -export { default as flatten } from "./flatten.js"; -export { default as flip } from "./flip.js"; -export { default as forEach } from "./forEach.js"; -export { default as forEachObjIndexed } from "./forEachObjIndexed.js"; -export { default as fromPairs } from "./fromPairs.js"; -export { default as groupBy } from "./groupBy.js"; -export { default as groupWith } from "./groupWith.js"; -export { default as gt } from "./gt.js"; -export { default as gte } from "./gte.js"; -export { default as has } from "./has.js"; -export { default as hasIn } from "./hasIn.js"; -export { default as hasPath } from "./hasPath.js"; -export { default as head } from "./head.js"; -export { default as identical } from "./identical.js"; -export { default as identity } from "./identity.js"; -export { default as ifElse } from "./ifElse.js"; -export { default as inc } from "./inc.js"; -export { default as includes } from "./includes.js"; -export { default as indexBy } from "./indexBy.js"; -export { default as indexOf } from "./indexOf.js"; -export { default as init } from "./init.js"; -export { default as innerJoin } from "./innerJoin.js"; -export { default as insert } from "./insert.js"; -export { default as insertAll } from "./insertAll.js"; -export { default as intersection } from "./intersection.js"; -export { default as intersperse } from "./intersperse.js"; -export { default as into } from "./into.js"; -export { default as invert } from "./invert.js"; -export { default as invertObj } from "./invertObj.js"; -export { default as invoker } from "./invoker.js"; -export { default as is } from "./is.js"; -export { default as isEmpty } from "./isEmpty.js"; -export { default as isNil } from "./isNil.js"; -export { default as join } from "./join.js"; -export { default as juxt } from "./juxt.js"; -export { default as keys } from "./keys.js"; -export { default as keysIn } from "./keysIn.js"; -export { default as last } from "./last.js"; -export { default as lastIndexOf } from "./lastIndexOf.js"; -export { default as length } from "./length.js"; -export { default as lens } from "./lens.js"; -export { default as lensIndex } from "./lensIndex.js"; -export { default as lensPath } from "./lensPath.js"; -export { default as lensProp } from "./lensProp.js"; -export { default as lift } from "./lift.js"; -export { default as liftN } from "./liftN.js"; -export { default as lt } from "./lt.js"; -export { default as lte } from "./lte.js"; -export { default as map } from "./map.js"; -export { default as mapAccum } from "./mapAccum.js"; -export { default as mapAccumRight } from "./mapAccumRight.js"; -export { default as mapObjIndexed } from "./mapObjIndexed.js"; -export { default as match } from "./match.js"; -export { default as mathMod } from "./mathMod.js"; -export { default as max } from "./max.js"; -export { default as maxBy } from "./maxBy.js"; -export { default as mean } from "./mean.js"; -export { default as median } from "./median.js"; -export { default as memoizeWith } from "./memoizeWith.js"; -export { default as merge } from "./merge.js"; -export { default as mergeAll } from "./mergeAll.js"; -export { default as mergeDeepLeft } from "./mergeDeepLeft.js"; -export { default as mergeDeepRight } from "./mergeDeepRight.js"; -export { default as mergeDeepWith } from "./mergeDeepWith.js"; -export { default as mergeDeepWithKey } from "./mergeDeepWithKey.js"; -export { default as mergeLeft } from "./mergeLeft.js"; -export { default as mergeRight } from "./mergeRight.js"; -export { default as mergeWith } from "./mergeWith.js"; -export { default as mergeWithKey } from "./mergeWithKey.js"; -export { default as min } from "./min.js"; -export { default as minBy } from "./minBy.js"; -export { default as modulo } from "./modulo.js"; -export { default as move } from "./move.js"; -export { default as multiply } from "./multiply.js"; -export { default as nAry } from "./nAry.js"; -export { default as negate } from "./negate.js"; -export { default as none } from "./none.js"; -export { default as not } from "./not.js"; -export { default as nth } from "./nth.js"; -export { default as nthArg } from "./nthArg.js"; -export { default as o } from "./o.js"; -export { default as objOf } from "./objOf.js"; -export { default as of } from "./of.js"; -export { default as omit } from "./omit.js"; -export { default as once } from "./once.js"; -export { default as or } from "./or.js"; -export { default as otherwise } from "./otherwise.js"; -export { default as over } from "./over.js"; -export { default as pair } from "./pair.js"; -export { default as partial } from "./partial.js"; -export { default as partialRight } from "./partialRight.js"; -export { default as partition } from "./partition.js"; -export { default as path } from "./path.js"; -export { default as paths } from "./paths.js"; -export { default as pathEq } from "./pathEq.js"; -export { default as pathOr } from "./pathOr.js"; -export { default as pathSatisfies } from "./pathSatisfies.js"; -export { default as pick } from "./pick.js"; -export { default as pickAll } from "./pickAll.js"; -export { default as pickBy } from "./pickBy.js"; -export { default as pipe } from "./pipe.js"; -export { default as pipeK } from "./pipeK.js"; -export { default as pipeP } from "./pipeP.js"; -export { default as pipeWith } from "./pipeWith.js"; -export { default as pluck } from "./pluck.js"; -export { default as prepend } from "./prepend.js"; -export { default as product } from "./product.js"; -export { default as project } from "./project.js"; -export { default as prop } from "./prop.js"; -export { default as propEq } from "./propEq.js"; -export { default as propIs } from "./propIs.js"; -export { default as propOr } from "./propOr.js"; -export { default as propSatisfies } from "./propSatisfies.js"; -export { default as props } from "./props.js"; -export { default as range } from "./range.js"; -export { default as reduce } from "./reduce.js"; -export { default as reduceBy } from "./reduceBy.js"; -export { default as reduceRight } from "./reduceRight.js"; -export { default as reduceWhile } from "./reduceWhile.js"; -export { default as reduced } from "./reduced.js"; -export { default as reject } from "./reject.js"; -export { default as remove } from "./remove.js"; -export { default as repeat } from "./repeat.js"; -export { default as replace } from "./replace.js"; -export { default as reverse } from "./reverse.js"; -export { default as scan } from "./scan.js"; -export { default as sequence } from "./sequence.js"; -export { default as set } from "./set.js"; -export { default as slice } from "./slice.js"; -export { default as sort } from "./sort.js"; -export { default as sortBy } from "./sortBy.js"; -export { default as sortWith } from "./sortWith.js"; -export { default as split } from "./split.js"; -export { default as splitAt } from "./splitAt.js"; -export { default as splitEvery } from "./splitEvery.js"; -export { default as splitWhen } from "./splitWhen.js"; -export { default as startsWith } from "./startsWith.js"; -export { default as subtract } from "./subtract.js"; -export { default as sum } from "./sum.js"; -export { default as symmetricDifference } from "./symmetricDifference.js"; -export { default as symmetricDifferenceWith } from "./symmetricDifferenceWith.js"; -export { default as tail } from "./tail.js"; -export { default as take } from "./take.js"; -export { default as takeLast } from "./takeLast.js"; -export { default as takeLastWhile } from "./takeLastWhile.js"; -export { default as takeWhile } from "./takeWhile.js"; -export { default as tap } from "./tap.js"; -export { default as test } from "./test.js"; -export { default as andThen } from "./andThen.js"; -export { default as times } from "./times.js"; -export { default as toLower } from "./toLower.js"; -export { default as toPairs } from "./toPairs.js"; -export { default as toPairsIn } from "./toPairsIn.js"; -export { default as toString } from "./toString.js"; -export { default as toUpper } from "./toUpper.js"; -export { default as transduce } from "./transduce.js"; -export { default as transpose } from "./transpose.js"; -export { default as traverse } from "./traverse.js"; -export { default as trim } from "./trim.js"; -export { default as tryCatch } from "./tryCatch.js"; -export { default as type } from "./type.js"; -export { default as unapply } from "./unapply.js"; -export { default as unary } from "./unary.js"; -export { default as uncurryN } from "./uncurryN.js"; -export { default as unfold } from "./unfold.js"; -export { default as union } from "./union.js"; -export { default as unionWith } from "./unionWith.js"; -export { default as uniq } from "./uniq.js"; -export { default as uniqBy } from "./uniqBy.js"; -export { default as uniqWith } from "./uniqWith.js"; -export { default as unless } from "./unless.js"; -export { default as unnest } from "./unnest.js"; -export { default as until } from "./until.js"; -export { default as update } from "./update.js"; -export { default as useWith } from "./useWith.js"; -export { default as values } from "./values.js"; -export { default as valuesIn } from "./valuesIn.js"; -export { default as view } from "./view.js"; -export { default as when } from "./when.js"; -export { default as where } from "./where.js"; -export { default as whereEq } from "./whereEq.js"; -export { default as without } from "./without.js"; -export { default as xor } from "./xor.js"; -export { default as xprod } from "./xprod.js"; -export { default as zip } from "./zip.js"; -export { default as zipObj } from "./zipObj.js"; -export { default as zipWith } from "./zipWith.js"; -export { default as thunkify } from "./thunkify.js"; diff --git a/node_modules/ramda/src/indexBy.js b/node_modules/ramda/src/indexBy.js deleted file mode 100644 index 0f6c76a..0000000 --- a/node_modules/ramda/src/indexBy.js +++ /dev/null @@ -1,33 +0,0 @@ -var reduceBy = -/*#__PURE__*/ -require("./reduceBy"); -/** - * Given a function that generates a key, turns a list of objects into an - * object indexing the objects by the given key. Note that if multiple - * objects generate the same value for the indexing key only the last value - * will be included in the generated object. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (a -> String) -> [{k: v}] -> {k: {k: v}} - * @param {Function} fn Function :: a -> String - * @param {Array} array The array of objects to index - * @return {Object} An object indexing each array element by the given property. - * @example - * - * const list = [{id: 'xyz', title: 'A'}, {id: 'abc', title: 'B'}]; - * R.indexBy(R.prop('id'), list); - * //=> {abc: {id: 'abc', title: 'B'}, xyz: {id: 'xyz', title: 'A'}} - */ - - -var indexBy = -/*#__PURE__*/ -reduceBy(function (acc, elem) { - return elem; -}, null); -module.exports = indexBy; \ No newline at end of file diff --git a/node_modules/ramda/src/indexOf.js b/node_modules/ramda/src/indexOf.js deleted file mode 100644 index 1ef5c36..0000000 --- a/node_modules/ramda/src/indexOf.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _indexOf = -/*#__PURE__*/ -require("./internal/_indexOf"); - -var _isArray = -/*#__PURE__*/ -require("./internal/_isArray"); -/** - * Returns the position of the first occurrence of an item in an array, or -1 - * if the item is not included in the array. [`R.equals`](#equals) is used to - * determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Number - * @param {*} target The item to find. - * @param {Array} xs The array to search in. - * @return {Number} the index of the target, or -1 if the target is not found. - * @see R.lastIndexOf - * @example - * - * R.indexOf(3, [1,2,3,4]); //=> 2 - * R.indexOf(10, [1,2,3,4]); //=> -1 - */ - - -var indexOf = -/*#__PURE__*/ -_curry2(function indexOf(target, xs) { - return typeof xs.indexOf === 'function' && !_isArray(xs) ? xs.indexOf(target) : _indexOf(xs, target, 0); -}); - -module.exports = indexOf; \ No newline at end of file diff --git a/node_modules/ramda/src/init.js b/node_modules/ramda/src/init.js deleted file mode 100644 index 9f1b416..0000000 --- a/node_modules/ramda/src/init.js +++ /dev/null @@ -1,33 +0,0 @@ -var slice = -/*#__PURE__*/ -require("./slice"); -/** - * Returns all but the last element of the given list or string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.last, R.head, R.tail - * @example - * - * R.init([1, 2, 3]); //=> [1, 2] - * R.init([1, 2]); //=> [1] - * R.init([1]); //=> [] - * R.init([]); //=> [] - * - * R.init('abc'); //=> 'ab' - * R.init('ab'); //=> 'a' - * R.init('a'); //=> '' - * R.init(''); //=> '' - */ - - -var init = -/*#__PURE__*/ -slice(0, -1); -module.exports = init; \ No newline at end of file diff --git a/node_modules/ramda/src/innerJoin.js b/node_modules/ramda/src/innerJoin.js deleted file mode 100644 index 029d800..0000000 --- a/node_modules/ramda/src/innerJoin.js +++ /dev/null @@ -1,57 +0,0 @@ -var _includesWith = -/*#__PURE__*/ -require("./internal/_includesWith"); - -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var _filter = -/*#__PURE__*/ -require("./internal/_filter"); -/** - * Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list - * `xs'` comprising each of the elements of `xs` which is equal to one or more - * elements of `ys` according to `pred`. - * - * `pred` must be a binary function expecting an element from each list. - * - * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should - * not be significant, but since `xs'` is ordered the implementation guarantees - * that its values are in the same order as they appear in `xs`. Duplicates are - * not removed, so `xs'` may contain duplicates if `xs` contains duplicates. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Relation - * @sig ((a, b) -> Boolean) -> [a] -> [b] -> [a] - * @param {Function} pred - * @param {Array} xs - * @param {Array} ys - * @return {Array} - * @see R.intersection - * @example - * - * R.innerJoin( - * (record, id) => record.id === id, - * [{id: 824, name: 'Richie Furay'}, - * {id: 956, name: 'Dewey Martin'}, - * {id: 313, name: 'Bruce Palmer'}, - * {id: 456, name: 'Stephen Stills'}, - * {id: 177, name: 'Neil Young'}], - * [177, 456, 999] - * ); - * //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}] - */ - - -var innerJoin = -/*#__PURE__*/ -_curry3(function innerJoin(pred, xs, ys) { - return _filter(function (x) { - return _includesWith(pred, x, ys); - }, xs); -}); - -module.exports = innerJoin; \ No newline at end of file diff --git a/node_modules/ramda/src/insert.js b/node_modules/ramda/src/insert.js deleted file mode 100644 index 2ecbcc6..0000000 --- a/node_modules/ramda/src/insert.js +++ /dev/null @@ -1,34 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Inserts the supplied element into the list, at the specified `index`. _Note that - - * this is not destructive_: it returns a copy of the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.2.2 - * @category List - * @sig Number -> a -> [a] -> [a] - * @param {Number} index The position to insert the element - * @param {*} elt The element to insert into the Array - * @param {Array} list The list to insert into - * @return {Array} A new Array with `elt` inserted at `index`. - * @example - * - * R.insert(2, 'x', [1,2,3,4]); //=> [1,2,'x',3,4] - */ - - -var insert = -/*#__PURE__*/ -_curry3(function insert(idx, elt, list) { - idx = idx < list.length && idx >= 0 ? idx : list.length; - var result = Array.prototype.slice.call(list, 0); - result.splice(idx, 0, elt); - return result; -}); - -module.exports = insert; \ No newline at end of file diff --git a/node_modules/ramda/src/insertAll.js b/node_modules/ramda/src/insertAll.js deleted file mode 100644 index 40707fb..0000000 --- a/node_modules/ramda/src/insertAll.js +++ /dev/null @@ -1,31 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Inserts the sub-list into the list, at the specified `index`. _Note that this is not - * destructive_: it returns a copy of the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category List - * @sig Number -> [a] -> [a] -> [a] - * @param {Number} index The position to insert the sub-list - * @param {Array} elts The sub-list to insert into the Array - * @param {Array} list The list to insert the sub-list into - * @return {Array} A new Array with `elts` inserted starting at `index`. - * @example - * - * R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4] - */ - - -var insertAll = -/*#__PURE__*/ -_curry3(function insertAll(idx, elts, list) { - idx = idx < list.length && idx >= 0 ? idx : list.length; - return [].concat(Array.prototype.slice.call(list, 0, idx), elts, Array.prototype.slice.call(list, idx)); -}); - -module.exports = insertAll; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_Set.js b/node_modules/ramda/src/internal/_Set.js deleted file mode 100644 index 4460178..0000000 --- a/node_modules/ramda/src/internal/_Set.js +++ /dev/null @@ -1,203 +0,0 @@ -var _includes = -/*#__PURE__*/ -require("./_includes"); - -var _Set = -/*#__PURE__*/ -function () { - function _Set() { - /* globals Set */ - this._nativeSet = typeof Set === 'function' ? new Set() : null; - this._items = {}; - } - - // until we figure out why jsdoc chokes on this - // @param item The item to add to the Set - // @returns {boolean} true if the item did not exist prior, otherwise false - // - _Set.prototype.add = function (item) { - return !hasOrAdd(item, true, this); - }; // - // @param item The item to check for existence in the Set - // @returns {boolean} true if the item exists in the Set, otherwise false - // - - - _Set.prototype.has = function (item) { - return hasOrAdd(item, false, this); - }; // - // Combines the logic for checking whether an item is a member of the set and - // for adding a new item to the set. - // - // @param item The item to check or add to the Set instance. - // @param shouldAdd If true, the item will be added to the set if it doesn't - // already exist. - // @param set The set instance to check or add to. - // @return {boolean} true if the item already existed, otherwise false. - // - - - return _Set; -}(); - -function hasOrAdd(item, shouldAdd, set) { - var type = typeof item; - var prevSize, newSize; - - switch (type) { - case 'string': - case 'number': - // distinguish between +0 and -0 - if (item === 0 && 1 / item === -Infinity) { - if (set._items['-0']) { - return true; - } else { - if (shouldAdd) { - set._items['-0'] = true; - } - - return false; - } - } // these types can all utilise the native Set - - - if (set._nativeSet !== null) { - if (shouldAdd) { - prevSize = set._nativeSet.size; - - set._nativeSet.add(item); - - newSize = set._nativeSet.size; - return newSize === prevSize; - } else { - return set._nativeSet.has(item); - } - } else { - if (!(type in set._items)) { - if (shouldAdd) { - set._items[type] = {}; - set._items[type][item] = true; - } - - return false; - } else if (item in set._items[type]) { - return true; - } else { - if (shouldAdd) { - set._items[type][item] = true; - } - - return false; - } - } - - case 'boolean': - // set._items['boolean'] holds a two element array - // representing [ falseExists, trueExists ] - if (type in set._items) { - var bIdx = item ? 1 : 0; - - if (set._items[type][bIdx]) { - return true; - } else { - if (shouldAdd) { - set._items[type][bIdx] = true; - } - - return false; - } - } else { - if (shouldAdd) { - set._items[type] = item ? [false, true] : [true, false]; - } - - return false; - } - - case 'function': - // compare functions for reference equality - if (set._nativeSet !== null) { - if (shouldAdd) { - prevSize = set._nativeSet.size; - - set._nativeSet.add(item); - - newSize = set._nativeSet.size; - return newSize === prevSize; - } else { - return set._nativeSet.has(item); - } - } else { - if (!(type in set._items)) { - if (shouldAdd) { - set._items[type] = [item]; - } - - return false; - } - - if (!_includes(item, set._items[type])) { - if (shouldAdd) { - set._items[type].push(item); - } - - return false; - } - - return true; - } - - case 'undefined': - if (set._items[type]) { - return true; - } else { - if (shouldAdd) { - set._items[type] = true; - } - - return false; - } - - case 'object': - if (item === null) { - if (!set._items['null']) { - if (shouldAdd) { - set._items['null'] = true; - } - - return false; - } - - return true; - } - - /* falls through */ - - default: - // reduce the search size of heterogeneous sets by creating buckets - // for each type. - type = Object.prototype.toString.call(item); - - if (!(type in set._items)) { - if (shouldAdd) { - set._items[type] = [item]; - } - - return false; - } // scan through all previously applied items - - - if (!_includes(item, set._items[type])) { - if (shouldAdd) { - set._items[type].push(item); - } - - return false; - } - - return true; - } -} // A simple Set type that honours R.equals semantics - - -module.exports = _Set; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_aperture.js b/node_modules/ramda/src/internal/_aperture.js deleted file mode 100644 index a0d5df0..0000000 --- a/node_modules/ramda/src/internal/_aperture.js +++ /dev/null @@ -1,14 +0,0 @@ -function _aperture(n, list) { - var idx = 0; - var limit = list.length - (n - 1); - var acc = new Array(limit >= 0 ? limit : 0); - - while (idx < limit) { - acc[idx] = Array.prototype.slice.call(list, idx, idx + n); - idx += 1; - } - - return acc; -} - -module.exports = _aperture; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_arity.js b/node_modules/ramda/src/internal/_arity.js deleted file mode 100644 index 09ba49d..0000000 --- a/node_modules/ramda/src/internal/_arity.js +++ /dev/null @@ -1,64 +0,0 @@ -function _arity(n, fn) { - /* eslint-disable no-unused-vars */ - switch (n) { - case 0: - return function () { - return fn.apply(this, arguments); - }; - - case 1: - return function (a0) { - return fn.apply(this, arguments); - }; - - case 2: - return function (a0, a1) { - return fn.apply(this, arguments); - }; - - case 3: - return function (a0, a1, a2) { - return fn.apply(this, arguments); - }; - - case 4: - return function (a0, a1, a2, a3) { - return fn.apply(this, arguments); - }; - - case 5: - return function (a0, a1, a2, a3, a4) { - return fn.apply(this, arguments); - }; - - case 6: - return function (a0, a1, a2, a3, a4, a5) { - return fn.apply(this, arguments); - }; - - case 7: - return function (a0, a1, a2, a3, a4, a5, a6) { - return fn.apply(this, arguments); - }; - - case 8: - return function (a0, a1, a2, a3, a4, a5, a6, a7) { - return fn.apply(this, arguments); - }; - - case 9: - return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { - return fn.apply(this, arguments); - }; - - case 10: - return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { - return fn.apply(this, arguments); - }; - - default: - throw new Error('First argument to _arity must be a non-negative integer no greater than ten'); - } -} - -module.exports = _arity; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_arrayFromIterator.js b/node_modules/ramda/src/internal/_arrayFromIterator.js deleted file mode 100644 index 8e2027e..0000000 --- a/node_modules/ramda/src/internal/_arrayFromIterator.js +++ /dev/null @@ -1,12 +0,0 @@ -function _arrayFromIterator(iter) { - var list = []; - var next; - - while (!(next = iter.next()).done) { - list.push(next.value); - } - - return list; -} - -module.exports = _arrayFromIterator; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_assertPromise.js b/node_modules/ramda/src/internal/_assertPromise.js deleted file mode 100644 index b939333..0000000 --- a/node_modules/ramda/src/internal/_assertPromise.js +++ /dev/null @@ -1,15 +0,0 @@ -var _isFunction = -/*#__PURE__*/ -require("./_isFunction"); - -var _toString = -/*#__PURE__*/ -require("./_toString"); - -function _assertPromise(name, p) { - if (p == null || !_isFunction(p.then)) { - throw new TypeError('`' + name + '` expected a Promise, received ' + _toString(p, [])); - } -} - -module.exports = _assertPromise; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_checkForMethod.js b/node_modules/ramda/src/internal/_checkForMethod.js deleted file mode 100644 index 8830b3f..0000000 --- a/node_modules/ramda/src/internal/_checkForMethod.js +++ /dev/null @@ -1,29 +0,0 @@ -var _isArray = -/*#__PURE__*/ -require("./_isArray"); -/** - * This checks whether a function has a [methodname] function. If it isn't an - * array it will execute that function otherwise it will default to the ramda - * implementation. - * - * @private - * @param {Function} fn ramda implemtation - * @param {String} methodname property to check for a custom implementation - * @return {Object} Whatever the return value of the method is. - */ - - -function _checkForMethod(methodname, fn) { - return function () { - var length = arguments.length; - - if (length === 0) { - return fn(); - } - - var obj = arguments[length - 1]; - return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); - }; -} - -module.exports = _checkForMethod; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_clone.js b/node_modules/ramda/src/internal/_clone.js deleted file mode 100644 index 274839c..0000000 --- a/node_modules/ramda/src/internal/_clone.js +++ /dev/null @@ -1,61 +0,0 @@ -var _cloneRegExp = -/*#__PURE__*/ -require("./_cloneRegExp"); - -var type = -/*#__PURE__*/ -require("../type"); -/** - * Copies an object. - * - * @private - * @param {*} value The value to be copied - * @param {Array} refFrom Array containing the source references - * @param {Array} refTo Array containing the copied source references - * @param {Boolean} deep Whether or not to perform deep cloning. - * @return {*} The copied value. - */ - - -function _clone(value, refFrom, refTo, deep) { - var copy = function copy(copiedValue) { - var len = refFrom.length; - var idx = 0; - - while (idx < len) { - if (value === refFrom[idx]) { - return refTo[idx]; - } - - idx += 1; - } - - refFrom[idx + 1] = value; - refTo[idx + 1] = copiedValue; - - for (var key in value) { - copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key]; - } - - return copiedValue; - }; - - switch (type(value)) { - case 'Object': - return copy({}); - - case 'Array': - return copy([]); - - case 'Date': - return new Date(value.valueOf()); - - case 'RegExp': - return _cloneRegExp(value); - - default: - return value; - } -} - -module.exports = _clone; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_cloneRegExp.js b/node_modules/ramda/src/internal/_cloneRegExp.js deleted file mode 100644 index ea26283..0000000 --- a/node_modules/ramda/src/internal/_cloneRegExp.js +++ /dev/null @@ -1,5 +0,0 @@ -function _cloneRegExp(pattern) { - return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : '')); -} - -module.exports = _cloneRegExp; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_complement.js b/node_modules/ramda/src/internal/_complement.js deleted file mode 100644 index 4bb77e3..0000000 --- a/node_modules/ramda/src/internal/_complement.js +++ /dev/null @@ -1,7 +0,0 @@ -function _complement(f) { - return function () { - return !f.apply(this, arguments); - }; -} - -module.exports = _complement; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_concat.js b/node_modules/ramda/src/internal/_concat.js deleted file mode 100644 index 6b00ed8..0000000 --- a/node_modules/ramda/src/internal/_concat.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Private `concat` function to merge two array-like objects. - * - * @private - * @param {Array|Arguments} [set1=[]] An array-like object. - * @param {Array|Arguments} [set2=[]] An array-like object. - * @return {Array} A new, merged array. - * @example - * - * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] - */ -function _concat(set1, set2) { - set1 = set1 || []; - set2 = set2 || []; - var idx; - var len1 = set1.length; - var len2 = set2.length; - var result = []; - idx = 0; - - while (idx < len1) { - result[result.length] = set1[idx]; - idx += 1; - } - - idx = 0; - - while (idx < len2) { - result[result.length] = set2[idx]; - idx += 1; - } - - return result; -} - -module.exports = _concat; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_createPartialApplicator.js b/node_modules/ramda/src/internal/_createPartialApplicator.js deleted file mode 100644 index 05f301b..0000000 --- a/node_modules/ramda/src/internal/_createPartialApplicator.js +++ /dev/null @@ -1,17 +0,0 @@ -var _arity = -/*#__PURE__*/ -require("./_arity"); - -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -function _createPartialApplicator(concat) { - return _curry2(function (fn, args) { - return _arity(Math.max(0, fn.length - args.length), function () { - return fn.apply(this, concat(args, arguments)); - }); - }); -} - -module.exports = _createPartialApplicator; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_curry1.js b/node_modules/ramda/src/internal/_curry1.js deleted file mode 100644 index a3bd4b9..0000000 --- a/node_modules/ramda/src/internal/_curry1.js +++ /dev/null @@ -1,24 +0,0 @@ -var _isPlaceholder = -/*#__PURE__*/ -require("./_isPlaceholder"); -/** - * Optimized internal one-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - - -function _curry1(fn) { - return function f1(a) { - if (arguments.length === 0 || _isPlaceholder(a)) { - return f1; - } else { - return fn.apply(this, arguments); - } - }; -} - -module.exports = _curry1; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_curry2.js b/node_modules/ramda/src/internal/_curry2.js deleted file mode 100644 index a5f8a47..0000000 --- a/node_modules/ramda/src/internal/_curry2.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./_curry1"); - -var _isPlaceholder = -/*#__PURE__*/ -require("./_isPlaceholder"); -/** - * Optimized internal two-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - - -function _curry2(fn) { - return function f2(a, b) { - switch (arguments.length) { - case 0: - return f2; - - case 1: - return _isPlaceholder(a) ? f2 : _curry1(function (_b) { - return fn(a, _b); - }); - - default: - return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) { - return fn(_a, b); - }) : _isPlaceholder(b) ? _curry1(function (_b) { - return fn(a, _b); - }) : fn(a, b); - } - }; -} - -module.exports = _curry2; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_curry3.js b/node_modules/ramda/src/internal/_curry3.js deleted file mode 100644 index da2cbe5..0000000 --- a/node_modules/ramda/src/internal/_curry3.js +++ /dev/null @@ -1,60 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./_curry1"); - -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _isPlaceholder = -/*#__PURE__*/ -require("./_isPlaceholder"); -/** - * Optimized internal three-arity curry function. - * - * @private - * @category Function - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - - -function _curry3(fn) { - return function f3(a, b, c) { - switch (arguments.length) { - case 0: - return f3; - - case 1: - return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) { - return fn(a, _b, _c); - }); - - case 2: - return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) { - return fn(_a, b, _c); - }) : _isPlaceholder(b) ? _curry2(function (_b, _c) { - return fn(a, _b, _c); - }) : _curry1(function (_c) { - return fn(a, b, _c); - }); - - default: - return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) { - return fn(_a, _b, c); - }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) { - return fn(_a, b, _c); - }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) { - return fn(a, _b, _c); - }) : _isPlaceholder(a) ? _curry1(function (_a) { - return fn(_a, b, c); - }) : _isPlaceholder(b) ? _curry1(function (_b) { - return fn(a, _b, c); - }) : _isPlaceholder(c) ? _curry1(function (_c) { - return fn(a, b, _c); - }) : fn(a, b, c); - } - }; -} - -module.exports = _curry3; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_curryN.js b/node_modules/ramda/src/internal/_curryN.js deleted file mode 100644 index 3e62862..0000000 --- a/node_modules/ramda/src/internal/_curryN.js +++ /dev/null @@ -1,50 +0,0 @@ -var _arity = -/*#__PURE__*/ -require("./_arity"); - -var _isPlaceholder = -/*#__PURE__*/ -require("./_isPlaceholder"); -/** - * Internal curryN function. - * - * @private - * @category Function - * @param {Number} length The arity of the curried function. - * @param {Array} received An array of arguments received thus far. - * @param {Function} fn The function to curry. - * @return {Function} The curried function. - */ - - -function _curryN(length, received, fn) { - return function () { - var combined = []; - var argsIdx = 0; - var left = length; - var combinedIdx = 0; - - while (combinedIdx < received.length || argsIdx < arguments.length) { - var result; - - if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) { - result = received[combinedIdx]; - } else { - result = arguments[argsIdx]; - argsIdx += 1; - } - - combined[combinedIdx] = result; - - if (!_isPlaceholder(result)) { - left -= 1; - } - - combinedIdx += 1; - } - - return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn)); - }; -} - -module.exports = _curryN; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_dispatchable.js b/node_modules/ramda/src/internal/_dispatchable.js deleted file mode 100644 index 44b4228..0000000 --- a/node_modules/ramda/src/internal/_dispatchable.js +++ /dev/null @@ -1,54 +0,0 @@ -var _isArray = -/*#__PURE__*/ -require("./_isArray"); - -var _isTransformer = -/*#__PURE__*/ -require("./_isTransformer"); -/** - * Returns a function that dispatches with different strategies based on the - * object in list position (last argument). If it is an array, executes [fn]. - * Otherwise, if it has a function with one of the given method names, it will - * execute that function (functor case). Otherwise, if it is a transformer, - * uses transducer [xf] to return a new transformer (transducer case). - * Otherwise, it will default to executing [fn]. - * - * @private - * @param {Array} methodNames properties to check for a custom implementation - * @param {Function} xf transducer to initialize if object is transformer - * @param {Function} fn default ramda implementation - * @return {Function} A function that dispatches on object in list position - */ - - -function _dispatchable(methodNames, xf, fn) { - return function () { - if (arguments.length === 0) { - return fn(); - } - - var args = Array.prototype.slice.call(arguments, 0); - var obj = args.pop(); - - if (!_isArray(obj)) { - var idx = 0; - - while (idx < methodNames.length) { - if (typeof obj[methodNames[idx]] === 'function') { - return obj[methodNames[idx]].apply(obj, args); - } - - idx += 1; - } - - if (_isTransformer(obj)) { - var transducer = xf.apply(null, args); - return transducer(obj); - } - } - - return fn.apply(this, arguments); - }; -} - -module.exports = _dispatchable; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_dropLast.js b/node_modules/ramda/src/internal/_dropLast.js deleted file mode 100644 index 9f717a9..0000000 --- a/node_modules/ramda/src/internal/_dropLast.js +++ /dev/null @@ -1,9 +0,0 @@ -var take = -/*#__PURE__*/ -require("../take"); - -function dropLast(n, xs) { - return take(n < xs.length ? xs.length - n : 0, xs); -} - -module.exports = dropLast; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_dropLastWhile.js b/node_modules/ramda/src/internal/_dropLastWhile.js deleted file mode 100644 index 3f7d1e9..0000000 --- a/node_modules/ramda/src/internal/_dropLastWhile.js +++ /dev/null @@ -1,15 +0,0 @@ -var slice = -/*#__PURE__*/ -require("../slice"); - -function dropLastWhile(pred, xs) { - var idx = xs.length - 1; - - while (idx >= 0 && pred(xs[idx])) { - idx -= 1; - } - - return slice(0, idx + 1, xs); -} - -module.exports = dropLastWhile; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_equals.js b/node_modules/ramda/src/internal/_equals.js deleted file mode 100644 index f8519e2..0000000 --- a/node_modules/ramda/src/internal/_equals.js +++ /dev/null @@ -1,189 +0,0 @@ -var _arrayFromIterator = -/*#__PURE__*/ -require("./_arrayFromIterator"); - -var _includesWith = -/*#__PURE__*/ -require("./_includesWith"); - -var _functionName = -/*#__PURE__*/ -require("./_functionName"); - -var _has = -/*#__PURE__*/ -require("./_has"); - -var _objectIs = -/*#__PURE__*/ -require("./_objectIs"); - -var keys = -/*#__PURE__*/ -require("../keys"); - -var type = -/*#__PURE__*/ -require("../type"); -/** - * private _uniqContentEquals function. - * That function is checking equality of 2 iterator contents with 2 assumptions - * - iterators lengths are the same - * - iterators values are unique - * - * false-positive result will be returned for comparision of, e.g. - * - [1,2,3] and [1,2,3,4] - * - [1,1,1] and [1,2,3] - * */ - - -function _uniqContentEquals(aIterator, bIterator, stackA, stackB) { - var a = _arrayFromIterator(aIterator); - - var b = _arrayFromIterator(bIterator); - - function eq(_a, _b) { - return _equals(_a, _b, stackA.slice(), stackB.slice()); - } // if *a* array contains any element that is not included in *b* - - - return !_includesWith(function (b, aItem) { - return !_includesWith(eq, aItem, b); - }, b, a); -} - -function _equals(a, b, stackA, stackB) { - if (_objectIs(a, b)) { - return true; - } - - var typeA = type(a); - - if (typeA !== type(b)) { - return false; - } - - if (a == null || b == null) { - return false; - } - - if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') { - return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a); - } - - if (typeof a.equals === 'function' || typeof b.equals === 'function') { - return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a); - } - - switch (typeA) { - case 'Arguments': - case 'Array': - case 'Object': - if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') { - return a === b; - } - - break; - - case 'Boolean': - case 'Number': - case 'String': - if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) { - return false; - } - - break; - - case 'Date': - if (!_objectIs(a.valueOf(), b.valueOf())) { - return false; - } - - break; - - case 'Error': - return a.name === b.name && a.message === b.message; - - case 'RegExp': - if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) { - return false; - } - - break; - } - - var idx = stackA.length - 1; - - while (idx >= 0) { - if (stackA[idx] === a) { - return stackB[idx] === b; - } - - idx -= 1; - } - - switch (typeA) { - case 'Map': - if (a.size !== b.size) { - return false; - } - - return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b])); - - case 'Set': - if (a.size !== b.size) { - return false; - } - - return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b])); - - case 'Arguments': - case 'Array': - case 'Object': - case 'Boolean': - case 'Number': - case 'String': - case 'Date': - case 'Error': - case 'RegExp': - case 'Int8Array': - case 'Uint8Array': - case 'Uint8ClampedArray': - case 'Int16Array': - case 'Uint16Array': - case 'Int32Array': - case 'Uint32Array': - case 'Float32Array': - case 'Float64Array': - case 'ArrayBuffer': - break; - - default: - // Values of other types are only equal if identical. - return false; - } - - var keysA = keys(a); - - if (keysA.length !== keys(b).length) { - return false; - } - - var extendedStackA = stackA.concat([a]); - var extendedStackB = stackB.concat([b]); - idx = keysA.length - 1; - - while (idx >= 0) { - var key = keysA[idx]; - - if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) { - return false; - } - - idx -= 1; - } - - return true; -} - -module.exports = _equals; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_filter.js b/node_modules/ramda/src/internal/_filter.js deleted file mode 100644 index 4283703..0000000 --- a/node_modules/ramda/src/internal/_filter.js +++ /dev/null @@ -1,17 +0,0 @@ -function _filter(fn, list) { - var idx = 0; - var len = list.length; - var result = []; - - while (idx < len) { - if (fn(list[idx])) { - result[result.length] = list[idx]; - } - - idx += 1; - } - - return result; -} - -module.exports = _filter; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_flatCat.js b/node_modules/ramda/src/internal/_flatCat.js deleted file mode 100644 index 04c68e5..0000000 --- a/node_modules/ramda/src/internal/_flatCat.js +++ /dev/null @@ -1,43 +0,0 @@ -var _forceReduced = -/*#__PURE__*/ -require("./_forceReduced"); - -var _isArrayLike = -/*#__PURE__*/ -require("./_isArrayLike"); - -var _reduce = -/*#__PURE__*/ -require("./_reduce"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var preservingReduced = function (xf) { - return { - '@@transducer/init': _xfBase.init, - '@@transducer/result': function (result) { - return xf['@@transducer/result'](result); - }, - '@@transducer/step': function (result, input) { - var ret = xf['@@transducer/step'](result, input); - return ret['@@transducer/reduced'] ? _forceReduced(ret) : ret; - } - }; -}; - -var _flatCat = function _xcat(xf) { - var rxf = preservingReduced(xf); - return { - '@@transducer/init': _xfBase.init, - '@@transducer/result': function (result) { - return rxf['@@transducer/result'](result); - }, - '@@transducer/step': function (result, input) { - return !_isArrayLike(input) ? _reduce(rxf, result, [input]) : _reduce(rxf, result, input); - } - }; -}; - -module.exports = _flatCat; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_forceReduced.js b/node_modules/ramda/src/internal/_forceReduced.js deleted file mode 100644 index d989c4d..0000000 --- a/node_modules/ramda/src/internal/_forceReduced.js +++ /dev/null @@ -1,8 +0,0 @@ -function _forceReduced(x) { - return { - '@@transducer/value': x, - '@@transducer/reduced': true - }; -} - -module.exports = _forceReduced; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_functionName.js b/node_modules/ramda/src/internal/_functionName.js deleted file mode 100644 index 25e9afb..0000000 --- a/node_modules/ramda/src/internal/_functionName.js +++ /dev/null @@ -1,7 +0,0 @@ -function _functionName(f) { - // String(x => x) evaluates to "x => x", so the pattern may not match. - var match = String(f).match(/^function (\w*)/); - return match == null ? '' : match[1]; -} - -module.exports = _functionName; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_functionsWith.js b/node_modules/ramda/src/internal/_functionsWith.js deleted file mode 100644 index 8a1fe01..0000000 --- a/node_modules/ramda/src/internal/_functionsWith.js +++ /dev/null @@ -1,19 +0,0 @@ -var _filter = -/*#__PURE__*/ -require("./_filter"); -/** - * @private - * @param {Function} fn The strategy for extracting function names from an object - * @return {Function} A function that takes an object and returns an array of function names. - */ - - -function _functionsWith(fn) { - return function (obj) { - return _filter(function (key) { - return typeof obj[key] === 'function'; - }, fn(obj)); - }; -} - -module.exports = _functionsWith; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_has.js b/node_modules/ramda/src/internal/_has.js deleted file mode 100644 index ec54484..0000000 --- a/node_modules/ramda/src/internal/_has.js +++ /dev/null @@ -1,5 +0,0 @@ -function _has(prop, obj) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -module.exports = _has; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_identity.js b/node_modules/ramda/src/internal/_identity.js deleted file mode 100644 index 43b5558..0000000 --- a/node_modules/ramda/src/internal/_identity.js +++ /dev/null @@ -1,5 +0,0 @@ -function _identity(x) { - return x; -} - -module.exports = _identity; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_includes.js b/node_modules/ramda/src/internal/_includes.js deleted file mode 100644 index 8368eab..0000000 --- a/node_modules/ramda/src/internal/_includes.js +++ /dev/null @@ -1,9 +0,0 @@ -var _indexOf = -/*#__PURE__*/ -require("./_indexOf"); - -function _includes(a, list) { - return _indexOf(list, a, 0) >= 0; -} - -module.exports = _includes; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_includesWith.js b/node_modules/ramda/src/internal/_includesWith.js deleted file mode 100644 index 19d3072..0000000 --- a/node_modules/ramda/src/internal/_includesWith.js +++ /dev/null @@ -1,16 +0,0 @@ -function _includesWith(pred, x, list) { - var idx = 0; - var len = list.length; - - while (idx < len) { - if (pred(x, list[idx])) { - return true; - } - - idx += 1; - } - - return false; -} - -module.exports = _includesWith; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_indexOf.js b/node_modules/ramda/src/internal/_indexOf.js deleted file mode 100644 index 6a8db89..0000000 --- a/node_modules/ramda/src/internal/_indexOf.js +++ /dev/null @@ -1,72 +0,0 @@ -var equals = -/*#__PURE__*/ -require("../equals"); - -function _indexOf(list, a, idx) { - var inf, item; // Array.prototype.indexOf doesn't exist below IE9 - - if (typeof list.indexOf === 'function') { - switch (typeof a) { - case 'number': - if (a === 0) { - // manually crawl the list to distinguish between +0 and -0 - inf = 1 / a; - - while (idx < list.length) { - item = list[idx]; - - if (item === 0 && 1 / item === inf) { - return idx; - } - - idx += 1; - } - - return -1; - } else if (a !== a) { - // NaN - while (idx < list.length) { - item = list[idx]; - - if (typeof item === 'number' && item !== item) { - return idx; - } - - idx += 1; - } - - return -1; - } // non-zero numbers can utilise Set - - - return list.indexOf(a, idx); - // all these types can utilise Set - - case 'string': - case 'boolean': - case 'function': - case 'undefined': - return list.indexOf(a, idx); - - case 'object': - if (a === null) { - // null can utilise Set - return list.indexOf(a, idx); - } - - } - } // anything else not covered above, defer to R.equals - - - while (idx < list.length) { - if (equals(list[idx], a)) { - return idx; - } - - idx += 1; - } - - return -1; -} - -module.exports = _indexOf; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_isArguments.js b/node_modules/ramda/src/internal/_isArguments.js deleted file mode 100644 index bb86b25..0000000 --- a/node_modules/ramda/src/internal/_isArguments.js +++ /dev/null @@ -1,17 +0,0 @@ -var _has = -/*#__PURE__*/ -require("./_has"); - -var toString = Object.prototype.toString; - -var _isArguments = -/*#__PURE__*/ -function () { - return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) { - return toString.call(x) === '[object Arguments]'; - } : function _isArguments(x) { - return _has('callee', x); - }; -}(); - -module.exports = _isArguments; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_isArray.js b/node_modules/ramda/src/internal/_isArray.js deleted file mode 100644 index fc8bcc3..0000000 --- a/node_modules/ramda/src/internal/_isArray.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Tests whether or not an object is an array. - * - * @private - * @param {*} val The object to test. - * @return {Boolean} `true` if `val` is an array, `false` otherwise. - * @example - * - * _isArray([]); //=> true - * _isArray(null); //=> false - * _isArray({}); //=> false - */ -module.exports = Array.isArray || function _isArray(val) { - return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]'; -}; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_isArrayLike.js b/node_modules/ramda/src/internal/_isArrayLike.js deleted file mode 100644 index 14c41ac..0000000 --- a/node_modules/ramda/src/internal/_isArrayLike.js +++ /dev/null @@ -1,65 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./_curry1"); - -var _isArray = -/*#__PURE__*/ -require("./_isArray"); - -var _isString = -/*#__PURE__*/ -require("./_isString"); -/** - * Tests whether or not an object is similar to an array. - * - * @private - * @category Type - * @category List - * @sig * -> Boolean - * @param {*} x The object to test. - * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise. - * @example - * - * _isArrayLike([]); //=> true - * _isArrayLike(true); //=> false - * _isArrayLike({}); //=> false - * _isArrayLike({length: 10}); //=> false - * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true - */ - - -var _isArrayLike = -/*#__PURE__*/ -_curry1(function isArrayLike(x) { - if (_isArray(x)) { - return true; - } - - if (!x) { - return false; - } - - if (typeof x !== 'object') { - return false; - } - - if (_isString(x)) { - return false; - } - - if (x.nodeType === 1) { - return !!x.length; - } - - if (x.length === 0) { - return true; - } - - if (x.length > 0) { - return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1); - } - - return false; -}); - -module.exports = _isArrayLike; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_isFunction.js b/node_modules/ramda/src/internal/_isFunction.js deleted file mode 100644 index ea5dfb8..0000000 --- a/node_modules/ramda/src/internal/_isFunction.js +++ /dev/null @@ -1,6 +0,0 @@ -function _isFunction(x) { - var type = Object.prototype.toString.call(x); - return type === '[object Function]' || type === '[object AsyncFunction]' || type === '[object GeneratorFunction]' || type === '[object AsyncGeneratorFunction]'; -} - -module.exports = _isFunction; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_isInteger.js b/node_modules/ramda/src/internal/_isInteger.js deleted file mode 100644 index 458977f..0000000 --- a/node_modules/ramda/src/internal/_isInteger.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Determine if the passed argument is an integer. - * - * @private - * @param {*} n - * @category Type - * @return {Boolean} - */ -module.exports = Number.isInteger || function _isInteger(n) { - return n << 0 === n; -}; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_isNumber.js b/node_modules/ramda/src/internal/_isNumber.js deleted file mode 100644 index bb59d63..0000000 --- a/node_modules/ramda/src/internal/_isNumber.js +++ /dev/null @@ -1,5 +0,0 @@ -function _isNumber(x) { - return Object.prototype.toString.call(x) === '[object Number]'; -} - -module.exports = _isNumber; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_isObject.js b/node_modules/ramda/src/internal/_isObject.js deleted file mode 100644 index 8be1386..0000000 --- a/node_modules/ramda/src/internal/_isObject.js +++ /dev/null @@ -1,5 +0,0 @@ -function _isObject(x) { - return Object.prototype.toString.call(x) === '[object Object]'; -} - -module.exports = _isObject; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_isPlaceholder.js b/node_modules/ramda/src/internal/_isPlaceholder.js deleted file mode 100644 index 720b073..0000000 --- a/node_modules/ramda/src/internal/_isPlaceholder.js +++ /dev/null @@ -1,5 +0,0 @@ -function _isPlaceholder(a) { - return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true; -} - -module.exports = _isPlaceholder; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_isRegExp.js b/node_modules/ramda/src/internal/_isRegExp.js deleted file mode 100644 index bec7e02..0000000 --- a/node_modules/ramda/src/internal/_isRegExp.js +++ /dev/null @@ -1,5 +0,0 @@ -function _isRegExp(x) { - return Object.prototype.toString.call(x) === '[object RegExp]'; -} - -module.exports = _isRegExp; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_isString.js b/node_modules/ramda/src/internal/_isString.js deleted file mode 100644 index 8a18aad..0000000 --- a/node_modules/ramda/src/internal/_isString.js +++ /dev/null @@ -1,5 +0,0 @@ -function _isString(x) { - return Object.prototype.toString.call(x) === '[object String]'; -} - -module.exports = _isString; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_isTransformer.js b/node_modules/ramda/src/internal/_isTransformer.js deleted file mode 100644 index 015386f..0000000 --- a/node_modules/ramda/src/internal/_isTransformer.js +++ /dev/null @@ -1,5 +0,0 @@ -function _isTransformer(obj) { - return obj != null && typeof obj['@@transducer/step'] === 'function'; -} - -module.exports = _isTransformer; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_makeFlat.js b/node_modules/ramda/src/internal/_makeFlat.js deleted file mode 100644 index 530312b..0000000 --- a/node_modules/ramda/src/internal/_makeFlat.js +++ /dev/null @@ -1,40 +0,0 @@ -var _isArrayLike = -/*#__PURE__*/ -require("./_isArrayLike"); -/** - * `_makeFlat` is a helper function that returns a one-level or fully recursive - * function based on the flag passed in. - * - * @private - */ - - -function _makeFlat(recursive) { - return function flatt(list) { - var value, jlen, j; - var result = []; - var idx = 0; - var ilen = list.length; - - while (idx < ilen) { - if (_isArrayLike(list[idx])) { - value = recursive ? flatt(list[idx]) : list[idx]; - j = 0; - jlen = value.length; - - while (j < jlen) { - result[result.length] = value[j]; - j += 1; - } - } else { - result[result.length] = list[idx]; - } - - idx += 1; - } - - return result; - }; -} - -module.exports = _makeFlat; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_map.js b/node_modules/ramda/src/internal/_map.js deleted file mode 100644 index ab95735..0000000 --- a/node_modules/ramda/src/internal/_map.js +++ /dev/null @@ -1,14 +0,0 @@ -function _map(fn, functor) { - var idx = 0; - var len = functor.length; - var result = Array(len); - - while (idx < len) { - result[idx] = fn(functor[idx]); - idx += 1; - } - - return result; -} - -module.exports = _map; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_objectAssign.js b/node_modules/ramda/src/internal/_objectAssign.js deleted file mode 100644 index 6f8d516..0000000 --- a/node_modules/ramda/src/internal/_objectAssign.js +++ /dev/null @@ -1,32 +0,0 @@ -var _has = -/*#__PURE__*/ -require("./_has"); // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign - - -function _objectAssign(target) { - if (target == null) { - throw new TypeError('Cannot convert undefined or null to object'); - } - - var output = Object(target); - var idx = 1; - var length = arguments.length; - - while (idx < length) { - var source = arguments[idx]; - - if (source != null) { - for (var nextKey in source) { - if (_has(nextKey, source)) { - output[nextKey] = source[nextKey]; - } - } - } - - idx += 1; - } - - return output; -} - -module.exports = typeof Object.assign === 'function' ? Object.assign : _objectAssign; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_objectIs.js b/node_modules/ramda/src/internal/_objectIs.js deleted file mode 100644 index 0f8b07e..0000000 --- a/node_modules/ramda/src/internal/_objectIs.js +++ /dev/null @@ -1,14 +0,0 @@ -// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is -function _objectIs(a, b) { - // SameValue algorithm - if (a === b) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return a !== 0 || 1 / a === 1 / b; - } else { - // Step 6.a: NaN == NaN - return a !== a && b !== b; - } -} - -module.exports = typeof Object.is === 'function' ? Object.is : _objectIs; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_of.js b/node_modules/ramda/src/internal/_of.js deleted file mode 100644 index e408fcc..0000000 --- a/node_modules/ramda/src/internal/_of.js +++ /dev/null @@ -1,5 +0,0 @@ -function _of(x) { - return [x]; -} - -module.exports = _of; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_pipe.js b/node_modules/ramda/src/internal/_pipe.js deleted file mode 100644 index 7d72cc4..0000000 --- a/node_modules/ramda/src/internal/_pipe.js +++ /dev/null @@ -1,7 +0,0 @@ -function _pipe(f, g) { - return function () { - return g.call(this, f.apply(this, arguments)); - }; -} - -module.exports = _pipe; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_pipeP.js b/node_modules/ramda/src/internal/_pipeP.js deleted file mode 100644 index 3b79a05..0000000 --- a/node_modules/ramda/src/internal/_pipeP.js +++ /dev/null @@ -1,10 +0,0 @@ -function _pipeP(f, g) { - return function () { - var ctx = this; - return f.apply(ctx, arguments).then(function (x) { - return g.call(ctx, x); - }); - }; -} - -module.exports = _pipeP; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_quote.js b/node_modules/ramda/src/internal/_quote.js deleted file mode 100644 index 1067e8a..0000000 --- a/node_modules/ramda/src/internal/_quote.js +++ /dev/null @@ -1,7 +0,0 @@ -function _quote(s) { - var escaped = s.replace(/\\/g, '\\\\').replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace - .replace(/\f/g, '\\f').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t').replace(/\v/g, '\\v').replace(/\0/g, '\\0'); - return '"' + escaped.replace(/"/g, '\\"') + '"'; -} - -module.exports = _quote; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_reduce.js b/node_modules/ramda/src/internal/_reduce.js deleted file mode 100644 index 2f96aca..0000000 --- a/node_modules/ramda/src/internal/_reduce.js +++ /dev/null @@ -1,82 +0,0 @@ -var _isArrayLike = -/*#__PURE__*/ -require("./_isArrayLike"); - -var _xwrap = -/*#__PURE__*/ -require("./_xwrap"); - -var bind = -/*#__PURE__*/ -require("../bind"); - -function _arrayReduce(xf, acc, list) { - var idx = 0; - var len = list.length; - - while (idx < len) { - acc = xf['@@transducer/step'](acc, list[idx]); - - if (acc && acc['@@transducer/reduced']) { - acc = acc['@@transducer/value']; - break; - } - - idx += 1; - } - - return xf['@@transducer/result'](acc); -} - -function _iterableReduce(xf, acc, iter) { - var step = iter.next(); - - while (!step.done) { - acc = xf['@@transducer/step'](acc, step.value); - - if (acc && acc['@@transducer/reduced']) { - acc = acc['@@transducer/value']; - break; - } - - step = iter.next(); - } - - return xf['@@transducer/result'](acc); -} - -function _methodReduce(xf, acc, obj, methodName) { - return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc)); -} - -var symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator'; - -function _reduce(fn, acc, list) { - if (typeof fn === 'function') { - fn = _xwrap(fn); - } - - if (_isArrayLike(list)) { - return _arrayReduce(fn, acc, list); - } - - if (typeof list['fantasy-land/reduce'] === 'function') { - return _methodReduce(fn, acc, list, 'fantasy-land/reduce'); - } - - if (list[symIterator] != null) { - return _iterableReduce(fn, acc, list[symIterator]()); - } - - if (typeof list.next === 'function') { - return _iterableReduce(fn, acc, list); - } - - if (typeof list.reduce === 'function') { - return _methodReduce(fn, acc, list, 'reduce'); - } - - throw new TypeError('reduce: list must be array or iterable'); -} - -module.exports = _reduce; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_reduced.js b/node_modules/ramda/src/internal/_reduced.js deleted file mode 100644 index f514bc5..0000000 --- a/node_modules/ramda/src/internal/_reduced.js +++ /dev/null @@ -1,8 +0,0 @@ -function _reduced(x) { - return x && x['@@transducer/reduced'] ? x : { - '@@transducer/value': x, - '@@transducer/reduced': true - }; -} - -module.exports = _reduced; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_stepCat.js b/node_modules/ramda/src/internal/_stepCat.js deleted file mode 100644 index fc52dd6..0000000 --- a/node_modules/ramda/src/internal/_stepCat.js +++ /dev/null @@ -1,64 +0,0 @@ -var _objectAssign = -/*#__PURE__*/ -require("./_objectAssign"); - -var _identity = -/*#__PURE__*/ -require("./_identity"); - -var _isArrayLike = -/*#__PURE__*/ -require("./_isArrayLike"); - -var _isTransformer = -/*#__PURE__*/ -require("./_isTransformer"); - -var objOf = -/*#__PURE__*/ -require("../objOf"); - -var _stepCatArray = { - '@@transducer/init': Array, - '@@transducer/step': function (xs, x) { - xs.push(x); - return xs; - }, - '@@transducer/result': _identity -}; -var _stepCatString = { - '@@transducer/init': String, - '@@transducer/step': function (a, b) { - return a + b; - }, - '@@transducer/result': _identity -}; -var _stepCatObject = { - '@@transducer/init': Object, - '@@transducer/step': function (result, input) { - return _objectAssign(result, _isArrayLike(input) ? objOf(input[0], input[1]) : input); - }, - '@@transducer/result': _identity -}; - -function _stepCat(obj) { - if (_isTransformer(obj)) { - return obj; - } - - if (_isArrayLike(obj)) { - return _stepCatArray; - } - - if (typeof obj === 'string') { - return _stepCatString; - } - - if (typeof obj === 'object') { - return _stepCatObject; - } - - throw new Error('Cannot create transformer for ' + obj); -} - -module.exports = _stepCat; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_toISOString.js b/node_modules/ramda/src/internal/_toISOString.js deleted file mode 100644 index 3c1da8a..0000000 --- a/node_modules/ramda/src/internal/_toISOString.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Polyfill from . - */ -var pad = function pad(n) { - return (n < 10 ? '0' : '') + n; -}; - -var _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) { - return d.toISOString(); -} : function _toISOString(d) { - return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z'; -}; - -module.exports = _toISOString; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_toString.js b/node_modules/ramda/src/internal/_toString.js deleted file mode 100644 index 09cabf5..0000000 --- a/node_modules/ramda/src/internal/_toString.js +++ /dev/null @@ -1,78 +0,0 @@ -var _includes = -/*#__PURE__*/ -require("./_includes"); - -var _map = -/*#__PURE__*/ -require("./_map"); - -var _quote = -/*#__PURE__*/ -require("./_quote"); - -var _toISOString = -/*#__PURE__*/ -require("./_toISOString"); - -var keys = -/*#__PURE__*/ -require("../keys"); - -var reject = -/*#__PURE__*/ -require("../reject"); - -function _toString(x, seen) { - var recur = function recur(y) { - var xs = seen.concat([x]); - return _includes(y, xs) ? '' : _toString(y, xs); - }; // mapPairs :: (Object, [String]) -> [String] - - - var mapPairs = function (obj, keys) { - return _map(function (k) { - return _quote(k) + ': ' + recur(obj[k]); - }, keys.slice().sort()); - }; - - switch (Object.prototype.toString.call(x)) { - case '[object Arguments]': - return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))'; - - case '[object Array]': - return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) { - return /^\d+$/.test(k); - }, keys(x)))).join(', ') + ']'; - - case '[object Boolean]': - return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString(); - - case '[object Date]': - return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')'; - - case '[object Null]': - return 'null'; - - case '[object Number]': - return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10); - - case '[object String]': - return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x); - - case '[object Undefined]': - return 'undefined'; - - default: - if (typeof x.toString === 'function') { - var repr = x.toString(); - - if (repr !== '[object Object]') { - return repr; - } - } - - return '{' + mapPairs(x, keys(x)).join(', ') + '}'; - } -} - -module.exports = _toString; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xall.js b/node_modules/ramda/src/internal/_xall.js deleted file mode 100644 index 3248cc5..0000000 --- a/node_modules/ramda/src/internal/_xall.js +++ /dev/null @@ -1,50 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _reduced = -/*#__PURE__*/ -require("./_reduced"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XAll = -/*#__PURE__*/ -function () { - function XAll(f, xf) { - this.xf = xf; - this.f = f; - this.all = true; - } - - XAll.prototype['@@transducer/init'] = _xfBase.init; - - XAll.prototype['@@transducer/result'] = function (result) { - if (this.all) { - result = this.xf['@@transducer/step'](result, true); - } - - return this.xf['@@transducer/result'](result); - }; - - XAll.prototype['@@transducer/step'] = function (result, input) { - if (!this.f(input)) { - this.all = false; - result = _reduced(this.xf['@@transducer/step'](result, false)); - } - - return result; - }; - - return XAll; -}(); - -var _xall = -/*#__PURE__*/ -_curry2(function _xall(f, xf) { - return new XAll(f, xf); -}); - -module.exports = _xall; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xany.js b/node_modules/ramda/src/internal/_xany.js deleted file mode 100644 index d21bb02..0000000 --- a/node_modules/ramda/src/internal/_xany.js +++ /dev/null @@ -1,50 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _reduced = -/*#__PURE__*/ -require("./_reduced"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XAny = -/*#__PURE__*/ -function () { - function XAny(f, xf) { - this.xf = xf; - this.f = f; - this.any = false; - } - - XAny.prototype['@@transducer/init'] = _xfBase.init; - - XAny.prototype['@@transducer/result'] = function (result) { - if (!this.any) { - result = this.xf['@@transducer/step'](result, false); - } - - return this.xf['@@transducer/result'](result); - }; - - XAny.prototype['@@transducer/step'] = function (result, input) { - if (this.f(input)) { - this.any = true; - result = _reduced(this.xf['@@transducer/step'](result, true)); - } - - return result; - }; - - return XAny; -}(); - -var _xany = -/*#__PURE__*/ -_curry2(function _xany(f, xf) { - return new XAny(f, xf); -}); - -module.exports = _xany; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xaperture.js b/node_modules/ramda/src/internal/_xaperture.js deleted file mode 100644 index 7715fe4..0000000 --- a/node_modules/ramda/src/internal/_xaperture.js +++ /dev/null @@ -1,58 +0,0 @@ -var _concat = -/*#__PURE__*/ -require("./_concat"); - -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XAperture = -/*#__PURE__*/ -function () { - function XAperture(n, xf) { - this.xf = xf; - this.pos = 0; - this.full = false; - this.acc = new Array(n); - } - - XAperture.prototype['@@transducer/init'] = _xfBase.init; - - XAperture.prototype['@@transducer/result'] = function (result) { - this.acc = null; - return this.xf['@@transducer/result'](result); - }; - - XAperture.prototype['@@transducer/step'] = function (result, input) { - this.store(input); - return this.full ? this.xf['@@transducer/step'](result, this.getCopy()) : result; - }; - - XAperture.prototype.store = function (input) { - this.acc[this.pos] = input; - this.pos += 1; - - if (this.pos === this.acc.length) { - this.pos = 0; - this.full = true; - } - }; - - XAperture.prototype.getCopy = function () { - return _concat(Array.prototype.slice.call(this.acc, this.pos), Array.prototype.slice.call(this.acc, 0, this.pos)); - }; - - return XAperture; -}(); - -var _xaperture = -/*#__PURE__*/ -_curry2(function _xaperture(n, xf) { - return new XAperture(n, xf); -}); - -module.exports = _xaperture; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xchain.js b/node_modules/ramda/src/internal/_xchain.js deleted file mode 100644 index 64106d1..0000000 --- a/node_modules/ramda/src/internal/_xchain.js +++ /dev/null @@ -1,19 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _flatCat = -/*#__PURE__*/ -require("./_flatCat"); - -var map = -/*#__PURE__*/ -require("../map"); - -var _xchain = -/*#__PURE__*/ -_curry2(function _xchain(f, xf) { - return map(f, _flatCat(xf)); -}); - -module.exports = _xchain; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xdrop.js b/node_modules/ramda/src/internal/_xdrop.js deleted file mode 100644 index 97efb8a..0000000 --- a/node_modules/ramda/src/internal/_xdrop.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XDrop = -/*#__PURE__*/ -function () { - function XDrop(n, xf) { - this.xf = xf; - this.n = n; - } - - XDrop.prototype['@@transducer/init'] = _xfBase.init; - XDrop.prototype['@@transducer/result'] = _xfBase.result; - - XDrop.prototype['@@transducer/step'] = function (result, input) { - if (this.n > 0) { - this.n -= 1; - return result; - } - - return this.xf['@@transducer/step'](result, input); - }; - - return XDrop; -}(); - -var _xdrop = -/*#__PURE__*/ -_curry2(function _xdrop(n, xf) { - return new XDrop(n, xf); -}); - -module.exports = _xdrop; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xdropLast.js b/node_modules/ramda/src/internal/_xdropLast.js deleted file mode 100644 index 85fa91e..0000000 --- a/node_modules/ramda/src/internal/_xdropLast.js +++ /dev/null @@ -1,54 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XDropLast = -/*#__PURE__*/ -function () { - function XDropLast(n, xf) { - this.xf = xf; - this.pos = 0; - this.full = false; - this.acc = new Array(n); - } - - XDropLast.prototype['@@transducer/init'] = _xfBase.init; - - XDropLast.prototype['@@transducer/result'] = function (result) { - this.acc = null; - return this.xf['@@transducer/result'](result); - }; - - XDropLast.prototype['@@transducer/step'] = function (result, input) { - if (this.full) { - result = this.xf['@@transducer/step'](result, this.acc[this.pos]); - } - - this.store(input); - return result; - }; - - XDropLast.prototype.store = function (input) { - this.acc[this.pos] = input; - this.pos += 1; - - if (this.pos === this.acc.length) { - this.pos = 0; - this.full = true; - } - }; - - return XDropLast; -}(); - -var _xdropLast = -/*#__PURE__*/ -_curry2(function _xdropLast(n, xf) { - return new XDropLast(n, xf); -}); - -module.exports = _xdropLast; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xdropLastWhile.js b/node_modules/ramda/src/internal/_xdropLastWhile.js deleted file mode 100644 index 674a4c6..0000000 --- a/node_modules/ramda/src/internal/_xdropLastWhile.js +++ /dev/null @@ -1,53 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _reduce = -/*#__PURE__*/ -require("./_reduce"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XDropLastWhile = -/*#__PURE__*/ -function () { - function XDropLastWhile(fn, xf) { - this.f = fn; - this.retained = []; - this.xf = xf; - } - - XDropLastWhile.prototype['@@transducer/init'] = _xfBase.init; - - XDropLastWhile.prototype['@@transducer/result'] = function (result) { - this.retained = null; - return this.xf['@@transducer/result'](result); - }; - - XDropLastWhile.prototype['@@transducer/step'] = function (result, input) { - return this.f(input) ? this.retain(result, input) : this.flush(result, input); - }; - - XDropLastWhile.prototype.flush = function (result, input) { - result = _reduce(this.xf['@@transducer/step'], result, this.retained); - this.retained = []; - return this.xf['@@transducer/step'](result, input); - }; - - XDropLastWhile.prototype.retain = function (result, input) { - this.retained.push(input); - return result; - }; - - return XDropLastWhile; -}(); - -var _xdropLastWhile = -/*#__PURE__*/ -_curry2(function _xdropLastWhile(fn, xf) { - return new XDropLastWhile(fn, xf); -}); - -module.exports = _xdropLastWhile; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xdropRepeatsWith.js b/node_modules/ramda/src/internal/_xdropRepeatsWith.js deleted file mode 100644 index d9e12dc..0000000 --- a/node_modules/ramda/src/internal/_xdropRepeatsWith.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XDropRepeatsWith = -/*#__PURE__*/ -function () { - function XDropRepeatsWith(pred, xf) { - this.xf = xf; - this.pred = pred; - this.lastValue = undefined; - this.seenFirstValue = false; - } - - XDropRepeatsWith.prototype['@@transducer/init'] = _xfBase.init; - XDropRepeatsWith.prototype['@@transducer/result'] = _xfBase.result; - - XDropRepeatsWith.prototype['@@transducer/step'] = function (result, input) { - var sameAsLast = false; - - if (!this.seenFirstValue) { - this.seenFirstValue = true; - } else if (this.pred(this.lastValue, input)) { - sameAsLast = true; - } - - this.lastValue = input; - return sameAsLast ? result : this.xf['@@transducer/step'](result, input); - }; - - return XDropRepeatsWith; -}(); - -var _xdropRepeatsWith = -/*#__PURE__*/ -_curry2(function _xdropRepeatsWith(pred, xf) { - return new XDropRepeatsWith(pred, xf); -}); - -module.exports = _xdropRepeatsWith; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xdropWhile.js b/node_modules/ramda/src/internal/_xdropWhile.js deleted file mode 100644 index e33febf..0000000 --- a/node_modules/ramda/src/internal/_xdropWhile.js +++ /dev/null @@ -1,41 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XDropWhile = -/*#__PURE__*/ -function () { - function XDropWhile(f, xf) { - this.xf = xf; - this.f = f; - } - - XDropWhile.prototype['@@transducer/init'] = _xfBase.init; - XDropWhile.prototype['@@transducer/result'] = _xfBase.result; - - XDropWhile.prototype['@@transducer/step'] = function (result, input) { - if (this.f) { - if (this.f(input)) { - return result; - } - - this.f = null; - } - - return this.xf['@@transducer/step'](result, input); - }; - - return XDropWhile; -}(); - -var _xdropWhile = -/*#__PURE__*/ -_curry2(function _xdropWhile(f, xf) { - return new XDropWhile(f, xf); -}); - -module.exports = _xdropWhile; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xfBase.js b/node_modules/ramda/src/internal/_xfBase.js deleted file mode 100644 index cb1dfee..0000000 --- a/node_modules/ramda/src/internal/_xfBase.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - init: function () { - return this.xf['@@transducer/init'](); - }, - result: function (result) { - return this.xf['@@transducer/result'](result); - } -}; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xfilter.js b/node_modules/ramda/src/internal/_xfilter.js deleted file mode 100644 index 4bc4dbf..0000000 --- a/node_modules/ramda/src/internal/_xfilter.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XFilter = -/*#__PURE__*/ -function () { - function XFilter(f, xf) { - this.xf = xf; - this.f = f; - } - - XFilter.prototype['@@transducer/init'] = _xfBase.init; - XFilter.prototype['@@transducer/result'] = _xfBase.result; - - XFilter.prototype['@@transducer/step'] = function (result, input) { - return this.f(input) ? this.xf['@@transducer/step'](result, input) : result; - }; - - return XFilter; -}(); - -var _xfilter = -/*#__PURE__*/ -_curry2(function _xfilter(f, xf) { - return new XFilter(f, xf); -}); - -module.exports = _xfilter; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xfind.js b/node_modules/ramda/src/internal/_xfind.js deleted file mode 100644 index ef413c5..0000000 --- a/node_modules/ramda/src/internal/_xfind.js +++ /dev/null @@ -1,50 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _reduced = -/*#__PURE__*/ -require("./_reduced"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XFind = -/*#__PURE__*/ -function () { - function XFind(f, xf) { - this.xf = xf; - this.f = f; - this.found = false; - } - - XFind.prototype['@@transducer/init'] = _xfBase.init; - - XFind.prototype['@@transducer/result'] = function (result) { - if (!this.found) { - result = this.xf['@@transducer/step'](result, void 0); - } - - return this.xf['@@transducer/result'](result); - }; - - XFind.prototype['@@transducer/step'] = function (result, input) { - if (this.f(input)) { - this.found = true; - result = _reduced(this.xf['@@transducer/step'](result, input)); - } - - return result; - }; - - return XFind; -}(); - -var _xfind = -/*#__PURE__*/ -_curry2(function _xfind(f, xf) { - return new XFind(f, xf); -}); - -module.exports = _xfind; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xfindIndex.js b/node_modules/ramda/src/internal/_xfindIndex.js deleted file mode 100644 index 0db4dd0..0000000 --- a/node_modules/ramda/src/internal/_xfindIndex.js +++ /dev/null @@ -1,53 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _reduced = -/*#__PURE__*/ -require("./_reduced"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XFindIndex = -/*#__PURE__*/ -function () { - function XFindIndex(f, xf) { - this.xf = xf; - this.f = f; - this.idx = -1; - this.found = false; - } - - XFindIndex.prototype['@@transducer/init'] = _xfBase.init; - - XFindIndex.prototype['@@transducer/result'] = function (result) { - if (!this.found) { - result = this.xf['@@transducer/step'](result, -1); - } - - return this.xf['@@transducer/result'](result); - }; - - XFindIndex.prototype['@@transducer/step'] = function (result, input) { - this.idx += 1; - - if (this.f(input)) { - this.found = true; - result = _reduced(this.xf['@@transducer/step'](result, this.idx)); - } - - return result; - }; - - return XFindIndex; -}(); - -var _xfindIndex = -/*#__PURE__*/ -_curry2(function _xfindIndex(f, xf) { - return new XFindIndex(f, xf); -}); - -module.exports = _xfindIndex; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xfindLast.js b/node_modules/ramda/src/internal/_xfindLast.js deleted file mode 100644 index 315feb7..0000000 --- a/node_modules/ramda/src/internal/_xfindLast.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XFindLast = -/*#__PURE__*/ -function () { - function XFindLast(f, xf) { - this.xf = xf; - this.f = f; - } - - XFindLast.prototype['@@transducer/init'] = _xfBase.init; - - XFindLast.prototype['@@transducer/result'] = function (result) { - return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.last)); - }; - - XFindLast.prototype['@@transducer/step'] = function (result, input) { - if (this.f(input)) { - this.last = input; - } - - return result; - }; - - return XFindLast; -}(); - -var _xfindLast = -/*#__PURE__*/ -_curry2(function _xfindLast(f, xf) { - return new XFindLast(f, xf); -}); - -module.exports = _xfindLast; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xfindLastIndex.js b/node_modules/ramda/src/internal/_xfindLastIndex.js deleted file mode 100644 index 0a0f564..0000000 --- a/node_modules/ramda/src/internal/_xfindLastIndex.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XFindLastIndex = -/*#__PURE__*/ -function () { - function XFindLastIndex(f, xf) { - this.xf = xf; - this.f = f; - this.idx = -1; - this.lastIdx = -1; - } - - XFindLastIndex.prototype['@@transducer/init'] = _xfBase.init; - - XFindLastIndex.prototype['@@transducer/result'] = function (result) { - return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.lastIdx)); - }; - - XFindLastIndex.prototype['@@transducer/step'] = function (result, input) { - this.idx += 1; - - if (this.f(input)) { - this.lastIdx = this.idx; - } - - return result; - }; - - return XFindLastIndex; -}(); - -var _xfindLastIndex = -/*#__PURE__*/ -_curry2(function _xfindLastIndex(f, xf) { - return new XFindLastIndex(f, xf); -}); - -module.exports = _xfindLastIndex; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xmap.js b/node_modules/ramda/src/internal/_xmap.js deleted file mode 100644 index fff35da..0000000 --- a/node_modules/ramda/src/internal/_xmap.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XMap = -/*#__PURE__*/ -function () { - function XMap(f, xf) { - this.xf = xf; - this.f = f; - } - - XMap.prototype['@@transducer/init'] = _xfBase.init; - XMap.prototype['@@transducer/result'] = _xfBase.result; - - XMap.prototype['@@transducer/step'] = function (result, input) { - return this.xf['@@transducer/step'](result, this.f(input)); - }; - - return XMap; -}(); - -var _xmap = -/*#__PURE__*/ -_curry2(function _xmap(f, xf) { - return new XMap(f, xf); -}); - -module.exports = _xmap; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xreduceBy.js b/node_modules/ramda/src/internal/_xreduceBy.js deleted file mode 100644 index 7adee15..0000000 --- a/node_modules/ramda/src/internal/_xreduceBy.js +++ /dev/null @@ -1,60 +0,0 @@ -var _curryN = -/*#__PURE__*/ -require("./_curryN"); - -var _has = -/*#__PURE__*/ -require("./_has"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XReduceBy = -/*#__PURE__*/ -function () { - function XReduceBy(valueFn, valueAcc, keyFn, xf) { - this.valueFn = valueFn; - this.valueAcc = valueAcc; - this.keyFn = keyFn; - this.xf = xf; - this.inputs = {}; - } - - XReduceBy.prototype['@@transducer/init'] = _xfBase.init; - - XReduceBy.prototype['@@transducer/result'] = function (result) { - var key; - - for (key in this.inputs) { - if (_has(key, this.inputs)) { - result = this.xf['@@transducer/step'](result, this.inputs[key]); - - if (result['@@transducer/reduced']) { - result = result['@@transducer/value']; - break; - } - } - } - - this.inputs = null; - return this.xf['@@transducer/result'](result); - }; - - XReduceBy.prototype['@@transducer/step'] = function (result, input) { - var key = this.keyFn(input); - this.inputs[key] = this.inputs[key] || [key, this.valueAcc]; - this.inputs[key][1] = this.valueFn(this.inputs[key][1], input); - return result; - }; - - return XReduceBy; -}(); - -var _xreduceBy = -/*#__PURE__*/ -_curryN(4, [], function _xreduceBy(valueFn, valueAcc, keyFn, xf) { - return new XReduceBy(valueFn, valueAcc, keyFn, xf); -}); - -module.exports = _xreduceBy; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xtake.js b/node_modules/ramda/src/internal/_xtake.js deleted file mode 100644 index 0f777f0..0000000 --- a/node_modules/ramda/src/internal/_xtake.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _reduced = -/*#__PURE__*/ -require("./_reduced"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XTake = -/*#__PURE__*/ -function () { - function XTake(n, xf) { - this.xf = xf; - this.n = n; - this.i = 0; - } - - XTake.prototype['@@transducer/init'] = _xfBase.init; - XTake.prototype['@@transducer/result'] = _xfBase.result; - - XTake.prototype['@@transducer/step'] = function (result, input) { - this.i += 1; - var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input); - return this.n >= 0 && this.i >= this.n ? _reduced(ret) : ret; - }; - - return XTake; -}(); - -var _xtake = -/*#__PURE__*/ -_curry2(function _xtake(n, xf) { - return new XTake(n, xf); -}); - -module.exports = _xtake; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xtakeWhile.js b/node_modules/ramda/src/internal/_xtakeWhile.js deleted file mode 100644 index ecf93e6..0000000 --- a/node_modules/ramda/src/internal/_xtakeWhile.js +++ /dev/null @@ -1,37 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _reduced = -/*#__PURE__*/ -require("./_reduced"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XTakeWhile = -/*#__PURE__*/ -function () { - function XTakeWhile(f, xf) { - this.xf = xf; - this.f = f; - } - - XTakeWhile.prototype['@@transducer/init'] = _xfBase.init; - XTakeWhile.prototype['@@transducer/result'] = _xfBase.result; - - XTakeWhile.prototype['@@transducer/step'] = function (result, input) { - return this.f(input) ? this.xf['@@transducer/step'](result, input) : _reduced(result); - }; - - return XTakeWhile; -}(); - -var _xtakeWhile = -/*#__PURE__*/ -_curry2(function _xtakeWhile(f, xf) { - return new XTakeWhile(f, xf); -}); - -module.exports = _xtakeWhile; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xtap.js b/node_modules/ramda/src/internal/_xtap.js deleted file mode 100644 index 41e4da0..0000000 --- a/node_modules/ramda/src/internal/_xtap.js +++ /dev/null @@ -1,34 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./_curry2"); - -var _xfBase = -/*#__PURE__*/ -require("./_xfBase"); - -var XTap = -/*#__PURE__*/ -function () { - function XTap(f, xf) { - this.xf = xf; - this.f = f; - } - - XTap.prototype['@@transducer/init'] = _xfBase.init; - XTap.prototype['@@transducer/result'] = _xfBase.result; - - XTap.prototype['@@transducer/step'] = function (result, input) { - this.f(input); - return this.xf['@@transducer/step'](result, input); - }; - - return XTap; -}(); - -var _xtap = -/*#__PURE__*/ -_curry2(function _xtap(f, xf) { - return new XTap(f, xf); -}); - -module.exports = _xtap; \ No newline at end of file diff --git a/node_modules/ramda/src/internal/_xwrap.js b/node_modules/ramda/src/internal/_xwrap.js deleted file mode 100644 index ea7b410..0000000 --- a/node_modules/ramda/src/internal/_xwrap.js +++ /dev/null @@ -1,27 +0,0 @@ -var XWrap = -/*#__PURE__*/ -function () { - function XWrap(fn) { - this.f = fn; - } - - XWrap.prototype['@@transducer/init'] = function () { - throw new Error('init not implemented on XWrap'); - }; - - XWrap.prototype['@@transducer/result'] = function (acc) { - return acc; - }; - - XWrap.prototype['@@transducer/step'] = function (acc, x) { - return this.f(acc, x); - }; - - return XWrap; -}(); - -function _xwrap(fn) { - return new XWrap(fn); -} - -module.exports = _xwrap; \ No newline at end of file diff --git a/node_modules/ramda/src/intersection.js b/node_modules/ramda/src/intersection.js deleted file mode 100644 index 8ead1a3..0000000 --- a/node_modules/ramda/src/intersection.js +++ /dev/null @@ -1,55 +0,0 @@ -var _includes = -/*#__PURE__*/ -require("./internal/_includes"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _filter = -/*#__PURE__*/ -require("./internal/_filter"); - -var flip = -/*#__PURE__*/ -require("./flip"); - -var uniq = -/*#__PURE__*/ -require("./uniq"); -/** - * Combines two lists into a set (i.e. no duplicates) composed of those - * elements common to both lists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The list of elements found in both `list1` and `list2`. - * @see R.innerJoin - * @example - * - * R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3] - */ - - -var intersection = -/*#__PURE__*/ -_curry2(function intersection(list1, list2) { - var lookupList, filteredList; - - if (list1.length > list2.length) { - lookupList = list1; - filteredList = list2; - } else { - lookupList = list2; - filteredList = list1; - } - - return uniq(_filter(flip(_includes)(lookupList), filteredList)); -}); - -module.exports = intersection; \ No newline at end of file diff --git a/node_modules/ramda/src/intersperse.js b/node_modules/ramda/src/intersperse.js deleted file mode 100644 index 37aeaf7..0000000 --- a/node_modules/ramda/src/intersperse.js +++ /dev/null @@ -1,49 +0,0 @@ -var _checkForMethod = -/*#__PURE__*/ -require("./internal/_checkForMethod"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Creates a new list with the separator interposed between elements. - * - * Dispatches to the `intersperse` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} separator The element to add to the list. - * @param {Array} list The list to be interposed. - * @return {Array} The new list. - * @example - * - * R.intersperse('a', ['b', 'n', 'n', 's']); //=> ['b', 'a', 'n', 'a', 'n', 'a', 's'] - */ - - -var intersperse = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_checkForMethod('intersperse', function intersperse(separator, list) { - var out = []; - var idx = 0; - var length = list.length; - - while (idx < length) { - if (idx === length - 1) { - out.push(list[idx]); - } else { - out.push(list[idx], separator); - } - - idx += 1; - } - - return out; -})); - -module.exports = intersperse; \ No newline at end of file diff --git a/node_modules/ramda/src/into.js b/node_modules/ramda/src/into.js deleted file mode 100644 index 184a853..0000000 --- a/node_modules/ramda/src/into.js +++ /dev/null @@ -1,67 +0,0 @@ -var _clone = -/*#__PURE__*/ -require("./internal/_clone"); - -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var _isTransformer = -/*#__PURE__*/ -require("./internal/_isTransformer"); - -var _reduce = -/*#__PURE__*/ -require("./internal/_reduce"); - -var _stepCat = -/*#__PURE__*/ -require("./internal/_stepCat"); -/** - * Transforms the items of the list with the transducer and appends the - * transformed items to the accumulator using an appropriate iterator function - * based on the accumulator type. - * - * The accumulator can be an array, string, object or a transformer. Iterated - * items will be appended to arrays and concatenated to strings. Objects will - * be merged directly or 2-item arrays will be merged as key, value pairs. - * - * The accumulator can also be a transformer object that provides a 2-arity - * reducing iterator function, step, 0-arity initial value function, init, and - * 1-arity result extraction function result. The step function is used as the - * iterator function in reduce. The result function is used to convert the - * final accumulator into the return type and in most cases is R.identity. The - * init function is used to provide the initial accumulator. - * - * The iteration is performed with [`R.reduce`](#reduce) after initializing the - * transducer. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig a -> (b -> b) -> [c] -> a - * @param {*} acc The initial accumulator value. - * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.transduce - * @example - * - * const numbers = [1, 2, 3, 4]; - * const transducer = R.compose(R.map(R.add(1)), R.take(2)); - * - * R.into([], transducer, numbers); //=> [2, 3] - * - * const intoArray = R.into([]); - * intoArray(transducer, numbers); //=> [2, 3] - */ - - -var into = -/*#__PURE__*/ -_curry3(function into(acc, xf, list) { - return _isTransformer(acc) ? _reduce(xf(acc), acc['@@transducer/init'](), list) : _reduce(xf(_stepCat(acc)), _clone(acc, [], [], false), list); -}); - -module.exports = into; \ No newline at end of file diff --git a/node_modules/ramda/src/invert.js b/node_modules/ramda/src/invert.js deleted file mode 100644 index d80627d..0000000 --- a/node_modules/ramda/src/invert.js +++ /dev/null @@ -1,55 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _has = -/*#__PURE__*/ -require("./internal/_has"); - -var keys = -/*#__PURE__*/ -require("./keys"); -/** - * Same as [`R.invertObj`](#invertObj), however this accounts for objects with - * duplicate values by putting the values into an array. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {s: x} -> {x: [ s, ... ]} - * @param {Object} obj The object or array to invert - * @return {Object} out A new object with keys in an array. - * @see R.invertObj - * @example - * - * const raceResultsByFirstName = { - * first: 'alice', - * second: 'jake', - * third: 'alice', - * }; - * R.invert(raceResultsByFirstName); - * //=> { 'alice': ['first', 'third'], 'jake':['second'] } - */ - - -var invert = -/*#__PURE__*/ -_curry1(function invert(obj) { - var props = keys(obj); - var len = props.length; - var idx = 0; - var out = {}; - - while (idx < len) { - var key = props[idx]; - var val = obj[key]; - var list = _has(val, out) ? out[val] : out[val] = []; - list[list.length] = key; - idx += 1; - } - - return out; -}); - -module.exports = invert; \ No newline at end of file diff --git a/node_modules/ramda/src/invertObj.js b/node_modules/ramda/src/invertObj.js deleted file mode 100644 index 012b591..0000000 --- a/node_modules/ramda/src/invertObj.js +++ /dev/null @@ -1,54 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var keys = -/*#__PURE__*/ -require("./keys"); -/** - * Returns a new object with the keys of the given object as values, and the - * values of the given object, which are coerced to strings, as keys. Note - * that the last key found is preferred when handling the same value. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig {s: x} -> {x: s} - * @param {Object} obj The object or array to invert - * @return {Object} out A new object - * @see R.invert - * @example - * - * const raceResults = { - * first: 'alice', - * second: 'jake' - * }; - * R.invertObj(raceResults); - * //=> { 'alice': 'first', 'jake':'second' } - * - * // Alternatively: - * const raceResults = ['alice', 'jake']; - * R.invertObj(raceResults); - * //=> { 'alice': '0', 'jake':'1' } - */ - - -var invertObj = -/*#__PURE__*/ -_curry1(function invertObj(obj) { - var props = keys(obj); - var len = props.length; - var idx = 0; - var out = {}; - - while (idx < len) { - var key = props[idx]; - out[obj[key]] = key; - idx += 1; - } - - return out; -}); - -module.exports = invertObj; \ No newline at end of file diff --git a/node_modules/ramda/src/invoker.js b/node_modules/ramda/src/invoker.js deleted file mode 100644 index 44783a2..0000000 --- a/node_modules/ramda/src/invoker.js +++ /dev/null @@ -1,66 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _isFunction = -/*#__PURE__*/ -require("./internal/_isFunction"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); - -var toString = -/*#__PURE__*/ -require("./toString"); -/** - * Turns a named method with a specified arity into a function that can be - * called directly supplied with arguments and a target object. - * - * The returned function is curried and accepts `arity + 1` parameters where - * the final parameter is the target object. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *) - * @param {Number} arity Number of arguments the returned function should take - * before the target object. - * @param {String} method Name of any of the target object's methods to call. - * @return {Function} A new curried function. - * @see R.construct - * @example - * - * const sliceFrom = R.invoker(1, 'slice'); - * sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm' - * const sliceFrom6 = R.invoker(2, 'slice')(6); - * sliceFrom6(8, 'abcdefghijklm'); //=> 'gh' - * - * const dog = { - * speak: async () => 'Woof!' - * }; - * const speak = R.invoker(0, 'speak'); - * speak(dog).then(console.log) //~> 'Woof!' - * - * @symb R.invoker(0, 'method')(o) = o['method']() - * @symb R.invoker(1, 'method')(a, o) = o['method'](a) - * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b) - */ - - -var invoker = -/*#__PURE__*/ -_curry2(function invoker(arity, method) { - return curryN(arity + 1, function () { - var target = arguments[arity]; - - if (target != null && _isFunction(target[method])) { - return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity)); - } - - throw new TypeError(toString(target) + ' does not have a method named "' + method + '"'); - }); -}); - -module.exports = invoker; \ No newline at end of file diff --git a/node_modules/ramda/src/is.js b/node_modules/ramda/src/is.js deleted file mode 100644 index 3a1945e..0000000 --- a/node_modules/ramda/src/is.js +++ /dev/null @@ -1,35 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * See if an object (`val`) is an instance of the supplied constructor. This - * function will check up the inheritance chain, if any. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Type - * @sig (* -> {*}) -> a -> Boolean - * @param {Object} ctor A constructor - * @param {*} val The value to test - * @return {Boolean} - * @example - * - * R.is(Object, {}); //=> true - * R.is(Number, 1); //=> true - * R.is(Object, 1); //=> false - * R.is(String, 's'); //=> true - * R.is(String, new String('')); //=> true - * R.is(Object, new String('')); //=> true - * R.is(Object, 's'); //=> false - * R.is(Number, {}); //=> false - */ - - -var is = -/*#__PURE__*/ -_curry2(function is(Ctor, val) { - return val != null && val.constructor === Ctor || val instanceof Ctor; -}); - -module.exports = is; \ No newline at end of file diff --git a/node_modules/ramda/src/isEmpty.js b/node_modules/ramda/src/isEmpty.js deleted file mode 100644 index 48c80a5..0000000 --- a/node_modules/ramda/src/isEmpty.js +++ /dev/null @@ -1,41 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var empty = -/*#__PURE__*/ -require("./empty"); - -var equals = -/*#__PURE__*/ -require("./equals"); -/** - * Returns `true` if the given value is its type's empty value; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> Boolean - * @param {*} x - * @return {Boolean} - * @see R.empty - * @example - * - * R.isEmpty([1, 2, 3]); //=> false - * R.isEmpty([]); //=> true - * R.isEmpty(''); //=> true - * R.isEmpty(null); //=> false - * R.isEmpty({}); //=> true - * R.isEmpty({length: 0}); //=> false - */ - - -var isEmpty = -/*#__PURE__*/ -_curry1(function isEmpty(x) { - return x != null && equals(x, empty(x)); -}); - -module.exports = isEmpty; \ No newline at end of file diff --git a/node_modules/ramda/src/isNil.js b/node_modules/ramda/src/isNil.js deleted file mode 100644 index f29f44f..0000000 --- a/node_modules/ramda/src/isNil.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Checks if the input value is `null` or `undefined`. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Type - * @sig * -> Boolean - * @param {*} x The value to test. - * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`. - * @example - * - * R.isNil(null); //=> true - * R.isNil(undefined); //=> true - * R.isNil(0); //=> false - * R.isNil([]); //=> false - */ - - -var isNil = -/*#__PURE__*/ -_curry1(function isNil(x) { - return x == null; -}); - -module.exports = isNil; \ No newline at end of file diff --git a/node_modules/ramda/src/join.js b/node_modules/ramda/src/join.js deleted file mode 100644 index c18635e..0000000 --- a/node_modules/ramda/src/join.js +++ /dev/null @@ -1,28 +0,0 @@ -var invoker = -/*#__PURE__*/ -require("./invoker"); -/** - * Returns a string made by inserting the `separator` between each element and - * concatenating all the elements into a single string. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig String -> [a] -> String - * @param {Number|String} separator The string used to separate the elements. - * @param {Array} xs The elements to join into a string. - * @return {String} str The string made by concatenating `xs` with `separator`. - * @see R.split - * @example - * - * const spacer = R.join(' '); - * spacer(['a', 2, 3.4]); //=> 'a 2 3.4' - * R.join('|', [1, 2, 3]); //=> '1|2|3' - */ - - -var join = -/*#__PURE__*/ -invoker(1, 'join'); -module.exports = join; \ No newline at end of file diff --git a/node_modules/ramda/src/juxt.js b/node_modules/ramda/src/juxt.js deleted file mode 100644 index 6ed49b3..0000000 --- a/node_modules/ramda/src/juxt.js +++ /dev/null @@ -1,35 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var converge = -/*#__PURE__*/ -require("./converge"); -/** - * juxt applies a list of functions to a list of values. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Function - * @sig [(a, b, ..., m) -> n] -> ((a, b, ..., m) -> [n]) - * @param {Array} fns An array of functions - * @return {Function} A function that returns a list of values after applying each of the original `fns` to its parameters. - * @see R.applySpec - * @example - * - * const getRange = R.juxt([Math.min, Math.max]); - * getRange(3, 4, 9, -3); //=> [-3, 9] - * @symb R.juxt([f, g, h])(a, b) = [f(a, b), g(a, b), h(a, b)] - */ - - -var juxt = -/*#__PURE__*/ -_curry1(function juxt(fns) { - return converge(function () { - return Array.prototype.slice.call(arguments, 0); - }, fns); -}); - -module.exports = juxt; \ No newline at end of file diff --git a/node_modules/ramda/src/keys.js b/node_modules/ramda/src/keys.js deleted file mode 100644 index 8688954..0000000 --- a/node_modules/ramda/src/keys.js +++ /dev/null @@ -1,100 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _has = -/*#__PURE__*/ -require("./internal/_has"); - -var _isArguments = -/*#__PURE__*/ -require("./internal/_isArguments"); // cover IE < 9 keys issues - - -var hasEnumBug = ! -/*#__PURE__*/ -{ - toString: null -}.propertyIsEnumerable('toString'); -var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug - -var hasArgsEnumBug = -/*#__PURE__*/ -function () { - 'use strict'; - - return arguments.propertyIsEnumerable('length'); -}(); - -var contains = function contains(list, item) { - var idx = 0; - - while (idx < list.length) { - if (list[idx] === item) { - return true; - } - - idx += 1; - } - - return false; -}; -/** - * Returns a list containing the names of all the enumerable own properties of - * the supplied object. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> [k] - * @param {Object} obj The object to extract properties from - * @return {Array} An array of the object's own properties. - * @see R.keysIn, R.values - * @example - * - * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c'] - */ - - -var keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? -/*#__PURE__*/ -_curry1(function keys(obj) { - return Object(obj) !== obj ? [] : Object.keys(obj); -}) : -/*#__PURE__*/ -_curry1(function keys(obj) { - if (Object(obj) !== obj) { - return []; - } - - var prop, nIdx; - var ks = []; - - var checkArgsLength = hasArgsEnumBug && _isArguments(obj); - - for (prop in obj) { - if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) { - ks[ks.length] = prop; - } - } - - if (hasEnumBug) { - nIdx = nonEnumerableProps.length - 1; - - while (nIdx >= 0) { - prop = nonEnumerableProps[nIdx]; - - if (_has(prop, obj) && !contains(ks, prop)) { - ks[ks.length] = prop; - } - - nIdx -= 1; - } - } - - return ks; -}); -module.exports = keys; \ No newline at end of file diff --git a/node_modules/ramda/src/keysIn.js b/node_modules/ramda/src/keysIn.js deleted file mode 100644 index 0b71e53..0000000 --- a/node_modules/ramda/src/keysIn.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Returns a list containing the names of all the properties of the supplied - * object, including prototype properties. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @sig {k: v} -> [k] - * @param {Object} obj The object to extract properties from - * @return {Array} An array of the object's own and prototype properties. - * @see R.keys, R.valuesIn - * @example - * - * const F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * const f = new F(); - * R.keysIn(f); //=> ['x', 'y'] - */ - - -var keysIn = -/*#__PURE__*/ -_curry1(function keysIn(obj) { - var prop; - var ks = []; - - for (prop in obj) { - ks[ks.length] = prop; - } - - return ks; -}); - -module.exports = keysIn; \ No newline at end of file diff --git a/node_modules/ramda/src/last.js b/node_modules/ramda/src/last.js deleted file mode 100644 index 4f86a5f..0000000 --- a/node_modules/ramda/src/last.js +++ /dev/null @@ -1,29 +0,0 @@ -var nth = -/*#__PURE__*/ -require("./nth"); -/** - * Returns the last element of the given list or string. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig [a] -> a | Undefined - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.init, R.head, R.tail - * @example - * - * R.last(['fi', 'fo', 'fum']); //=> 'fum' - * R.last([]); //=> undefined - * - * R.last('abc'); //=> 'c' - * R.last(''); //=> '' - */ - - -var last = -/*#__PURE__*/ -nth(-1); -module.exports = last; \ No newline at end of file diff --git a/node_modules/ramda/src/lastIndexOf.js b/node_modules/ramda/src/lastIndexOf.js deleted file mode 100644 index 8f6bd82..0000000 --- a/node_modules/ramda/src/lastIndexOf.js +++ /dev/null @@ -1,53 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _isArray = -/*#__PURE__*/ -require("./internal/_isArray"); - -var equals = -/*#__PURE__*/ -require("./equals"); -/** - * Returns the position of the last occurrence of an item in an array, or -1 if - * the item is not included in the array. [`R.equals`](#equals) is used to - * determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> Number - * @param {*} target The item to find. - * @param {Array} xs The array to search in. - * @return {Number} the index of the target, or -1 if the target is not found. - * @see R.indexOf - * @example - * - * R.lastIndexOf(3, [-1,3,3,0,1,2,3,4]); //=> 6 - * R.lastIndexOf(10, [1,2,3,4]); //=> -1 - */ - - -var lastIndexOf = -/*#__PURE__*/ -_curry2(function lastIndexOf(target, xs) { - if (typeof xs.lastIndexOf === 'function' && !_isArray(xs)) { - return xs.lastIndexOf(target); - } else { - var idx = xs.length - 1; - - while (idx >= 0) { - if (equals(xs[idx], target)) { - return idx; - } - - idx -= 1; - } - - return -1; - } -}); - -module.exports = lastIndexOf; \ No newline at end of file diff --git a/node_modules/ramda/src/length.js b/node_modules/ramda/src/length.js deleted file mode 100644 index ad6ec1d..0000000 --- a/node_modules/ramda/src/length.js +++ /dev/null @@ -1,31 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _isNumber = -/*#__PURE__*/ -require("./internal/_isNumber"); -/** - * Returns the number of elements in the array by returning `list.length`. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [a] -> Number - * @param {Array} list The array to inspect. - * @return {Number} The length of the array. - * @example - * - * R.length([]); //=> 0 - * R.length([1, 2, 3]); //=> 3 - */ - - -var length = -/*#__PURE__*/ -_curry1(function length(list) { - return list != null && _isNumber(list.length) ? list.length : NaN; -}); - -module.exports = length; \ No newline at end of file diff --git a/node_modules/ramda/src/lens.js b/node_modules/ramda/src/lens.js deleted file mode 100644 index 1e6ee20..0000000 --- a/node_modules/ramda/src/lens.js +++ /dev/null @@ -1,45 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var map = -/*#__PURE__*/ -require("./map"); -/** - * Returns a lens for the given getter and setter functions. The getter "gets" - * the value of the focus; the setter "sets" the value of the focus. The setter - * should not mutate the data structure. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig (s -> a) -> ((a, s) -> s) -> Lens s a - * @param {Function} getter - * @param {Function} setter - * @return {Lens} - * @see R.view, R.set, R.over, R.lensIndex, R.lensProp - * @example - * - * const xLens = R.lens(R.prop('x'), R.assoc('x')); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} - */ - - -var lens = -/*#__PURE__*/ -_curry2(function lens(getter, setter) { - return function (toFunctorFn) { - return function (target) { - return map(function (focus) { - return setter(focus, target); - }, toFunctorFn(getter(target))); - }; - }; -}); - -module.exports = lens; \ No newline at end of file diff --git a/node_modules/ramda/src/lensIndex.js b/node_modules/ramda/src/lensIndex.js deleted file mode 100644 index f3d9410..0000000 --- a/node_modules/ramda/src/lensIndex.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var lens = -/*#__PURE__*/ -require("./lens"); - -var nth = -/*#__PURE__*/ -require("./nth"); - -var update = -/*#__PURE__*/ -require("./update"); -/** - * Returns a lens whose focus is the specified index. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Number -> Lens s a - * @param {Number} n - * @return {Lens} - * @see R.view, R.set, R.over, R.nth - * @example - * - * const headLens = R.lensIndex(0); - * - * R.view(headLens, ['a', 'b', 'c']); //=> 'a' - * R.set(headLens, 'x', ['a', 'b', 'c']); //=> ['x', 'b', 'c'] - * R.over(headLens, R.toUpper, ['a', 'b', 'c']); //=> ['A', 'b', 'c'] - */ - - -var lensIndex = -/*#__PURE__*/ -_curry1(function lensIndex(n) { - return lens(nth(n), update(n)); -}); - -module.exports = lensIndex; \ No newline at end of file diff --git a/node_modules/ramda/src/lensPath.js b/node_modules/ramda/src/lensPath.js deleted file mode 100644 index fd25e44..0000000 --- a/node_modules/ramda/src/lensPath.js +++ /dev/null @@ -1,48 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var assocPath = -/*#__PURE__*/ -require("./assocPath"); - -var lens = -/*#__PURE__*/ -require("./lens"); - -var path = -/*#__PURE__*/ -require("./path"); -/** - * Returns a lens whose focus is the specified path. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @typedefn Idx = String | Int - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig [Idx] -> Lens s a - * @param {Array} path The path to use. - * @return {Lens} - * @see R.view, R.set, R.over - * @example - * - * const xHeadYLens = R.lensPath(['x', 0, 'y']); - * - * R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> 2 - * R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]} - * R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); - * //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]} - */ - - -var lensPath = -/*#__PURE__*/ -_curry1(function lensPath(p) { - return lens(path(p), assocPath(p)); -}); - -module.exports = lensPath; \ No newline at end of file diff --git a/node_modules/ramda/src/lensProp.js b/node_modules/ramda/src/lensProp.js deleted file mode 100644 index b455429..0000000 --- a/node_modules/ramda/src/lensProp.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var assoc = -/*#__PURE__*/ -require("./assoc"); - -var lens = -/*#__PURE__*/ -require("./lens"); - -var prop = -/*#__PURE__*/ -require("./prop"); -/** - * Returns a lens whose focus is the specified property. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig String -> Lens s a - * @param {String} k - * @return {Lens} - * @see R.view, R.set, R.over - * @example - * - * const xLens = R.lensProp('x'); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} - */ - - -var lensProp = -/*#__PURE__*/ -_curry1(function lensProp(k) { - return lens(prop(k), assoc(k)); -}); - -module.exports = lensProp; \ No newline at end of file diff --git a/node_modules/ramda/src/lift.js b/node_modules/ramda/src/lift.js deleted file mode 100644 index 1628e48..0000000 --- a/node_modules/ramda/src/lift.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var liftN = -/*#__PURE__*/ -require("./liftN"); -/** - * "lifts" a function of arity > 1 so that it may "map over" a list, Function or other - * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig (*... -> *) -> ([*]... -> [*]) - * @param {Function} fn The function to lift into higher context - * @return {Function} The lifted function. - * @see R.liftN - * @example - * - * const madd3 = R.lift((a, b, c) => a + b + c); - * - * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] - * - * const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e); - * - * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24] - */ - - -var lift = -/*#__PURE__*/ -_curry1(function lift(fn) { - return liftN(fn.length, fn); -}); - -module.exports = lift; \ No newline at end of file diff --git a/node_modules/ramda/src/liftN.js b/node_modules/ramda/src/liftN.js deleted file mode 100644 index 997fb5c..0000000 --- a/node_modules/ramda/src/liftN.js +++ /dev/null @@ -1,48 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _reduce = -/*#__PURE__*/ -require("./internal/_reduce"); - -var ap = -/*#__PURE__*/ -require("./ap"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); - -var map = -/*#__PURE__*/ -require("./map"); -/** - * "lifts" a function to be the specified arity, so that it may "map over" that - * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Function - * @sig Number -> (*... -> *) -> ([*]... -> [*]) - * @param {Function} fn The function to lift into higher context - * @return {Function} The lifted function. - * @see R.lift, R.ap - * @example - * - * const madd3 = R.liftN(3, (...args) => R.sum(args)); - * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] - */ - - -var liftN = -/*#__PURE__*/ -_curry2(function liftN(arity, fn) { - var lifted = curryN(arity, fn); - return curryN(arity, function () { - return _reduce(ap, map(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1)); - }); -}); - -module.exports = liftN; \ No newline at end of file diff --git a/node_modules/ramda/src/lt.js b/node_modules/ramda/src/lt.js deleted file mode 100644 index 5014e8c..0000000 --- a/node_modules/ramda/src/lt.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns `true` if the first argument is less than the second; `false` - * otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {*} a - * @param {*} b - * @return {Boolean} - * @see R.gt - * @example - * - * R.lt(2, 1); //=> false - * R.lt(2, 2); //=> false - * R.lt(2, 3); //=> true - * R.lt('a', 'z'); //=> true - * R.lt('z', 'a'); //=> false - */ - - -var lt = -/*#__PURE__*/ -_curry2(function lt(a, b) { - return a < b; -}); - -module.exports = lt; \ No newline at end of file diff --git a/node_modules/ramda/src/lte.js b/node_modules/ramda/src/lte.js deleted file mode 100644 index da8641e..0000000 --- a/node_modules/ramda/src/lte.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns `true` if the first argument is less than or equal to the second; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> Boolean - * @param {Number} a - * @param {Number} b - * @return {Boolean} - * @see R.gte - * @example - * - * R.lte(2, 1); //=> false - * R.lte(2, 2); //=> true - * R.lte(2, 3); //=> true - * R.lte('a', 'z'); //=> true - * R.lte('z', 'a'); //=> false - */ - - -var lte = -/*#__PURE__*/ -_curry2(function lte(a, b) { - return a <= b; -}); - -module.exports = lte; \ No newline at end of file diff --git a/node_modules/ramda/src/map.js b/node_modules/ramda/src/map.js deleted file mode 100644 index 9684261..0000000 --- a/node_modules/ramda/src/map.js +++ /dev/null @@ -1,87 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _map = -/*#__PURE__*/ -require("./internal/_map"); - -var _reduce = -/*#__PURE__*/ -require("./internal/_reduce"); - -var _xmap = -/*#__PURE__*/ -require("./internal/_xmap"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); - -var keys = -/*#__PURE__*/ -require("./keys"); -/** - * Takes a function and - * a [functor](https://github.com/fantasyland/fantasy-land#functor), - * applies the function to each of the functor's values, and returns - * a functor of the same shape. - * - * Ramda provides suitable `map` implementations for `Array` and `Object`, - * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`. - * - * Dispatches to the `map` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * Also treats functions as functors and will compose them together. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Functor f => (a -> b) -> f a -> f b - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {Array} list The list to be iterated over. - * @return {Array} The new list. - * @see R.transduce, R.addIndex - * @example - * - * const double = x => x * 2; - * - * R.map(double, [1, 2, 3]); //=> [2, 4, 6] - * - * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6} - * @symb R.map(f, [a, b]) = [f(a), f(b)] - * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) } - * @symb R.map(f, functor_o) = functor_o.map(f) - */ - - -var map = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) { - switch (Object.prototype.toString.call(functor)) { - case '[object Function]': - return curryN(functor.length, function () { - return fn.call(this, functor.apply(this, arguments)); - }); - - case '[object Object]': - return _reduce(function (acc, key) { - acc[key] = fn(functor[key]); - return acc; - }, {}, keys(functor)); - - default: - return _map(fn, functor); - } -})); - -module.exports = map; \ No newline at end of file diff --git a/node_modules/ramda/src/mapAccum.js b/node_modules/ramda/src/mapAccum.js deleted file mode 100644 index 17e17ed..0000000 --- a/node_modules/ramda/src/mapAccum.js +++ /dev/null @@ -1,57 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * The `mapAccum` function behaves like a combination of map and reduce; it - * applies a function to each element of a list, passing an accumulating - * parameter from left to right, and returning a final value of this - * accumulator together with the new list. - * - * The iterator function receives two arguments, *acc* and *value*, and should - * return a tuple *[acc, value]*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y]) - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.scan, R.addIndex, R.mapAccumRight - * @example - * - * const digits = ['1', '2', '3', '4']; - * const appender = (a, b) => [a + b, a + b]; - * - * R.mapAccum(appender, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']] - * @symb R.mapAccum(f, a, [b, c, d]) = [ - * f(f(f(a, b)[0], c)[0], d)[0], - * [ - * f(a, b)[1], - * f(f(a, b)[0], c)[1], - * f(f(f(a, b)[0], c)[0], d)[1] - * ] - * ] - */ - - -var mapAccum = -/*#__PURE__*/ -_curry3(function mapAccum(fn, acc, list) { - var idx = 0; - var len = list.length; - var result = []; - var tuple = [acc]; - - while (idx < len) { - tuple = fn(tuple[0], list[idx]); - result[idx] = tuple[1]; - idx += 1; - } - - return [tuple[0], result]; -}); - -module.exports = mapAccum; \ No newline at end of file diff --git a/node_modules/ramda/src/mapAccumRight.js b/node_modules/ramda/src/mapAccumRight.js deleted file mode 100644 index dfe7532..0000000 --- a/node_modules/ramda/src/mapAccumRight.js +++ /dev/null @@ -1,59 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * The `mapAccumRight` function behaves like a combination of map and reduce; it - * applies a function to each element of a list, passing an accumulating - * parameter from right to left, and returning a final value of this - * accumulator together with the new list. - * - * Similar to [`mapAccum`](#mapAccum), except moves through the input list from - * the right to the left. - * - * The iterator function receives two arguments, *acc* and *value*, and should - * return a tuple *[acc, value]*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y]) - * @param {Function} fn The function to be called on every element of the input `list`. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.addIndex, R.mapAccum - * @example - * - * const digits = ['1', '2', '3', '4']; - * const appender = (a, b) => [b + a, b + a]; - * - * R.mapAccumRight(appender, 5, digits); //=> ['12345', ['12345', '2345', '345', '45']] - * @symb R.mapAccumRight(f, a, [b, c, d]) = [ - * f(f(f(a, d)[0], c)[0], b)[0], - * [ - * f(a, d)[1], - * f(f(a, d)[0], c)[1], - * f(f(f(a, d)[0], c)[0], b)[1] - * ] - * ] - */ - - -var mapAccumRight = -/*#__PURE__*/ -_curry3(function mapAccumRight(fn, acc, list) { - var idx = list.length - 1; - var result = []; - var tuple = [acc]; - - while (idx >= 0) { - tuple = fn(tuple[0], list[idx]); - result[idx] = tuple[1]; - idx -= 1; - } - - return [tuple[0], result]; -}); - -module.exports = mapAccumRight; \ No newline at end of file diff --git a/node_modules/ramda/src/mapObjIndexed.js b/node_modules/ramda/src/mapObjIndexed.js deleted file mode 100644 index f4d43d7..0000000 --- a/node_modules/ramda/src/mapObjIndexed.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _reduce = -/*#__PURE__*/ -require("./internal/_reduce"); - -var keys = -/*#__PURE__*/ -require("./keys"); -/** - * An Object-specific version of [`map`](#map). The function is applied to three - * arguments: *(value, key, obj)*. If only the value is significant, use - * [`map`](#map) instead. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Object - * @sig ((*, String, Object) -> *) -> Object -> Object - * @param {Function} fn - * @param {Object} obj - * @return {Object} - * @see R.map - * @example - * - * const xyz = { x: 1, y: 2, z: 3 }; - * const prependKeyAndDouble = (num, key, obj) => key + (num * 2); - * - * R.mapObjIndexed(prependKeyAndDouble, xyz); //=> { x: 'x2', y: 'y4', z: 'z6' } - */ - - -var mapObjIndexed = -/*#__PURE__*/ -_curry2(function mapObjIndexed(fn, obj) { - return _reduce(function (acc, key) { - acc[key] = fn(obj[key], key, obj); - return acc; - }, {}, keys(obj)); -}); - -module.exports = mapObjIndexed; \ No newline at end of file diff --git a/node_modules/ramda/src/match.js b/node_modules/ramda/src/match.js deleted file mode 100644 index 178b586..0000000 --- a/node_modules/ramda/src/match.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Tests a regular expression against a String. Note that this function will - * return an empty array when there are no matches. This differs from - * [`String.prototype.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) - * which returns `null` when there are no matches. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category String - * @sig RegExp -> String -> [String | Undefined] - * @param {RegExp} rx A regular expression. - * @param {String} str The string to match against - * @return {Array} The list of matches or empty array. - * @see R.test - * @example - * - * R.match(/([a-z]a)/g, 'bananas'); //=> ['ba', 'na', 'na'] - * R.match(/a/, 'b'); //=> [] - * R.match(/a/, null); //=> TypeError: null does not have a method named "match" - */ - - -var match = -/*#__PURE__*/ -_curry2(function match(rx, str) { - return str.match(rx) || []; -}); - -module.exports = match; \ No newline at end of file diff --git a/node_modules/ramda/src/mathMod.js b/node_modules/ramda/src/mathMod.js deleted file mode 100644 index a9be103..0000000 --- a/node_modules/ramda/src/mathMod.js +++ /dev/null @@ -1,57 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _isInteger = -/*#__PURE__*/ -require("./internal/_isInteger"); -/** - * `mathMod` behaves like the modulo operator should mathematically, unlike the - * `%` operator (and by extension, [`R.modulo`](#modulo)). So while - * `-17 % 5` is `-2`, `mathMod(-17, 5)` is `3`. `mathMod` requires Integer - * arguments, and returns NaN when the modulus is zero or negative. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} m The dividend. - * @param {Number} p the modulus. - * @return {Number} The result of `b mod a`. - * @see R.modulo - * @example - * - * R.mathMod(-17, 5); //=> 3 - * R.mathMod(17, 5); //=> 2 - * R.mathMod(17, -5); //=> NaN - * R.mathMod(17, 0); //=> NaN - * R.mathMod(17.2, 5); //=> NaN - * R.mathMod(17, 5.3); //=> NaN - * - * const clock = R.mathMod(R.__, 12); - * clock(15); //=> 3 - * clock(24); //=> 0 - * - * const seventeenMod = R.mathMod(17); - * seventeenMod(3); //=> 2 - * seventeenMod(4); //=> 1 - * seventeenMod(10); //=> 7 - */ - - -var mathMod = -/*#__PURE__*/ -_curry2(function mathMod(m, p) { - if (!_isInteger(m)) { - return NaN; - } - - if (!_isInteger(p) || p < 1) { - return NaN; - } - - return (m % p + p) % p; -}); - -module.exports = mathMod; \ No newline at end of file diff --git a/node_modules/ramda/src/max.js b/node_modules/ramda/src/max.js deleted file mode 100644 index 64d16dd..0000000 --- a/node_modules/ramda/src/max.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns the larger of its two arguments. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> a - * @param {*} a - * @param {*} b - * @return {*} - * @see R.maxBy, R.min - * @example - * - * R.max(789, 123); //=> 789 - * R.max('a', 'b'); //=> 'b' - */ - - -var max = -/*#__PURE__*/ -_curry2(function max(a, b) { - return b > a ? b : a; -}); - -module.exports = max; \ No newline at end of file diff --git a/node_modules/ramda/src/maxBy.js b/node_modules/ramda/src/maxBy.js deleted file mode 100644 index 77c34c8..0000000 --- a/node_modules/ramda/src/maxBy.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Takes a function and two values, and returns whichever value produces the - * larger result when passed to the provided function. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Relation - * @sig Ord b => (a -> b) -> a -> a -> a - * @param {Function} f - * @param {*} a - * @param {*} b - * @return {*} - * @see R.max, R.minBy - * @example - * - * // square :: Number -> Number - * const square = n => n * n; - * - * R.maxBy(square, -3, 2); //=> -3 - * - * R.reduce(R.maxBy(square), 0, [3, -5, 4, 1, -2]); //=> -5 - * R.reduce(R.maxBy(square), 0, []); //=> 0 - */ - - -var maxBy = -/*#__PURE__*/ -_curry3(function maxBy(f, a, b) { - return f(b) > f(a) ? b : a; -}); - -module.exports = maxBy; \ No newline at end of file diff --git a/node_modules/ramda/src/mean.js b/node_modules/ramda/src/mean.js deleted file mode 100644 index ba8a70c..0000000 --- a/node_modules/ramda/src/mean.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var sum = -/*#__PURE__*/ -require("./sum"); -/** - * Returns the mean of the given list of numbers. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list - * @return {Number} - * @see R.median - * @example - * - * R.mean([2, 7, 9]); //=> 6 - * R.mean([]); //=> NaN - */ - - -var mean = -/*#__PURE__*/ -_curry1(function mean(list) { - return sum(list) / list.length; -}); - -module.exports = mean; \ No newline at end of file diff --git a/node_modules/ramda/src/median.js b/node_modules/ramda/src/median.js deleted file mode 100644 index 7a63990..0000000 --- a/node_modules/ramda/src/median.js +++ /dev/null @@ -1,43 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var mean = -/*#__PURE__*/ -require("./mean"); -/** - * Returns the median of the given list of numbers. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list - * @return {Number} - * @see R.mean - * @example - * - * R.median([2, 9, 7]); //=> 7 - * R.median([7, 2, 10, 9]); //=> 8 - * R.median([]); //=> NaN - */ - - -var median = -/*#__PURE__*/ -_curry1(function median(list) { - var len = list.length; - - if (len === 0) { - return NaN; - } - - var width = 2 - len % 2; - var idx = (len - width) / 2; - return mean(Array.prototype.slice.call(list, 0).sort(function (a, b) { - return a < b ? -1 : a > b ? 1 : 0; - }).slice(idx, idx + width)); -}); - -module.exports = median; \ No newline at end of file diff --git a/node_modules/ramda/src/memoizeWith.js b/node_modules/ramda/src/memoizeWith.js deleted file mode 100644 index 2d722e7..0000000 --- a/node_modules/ramda/src/memoizeWith.js +++ /dev/null @@ -1,57 +0,0 @@ -var _arity = -/*#__PURE__*/ -require("./internal/_arity"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _has = -/*#__PURE__*/ -require("./internal/_has"); -/** - * Creates a new function that, when invoked, caches the result of calling `fn` - * for a given argument set and returns the result. Subsequent calls to the - * memoized `fn` with the same argument set will not result in an additional - * call to `fn`; instead, the cached result for that set of arguments will be - * returned. - * - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Function - * @sig (*... -> String) -> (*... -> a) -> (*... -> a) - * @param {Function} fn The function to generate the cache key. - * @param {Function} fn The function to memoize. - * @return {Function} Memoized version of `fn`. - * @example - * - * let count = 0; - * const factorial = R.memoizeWith(R.identity, n => { - * count += 1; - * return R.product(R.range(1, n + 1)); - * }); - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * factorial(5); //=> 120 - * count; //=> 1 - */ - - -var memoizeWith = -/*#__PURE__*/ -_curry2(function memoizeWith(mFn, fn) { - var cache = {}; - return _arity(fn.length, function () { - var key = mFn.apply(this, arguments); - - if (!_has(key, cache)) { - cache[key] = fn.apply(this, arguments); - } - - return cache[key]; - }); -}); - -module.exports = memoizeWith; \ No newline at end of file diff --git a/node_modules/ramda/src/merge.js b/node_modules/ramda/src/merge.js deleted file mode 100644 index 2d17e46..0000000 --- a/node_modules/ramda/src/merge.js +++ /dev/null @@ -1,40 +0,0 @@ -var _objectAssign = -/*#__PURE__*/ -require("./internal/_objectAssign"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeRight, R.mergeDeepRight, R.mergeWith, R.mergeWithKey - * @deprecated since v0.26.0 - * @example - * - * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * const withDefaults = R.merge({x: 0, y: 0}); - * withDefaults({y: 2}); //=> {x: 0, y: 2} - * @symb R.merge(a, b) = {...a, ...b} - */ - - -var merge = -/*#__PURE__*/ -_curry2(function merge(l, r) { - return _objectAssign({}, l, r); -}); - -module.exports = merge; \ No newline at end of file diff --git a/node_modules/ramda/src/mergeAll.js b/node_modules/ramda/src/mergeAll.js deleted file mode 100644 index c1d44b3..0000000 --- a/node_modules/ramda/src/mergeAll.js +++ /dev/null @@ -1,33 +0,0 @@ -var _objectAssign = -/*#__PURE__*/ -require("./internal/_objectAssign"); - -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Merges a list of objects together into one object. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig [{k: v}] -> {k: v} - * @param {Array} list An array of objects - * @return {Object} A merged object. - * @see R.reduce - * @example - * - * R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3} - * R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2} - * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 } - */ - - -var mergeAll = -/*#__PURE__*/ -_curry1(function mergeAll(list) { - return _objectAssign.apply(null, [{}].concat(list)); -}); - -module.exports = mergeAll; \ No newline at end of file diff --git a/node_modules/ramda/src/mergeDeepLeft.js b/node_modules/ramda/src/mergeDeepLeft.js deleted file mode 100644 index 778b165..0000000 --- a/node_modules/ramda/src/mergeDeepLeft.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var mergeDeepWithKey = -/*#__PURE__*/ -require("./mergeDeepWithKey"); -/** - * Creates a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects: - * - and both values are objects, the two values will be recursively merged - * - otherwise the value from the first object will be used. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig {a} -> {a} -> {a} - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.merge, R.mergeDeepRight, R.mergeDeepWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepLeft({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, - * { age: 40, contact: { email: 'baa@example.com' }}); - * //=> { name: 'fred', age: 10, contact: { email: 'moo@example.com' }} - */ - - -var mergeDeepLeft = -/*#__PURE__*/ -_curry2(function mergeDeepLeft(lObj, rObj) { - return mergeDeepWithKey(function (k, lVal, rVal) { - return lVal; - }, lObj, rObj); -}); - -module.exports = mergeDeepLeft; \ No newline at end of file diff --git a/node_modules/ramda/src/mergeDeepRight.js b/node_modules/ramda/src/mergeDeepRight.js deleted file mode 100644 index 5a865cb..0000000 --- a/node_modules/ramda/src/mergeDeepRight.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var mergeDeepWithKey = -/*#__PURE__*/ -require("./mergeDeepWithKey"); -/** - * Creates a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects: - * - and both values are objects, the two values will be recursively merged - * - otherwise the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig {a} -> {a} -> {a} - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, - * { age: 40, contact: { email: 'baa@example.com' }}); - * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }} - */ - - -var mergeDeepRight = -/*#__PURE__*/ -_curry2(function mergeDeepRight(lObj, rObj) { - return mergeDeepWithKey(function (k, lVal, rVal) { - return rVal; - }, lObj, rObj); -}); - -module.exports = mergeDeepRight; \ No newline at end of file diff --git a/node_modules/ramda/src/mergeDeepWith.js b/node_modules/ramda/src/mergeDeepWith.js deleted file mode 100644 index cd1e7c0..0000000 --- a/node_modules/ramda/src/mergeDeepWith.js +++ /dev/null @@ -1,45 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var mergeDeepWithKey = -/*#__PURE__*/ -require("./mergeDeepWithKey"); -/** - * Creates a new object with the own properties of the two provided objects. - * If a key exists in both objects: - * - and both associated values are also objects then the values will be - * recursively merged. - * - otherwise the provided function is applied to associated values using the - * resulting value as the new value associated with the key. - * If a key only exists in one object, the value will be associated with the key - * of the resulting object. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig ((a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.mergeWith, R.mergeDeepWithKey - * @example - * - * R.mergeDeepWith(R.concat, - * { a: true, c: { values: [10, 20] }}, - * { b: true, c: { values: [15, 35] }}); - * //=> { a: true, b: true, c: { values: [10, 20, 15, 35] }} - */ - - -var mergeDeepWith = -/*#__PURE__*/ -_curry3(function mergeDeepWith(fn, lObj, rObj) { - return mergeDeepWithKey(function (k, lVal, rVal) { - return fn(lVal, rVal); - }, lObj, rObj); -}); - -module.exports = mergeDeepWith; \ No newline at end of file diff --git a/node_modules/ramda/src/mergeDeepWithKey.js b/node_modules/ramda/src/mergeDeepWithKey.js deleted file mode 100644 index 36117e3..0000000 --- a/node_modules/ramda/src/mergeDeepWithKey.js +++ /dev/null @@ -1,54 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var _isObject = -/*#__PURE__*/ -require("./internal/_isObject"); - -var mergeWithKey = -/*#__PURE__*/ -require("./mergeWithKey"); -/** - * Creates a new object with the own properties of the two provided objects. - * If a key exists in both objects: - * - and both associated values are also objects then the values will be - * recursively merged. - * - otherwise the provided function is applied to the key and associated values - * using the resulting value as the new value associated with the key. - * If a key only exists in one object, the value will be associated with the key - * of the resulting object. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Object - * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} lObj - * @param {Object} rObj - * @return {Object} - * @see R.mergeWithKey, R.mergeDeepWith - * @example - * - * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r - * R.mergeDeepWithKey(concatValues, - * { a: true, c: { thing: 'foo', values: [10, 20] }}, - * { b: true, c: { thing: 'bar', values: [15, 35] }}); - * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }} - */ - - -var mergeDeepWithKey = -/*#__PURE__*/ -_curry3(function mergeDeepWithKey(fn, lObj, rObj) { - return mergeWithKey(function (k, lVal, rVal) { - if (_isObject(lVal) && _isObject(rVal)) { - return mergeDeepWithKey(fn, lVal, rVal); - } else { - return fn(k, lVal, rVal); - } - }, lObj, rObj); -}); - -module.exports = mergeDeepWithKey; \ No newline at end of file diff --git a/node_modules/ramda/src/mergeLeft.js b/node_modules/ramda/src/mergeLeft.js deleted file mode 100644 index 9e7d10b..0000000 --- a/node_modules/ramda/src/mergeLeft.js +++ /dev/null @@ -1,39 +0,0 @@ -var _objectAssign = -/*#__PURE__*/ -require("./internal/_objectAssign"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the first object will be used. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeRight, R.mergeDeepLeft, R.mergeWith, R.mergeWithKey - * @example - * - * R.mergeLeft({ 'age': 40 }, { 'name': 'fred', 'age': 10 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * const resetToDefault = R.mergeLeft({x: 0}); - * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2} - * @symb R.mergeLeft(a, b) = {...b, ...a} - */ - - -var mergeLeft = -/*#__PURE__*/ -_curry2(function mergeLeft(l, r) { - return _objectAssign({}, r, l); -}); - -module.exports = mergeLeft; \ No newline at end of file diff --git a/node_modules/ramda/src/mergeRight.js b/node_modules/ramda/src/mergeRight.js deleted file mode 100644 index fbbe4c1..0000000 --- a/node_modules/ramda/src/mergeRight.js +++ /dev/null @@ -1,39 +0,0 @@ -var _objectAssign = -/*#__PURE__*/ -require("./internal/_objectAssign"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Create a new object with the own properties of the first object merged with - * the own properties of the second object. If a key exists in both objects, - * the value from the second object will be used. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Object - * @sig {k: v} -> {k: v} -> {k: v} - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeLeft, R.mergeDeepRight, R.mergeWith, R.mergeWithKey - * @example - * - * R.mergeRight({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); - * //=> { 'name': 'fred', 'age': 40 } - * - * const withDefaults = R.mergeRight({x: 0, y: 0}); - * withDefaults({y: 2}); //=> {x: 0, y: 2} - * @symb R.mergeRight(a, b) = {...a, ...b} - */ - - -var mergeRight = -/*#__PURE__*/ -_curry2(function mergeRight(l, r) { - return _objectAssign({}, l, r); -}); - -module.exports = mergeRight; \ No newline at end of file diff --git a/node_modules/ramda/src/mergeWith.js b/node_modules/ramda/src/mergeWith.js deleted file mode 100644 index 790a1aa..0000000 --- a/node_modules/ramda/src/mergeWith.js +++ /dev/null @@ -1,41 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var mergeWithKey = -/*#__PURE__*/ -require("./mergeWithKey"); -/** - * Creates a new object with the own properties of the two provided objects. If - * a key exists in both objects, the provided function is applied to the values - * associated with the key in each object, with the result being used as the - * value associated with the key in the returned object. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @sig ((a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeDeepWith, R.merge, R.mergeWithKey - * @example - * - * R.mergeWith(R.concat, - * { a: true, values: [10, 20] }, - * { b: true, values: [15, 35] }); - * //=> { a: true, b: true, values: [10, 20, 15, 35] } - */ - - -var mergeWith = -/*#__PURE__*/ -_curry3(function mergeWith(fn, l, r) { - return mergeWithKey(function (_, _l, _r) { - return fn(_l, _r); - }, l, r); -}); - -module.exports = mergeWith; \ No newline at end of file diff --git a/node_modules/ramda/src/mergeWithKey.js b/node_modules/ramda/src/mergeWithKey.js deleted file mode 100644 index 763c002..0000000 --- a/node_modules/ramda/src/mergeWithKey.js +++ /dev/null @@ -1,56 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var _has = -/*#__PURE__*/ -require("./internal/_has"); -/** - * Creates a new object with the own properties of the two provided objects. If - * a key exists in both objects, the provided function is applied to the key - * and the values associated with the key in each object, with the result being - * used as the value associated with the key in the returned object. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Object - * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} - * @param {Function} fn - * @param {Object} l - * @param {Object} r - * @return {Object} - * @see R.mergeDeepWithKey, R.merge, R.mergeWith - * @example - * - * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r - * R.mergeWithKey(concatValues, - * { a: true, thing: 'foo', values: [10, 20] }, - * { b: true, thing: 'bar', values: [15, 35] }); - * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] } - * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 } - */ - - -var mergeWithKey = -/*#__PURE__*/ -_curry3(function mergeWithKey(fn, l, r) { - var result = {}; - var k; - - for (k in l) { - if (_has(k, l)) { - result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k]; - } - } - - for (k in r) { - if (_has(k, r) && !_has(k, result)) { - result[k] = r[k]; - } - } - - return result; -}); - -module.exports = mergeWithKey; \ No newline at end of file diff --git a/node_modules/ramda/src/min.js b/node_modules/ramda/src/min.js deleted file mode 100644 index b535543..0000000 --- a/node_modules/ramda/src/min.js +++ /dev/null @@ -1,29 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns the smaller of its two arguments. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord a => a -> a -> a - * @param {*} a - * @param {*} b - * @return {*} - * @see R.minBy, R.max - * @example - * - * R.min(789, 123); //=> 123 - * R.min('a', 'b'); //=> 'a' - */ - - -var min = -/*#__PURE__*/ -_curry2(function min(a, b) { - return b < a ? b : a; -}); - -module.exports = min; \ No newline at end of file diff --git a/node_modules/ramda/src/minBy.js b/node_modules/ramda/src/minBy.js deleted file mode 100644 index 283b0d8..0000000 --- a/node_modules/ramda/src/minBy.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Takes a function and two values, and returns whichever value produces the - * smaller result when passed to the provided function. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Relation - * @sig Ord b => (a -> b) -> a -> a -> a - * @param {Function} f - * @param {*} a - * @param {*} b - * @return {*} - * @see R.min, R.maxBy - * @example - * - * // square :: Number -> Number - * const square = n => n * n; - * - * R.minBy(square, -3, 2); //=> 2 - * - * R.reduce(R.minBy(square), Infinity, [3, -5, 4, 1, -2]); //=> 1 - * R.reduce(R.minBy(square), Infinity, []); //=> Infinity - */ - - -var minBy = -/*#__PURE__*/ -_curry3(function minBy(f, a, b) { - return f(b) < f(a) ? b : a; -}); - -module.exports = minBy; \ No newline at end of file diff --git a/node_modules/ramda/src/modulo.js b/node_modules/ramda/src/modulo.js deleted file mode 100644 index b26f80e..0000000 --- a/node_modules/ramda/src/modulo.js +++ /dev/null @@ -1,37 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Divides the first parameter by the second and returns the remainder. Note - * that this function preserves the JavaScript-style behavior for modulo. For - * mathematical modulo see [`mathMod`](#mathMod). - * - * @func - * @memberOf R - * @since v0.1.1 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The value to the divide. - * @param {Number} b The pseudo-modulus - * @return {Number} The result of `b % a`. - * @see R.mathMod - * @example - * - * R.modulo(17, 3); //=> 2 - * // JS behavior: - * R.modulo(-17, 3); //=> -2 - * R.modulo(17, -3); //=> 2 - * - * const isOdd = R.modulo(R.__, 2); - * isOdd(42); //=> 0 - * isOdd(21); //=> 1 - */ - - -var modulo = -/*#__PURE__*/ -_curry2(function modulo(a, b) { - return a % b; -}); - -module.exports = modulo; \ No newline at end of file diff --git a/node_modules/ramda/src/move.js b/node_modules/ramda/src/move.js deleted file mode 100644 index bf31a79..0000000 --- a/node_modules/ramda/src/move.js +++ /dev/null @@ -1,35 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Move an item, at index `from`, to index `to`, in a list of elements. - * A new list will be created containing the new elements order. - * - * @func - * @memberOf R - * @since v0.27.1 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @param {Number} from The source index - * @param {Number} to The destination index - * @param {Array} list The list which will serve to realise the move - * @return {Array} The new list reordered - * @example - * - * R.move(0, 2, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['b', 'c', 'a', 'd', 'e', 'f'] - * R.move(-1, 0, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['f', 'a', 'b', 'c', 'd', 'e'] list rotation - */ - - -var move = -/*#__PURE__*/ -_curry3(function (from, to, list) { - var length = list.length; - var result = list.slice(); - var positiveFrom = from < 0 ? length + from : from; - var positiveTo = to < 0 ? length + to : to; - var item = result.splice(positiveFrom, 1); - return positiveFrom < 0 || positiveFrom >= list.length || positiveTo < 0 || positiveTo >= list.length ? list : [].concat(result.slice(0, positiveTo)).concat(item).concat(result.slice(positiveTo, list.length)); -}); - -module.exports = move; \ No newline at end of file diff --git a/node_modules/ramda/src/multiply.js b/node_modules/ramda/src/multiply.js deleted file mode 100644 index 774c208..0000000 --- a/node_modules/ramda/src/multiply.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Multiplies two numbers. Equivalent to `a * b` but curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a * b`. - * @see R.divide - * @example - * - * const double = R.multiply(2); - * const triple = R.multiply(3); - * double(3); //=> 6 - * triple(4); //=> 12 - * R.multiply(2, 5); //=> 10 - */ - - -var multiply = -/*#__PURE__*/ -_curry2(function multiply(a, b) { - return a * b; -}); - -module.exports = multiply; \ No newline at end of file diff --git a/node_modules/ramda/src/nAry.js b/node_modules/ramda/src/nAry.js deleted file mode 100644 index 6beae80..0000000 --- a/node_modules/ramda/src/nAry.js +++ /dev/null @@ -1,100 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly `n` parameters. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig Number -> (* -> a) -> (* -> a) - * @param {Number} n The desired arity of the new function. - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity `n`. - * @see R.binary, R.unary - * @example - * - * const takesTwoArgs = (a, b) => [a, b]; - * - * takesTwoArgs.length; //=> 2 - * takesTwoArgs(1, 2); //=> [1, 2] - * - * const takesOneArg = R.nAry(1, takesTwoArgs); - * takesOneArg.length; //=> 1 - * // Only `n` arguments are passed to the wrapped function - * takesOneArg(1, 2); //=> [1, undefined] - * @symb R.nAry(0, f)(a, b) = f() - * @symb R.nAry(1, f)(a, b) = f(a) - * @symb R.nAry(2, f)(a, b) = f(a, b) - */ - - -var nAry = -/*#__PURE__*/ -_curry2(function nAry(n, fn) { - switch (n) { - case 0: - return function () { - return fn.call(this); - }; - - case 1: - return function (a0) { - return fn.call(this, a0); - }; - - case 2: - return function (a0, a1) { - return fn.call(this, a0, a1); - }; - - case 3: - return function (a0, a1, a2) { - return fn.call(this, a0, a1, a2); - }; - - case 4: - return function (a0, a1, a2, a3) { - return fn.call(this, a0, a1, a2, a3); - }; - - case 5: - return function (a0, a1, a2, a3, a4) { - return fn.call(this, a0, a1, a2, a3, a4); - }; - - case 6: - return function (a0, a1, a2, a3, a4, a5) { - return fn.call(this, a0, a1, a2, a3, a4, a5); - }; - - case 7: - return function (a0, a1, a2, a3, a4, a5, a6) { - return fn.call(this, a0, a1, a2, a3, a4, a5, a6); - }; - - case 8: - return function (a0, a1, a2, a3, a4, a5, a6, a7) { - return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7); - }; - - case 9: - return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { - return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8); - }; - - case 10: - return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { - return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - }; - - default: - throw new Error('First argument to nAry must be a non-negative integer no greater than ten'); - } -}); - -module.exports = nAry; \ No newline at end of file diff --git a/node_modules/ramda/src/negate.js b/node_modules/ramda/src/negate.js deleted file mode 100644 index f6f7d8e..0000000 --- a/node_modules/ramda/src/negate.js +++ /dev/null @@ -1,26 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Negates its argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Math - * @sig Number -> Number - * @param {Number} n - * @return {Number} - * @example - * - * R.negate(42); //=> -42 - */ - - -var negate = -/*#__PURE__*/ -_curry1(function negate(n) { - return -n; -}); - -module.exports = negate; \ No newline at end of file diff --git a/node_modules/ramda/src/none.js b/node_modules/ramda/src/none.js deleted file mode 100644 index f9851e8..0000000 --- a/node_modules/ramda/src/none.js +++ /dev/null @@ -1,45 +0,0 @@ -var _complement = -/*#__PURE__*/ -require("./internal/_complement"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var all = -/*#__PURE__*/ -require("./all"); -/** - * Returns `true` if no elements of the list match the predicate, `false` - * otherwise. - * - * Dispatches to the `all` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig (a -> Boolean) -> [a] -> Boolean - * @param {Function} fn The predicate function. - * @param {Array} list The array to consider. - * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise. - * @see R.all, R.any - * @example - * - * const isEven = n => n % 2 === 0; - * const isOdd = n => n % 2 === 1; - * - * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true - * R.none(isOdd, [1, 3, 5, 7, 8, 11]); //=> false - */ - - -var none = -/*#__PURE__*/ -_curry2(function none(fn, input) { - return all(_complement(fn), input); -}); - -module.exports = none; \ No newline at end of file diff --git a/node_modules/ramda/src/not.js b/node_modules/ramda/src/not.js deleted file mode 100644 index e38e630..0000000 --- a/node_modules/ramda/src/not.js +++ /dev/null @@ -1,31 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * A function that returns the `!` of its argument. It will return `true` when - * passed false-y value, and `false` when passed a truth-y one. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig * -> Boolean - * @param {*} a any value - * @return {Boolean} the logical inverse of passed argument. - * @see R.complement - * @example - * - * R.not(true); //=> false - * R.not(false); //=> true - * R.not(0); //=> true - * R.not(1); //=> false - */ - - -var not = -/*#__PURE__*/ -_curry1(function not(a) { - return !a; -}); - -module.exports = not; \ No newline at end of file diff --git a/node_modules/ramda/src/nth.js b/node_modules/ramda/src/nth.js deleted file mode 100644 index 24ff8eb..0000000 --- a/node_modules/ramda/src/nth.js +++ /dev/null @@ -1,43 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _isString = -/*#__PURE__*/ -require("./internal/_isString"); -/** - * Returns the nth element of the given list or string. If n is negative the - * element at index length + n is returned. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> a | Undefined - * @sig Number -> String -> String - * @param {Number} offset - * @param {*} list - * @return {*} - * @example - * - * const list = ['foo', 'bar', 'baz', 'quux']; - * R.nth(1, list); //=> 'bar' - * R.nth(-1, list); //=> 'quux' - * R.nth(-99, list); //=> undefined - * - * R.nth(2, 'abc'); //=> 'c' - * R.nth(3, 'abc'); //=> '' - * @symb R.nth(-1, [a, b, c]) = c - * @symb R.nth(0, [a, b, c]) = a - * @symb R.nth(1, [a, b, c]) = b - */ - - -var nth = -/*#__PURE__*/ -_curry2(function nth(offset, list) { - var idx = offset < 0 ? list.length + offset : offset; - return _isString(list) ? list.charAt(idx) : list[idx]; -}); - -module.exports = nth; \ No newline at end of file diff --git a/node_modules/ramda/src/nthArg.js b/node_modules/ramda/src/nthArg.js deleted file mode 100644 index b9727e4..0000000 --- a/node_modules/ramda/src/nthArg.js +++ /dev/null @@ -1,41 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); - -var nth = -/*#__PURE__*/ -require("./nth"); -/** - * Returns a function which returns its nth argument. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category Function - * @sig Number -> *... -> * - * @param {Number} n - * @return {Function} - * @example - * - * R.nthArg(1)('a', 'b', 'c'); //=> 'b' - * R.nthArg(-1)('a', 'b', 'c'); //=> 'c' - * @symb R.nthArg(-1)(a, b, c) = c - * @symb R.nthArg(0)(a, b, c) = a - * @symb R.nthArg(1)(a, b, c) = b - */ - - -var nthArg = -/*#__PURE__*/ -_curry1(function nthArg(n) { - var arity = n < 0 ? 1 : n + 1; - return curryN(arity, function () { - return nth(n, arguments); - }); -}); - -module.exports = nthArg; \ No newline at end of file diff --git a/node_modules/ramda/src/o.js b/node_modules/ramda/src/o.js deleted file mode 100644 index 3d284bb..0000000 --- a/node_modules/ramda/src/o.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * `o` is a curried composition function that returns a unary function. - * Like [`compose`](#compose), `o` performs right-to-left function composition. - * Unlike [`compose`](#compose), the rightmost function passed to `o` will be - * invoked with only one argument. Also, unlike [`compose`](#compose), `o` is - * limited to accepting only 2 unary functions. The name o was chosen because - * of its similarity to the mathematical composition operator ∘. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category Function - * @sig (b -> c) -> (a -> b) -> a -> c - * @param {Function} f - * @param {Function} g - * @return {Function} - * @see R.compose, R.pipe - * @example - * - * const classyGreeting = name => "The name's " + name.last + ", " + name.first + " " + name.last - * const yellGreeting = R.o(R.toUpper, classyGreeting); - * yellGreeting({first: 'James', last: 'Bond'}); //=> "THE NAME'S BOND, JAMES BOND" - * - * R.o(R.multiply(10), R.add(10))(-4) //=> 60 - * - * @symb R.o(f, g, x) = f(g(x)) - */ - - -var o = -/*#__PURE__*/ -_curry3(function o(f, g, x) { - return f(g(x)); -}); - -module.exports = o; \ No newline at end of file diff --git a/node_modules/ramda/src/objOf.js b/node_modules/ramda/src/objOf.js deleted file mode 100644 index 351c03e..0000000 --- a/node_modules/ramda/src/objOf.js +++ /dev/null @@ -1,34 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Creates an object containing a single key:value pair. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Object - * @sig String -> a -> {String:a} - * @param {String} key - * @param {*} val - * @return {Object} - * @see R.pair - * @example - * - * const matchPhrases = R.compose( - * R.objOf('must'), - * R.map(R.objOf('match_phrase')) - * ); - * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]} - */ - - -var objOf = -/*#__PURE__*/ -_curry2(function objOf(key, val) { - var obj = {}; - obj[key] = val; - return obj; -}); - -module.exports = objOf; \ No newline at end of file diff --git a/node_modules/ramda/src/of.js b/node_modules/ramda/src/of.js deleted file mode 100644 index 1133a43..0000000 --- a/node_modules/ramda/src/of.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _of = -/*#__PURE__*/ -require("./internal/_of"); -/** - * Returns a singleton array containing the value provided. - * - * Note this `of` is different from the ES6 `of`; See - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of - * - * @func - * @memberOf R - * @since v0.3.0 - * @category Function - * @sig a -> [a] - * @param {*} x any value - * @return {Array} An array wrapping `x`. - * @example - * - * R.of(null); //=> [null] - * R.of([42]); //=> [[42]] - */ - - -var of = -/*#__PURE__*/ -_curry1(_of); - -module.exports = of; \ No newline at end of file diff --git a/node_modules/ramda/src/omit.js b/node_modules/ramda/src/omit.js deleted file mode 100644 index 467b68c..0000000 --- a/node_modules/ramda/src/omit.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns a partial copy of an object omitting the keys specified. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [String] -> {String: *} -> {String: *} - * @param {Array} names an array of String property names to omit from the new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with properties from `names` not on it. - * @see R.pick - * @example - * - * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3} - */ - - -var omit = -/*#__PURE__*/ -_curry2(function omit(names, obj) { - var result = {}; - var index = {}; - var idx = 0; - var len = names.length; - - while (idx < len) { - index[names[idx]] = 1; - idx += 1; - } - - for (var prop in obj) { - if (!index.hasOwnProperty(prop)) { - result[prop] = obj[prop]; - } - } - - return result; -}); - -module.exports = omit; \ No newline at end of file diff --git a/node_modules/ramda/src/once.js b/node_modules/ramda/src/once.js deleted file mode 100644 index 8ecd291..0000000 --- a/node_modules/ramda/src/once.js +++ /dev/null @@ -1,45 +0,0 @@ -var _arity = -/*#__PURE__*/ -require("./internal/_arity"); - -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Accepts a function `fn` and returns a function that guards invocation of - * `fn` such that `fn` can only ever be called once, no matter how many times - * the returned function is invoked. The first value calculated is returned in - * subsequent invocations. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a... -> b) -> (a... -> b) - * @param {Function} fn The function to wrap in a call-only-once wrapper. - * @return {Function} The wrapped function. - * @example - * - * const addOneOnce = R.once(x => x + 1); - * addOneOnce(10); //=> 11 - * addOneOnce(addOneOnce(50)); //=> 11 - */ - - -var once = -/*#__PURE__*/ -_curry1(function once(fn) { - var called = false; - var result; - return _arity(fn.length, function () { - if (called) { - return result; - } - - called = true; - result = fn.apply(this, arguments); - return result; - }); -}); - -module.exports = once; \ No newline at end of file diff --git a/node_modules/ramda/src/or.js b/node_modules/ramda/src/or.js deleted file mode 100644 index 4358b18..0000000 --- a/node_modules/ramda/src/or.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns `true` if one or both of its arguments are `true`. Returns `false` - * if both arguments are `false`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Logic - * @sig a -> b -> a | b - * @param {Any} a - * @param {Any} b - * @return {Any} the first argument if truthy, otherwise the second argument. - * @see R.either, R.xor - * @example - * - * R.or(true, true); //=> true - * R.or(true, false); //=> true - * R.or(false, true); //=> true - * R.or(false, false); //=> false - */ - - -var or = -/*#__PURE__*/ -_curry2(function or(a, b) { - return a || b; -}); - -module.exports = or; \ No newline at end of file diff --git a/node_modules/ramda/src/otherwise.js b/node_modules/ramda/src/otherwise.js deleted file mode 100644 index 6101886..0000000 --- a/node_modules/ramda/src/otherwise.js +++ /dev/null @@ -1,46 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _assertPromise = -/*#__PURE__*/ -require("./internal/_assertPromise"); -/** - * Returns the result of applying the onFailure function to the value inside - * a failed promise. This is useful for handling rejected promises - * inside function compositions. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig (e -> b) -> (Promise e a) -> (Promise e b) - * @sig (e -> (Promise f b)) -> (Promise e a) -> (Promise f b) - * @param {Function} onFailure The function to apply. Can return a value or a promise of a value. - * @param {Promise} p - * @return {Promise} The result of calling `p.then(null, onFailure)` - * @see R.then - * @example - * - * var failedFetch = (id) => Promise.reject('bad ID'); - * var useDefault = () => ({ firstName: 'Bob', lastName: 'Loblaw' }) - * - * //recoverFromFailure :: String -> Promise ({firstName, lastName}) - * var recoverFromFailure = R.pipe( - * failedFetch, - * R.otherwise(useDefault), - * R.then(R.pick(['firstName', 'lastName'])), - * ); - * recoverFromFailure(12345).then(console.log) - */ - - -var otherwise = -/*#__PURE__*/ -_curry2(function otherwise(f, p) { - _assertPromise('otherwise', p); - - return p.then(null, f); -}); - -module.exports = otherwise; \ No newline at end of file diff --git a/node_modules/ramda/src/over.js b/node_modules/ramda/src/over.js deleted file mode 100644 index c8c46c0..0000000 --- a/node_modules/ramda/src/over.js +++ /dev/null @@ -1,50 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); // `Identity` is a functor that holds a single value, where `map` simply -// transforms the held value with the provided function. - - -var Identity = function (x) { - return { - value: x, - map: function (f) { - return Identity(f(x)); - } - }; -}; -/** - * Returns the result of "setting" the portion of the given data structure - * focused by the given lens to the result of applying the given function to - * the focused value. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> (a -> a) -> s -> s - * @param {Lens} lens - * @param {*} v - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * const headLens = R.lensIndex(0); - * - * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz'] - */ - - -var over = -/*#__PURE__*/ -_curry3(function over(lens, f, x) { - // The value returned by the getter function is first transformed with `f`, - // then set as the value of an `Identity`. This is then mapped over with the - // setter function of the lens. - return lens(function (y) { - return Identity(f(y)); - })(x).value; -}); - -module.exports = over; \ No newline at end of file diff --git a/node_modules/ramda/src/pair.js b/node_modules/ramda/src/pair.js deleted file mode 100644 index 09b683e..0000000 --- a/node_modules/ramda/src/pair.js +++ /dev/null @@ -1,28 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Takes two arguments, `fst` and `snd`, and returns `[fst, snd]`. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category List - * @sig a -> b -> (a,b) - * @param {*} fst - * @param {*} snd - * @return {Array} - * @see R.objOf, R.of - * @example - * - * R.pair('foo', 'bar'); //=> ['foo', 'bar'] - */ - - -var pair = -/*#__PURE__*/ -_curry2(function pair(fst, snd) { - return [fst, snd]; -}); - -module.exports = pair; \ No newline at end of file diff --git a/node_modules/ramda/src/partial.js b/node_modules/ramda/src/partial.js deleted file mode 100644 index 46141fe..0000000 --- a/node_modules/ramda/src/partial.js +++ /dev/null @@ -1,42 +0,0 @@ -var _concat = -/*#__PURE__*/ -require("./internal/_concat"); - -var _createPartialApplicator = -/*#__PURE__*/ -require("./internal/_createPartialApplicator"); -/** - * Takes a function `f` and a list of arguments, and returns a function `g`. - * When applied, `g` returns the result of applying `f` to the arguments - * provided initially followed by the arguments provided to `g`. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x) - * @param {Function} f - * @param {Array} args - * @return {Function} - * @see R.partialRight, R.curry - * @example - * - * const multiply2 = (a, b) => a * b; - * const double = R.partial(multiply2, [2]); - * double(2); //=> 4 - * - * const greet = (salutation, title, firstName, lastName) => - * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; - * - * const sayHello = R.partial(greet, ['Hello']); - * const sayHelloToMs = R.partial(sayHello, ['Ms.']); - * sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!' - * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d) - */ - - -var partial = -/*#__PURE__*/ -_createPartialApplicator(_concat); - -module.exports = partial; \ No newline at end of file diff --git a/node_modules/ramda/src/partialRight.js b/node_modules/ramda/src/partialRight.js deleted file mode 100644 index 0d88e17..0000000 --- a/node_modules/ramda/src/partialRight.js +++ /dev/null @@ -1,44 +0,0 @@ -var _concat = -/*#__PURE__*/ -require("./internal/_concat"); - -var _createPartialApplicator = -/*#__PURE__*/ -require("./internal/_createPartialApplicator"); - -var flip = -/*#__PURE__*/ -require("./flip"); -/** - * Takes a function `f` and a list of arguments, and returns a function `g`. - * When applied, `g` returns the result of applying `f` to the arguments - * provided to `g` followed by the arguments provided initially. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x) - * @param {Function} f - * @param {Array} args - * @return {Function} - * @see R.partial - * @example - * - * const greet = (salutation, title, firstName, lastName) => - * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; - * - * const greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']); - * - * greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!' - * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b) - */ - - -var partialRight = -/*#__PURE__*/ -_createPartialApplicator( -/*#__PURE__*/ -flip(_concat)); - -module.exports = partialRight; \ No newline at end of file diff --git a/node_modules/ramda/src/partition.js b/node_modules/ramda/src/partition.js deleted file mode 100644 index 23a8526..0000000 --- a/node_modules/ramda/src/partition.js +++ /dev/null @@ -1,41 +0,0 @@ -var filter = -/*#__PURE__*/ -require("./filter"); - -var juxt = -/*#__PURE__*/ -require("./juxt"); - -var reject = -/*#__PURE__*/ -require("./reject"); -/** - * Takes a predicate and a list or other `Filterable` object and returns the - * pair of filterable objects of the same type of elements which do and do not - * satisfy, the predicate, respectively. Filterable objects include plain objects or any object - * that has a filter method such as `Array`. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> [f a, f a] - * @param {Function} pred A predicate to determine which side the element belongs to. - * @param {Array} filterable the list (or other filterable) to partition. - * @return {Array} An array, containing first the subset of elements that satisfy the - * predicate, and second the subset of elements that do not satisfy. - * @see R.filter, R.reject - * @example - * - * R.partition(R.includes('s'), ['sss', 'ttt', 'foo', 'bars']); - * // => [ [ 'sss', 'bars' ], [ 'ttt', 'foo' ] ] - * - * R.partition(R.includes('s'), { a: 'sss', b: 'ttt', foo: 'bars' }); - * // => [ { a: 'sss', foo: 'bars' }, { b: 'ttt' } ] - */ - - -var partition = -/*#__PURE__*/ -juxt([filter, reject]); -module.exports = partition; \ No newline at end of file diff --git a/node_modules/ramda/src/path.js b/node_modules/ramda/src/path.js deleted file mode 100644 index 9f0e474..0000000 --- a/node_modules/ramda/src/path.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var paths = -/*#__PURE__*/ -require("./paths"); -/** - * Retrieve the value at a given path. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @typedefn Idx = String | Int - * @sig [Idx] -> {a} -> a | Undefined - * @param {Array} path The path to use. - * @param {Object} obj The object to retrieve the nested property from. - * @return {*} The data at `path`. - * @see R.prop, R.nth - * @example - * - * R.path(['a', 'b'], {a: {b: 2}}); //=> 2 - * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined - * R.path(['a', 'b', 0], {a: {b: [1, 2, 3]}}); //=> 1 - * R.path(['a', 'b', -2], {a: {b: [1, 2, 3]}}); //=> 2 - */ - - -var path = -/*#__PURE__*/ -_curry2(function path(pathAr, obj) { - return paths([pathAr], obj)[0]; -}); - -module.exports = path; \ No newline at end of file diff --git a/node_modules/ramda/src/pathEq.js b/node_modules/ramda/src/pathEq.js deleted file mode 100644 index 5fc848f..0000000 --- a/node_modules/ramda/src/pathEq.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var equals = -/*#__PURE__*/ -require("./equals"); - -var path = -/*#__PURE__*/ -require("./path"); -/** - * Determines whether a nested path on an object has a specific value, in - * [`R.equals`](#equals) terms. Most likely used to filter a list. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category Relation - * @typedefn Idx = String | Int - * @sig [Idx] -> a -> {a} -> Boolean - * @param {Array} path The path of the nested property to use - * @param {*} val The value to compare the nested property with - * @param {Object} obj The object to check the nested property in - * @return {Boolean} `true` if the value equals the nested object property, - * `false` otherwise. - * @example - * - * const user1 = { address: { zipCode: 90210 } }; - * const user2 = { address: { zipCode: 55555 } }; - * const user3 = { name: 'Bob' }; - * const users = [ user1, user2, user3 ]; - * const isFamous = R.pathEq(['address', 'zipCode'], 90210); - * R.filter(isFamous, users); //=> [ user1 ] - */ - - -var pathEq = -/*#__PURE__*/ -_curry3(function pathEq(_path, val, obj) { - return equals(path(_path, obj), val); -}); - -module.exports = pathEq; \ No newline at end of file diff --git a/node_modules/ramda/src/pathOr.js b/node_modules/ramda/src/pathOr.js deleted file mode 100644 index 565d723..0000000 --- a/node_modules/ramda/src/pathOr.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var defaultTo = -/*#__PURE__*/ -require("./defaultTo"); - -var path = -/*#__PURE__*/ -require("./path"); -/** - * If the given, non-null object has a value at the given path, returns the - * value at that path. Otherwise returns the provided default value. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Object - * @typedefn Idx = String | Int - * @sig a -> [Idx] -> {a} -> a - * @param {*} d The default value. - * @param {Array} p The path to use. - * @param {Object} obj The object to retrieve the nested property from. - * @return {*} The data at `path` of the supplied object or the default value. - * @example - * - * R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2 - * R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A" - */ - - -var pathOr = -/*#__PURE__*/ -_curry3(function pathOr(d, p, obj) { - return defaultTo(d, path(p, obj)); -}); - -module.exports = pathOr; \ No newline at end of file diff --git a/node_modules/ramda/src/pathSatisfies.js b/node_modules/ramda/src/pathSatisfies.js deleted file mode 100644 index 3d9be8a..0000000 --- a/node_modules/ramda/src/pathSatisfies.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var path = -/*#__PURE__*/ -require("./path"); -/** - * Returns `true` if the specified object property at given path satisfies the - * given predicate; `false` otherwise. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Logic - * @typedefn Idx = String | Int - * @sig (a -> Boolean) -> [Idx] -> {a} -> Boolean - * @param {Function} pred - * @param {Array} propPath - * @param {*} obj - * @return {Boolean} - * @see R.propSatisfies, R.path - * @example - * - * R.pathSatisfies(y => y > 0, ['x', 'y'], {x: {y: 2}}); //=> true - * R.pathSatisfies(R.is(Object), [], {x: {y: 2}}); //=> true - */ - - -var pathSatisfies = -/*#__PURE__*/ -_curry3(function pathSatisfies(pred, propPath, obj) { - return pred(path(propPath, obj)); -}); - -module.exports = pathSatisfies; \ No newline at end of file diff --git a/node_modules/ramda/src/paths.js b/node_modules/ramda/src/paths.js deleted file mode 100644 index e5fadaa..0000000 --- a/node_modules/ramda/src/paths.js +++ /dev/null @@ -1,54 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _isInteger = -/*#__PURE__*/ -require("./internal/_isInteger"); - -var nth = -/*#__PURE__*/ -require("./nth"); -/** - * Retrieves the values at given paths of an object. - * - * @func - * @memberOf R - * @since v0.27.1 - * @category Object - * @typedefn Idx = [String | Int] - * @sig [Idx] -> {a} -> [a | Undefined] - * @param {Array} pathsArray The array of paths to be fetched. - * @param {Object} obj The object to retrieve the nested properties from. - * @return {Array} A list consisting of values at paths specified by "pathsArray". - * @see R.path - * @example - * - * R.paths([['a', 'b'], ['p', 0, 'q']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, 3] - * R.paths([['a', 'b'], ['p', 'r']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, undefined] - */ - - -var paths = -/*#__PURE__*/ -_curry2(function paths(pathsArray, obj) { - return pathsArray.map(function (paths) { - var val = obj; - var idx = 0; - var p; - - while (idx < paths.length) { - if (val == null) { - return; - } - - p = paths[idx]; - val = _isInteger(p) ? nth(p, val) : val[p]; - idx += 1; - } - - return val; - }); -}); - -module.exports = paths; \ No newline at end of file diff --git a/node_modules/ramda/src/pick.js b/node_modules/ramda/src/pick.js deleted file mode 100644 index 5bb7c67..0000000 --- a/node_modules/ramda/src/pick.js +++ /dev/null @@ -1,41 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns a partial copy of an object containing only the keys specified. If - * the key does not exist, the property is ignored. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> {k: v} - * @param {Array} names an array of String property names to copy onto a new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties from `names` on it. - * @see R.omit, R.props - * @example - * - * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} - * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1} - */ - - -var pick = -/*#__PURE__*/ -_curry2(function pick(names, obj) { - var result = {}; - var idx = 0; - - while (idx < names.length) { - if (names[idx] in obj) { - result[names[idx]] = obj[names[idx]]; - } - - idx += 1; - } - - return result; -}); - -module.exports = pick; \ No newline at end of file diff --git a/node_modules/ramda/src/pickAll.js b/node_modules/ramda/src/pickAll.js deleted file mode 100644 index 7556e36..0000000 --- a/node_modules/ramda/src/pickAll.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Similar to `pick` except that this one includes a `key: undefined` pair for - * properties that don't exist. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> {k: v} - * @param {Array} names an array of String property names to copy onto a new object - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties from `names` on it. - * @see R.pick - * @example - * - * R.pickAll(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} - * R.pickAll(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined} - */ - - -var pickAll = -/*#__PURE__*/ -_curry2(function pickAll(names, obj) { - var result = {}; - var idx = 0; - var len = names.length; - - while (idx < len) { - var name = names[idx]; - result[name] = obj[name]; - idx += 1; - } - - return result; -}); - -module.exports = pickAll; \ No newline at end of file diff --git a/node_modules/ramda/src/pickBy.js b/node_modules/ramda/src/pickBy.js deleted file mode 100644 index 889a086..0000000 --- a/node_modules/ramda/src/pickBy.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns a partial copy of an object containing only the keys that satisfy - * the supplied predicate. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Object - * @sig ((v, k) -> Boolean) -> {k: v} -> {k: v} - * @param {Function} pred A predicate to determine whether or not a key - * should be included on the output object. - * @param {Object} obj The object to copy from - * @return {Object} A new object with only properties that satisfy `pred` - * on it. - * @see R.pick, R.filter - * @example - * - * const isUpperCase = (val, key) => key.toUpperCase() === key; - * R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4} - */ - - -var pickBy = -/*#__PURE__*/ -_curry2(function pickBy(test, obj) { - var result = {}; - - for (var prop in obj) { - if (test(obj[prop], prop, obj)) { - result[prop] = obj[prop]; - } - } - - return result; -}); - -module.exports = pickBy; \ No newline at end of file diff --git a/node_modules/ramda/src/pipe.js b/node_modules/ramda/src/pipe.js deleted file mode 100644 index 9524b69..0000000 --- a/node_modules/ramda/src/pipe.js +++ /dev/null @@ -1,49 +0,0 @@ -var _arity = -/*#__PURE__*/ -require("./internal/_arity"); - -var _pipe = -/*#__PURE__*/ -require("./internal/_pipe"); - -var reduce = -/*#__PURE__*/ -require("./reduce"); - -var tail = -/*#__PURE__*/ -require("./tail"); -/** - * Performs left-to-right function composition. The first argument may have - * any arity; the remaining arguments must be unary. - * - * In some libraries this function is named `sequence`. - * - * **Note:** The result of pipe is not automatically curried. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z) - * @param {...Function} functions - * @return {Function} - * @see R.compose - * @example - * - * const f = R.pipe(Math.pow, R.negate, R.inc); - * - * f(3, 4); // -(3^4) + 1 - * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b))) - */ - - -function pipe() { - if (arguments.length === 0) { - throw new Error('pipe requires at least one argument'); - } - - return _arity(arguments[0].length, reduce(_pipe, arguments[0], tail(arguments))); -} - -module.exports = pipe; \ No newline at end of file diff --git a/node_modules/ramda/src/pipeK.js b/node_modules/ramda/src/pipeK.js deleted file mode 100644 index db48d1d..0000000 --- a/node_modules/ramda/src/pipeK.js +++ /dev/null @@ -1,53 +0,0 @@ -var composeK = -/*#__PURE__*/ -require("./composeK"); - -var reverse = -/*#__PURE__*/ -require("./reverse"); -/** - * Returns the left-to-right Kleisli composition of the provided functions, - * each of which must return a value of a type supported by [`chain`](#chain). - * - * `R.pipeK(f, g, h)` is equivalent to `R.pipe(f, R.chain(g), R.chain(h))`. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Function - * @sig Chain m => ((a -> m b), (b -> m c), ..., (y -> m z)) -> (a -> m z) - * @param {...Function} - * @return {Function} - * @see R.composeK - * @deprecated since v0.26.0 - * @example - * - * // parseJson :: String -> Maybe * - * // get :: String -> Object -> Maybe * - * - * // getStateCode :: Maybe String -> Maybe String - * const getStateCode = R.pipeK( - * parseJson, - * get('user'), - * get('address'), - * get('state'), - * R.compose(Maybe.of, R.toUpper) - * ); - * - * getStateCode('{"user":{"address":{"state":"ny"}}}'); - * //=> Just('NY') - * getStateCode('[Invalid JSON]'); - * //=> Nothing() - * @symb R.pipeK(f, g, h)(a) = R.chain(h, R.chain(g, f(a))) - */ - - -function pipeK() { - if (arguments.length === 0) { - throw new Error('pipeK requires at least one argument'); - } - - return composeK.apply(this, reverse(arguments)); -} - -module.exports = pipeK; \ No newline at end of file diff --git a/node_modules/ramda/src/pipeP.js b/node_modules/ramda/src/pipeP.js deleted file mode 100644 index a931d7e..0000000 --- a/node_modules/ramda/src/pipeP.js +++ /dev/null @@ -1,45 +0,0 @@ -var _arity = -/*#__PURE__*/ -require("./internal/_arity"); - -var _pipeP = -/*#__PURE__*/ -require("./internal/_pipeP"); - -var reduce = -/*#__PURE__*/ -require("./reduce"); - -var tail = -/*#__PURE__*/ -require("./tail"); -/** - * Performs left-to-right composition of one or more Promise-returning - * functions. The first argument may have any arity; the remaining arguments - * must be unary. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category Function - * @sig ((a -> Promise b), (b -> Promise c), ..., (y -> Promise z)) -> (a -> Promise z) - * @param {...Function} functions - * @return {Function} - * @see R.composeP - * @deprecated since v0.26.0 - * @example - * - * // followersForUser :: String -> Promise [User] - * const followersForUser = R.pipeP(db.getUserById, db.getFollowers); - */ - - -function pipeP() { - if (arguments.length === 0) { - throw new Error('pipeP requires at least one argument'); - } - - return _arity(arguments[0].length, reduce(_pipeP, arguments[0], tail(arguments))); -} - -module.exports = pipeP; \ No newline at end of file diff --git a/node_modules/ramda/src/pipeWith.js b/node_modules/ramda/src/pipeWith.js deleted file mode 100644 index 51adaac..0000000 --- a/node_modules/ramda/src/pipeWith.js +++ /dev/null @@ -1,65 +0,0 @@ -var _arity = -/*#__PURE__*/ -require("./internal/_arity"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var head = -/*#__PURE__*/ -require("./head"); - -var _reduce = -/*#__PURE__*/ -require("./internal/_reduce"); - -var tail = -/*#__PURE__*/ -require("./tail"); - -var identity = -/*#__PURE__*/ -require("./identity"); -/** - * Performs left-to-right function composition using transforming function. The first argument may have - * any arity; the remaining arguments must be unary. - * - * **Note:** The result of pipeWith is not automatically curried. Transforming function is not used on the - * first argument. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig ((* -> *), [((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)]) -> ((a, b, ..., n) -> z) - * @param {...Function} functions - * @return {Function} - * @see R.composeWith, R.pipe - * @example - * - * const pipeWhileNotNil = R.pipeWith((f, res) => R.isNil(res) ? res : f(res)); - * const f = pipeWhileNotNil([Math.pow, R.negate, R.inc]) - * - * f(3, 4); // -(3^4) + 1 - * @symb R.pipeWith(f)([g, h, i])(...args) = f(i, f(h, g(...args))) - */ - - -var pipeWith = -/*#__PURE__*/ -_curry2(function pipeWith(xf, list) { - if (list.length <= 0) { - return identity; - } - - var headList = head(list); - var tailList = tail(list); - return _arity(headList.length, function () { - return _reduce(function (result, f) { - return xf.call(this, f, result); - }, headList.apply(this, arguments), tailList); - }); -}); - -module.exports = pipeWith; \ No newline at end of file diff --git a/node_modules/ramda/src/pluck.js b/node_modules/ramda/src/pluck.js deleted file mode 100644 index 15174a3..0000000 --- a/node_modules/ramda/src/pluck.js +++ /dev/null @@ -1,47 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var map = -/*#__PURE__*/ -require("./map"); - -var prop = -/*#__PURE__*/ -require("./prop"); -/** - * Returns a new list by plucking the same named property off all objects in - * the list supplied. - * - * `pluck` will work on - * any [functor](https://github.com/fantasyland/fantasy-land#functor) in - * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Functor f => k -> f {k: v} -> f v - * @param {Number|String} key The key name to pluck off of each object. - * @param {Array} f The array or functor to consider. - * @return {Array} The list of values for the given key. - * @see R.props - * @example - * - * var getAges = R.pluck('age'); - * getAges([{name: 'fred', age: 29}, {name: 'wilma', age: 27}]); //=> [29, 27] - * - * R.pluck(0, [[1, 2], [3, 4]]); //=> [1, 3] - * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5} - * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5] - * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5] - */ - - -var pluck = -/*#__PURE__*/ -_curry2(function pluck(p, list) { - return map(prop(p), list); -}); - -module.exports = pluck; \ No newline at end of file diff --git a/node_modules/ramda/src/prepend.js b/node_modules/ramda/src/prepend.js deleted file mode 100644 index 3483e1f..0000000 --- a/node_modules/ramda/src/prepend.js +++ /dev/null @@ -1,33 +0,0 @@ -var _concat = -/*#__PURE__*/ -require("./internal/_concat"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns a new list with the given element at the front, followed by the - * contents of the list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig a -> [a] -> [a] - * @param {*} el The item to add to the head of the output list. - * @param {Array} list The array to add to the tail of the output list. - * @return {Array} A new array. - * @see R.append - * @example - * - * R.prepend('fee', ['fi', 'fo', 'fum']); //=> ['fee', 'fi', 'fo', 'fum'] - */ - - -var prepend = -/*#__PURE__*/ -_curry2(function prepend(el, list) { - return _concat([el], list); -}); - -module.exports = prepend; \ No newline at end of file diff --git a/node_modules/ramda/src/product.js b/node_modules/ramda/src/product.js deleted file mode 100644 index 6af481a..0000000 --- a/node_modules/ramda/src/product.js +++ /dev/null @@ -1,28 +0,0 @@ -var multiply = -/*#__PURE__*/ -require("./multiply"); - -var reduce = -/*#__PURE__*/ -require("./reduce"); -/** - * Multiplies together all the elements of a list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list An array of numbers - * @return {Number} The product of all the numbers in the list. - * @see R.reduce - * @example - * - * R.product([2,4,6,8,100,1]); //=> 38400 - */ - - -var product = -/*#__PURE__*/ -reduce(multiply, 1); -module.exports = product; \ No newline at end of file diff --git a/node_modules/ramda/src/project.js b/node_modules/ramda/src/project.js deleted file mode 100644 index 56d11a1..0000000 --- a/node_modules/ramda/src/project.js +++ /dev/null @@ -1,41 +0,0 @@ -var _map = -/*#__PURE__*/ -require("./internal/_map"); - -var identity = -/*#__PURE__*/ -require("./identity"); - -var pickAll = -/*#__PURE__*/ -require("./pickAll"); - -var useWith = -/*#__PURE__*/ -require("./useWith"); -/** - * Reasonable analog to SQL `select` statement. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @category Relation - * @sig [k] -> [{k: v}] -> [{k: v}] - * @param {Array} props The property names to project - * @param {Array} objs The objects to query - * @return {Array} An array of objects with just the `props` properties. - * @example - * - * const abby = {name: 'Abby', age: 7, hair: 'blond', grade: 2}; - * const fred = {name: 'Fred', age: 12, hair: 'brown', grade: 7}; - * const kids = [abby, fred]; - * R.project(['name', 'grade'], kids); //=> [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}] - */ - - -var project = -/*#__PURE__*/ -useWith(_map, [pickAll, identity]); // passing `identity` gives correct arity - -module.exports = project; \ No newline at end of file diff --git a/node_modules/ramda/src/prop.js b/node_modules/ramda/src/prop.js deleted file mode 100644 index e05aacc..0000000 --- a/node_modules/ramda/src/prop.js +++ /dev/null @@ -1,37 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var path = -/*#__PURE__*/ -require("./path"); -/** - * Returns a function that when supplied an object returns the indicated - * property of that object, if it exists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @typedefn Idx = String | Int - * @sig Idx -> {s: a} -> a | Undefined - * @param {String|Number} p The property name or array index - * @param {Object} obj The object to query - * @return {*} The value at `obj.p`. - * @see R.path, R.nth - * @example - * - * R.prop('x', {x: 100}); //=> 100 - * R.prop('x', {}); //=> undefined - * R.prop(0, [100]); //=> 100 - * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4 - */ - - -var prop = -/*#__PURE__*/ -_curry2(function prop(p, obj) { - return path([p], obj); -}); - -module.exports = prop; \ No newline at end of file diff --git a/node_modules/ramda/src/propEq.js b/node_modules/ramda/src/propEq.js deleted file mode 100644 index 10c33ed..0000000 --- a/node_modules/ramda/src/propEq.js +++ /dev/null @@ -1,41 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var equals = -/*#__PURE__*/ -require("./equals"); -/** - * Returns `true` if the specified object property is equal, in - * [`R.equals`](#equals) terms, to the given value; `false` otherwise. - * You can test multiple properties with [`R.whereEq`](#whereEq). - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig String -> a -> Object -> Boolean - * @param {String} name - * @param {*} val - * @param {*} obj - * @return {Boolean} - * @see R.whereEq, R.propSatisfies, R.equals - * @example - * - * const abby = {name: 'Abby', age: 7, hair: 'blond'}; - * const fred = {name: 'Fred', age: 12, hair: 'brown'}; - * const rusty = {name: 'Rusty', age: 10, hair: 'brown'}; - * const alois = {name: 'Alois', age: 15, disposition: 'surly'}; - * const kids = [abby, fred, rusty, alois]; - * const hasBrownHair = R.propEq('hair', 'brown'); - * R.filter(hasBrownHair, kids); //=> [fred, rusty] - */ - - -var propEq = -/*#__PURE__*/ -_curry3(function propEq(name, val, obj) { - return equals(val, obj[name]); -}); - -module.exports = propEq; \ No newline at end of file diff --git a/node_modules/ramda/src/propIs.js b/node_modules/ramda/src/propIs.js deleted file mode 100644 index 5631dca..0000000 --- a/node_modules/ramda/src/propIs.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var is = -/*#__PURE__*/ -require("./is"); -/** - * Returns `true` if the specified object property is of the given type; - * `false` otherwise. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Type - * @sig Type -> String -> Object -> Boolean - * @param {Function} type - * @param {String} name - * @param {*} obj - * @return {Boolean} - * @see R.is, R.propSatisfies - * @example - * - * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true - * R.propIs(Number, 'x', {x: 'foo'}); //=> false - * R.propIs(Number, 'x', {}); //=> false - */ - - -var propIs = -/*#__PURE__*/ -_curry3(function propIs(type, name, obj) { - return is(type, obj[name]); -}); - -module.exports = propIs; \ No newline at end of file diff --git a/node_modules/ramda/src/propOr.js b/node_modules/ramda/src/propOr.js deleted file mode 100644 index 259d468..0000000 --- a/node_modules/ramda/src/propOr.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var pathOr = -/*#__PURE__*/ -require("./pathOr"); -/** - * If the given, non-null object has an own property with the specified name, - * returns the value of that property. Otherwise returns the provided default - * value. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category Object - * @sig a -> String -> Object -> a - * @param {*} val The default value. - * @param {String} p The name of the property to return. - * @param {Object} obj The object to query. - * @return {*} The value of given property of the supplied object or the default value. - * @example - * - * const alice = { - * name: 'ALICE', - * age: 101 - * }; - * const favorite = R.prop('favoriteLibrary'); - * const favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary'); - * - * favorite(alice); //=> undefined - * favoriteWithDefault(alice); //=> 'Ramda' - */ - - -var propOr = -/*#__PURE__*/ -_curry3(function propOr(val, p, obj) { - return pathOr(val, [p], obj); -}); - -module.exports = propOr; \ No newline at end of file diff --git a/node_modules/ramda/src/propSatisfies.js b/node_modules/ramda/src/propSatisfies.js deleted file mode 100644 index 9bb4edf..0000000 --- a/node_modules/ramda/src/propSatisfies.js +++ /dev/null @@ -1,31 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Returns `true` if the specified object property satisfies the given - * predicate; `false` otherwise. You can test multiple properties with - * [`R.where`](#where). - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Logic - * @sig (a -> Boolean) -> String -> {String: a} -> Boolean - * @param {Function} pred - * @param {String} name - * @param {*} obj - * @return {Boolean} - * @see R.where, R.propEq, R.propIs - * @example - * - * R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true - */ - - -var propSatisfies = -/*#__PURE__*/ -_curry3(function propSatisfies(pred, name, obj) { - return pred(obj[name]); -}); - -module.exports = propSatisfies; \ No newline at end of file diff --git a/node_modules/ramda/src/props.js b/node_modules/ramda/src/props.js deleted file mode 100644 index f682b30..0000000 --- a/node_modules/ramda/src/props.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var path = -/*#__PURE__*/ -require("./path"); -/** - * Acts as multiple `prop`: array of keys in, array of values out. Preserves - * order. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig [k] -> {k: v} -> [v] - * @param {Array} ps The property names to fetch - * @param {Object} obj The object to query - * @return {Array} The corresponding values or partially applied function. - * @example - * - * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2] - * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2] - * - * const fullName = R.compose(R.join(' '), R.props(['first', 'last'])); - * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth' - */ - - -var props = -/*#__PURE__*/ -_curry2(function props(ps, obj) { - return ps.map(function (p) { - return path([p], obj); - }); -}); - -module.exports = props; \ No newline at end of file diff --git a/node_modules/ramda/src/range.js b/node_modules/ramda/src/range.js deleted file mode 100644 index 749a71c..0000000 --- a/node_modules/ramda/src/range.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _isNumber = -/*#__PURE__*/ -require("./internal/_isNumber"); -/** - * Returns a list of numbers from `from` (inclusive) to `to` (exclusive). - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> Number -> [Number] - * @param {Number} from The first number in the list. - * @param {Number} to One more than the last number in the list. - * @return {Array} The list of numbers in the set `[a, b)`. - * @example - * - * R.range(1, 5); //=> [1, 2, 3, 4] - * R.range(50, 53); //=> [50, 51, 52] - */ - - -var range = -/*#__PURE__*/ -_curry2(function range(from, to) { - if (!(_isNumber(from) && _isNumber(to))) { - throw new TypeError('Both arguments to range must be numbers'); - } - - var result = []; - var n = from; - - while (n < to) { - result.push(n); - n += 1; - } - - return result; -}); - -module.exports = range; \ No newline at end of file diff --git a/node_modules/ramda/src/reduce.js b/node_modules/ramda/src/reduce.js deleted file mode 100644 index 3176e01..0000000 --- a/node_modules/ramda/src/reduce.js +++ /dev/null @@ -1,60 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var _reduce = -/*#__PURE__*/ -require("./internal/_reduce"); -/** - * Returns a single item by iterating through the list, successively calling - * the iterator function and passing it an accumulator value and the current - * value from the array, and then passing the result to the next call. - * - * The iterator function receives two values: *(acc, value)*. It may use - * [`R.reduced`](#reduced) to shortcut the iteration. - * - * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function - * is *(value, acc)*. - * - * Note: `R.reduce` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.reduce` method. For more details - * on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description - * - * Dispatches to the `reduce` method of the third argument, if present. When - * doing so, it is up to the user to handle the [`R.reduced`](#reduced) - * shortcuting, as this is not implemented by `reduce`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, b) -> a) -> a -> [b] -> a - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduced, R.addIndex, R.reduceRight - * @example - * - * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10 - * // - -10 - * // / \ / \ - * // - 4 -6 4 - * // / \ / \ - * // - 3 ==> -3 3 - * // / \ / \ - * // - 2 -1 2 - * // / \ / \ - * // 0 1 0 1 - * - * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d) - */ - - -var reduce = -/*#__PURE__*/ -_curry3(_reduce); - -module.exports = reduce; \ No newline at end of file diff --git a/node_modules/ramda/src/reduceBy.js b/node_modules/ramda/src/reduceBy.js deleted file mode 100644 index 380532f..0000000 --- a/node_modules/ramda/src/reduceBy.js +++ /dev/null @@ -1,79 +0,0 @@ -var _clone = -/*#__PURE__*/ -require("./internal/_clone"); - -var _curryN = -/*#__PURE__*/ -require("./internal/_curryN"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _has = -/*#__PURE__*/ -require("./internal/_has"); - -var _reduce = -/*#__PURE__*/ -require("./internal/_reduce"); - -var _xreduceBy = -/*#__PURE__*/ -require("./internal/_xreduceBy"); -/** - * Groups the elements of the list according to the result of calling - * the String-returning function `keyFn` on each element and reduces the elements - * of each group to a single value via the reducer function `valueFn`. - * - * This function is basically a more general [`groupBy`](#groupBy) function. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category List - * @sig ((a, b) -> a) -> a -> (b -> String) -> [b] -> {String: a} - * @param {Function} valueFn The function that reduces the elements of each group to a single - * value. Receives two values, accumulator for a particular group and the current element. - * @param {*} acc The (initial) accumulator value for each group. - * @param {Function} keyFn The function that maps the list's element into a key. - * @param {Array} list The array to group. - * @return {Object} An object with the output of `keyFn` for keys, mapped to the output of - * `valueFn` for elements which produced that key when passed to `keyFn`. - * @see R.groupBy, R.reduce - * @example - * - * const groupNames = (acc, {name}) => acc.concat(name) - * const toGrade = ({score}) => - * score < 65 ? 'F' : - * score < 70 ? 'D' : - * score < 80 ? 'C' : - * score < 90 ? 'B' : 'A' - * - * var students = [ - * {name: 'Abby', score: 83}, - * {name: 'Bart', score: 62}, - * {name: 'Curt', score: 88}, - * {name: 'Dora', score: 92}, - * ] - * - * reduceBy(groupNames, [], toGrade, students) - * //=> {"A": ["Dora"], "B": ["Abby", "Curt"], "F": ["Bart"]} - */ - - -var reduceBy = -/*#__PURE__*/ -_curryN(4, [], -/*#__PURE__*/ -_dispatchable([], _xreduceBy, function reduceBy(valueFn, valueAcc, keyFn, list) { - return _reduce(function (acc, elt) { - var key = keyFn(elt); - acc[key] = valueFn(_has(key, acc) ? acc[key] : _clone(valueAcc, [], [], false), elt); - return acc; - }, {}, list); -})); - -module.exports = reduceBy; \ No newline at end of file diff --git a/node_modules/ramda/src/reduceRight.js b/node_modules/ramda/src/reduceRight.js deleted file mode 100644 index f5d0caa..0000000 --- a/node_modules/ramda/src/reduceRight.js +++ /dev/null @@ -1,61 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Returns a single item by iterating through the list, successively calling - * the iterator function and passing it an accumulator value and the current - * value from the array, and then passing the result to the next call. - * - * Similar to [`reduce`](#reduce), except moves through the input list from the - * right to the left. - * - * The iterator function receives two values: *(value, acc)*, while the arguments' - * order of `reduce`'s iterator function is *(acc, value)*. - * - * Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse - * arrays), unlike the native `Array.prototype.reduceRight` method. For more details - * on this behavior, see: - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, b) -> b) -> b -> [a] -> b - * @param {Function} fn The iterator function. Receives two values, the current element from the array - * and the accumulator. - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.addIndex - * @example - * - * R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2 - * // - -2 - * // / \ / \ - * // 1 - 1 3 - * // / \ / \ - * // 2 - ==> 2 -1 - * // / \ / \ - * // 3 - 3 4 - * // / \ / \ - * // 4 0 4 0 - * - * @symb R.reduceRight(f, a, [b, c, d]) = f(b, f(c, f(d, a))) - */ - - -var reduceRight = -/*#__PURE__*/ -_curry3(function reduceRight(fn, acc, list) { - var idx = list.length - 1; - - while (idx >= 0) { - acc = fn(list[idx], acc); - idx -= 1; - } - - return acc; -}); - -module.exports = reduceRight; \ No newline at end of file diff --git a/node_modules/ramda/src/reduceWhile.js b/node_modules/ramda/src/reduceWhile.js deleted file mode 100644 index c12c303..0000000 --- a/node_modules/ramda/src/reduceWhile.js +++ /dev/null @@ -1,51 +0,0 @@ -var _curryN = -/*#__PURE__*/ -require("./internal/_curryN"); - -var _reduce = -/*#__PURE__*/ -require("./internal/_reduce"); - -var _reduced = -/*#__PURE__*/ -require("./internal/_reduced"); -/** - * Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating - * through the list, successively calling the iterator function. `reduceWhile` - * also takes a predicate that is evaluated before each step. If the predicate - * returns `false`, it "short-circuits" the iteration and returns the current - * value of the accumulator. - * - * @func - * @memberOf R - * @since v0.22.0 - * @category List - * @sig ((a, b) -> Boolean) -> ((a, b) -> a) -> a -> [b] -> a - * @param {Function} pred The predicate. It is passed the accumulator and the - * current element. - * @param {Function} fn The iterator function. Receives two values, the - * accumulator and the current element. - * @param {*} a The accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.reduced - * @example - * - * const isOdd = (acc, x) => x % 2 === 1; - * const xs = [1, 3, 5, 60, 777, 800]; - * R.reduceWhile(isOdd, R.add, 0, xs); //=> 9 - * - * const ys = [2, 4, 6] - * R.reduceWhile(isOdd, R.add, 111, ys); //=> 111 - */ - - -var reduceWhile = -/*#__PURE__*/ -_curryN(4, [], function _reduceWhile(pred, fn, a, list) { - return _reduce(function (acc, x) { - return pred(acc, x) ? fn(acc, x) : _reduced(acc); - }, a, list); -}); - -module.exports = reduceWhile; \ No newline at end of file diff --git a/node_modules/ramda/src/reduced.js b/node_modules/ramda/src/reduced.js deleted file mode 100644 index 38a70e2..0000000 --- a/node_modules/ramda/src/reduced.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _reduced = -/*#__PURE__*/ -require("./internal/_reduced"); -/** - * Returns a value wrapped to indicate that it is the final value of the reduce - * and transduce functions. The returned value should be considered a black - * box: the internal structure is not guaranteed to be stable. - * - * Note: this optimization is only available to the below functions: - * - [`reduce`](#reduce) - * - [`reduceWhile`](#reduceWhile) - * - [`transduce`](#transduce) - * - * @func - * @memberOf R - * @since v0.15.0 - * @category List - * @sig a -> * - * @param {*} x The final value of the reduce. - * @return {*} The wrapped value. - * @see R.reduce, R.reduceWhile, R.transduce - * @example - * - * R.reduce( - * (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item), - * [], - * [1, 2, 3, 4, 5]) // [1, 2, 3] - */ - - -var reduced = -/*#__PURE__*/ -_curry1(_reduced); - -module.exports = reduced; \ No newline at end of file diff --git a/node_modules/ramda/src/reject.js b/node_modules/ramda/src/reject.js deleted file mode 100644 index 7f3bd58..0000000 --- a/node_modules/ramda/src/reject.js +++ /dev/null @@ -1,44 +0,0 @@ -var _complement = -/*#__PURE__*/ -require("./internal/_complement"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var filter = -/*#__PURE__*/ -require("./filter"); -/** - * The complement of [`filter`](#filter). - * - * Acts as a transducer if a transformer is given in list position. Filterable - * objects include plain objects or any object that has a filter method such - * as `Array`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Filterable f => (a -> Boolean) -> f a -> f a - * @param {Function} pred - * @param {Array} filterable - * @return {Array} - * @see R.filter, R.transduce, R.addIndex - * @example - * - * const isOdd = (n) => n % 2 === 1; - * - * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4] - * - * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} - */ - - -var reject = -/*#__PURE__*/ -_curry2(function reject(pred, filterable) { - return filter(_complement(pred), filterable); -}); - -module.exports = reject; \ No newline at end of file diff --git a/node_modules/ramda/src/remove.js b/node_modules/ramda/src/remove.js deleted file mode 100644 index 225175c..0000000 --- a/node_modules/ramda/src/remove.js +++ /dev/null @@ -1,34 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Removes the sub-list of `list` starting at index `start` and containing - * `count` elements. _Note that this is not destructive_: it returns a copy of - * the list with the changes. - * No lists have been harmed in the application of this function. - * - * @func - * @memberOf R - * @since v0.2.2 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @param {Number} start The position to start removing elements - * @param {Number} count The number of elements to remove - * @param {Array} list The list to remove from - * @return {Array} A new Array with `count` elements from `start` removed. - * @see R.without - * @example - * - * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8] - */ - - -var remove = -/*#__PURE__*/ -_curry3(function remove(start, count, list) { - var result = Array.prototype.slice.call(list, 0); - result.splice(start, count); - return result; -}); - -module.exports = remove; \ No newline at end of file diff --git a/node_modules/ramda/src/repeat.js b/node_modules/ramda/src/repeat.js deleted file mode 100644 index 2e49155..0000000 --- a/node_modules/ramda/src/repeat.js +++ /dev/null @@ -1,43 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var always = -/*#__PURE__*/ -require("./always"); - -var times = -/*#__PURE__*/ -require("./times"); -/** - * Returns a fixed list of size `n` containing a specified identical value. - * - * @func - * @memberOf R - * @since v0.1.1 - * @category List - * @sig a -> n -> [a] - * @param {*} value The value to repeat. - * @param {Number} n The desired size of the output list. - * @return {Array} A new array containing `n` `value`s. - * @see R.times - * @example - * - * R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi'] - * - * const obj = {}; - * const repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}] - * repeatedObjs[0] === repeatedObjs[1]; //=> true - * @symb R.repeat(a, 0) = [] - * @symb R.repeat(a, 1) = [a] - * @symb R.repeat(a, 2) = [a, a] - */ - - -var repeat = -/*#__PURE__*/ -_curry2(function repeat(value, n) { - return times(always(value), n); -}); - -module.exports = repeat; \ No newline at end of file diff --git a/node_modules/ramda/src/replace.js b/node_modules/ramda/src/replace.js deleted file mode 100644 index aa8fe04..0000000 --- a/node_modules/ramda/src/replace.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Replace a substring or regex match in a string with a replacement. - * - * The first two parameters correspond to the parameters of the - * `String.prototype.replace()` function, so the second parameter can also be a - * function. - * - * @func - * @memberOf R - * @since v0.7.0 - * @category String - * @sig RegExp|String -> String -> String -> String - * @param {RegExp|String} pattern A regular expression or a substring to match. - * @param {String} replacement The string to replace the matches with. - * @param {String} str The String to do the search and replacement in. - * @return {String} The result. - * @example - * - * R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo' - * R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo' - * - * // Use the "g" (global) flag to replace all occurrences: - * R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar' - */ - - -var replace = -/*#__PURE__*/ -_curry3(function replace(regex, replacement, str) { - return str.replace(regex, replacement); -}); - -module.exports = replace; \ No newline at end of file diff --git a/node_modules/ramda/src/reverse.js b/node_modules/ramda/src/reverse.js deleted file mode 100644 index cf3ab06..0000000 --- a/node_modules/ramda/src/reverse.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _isString = -/*#__PURE__*/ -require("./internal/_isString"); -/** - * Returns a new list or string with the elements or characters in reverse - * order. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {Array|String} list - * @return {Array|String} - * @example - * - * R.reverse([1, 2, 3]); //=> [3, 2, 1] - * R.reverse([1, 2]); //=> [2, 1] - * R.reverse([1]); //=> [1] - * R.reverse([]); //=> [] - * - * R.reverse('abc'); //=> 'cba' - * R.reverse('ab'); //=> 'ba' - * R.reverse('a'); //=> 'a' - * R.reverse(''); //=> '' - */ - - -var reverse = -/*#__PURE__*/ -_curry1(function reverse(list) { - return _isString(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse(); -}); - -module.exports = reverse; \ No newline at end of file diff --git a/node_modules/ramda/src/scan.js b/node_modules/ramda/src/scan.js deleted file mode 100644 index 9e6212d..0000000 --- a/node_modules/ramda/src/scan.js +++ /dev/null @@ -1,43 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Scan is similar to [`reduce`](#reduce), but returns a list of successively - * reduced values from the left - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig ((a, b) -> a) -> a -> [b] -> [a] - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array - * @param {*} acc The accumulator value. - * @param {Array} list The list to iterate over. - * @return {Array} A list of all intermediately reduced values. - * @see R.reduce, R.mapAccum - * @example - * - * const numbers = [1, 2, 3, 4]; - * const factorials = R.scan(R.multiply, 1, numbers); //=> [1, 1, 2, 6, 24] - * @symb R.scan(f, a, [b, c]) = [a, f(a, b), f(f(a, b), c)] - */ - - -var scan = -/*#__PURE__*/ -_curry3(function scan(fn, acc, list) { - var idx = 0; - var len = list.length; - var result = [acc]; - - while (idx < len) { - acc = fn(acc, list[idx]); - result[idx + 1] = acc; - idx += 1; - } - - return result; -}); - -module.exports = scan; \ No newline at end of file diff --git a/node_modules/ramda/src/sequence.js b/node_modules/ramda/src/sequence.js deleted file mode 100644 index cc1fe8a..0000000 --- a/node_modules/ramda/src/sequence.js +++ /dev/null @@ -1,54 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var ap = -/*#__PURE__*/ -require("./ap"); - -var map = -/*#__PURE__*/ -require("./map"); - -var prepend = -/*#__PURE__*/ -require("./prepend"); - -var reduceRight = -/*#__PURE__*/ -require("./reduceRight"); -/** - * Transforms a [Traversable](https://github.com/fantasyland/fantasy-land#traversable) - * of [Applicative](https://github.com/fantasyland/fantasy-land#applicative) into an - * Applicative of Traversable. - * - * Dispatches to the `sequence` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (Applicative f, Traversable t) => (a -> f a) -> t (f a) -> f (t a) - * @param {Function} of - * @param {*} traversable - * @return {*} - * @see R.traverse - * @example - * - * R.sequence(Maybe.of, [Just(1), Just(2), Just(3)]); //=> Just([1, 2, 3]) - * R.sequence(Maybe.of, [Just(1), Just(2), Nothing()]); //=> Nothing() - * - * R.sequence(R.of, Just([1, 2, 3])); //=> [Just(1), Just(2), Just(3)] - * R.sequence(R.of, Nothing()); //=> [Nothing()] - */ - - -var sequence = -/*#__PURE__*/ -_curry2(function sequence(of, traversable) { - return typeof traversable.sequence === 'function' ? traversable.sequence(of) : reduceRight(function (x, acc) { - return ap(map(prepend, x), acc); - }, of([]), traversable); -}); - -module.exports = sequence; \ No newline at end of file diff --git a/node_modules/ramda/src/set.js b/node_modules/ramda/src/set.js deleted file mode 100644 index 7a7b828..0000000 --- a/node_modules/ramda/src/set.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var always = -/*#__PURE__*/ -require("./always"); - -var over = -/*#__PURE__*/ -require("./over"); -/** - * Returns the result of "setting" the portion of the given data structure - * focused by the given lens to the given value. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> a -> s -> s - * @param {Lens} lens - * @param {*} v - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * const xLens = R.lensProp('x'); - * - * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} - * R.set(xLens, 8, {x: 1, y: 2}); //=> {x: 8, y: 2} - */ - - -var set = -/*#__PURE__*/ -_curry3(function set(lens, v, x) { - return over(lens, always(v), x); -}); - -module.exports = set; \ No newline at end of file diff --git a/node_modules/ramda/src/slice.js b/node_modules/ramda/src/slice.js deleted file mode 100644 index 4df43f8..0000000 --- a/node_modules/ramda/src/slice.js +++ /dev/null @@ -1,42 +0,0 @@ -var _checkForMethod = -/*#__PURE__*/ -require("./internal/_checkForMethod"); - -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Returns the elements of the given list or string (or object with a `slice` - * method) from `fromIndex` (inclusive) to `toIndex` (exclusive). - * - * Dispatches to the `slice` method of the third argument, if present. - * - * @func - * @memberOf R - * @since v0.1.4 - * @category List - * @sig Number -> Number -> [a] -> [a] - * @sig Number -> Number -> String -> String - * @param {Number} fromIndex The start index (inclusive). - * @param {Number} toIndex The end index (exclusive). - * @param {*} list - * @return {*} - * @example - * - * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] - * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd'] - * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c'] - * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] - * R.slice(0, 3, 'ramda'); //=> 'ram' - */ - - -var slice = -/*#__PURE__*/ -_curry3( -/*#__PURE__*/ -_checkForMethod('slice', function slice(fromIndex, toIndex, list) { - return Array.prototype.slice.call(list, fromIndex, toIndex); -})); - -module.exports = slice; \ No newline at end of file diff --git a/node_modules/ramda/src/sort.js b/node_modules/ramda/src/sort.js deleted file mode 100644 index 0d5c3b7..0000000 --- a/node_modules/ramda/src/sort.js +++ /dev/null @@ -1,32 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns a copy of the list, sorted according to the comparator function, - * which should accept two values at a time and return a negative number if the - * first value is smaller, a positive number if it's larger, and zero if they - * are equal. Please note that this is a **copy** of the list. It does not - * modify the original. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, a) -> Number) -> [a] -> [a] - * @param {Function} comparator A sorting function :: a -> b -> Int - * @param {Array} list The list to sort - * @return {Array} a new array with its elements sorted by the comparator function. - * @example - * - * const diff = function(a, b) { return a - b; }; - * R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7] - */ - - -var sort = -/*#__PURE__*/ -_curry2(function sort(comparator, list) { - return Array.prototype.slice.call(list, 0).sort(comparator); -}); - -module.exports = sort; \ No newline at end of file diff --git a/node_modules/ramda/src/sortBy.js b/node_modules/ramda/src/sortBy.js deleted file mode 100644 index fb2f3ab..0000000 --- a/node_modules/ramda/src/sortBy.js +++ /dev/null @@ -1,49 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Sorts the list according to the supplied function. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig Ord b => (a -> b) -> [a] -> [a] - * @param {Function} fn - * @param {Array} list The list to sort. - * @return {Array} A new list sorted by the keys generated by `fn`. - * @example - * - * const sortByFirstItem = R.sortBy(R.prop(0)); - * const pairs = [[-1, 1], [-2, 2], [-3, 3]]; - * sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]] - * - * const sortByNameCaseInsensitive = R.sortBy(R.compose(R.toLower, R.prop('name'))); - * const alice = { - * name: 'ALICE', - * age: 101 - * }; - * const bob = { - * name: 'Bob', - * age: -10 - * }; - * const clara = { - * name: 'clara', - * age: 314.159 - * }; - * const people = [clara, bob, alice]; - * sortByNameCaseInsensitive(people); //=> [alice, bob, clara] - */ - - -var sortBy = -/*#__PURE__*/ -_curry2(function sortBy(fn, list) { - return Array.prototype.slice.call(list, 0).sort(function (a, b) { - var aa = fn(a); - var bb = fn(b); - return aa < bb ? -1 : aa > bb ? 1 : 0; - }); -}); - -module.exports = sortBy; \ No newline at end of file diff --git a/node_modules/ramda/src/sortWith.js b/node_modules/ramda/src/sortWith.js deleted file mode 100644 index fd89a13..0000000 --- a/node_modules/ramda/src/sortWith.js +++ /dev/null @@ -1,54 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Sorts a list according to a list of comparators. - * - * @func - * @memberOf R - * @since v0.23.0 - * @category Relation - * @sig [(a, a) -> Number] -> [a] -> [a] - * @param {Array} functions A list of comparator functions. - * @param {Array} list The list to sort. - * @return {Array} A new list sorted according to the comarator functions. - * @example - * - * const alice = { - * name: 'alice', - * age: 40 - * }; - * const bob = { - * name: 'bob', - * age: 30 - * }; - * const clara = { - * name: 'clara', - * age: 40 - * }; - * const people = [clara, bob, alice]; - * const ageNameSort = R.sortWith([ - * R.descend(R.prop('age')), - * R.ascend(R.prop('name')) - * ]); - * ageNameSort(people); //=> [alice, clara, bob] - */ - - -var sortWith = -/*#__PURE__*/ -_curry2(function sortWith(fns, list) { - return Array.prototype.slice.call(list, 0).sort(function (a, b) { - var result = 0; - var i = 0; - - while (result === 0 && i < fns.length) { - result = fns[i](a, b); - i += 1; - } - - return result; - }); -}); - -module.exports = sortWith; \ No newline at end of file diff --git a/node_modules/ramda/src/split.js b/node_modules/ramda/src/split.js deleted file mode 100644 index 7adf8cd..0000000 --- a/node_modules/ramda/src/split.js +++ /dev/null @@ -1,29 +0,0 @@ -var invoker = -/*#__PURE__*/ -require("./invoker"); -/** - * Splits a string into an array of strings based on the given - * separator. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category String - * @sig (String | RegExp) -> String -> [String] - * @param {String|RegExp} sep The pattern. - * @param {String} str The string to separate into an array. - * @return {Array} The array of strings from `str` separated by `sep`. - * @see R.join - * @example - * - * const pathComponents = R.split('/'); - * R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node'] - * - * R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd'] - */ - - -var split = -/*#__PURE__*/ -invoker(1, 'split'); -module.exports = split; \ No newline at end of file diff --git a/node_modules/ramda/src/splitAt.js b/node_modules/ramda/src/splitAt.js deleted file mode 100644 index 06de43c..0000000 --- a/node_modules/ramda/src/splitAt.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var length = -/*#__PURE__*/ -require("./length"); - -var slice = -/*#__PURE__*/ -require("./slice"); -/** - * Splits a given list or string at a given index. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig Number -> [a] -> [[a], [a]] - * @sig Number -> String -> [String, String] - * @param {Number} index The index where the array/string is split. - * @param {Array|String} array The array/string to be split. - * @return {Array} - * @example - * - * R.splitAt(1, [1, 2, 3]); //=> [[1], [2, 3]] - * R.splitAt(5, 'hello world'); //=> ['hello', ' world'] - * R.splitAt(-1, 'foobar'); //=> ['fooba', 'r'] - */ - - -var splitAt = -/*#__PURE__*/ -_curry2(function splitAt(index, array) { - return [slice(0, index, array), slice(index, length(array), array)]; -}); - -module.exports = splitAt; \ No newline at end of file diff --git a/node_modules/ramda/src/splitEvery.js b/node_modules/ramda/src/splitEvery.js deleted file mode 100644 index db379e4..0000000 --- a/node_modules/ramda/src/splitEvery.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var slice = -/*#__PURE__*/ -require("./slice"); -/** - * Splits a collection into slices of the specified length. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [[a]] - * @sig Number -> String -> [String] - * @param {Number} n - * @param {Array} list - * @return {Array} - * @example - * - * R.splitEvery(3, [1, 2, 3, 4, 5, 6, 7]); //=> [[1, 2, 3], [4, 5, 6], [7]] - * R.splitEvery(3, 'foobarbaz'); //=> ['foo', 'bar', 'baz'] - */ - - -var splitEvery = -/*#__PURE__*/ -_curry2(function splitEvery(n, list) { - if (n <= 0) { - throw new Error('First argument to splitEvery must be a positive integer'); - } - - var result = []; - var idx = 0; - - while (idx < list.length) { - result.push(slice(idx, idx += n, list)); - } - - return result; -}); - -module.exports = splitEvery; \ No newline at end of file diff --git a/node_modules/ramda/src/splitWhen.js b/node_modules/ramda/src/splitWhen.js deleted file mode 100644 index 034c44c..0000000 --- a/node_modules/ramda/src/splitWhen.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Takes a list and a predicate and returns a pair of lists with the following properties: - * - * - the result of concatenating the two output lists is equivalent to the input list; - * - none of the elements of the first output list satisfies the predicate; and - * - if the second output list is non-empty, its first element satisfies the predicate. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [[a], [a]] - * @param {Function} pred The predicate that determines where the array is split. - * @param {Array} list The array to be split. - * @return {Array} - * @example - * - * R.splitWhen(R.equals(2), [1, 2, 3, 1, 2, 3]); //=> [[1], [2, 3, 1, 2, 3]] - */ - - -var splitWhen = -/*#__PURE__*/ -_curry2(function splitWhen(pred, list) { - var idx = 0; - var len = list.length; - var prefix = []; - - while (idx < len && !pred(list[idx])) { - prefix.push(list[idx]); - idx += 1; - } - - return [prefix, Array.prototype.slice.call(list, idx)]; -}); - -module.exports = splitWhen; \ No newline at end of file diff --git a/node_modules/ramda/src/startsWith.js b/node_modules/ramda/src/startsWith.js deleted file mode 100644 index 1c55396..0000000 --- a/node_modules/ramda/src/startsWith.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var equals = -/*#__PURE__*/ -require("./equals"); - -var take = -/*#__PURE__*/ -require("./take"); -/** - * Checks if a list starts with the provided sublist. - * - * Similarly, checks if a string starts with the provided substring. - * - * @func - * @memberOf R - * @since v0.24.0 - * @category List - * @sig [a] -> [a] -> Boolean - * @sig String -> String -> Boolean - * @param {*} prefix - * @param {*} list - * @return {Boolean} - * @see R.endsWith - * @example - * - * R.startsWith('a', 'abc') //=> true - * R.startsWith('b', 'abc') //=> false - * R.startsWith(['a'], ['a', 'b', 'c']) //=> true - * R.startsWith(['b'], ['a', 'b', 'c']) //=> false - */ - - -var startsWith = -/*#__PURE__*/ -_curry2(function (prefix, list) { - return equals(take(prefix.length, list), prefix); -}); - -module.exports = startsWith; \ No newline at end of file diff --git a/node_modules/ramda/src/subtract.js b/node_modules/ramda/src/subtract.js deleted file mode 100644 index 32f48ed..0000000 --- a/node_modules/ramda/src/subtract.js +++ /dev/null @@ -1,35 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Subtracts its second argument from its first argument. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig Number -> Number -> Number - * @param {Number} a The first value. - * @param {Number} b The second value. - * @return {Number} The result of `a - b`. - * @see R.add - * @example - * - * R.subtract(10, 8); //=> 2 - * - * const minus5 = R.subtract(R.__, 5); - * minus5(17); //=> 12 - * - * const complementaryAngle = R.subtract(90); - * complementaryAngle(30); //=> 60 - * complementaryAngle(72); //=> 18 - */ - - -var subtract = -/*#__PURE__*/ -_curry2(function subtract(a, b) { - return Number(a) - Number(b); -}); - -module.exports = subtract; \ No newline at end of file diff --git a/node_modules/ramda/src/sum.js b/node_modules/ramda/src/sum.js deleted file mode 100644 index c2c3209..0000000 --- a/node_modules/ramda/src/sum.js +++ /dev/null @@ -1,28 +0,0 @@ -var add = -/*#__PURE__*/ -require("./add"); - -var reduce = -/*#__PURE__*/ -require("./reduce"); -/** - * Adds together all the elements of a list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Math - * @sig [Number] -> Number - * @param {Array} list An array of numbers - * @return {Number} The sum of all the numbers in the list. - * @see R.reduce - * @example - * - * R.sum([2,4,6,8,100,1]); //=> 121 - */ - - -var sum = -/*#__PURE__*/ -reduce(add, 0); -module.exports = sum; \ No newline at end of file diff --git a/node_modules/ramda/src/symmetricDifference.js b/node_modules/ramda/src/symmetricDifference.js deleted file mode 100644 index a269374..0000000 --- a/node_modules/ramda/src/symmetricDifference.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var concat = -/*#__PURE__*/ -require("./concat"); - -var difference = -/*#__PURE__*/ -require("./difference"); -/** - * Finds the set (i.e. no duplicates) of all elements contained in the first or - * second list, but not both. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` or `list2`, but not both. - * @see R.symmetricDifferenceWith, R.difference, R.differenceWith - * @example - * - * R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5] - * R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2] - */ - - -var symmetricDifference = -/*#__PURE__*/ -_curry2(function symmetricDifference(list1, list2) { - return concat(difference(list1, list2), difference(list2, list1)); -}); - -module.exports = symmetricDifference; \ No newline at end of file diff --git a/node_modules/ramda/src/symmetricDifferenceWith.js b/node_modules/ramda/src/symmetricDifferenceWith.js deleted file mode 100644 index 653a46a..0000000 --- a/node_modules/ramda/src/symmetricDifferenceWith.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var concat = -/*#__PURE__*/ -require("./concat"); - -var differenceWith = -/*#__PURE__*/ -require("./differenceWith"); -/** - * Finds the set (i.e. no duplicates) of all elements contained in the first or - * second list, but not both. Duplication is determined according to the value - * returned by applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The elements in `list1` or `list2`, but not both. - * @see R.symmetricDifference, R.difference, R.differenceWith - * @example - * - * const eqA = R.eqBy(R.prop('a')); - * const l1 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; - * const l2 = [{a: 3}, {a: 4}, {a: 5}, {a: 6}]; - * R.symmetricDifferenceWith(eqA, l1, l2); //=> [{a: 1}, {a: 2}, {a: 5}, {a: 6}] - */ - - -var symmetricDifferenceWith = -/*#__PURE__*/ -_curry3(function symmetricDifferenceWith(pred, list1, list2) { - return concat(differenceWith(pred, list1, list2), differenceWith(pred, list2, list1)); -}); - -module.exports = symmetricDifferenceWith; \ No newline at end of file diff --git a/node_modules/ramda/src/tail.js b/node_modules/ramda/src/tail.js deleted file mode 100644 index 2831c63..0000000 --- a/node_modules/ramda/src/tail.js +++ /dev/null @@ -1,49 +0,0 @@ -var _checkForMethod = -/*#__PURE__*/ -require("./internal/_checkForMethod"); - -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var slice = -/*#__PURE__*/ -require("./slice"); -/** - * Returns all but the first element of the given list or string (or object - * with a `tail` method). - * - * Dispatches to the `slice` method of the first argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @sig String -> String - * @param {*} list - * @return {*} - * @see R.head, R.init, R.last - * @example - * - * R.tail([1, 2, 3]); //=> [2, 3] - * R.tail([1, 2]); //=> [2] - * R.tail([1]); //=> [] - * R.tail([]); //=> [] - * - * R.tail('abc'); //=> 'bc' - * R.tail('ab'); //=> 'b' - * R.tail('a'); //=> '' - * R.tail(''); //=> '' - */ - - -var tail = -/*#__PURE__*/ -_curry1( -/*#__PURE__*/ -_checkForMethod('tail', -/*#__PURE__*/ -slice(1, Infinity))); - -module.exports = tail; \ No newline at end of file diff --git a/node_modules/ramda/src/take.js b/node_modules/ramda/src/take.js deleted file mode 100644 index d9363f1..0000000 --- a/node_modules/ramda/src/take.js +++ /dev/null @@ -1,69 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xtake = -/*#__PURE__*/ -require("./internal/_xtake"); - -var slice = -/*#__PURE__*/ -require("./slice"); -/** - * Returns the first `n` elements of the given list, string, or - * transducer/transformer (or object with a `take` method). - * - * Dispatches to the `take` method of the second argument, if present. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n - * @param {*} list - * @return {*} - * @see R.drop - * @example - * - * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo'] - * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] - * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.take(3, 'ramda'); //=> 'ram' - * - * const personnel = [ - * 'Dave Brubeck', - * 'Paul Desmond', - * 'Eugene Wright', - * 'Joe Morello', - * 'Gerry Mulligan', - * 'Bob Bates', - * 'Joe Dodge', - * 'Ron Crotty' - * ]; - * - * const takeFive = R.take(5); - * takeFive(personnel); - * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan'] - * @symb R.take(-1, [a, b]) = [a, b] - * @symb R.take(0, [a, b]) = [] - * @symb R.take(1, [a, b]) = [a] - * @symb R.take(2, [a, b]) = [a, b] - */ - - -var take = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['take'], _xtake, function take(n, xs) { - return slice(0, n < 0 ? Infinity : n, xs); -})); - -module.exports = take; \ No newline at end of file diff --git a/node_modules/ramda/src/takeLast.js b/node_modules/ramda/src/takeLast.js deleted file mode 100644 index a254cde..0000000 --- a/node_modules/ramda/src/takeLast.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var drop = -/*#__PURE__*/ -require("./drop"); -/** - * Returns a new list containing the last `n` elements of the given list. - * If `n > list.length`, returns a list of `list.length` elements. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig Number -> [a] -> [a] - * @sig Number -> String -> String - * @param {Number} n The number of elements to return. - * @param {Array} xs The collection to consider. - * @return {Array} - * @see R.dropLast - * @example - * - * R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz'] - * R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] - * R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] - * R.takeLast(3, 'ramda'); //=> 'mda' - */ - - -var takeLast = -/*#__PURE__*/ -_curry2(function takeLast(n, xs) { - return drop(n >= 0 ? xs.length - n : 0, xs); -}); - -module.exports = takeLast; \ No newline at end of file diff --git a/node_modules/ramda/src/takeLastWhile.js b/node_modules/ramda/src/takeLastWhile.js deleted file mode 100644 index 98b82b6..0000000 --- a/node_modules/ramda/src/takeLastWhile.js +++ /dev/null @@ -1,47 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var slice = -/*#__PURE__*/ -require("./slice"); -/** - * Returns a new list containing the last `n` elements of a given list, passing - * each value to the supplied predicate function, and terminating when the - * predicate function returns `false`. Excludes the element that caused the - * predicate function to fail. The predicate function is passed one argument: - * *(value)*. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @sig (a -> Boolean) -> String -> String - * @param {Function} fn The function called per iteration. - * @param {Array} xs The collection to iterate over. - * @return {Array} A new array. - * @see R.dropLastWhile, R.addIndex - * @example - * - * const isNotOne = x => x !== 1; - * - * R.takeLastWhile(isNotOne, [1, 2, 3, 4]); //=> [2, 3, 4] - * - * R.takeLastWhile(x => x !== 'R' , 'Ramda'); //=> 'amda' - */ - - -var takeLastWhile = -/*#__PURE__*/ -_curry2(function takeLastWhile(fn, xs) { - var idx = xs.length - 1; - - while (idx >= 0 && fn(xs[idx])) { - idx -= 1; - } - - return slice(idx + 1, Infinity, xs); -}); - -module.exports = takeLastWhile; \ No newline at end of file diff --git a/node_modules/ramda/src/takeWhile.js b/node_modules/ramda/src/takeWhile.js deleted file mode 100644 index 02c47f4..0000000 --- a/node_modules/ramda/src/takeWhile.js +++ /dev/null @@ -1,62 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xtakeWhile = -/*#__PURE__*/ -require("./internal/_xtakeWhile"); - -var slice = -/*#__PURE__*/ -require("./slice"); -/** - * Returns a new list containing the first `n` elements of a given list, - * passing each value to the supplied predicate function, and terminating when - * the predicate function returns `false`. Excludes the element that caused the - * predicate function to fail. The predicate function is passed one argument: - * *(value)*. - * - * Dispatches to the `takeWhile` method of the second argument, if present. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig (a -> Boolean) -> [a] -> [a] - * @sig (a -> Boolean) -> String -> String - * @param {Function} fn The function called per iteration. - * @param {Array} xs The collection to iterate over. - * @return {Array} A new array. - * @see R.dropWhile, R.transduce, R.addIndex - * @example - * - * const isNotFour = x => x !== 4; - * - * R.takeWhile(isNotFour, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3] - * - * R.takeWhile(x => x !== 'd' , 'Ramda'); //=> 'Ram' - */ - - -var takeWhile = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable(['takeWhile'], _xtakeWhile, function takeWhile(fn, xs) { - var idx = 0; - var len = xs.length; - - while (idx < len && fn(xs[idx])) { - idx += 1; - } - - return slice(0, idx, xs); -})); - -module.exports = takeWhile; \ No newline at end of file diff --git a/node_modules/ramda/src/tap.js b/node_modules/ramda/src/tap.js deleted file mode 100644 index cf4e593..0000000 --- a/node_modules/ramda/src/tap.js +++ /dev/null @@ -1,43 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _dispatchable = -/*#__PURE__*/ -require("./internal/_dispatchable"); - -var _xtap = -/*#__PURE__*/ -require("./internal/_xtap"); -/** - * Runs the given function with the supplied object, then returns the object. - * - * Acts as a transducer if a transformer is given as second parameter. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig (a -> *) -> a -> a - * @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away. - * @param {*} x - * @return {*} `x`. - * @example - * - * const sayX = x => console.log('x is ' + x); - * R.tap(sayX, 100); //=> 100 - * // logs 'x is 100' - * @symb R.tap(f, a) = a - */ - - -var tap = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -_dispatchable([], _xtap, function tap(fn, x) { - fn(x); - return x; -})); - -module.exports = tap; \ No newline at end of file diff --git a/node_modules/ramda/src/test.js b/node_modules/ramda/src/test.js deleted file mode 100644 index 0014957..0000000 --- a/node_modules/ramda/src/test.js +++ /dev/null @@ -1,45 +0,0 @@ -var _cloneRegExp = -/*#__PURE__*/ -require("./internal/_cloneRegExp"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _isRegExp = -/*#__PURE__*/ -require("./internal/_isRegExp"); - -var toString = -/*#__PURE__*/ -require("./toString"); -/** - * Determines whether a given string matches a given regular expression. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category String - * @sig RegExp -> String -> Boolean - * @param {RegExp} pattern - * @param {String} str - * @return {Boolean} - * @see R.match - * @example - * - * R.test(/^x/, 'xyz'); //=> true - * R.test(/^y/, 'xyz'); //=> false - */ - - -var test = -/*#__PURE__*/ -_curry2(function test(pattern, str) { - if (!_isRegExp(pattern)) { - throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + toString(pattern)); - } - - return _cloneRegExp(pattern).test(str); -}); - -module.exports = test; \ No newline at end of file diff --git a/node_modules/ramda/src/thunkify.js b/node_modules/ramda/src/thunkify.js deleted file mode 100644 index e4bbc22..0000000 --- a/node_modules/ramda/src/thunkify.js +++ /dev/null @@ -1,39 +0,0 @@ -var curryN = -/*#__PURE__*/ -require("./curryN"); - -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Creates a thunk out of a function. A thunk delays a calculation until - * its result is needed, providing lazy evaluation of arguments. - * - * @func - * @memberOf R - * @since v0.26.0 - * @category Function - * @sig ((a, b, ..., j) -> k) -> (a, b, ..., j) -> (() -> k) - * @param {Function} fn A function to wrap in a thunk - * @return {Function} Expects arguments for `fn` and returns a new function - * that, when called, applies those arguments to `fn`. - * @see R.partial, R.partialRight - * @example - * - * R.thunkify(R.identity)(42)(); //=> 42 - * R.thunkify((a, b) => a + b)(25, 17)(); //=> 42 - */ - - -var thunkify = -/*#__PURE__*/ -_curry1(function thunkify(fn) { - return curryN(fn.length, function createThunk() { - var fnArgs = arguments; - return function invokeThunk() { - return fn.apply(this, fnArgs); - }; - }); -}); - -module.exports = thunkify; \ No newline at end of file diff --git a/node_modules/ramda/src/times.js b/node_modules/ramda/src/times.js deleted file mode 100644 index 8e19c72..0000000 --- a/node_modules/ramda/src/times.js +++ /dev/null @@ -1,50 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Calls an input function `n` times, returning an array containing the results - * of those function calls. - * - * `fn` is passed one argument: The current value of `n`, which begins at `0` - * and is gradually incremented to `n - 1`. - * - * @func - * @memberOf R - * @since v0.2.3 - * @category List - * @sig (Number -> a) -> Number -> [a] - * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`. - * @param {Number} n A value between `0` and `n - 1`. Increments after each function call. - * @return {Array} An array containing the return values of all calls to `fn`. - * @see R.repeat - * @example - * - * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4] - * @symb R.times(f, 0) = [] - * @symb R.times(f, 1) = [f(0)] - * @symb R.times(f, 2) = [f(0), f(1)] - */ - - -var times = -/*#__PURE__*/ -_curry2(function times(fn, n) { - var len = Number(n); - var idx = 0; - var list; - - if (len < 0 || isNaN(len)) { - throw new RangeError('n must be a non-negative number'); - } - - list = new Array(len); - - while (idx < len) { - list[idx] = fn(idx); - idx += 1; - } - - return list; -}); - -module.exports = times; \ No newline at end of file diff --git a/node_modules/ramda/src/toLower.js b/node_modules/ramda/src/toLower.js deleted file mode 100644 index b85c838..0000000 --- a/node_modules/ramda/src/toLower.js +++ /dev/null @@ -1,24 +0,0 @@ -var invoker = -/*#__PURE__*/ -require("./invoker"); -/** - * The lower case version of a string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category String - * @sig String -> String - * @param {String} str The string to lower case. - * @return {String} The lower case version of `str`. - * @see R.toUpper - * @example - * - * R.toLower('XYZ'); //=> 'xyz' - */ - - -var toLower = -/*#__PURE__*/ -invoker(0, 'toLowerCase'); -module.exports = toLower; \ No newline at end of file diff --git a/node_modules/ramda/src/toPairs.js b/node_modules/ramda/src/toPairs.js deleted file mode 100644 index ef9960b..0000000 --- a/node_modules/ramda/src/toPairs.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _has = -/*#__PURE__*/ -require("./internal/_has"); -/** - * Converts an object into an array of key, value arrays. Only the object's - * own properties are used. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Object - * @sig {String: *} -> [[String,*]] - * @param {Object} obj The object to extract from - * @return {Array} An array of key, value arrays from the object's own properties. - * @see R.fromPairs - * @example - * - * R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]] - */ - - -var toPairs = -/*#__PURE__*/ -_curry1(function toPairs(obj) { - var pairs = []; - - for (var prop in obj) { - if (_has(prop, obj)) { - pairs[pairs.length] = [prop, obj[prop]]; - } - } - - return pairs; -}); - -module.exports = toPairs; \ No newline at end of file diff --git a/node_modules/ramda/src/toPairsIn.js b/node_modules/ramda/src/toPairsIn.js deleted file mode 100644 index a7c008e..0000000 --- a/node_modules/ramda/src/toPairsIn.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Converts an object into an array of key, value arrays. The object's own - * properties and prototype properties are used. Note that the order of the - * output array is not guaranteed to be consistent across different JS - * platforms. - * - * @func - * @memberOf R - * @since v0.4.0 - * @category Object - * @sig {String: *} -> [[String,*]] - * @param {Object} obj The object to extract from - * @return {Array} An array of key, value arrays from the object's own - * and prototype properties. - * @example - * - * const F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * const f = new F(); - * R.toPairsIn(f); //=> [['x','X'], ['y','Y']] - */ - - -var toPairsIn = -/*#__PURE__*/ -_curry1(function toPairsIn(obj) { - var pairs = []; - - for (var prop in obj) { - pairs[pairs.length] = [prop, obj[prop]]; - } - - return pairs; -}); - -module.exports = toPairsIn; \ No newline at end of file diff --git a/node_modules/ramda/src/toString.js b/node_modules/ramda/src/toString.js deleted file mode 100644 index 638e9eb..0000000 --- a/node_modules/ramda/src/toString.js +++ /dev/null @@ -1,52 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var _toString = -/*#__PURE__*/ -require("./internal/_toString"); -/** - * Returns the string representation of the given value. `eval`'ing the output - * should result in a value equivalent to the input value. Many of the built-in - * `toString` methods do not satisfy this requirement. - * - * If the given value is an `[object Object]` with a `toString` method other - * than `Object.prototype.toString`, this method is invoked with no arguments - * to produce the return value. This means user-defined constructor functions - * can provide a suitable `toString` method. For example: - * - * function Point(x, y) { - * this.x = x; - * this.y = y; - * } - * - * Point.prototype.toString = function() { - * return 'new Point(' + this.x + ', ' + this.y + ')'; - * }; - * - * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)' - * - * @func - * @memberOf R - * @since v0.14.0 - * @category String - * @sig * -> String - * @param {*} val - * @return {String} - * @example - * - * R.toString(42); //=> '42' - * R.toString('abc'); //=> '"abc"' - * R.toString([1, 2, 3]); //=> '[1, 2, 3]' - * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}' - * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")' - */ - - -var toString = -/*#__PURE__*/ -_curry1(function toString(val) { - return _toString(val, []); -}); - -module.exports = toString; \ No newline at end of file diff --git a/node_modules/ramda/src/toUpper.js b/node_modules/ramda/src/toUpper.js deleted file mode 100644 index 3d955ba..0000000 --- a/node_modules/ramda/src/toUpper.js +++ /dev/null @@ -1,24 +0,0 @@ -var invoker = -/*#__PURE__*/ -require("./invoker"); -/** - * The upper case version of a string. - * - * @func - * @memberOf R - * @since v0.9.0 - * @category String - * @sig String -> String - * @param {String} str The string to upper case. - * @return {String} The upper case version of `str`. - * @see R.toLower - * @example - * - * R.toUpper('abc'); //=> 'ABC' - */ - - -var toUpper = -/*#__PURE__*/ -invoker(0, 'toUpperCase'); -module.exports = toUpper; \ No newline at end of file diff --git a/node_modules/ramda/src/transduce.js b/node_modules/ramda/src/transduce.js deleted file mode 100644 index 4d9444b..0000000 --- a/node_modules/ramda/src/transduce.js +++ /dev/null @@ -1,66 +0,0 @@ -var _reduce = -/*#__PURE__*/ -require("./internal/_reduce"); - -var _xwrap = -/*#__PURE__*/ -require("./internal/_xwrap"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); -/** - * Initializes a transducer using supplied iterator function. Returns a single - * item by iterating through the list, successively calling the transformed - * iterator function and passing it an accumulator value and the current value - * from the array, and then passing the result to the next call. - * - * The iterator function receives two values: *(acc, value)*. It will be - * wrapped as a transformer to initialize the transducer. A transformer can be - * passed directly in place of an iterator function. In both cases, iteration - * may be stopped early with the [`R.reduced`](#reduced) function. - * - * A transducer is a function that accepts a transformer and returns a - * transformer and can be composed directly. - * - * A transformer is an an object that provides a 2-arity reducing iterator - * function, step, 0-arity initial value function, init, and 1-arity result - * extraction function, result. The step function is used as the iterator - * function in reduce. The result function is used to convert the final - * accumulator into the return type and in most cases is - * [`R.identity`](#identity). The init function can be used to provide an - * initial accumulator, but is ignored by transduce. - * - * The iteration is performed with [`R.reduce`](#reduce) after initializing the transducer. - * - * @func - * @memberOf R - * @since v0.12.0 - * @category List - * @sig (c -> c) -> ((a, b) -> a) -> a -> [b] -> a - * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. - * @param {Function} fn The iterator function. Receives two values, the accumulator and the - * current element from the array. Wrapped as transformer, if necessary, and used to - * initialize the transducer - * @param {*} acc The initial accumulator value. - * @param {Array} list The list to iterate over. - * @return {*} The final, accumulated value. - * @see R.reduce, R.reduced, R.into - * @example - * - * const numbers = [1, 2, 3, 4]; - * const transducer = R.compose(R.map(R.add(1)), R.take(2)); - * R.transduce(transducer, R.flip(R.append), [], numbers); //=> [2, 3] - * - * const isOdd = (x) => x % 2 === 1; - * const firstOddTransducer = R.compose(R.filter(isOdd), R.take(1)); - * R.transduce(firstOddTransducer, R.flip(R.append), [], R.range(0, 100)); //=> [1] - */ - - -var transduce = -/*#__PURE__*/ -curryN(4, function transduce(xf, fn, acc, list) { - return _reduce(xf(typeof fn === 'function' ? _xwrap(fn) : fn), acc, list); -}); -module.exports = transduce; \ No newline at end of file diff --git a/node_modules/ramda/src/transpose.js b/node_modules/ramda/src/transpose.js deleted file mode 100644 index ae32f3c..0000000 --- a/node_modules/ramda/src/transpose.js +++ /dev/null @@ -1,55 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Transposes the rows and columns of a 2D list. - * When passed a list of `n` lists of length `x`, - * returns a list of `x` lists of length `n`. - * - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig [[a]] -> [[a]] - * @param {Array} list A 2D list - * @return {Array} A 2D list - * @example - * - * R.transpose([[1, 'a'], [2, 'b'], [3, 'c']]) //=> [[1, 2, 3], ['a', 'b', 'c']] - * R.transpose([[1, 2, 3], ['a', 'b', 'c']]) //=> [[1, 'a'], [2, 'b'], [3, 'c']] - * - * // If some of the rows are shorter than the following rows, their elements are skipped: - * R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]] - * @symb R.transpose([[a], [b], [c]]) = [a, b, c] - * @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]] - * @symb R.transpose([[a, b], [c]]) = [[a, c], [b]] - */ - - -var transpose = -/*#__PURE__*/ -_curry1(function transpose(outerlist) { - var i = 0; - var result = []; - - while (i < outerlist.length) { - var innerlist = outerlist[i]; - var j = 0; - - while (j < innerlist.length) { - if (typeof result[j] === 'undefined') { - result[j] = []; - } - - result[j].push(innerlist[j]); - j += 1; - } - - i += 1; - } - - return result; -}); - -module.exports = transpose; \ No newline at end of file diff --git a/node_modules/ramda/src/traverse.js b/node_modules/ramda/src/traverse.js deleted file mode 100644 index e33b789..0000000 --- a/node_modules/ramda/src/traverse.js +++ /dev/null @@ -1,46 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var map = -/*#__PURE__*/ -require("./map"); - -var sequence = -/*#__PURE__*/ -require("./sequence"); -/** - * Maps an [Applicative](https://github.com/fantasyland/fantasy-land#applicative)-returning - * function over a [Traversable](https://github.com/fantasyland/fantasy-land#traversable), - * then uses [`sequence`](#sequence) to transform the resulting Traversable of Applicative - * into an Applicative of Traversable. - * - * Dispatches to the `traverse` method of the third argument, if present. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig (Applicative f, Traversable t) => (a -> f a) -> (a -> f b) -> t a -> f (t b) - * @param {Function} of - * @param {Function} f - * @param {*} traversable - * @return {*} - * @see R.sequence - * @example - * - * // Returns `Maybe.Nothing` if the given divisor is `0` - * const safeDiv = n => d => d === 0 ? Maybe.Nothing() : Maybe.Just(n / d) - * - * R.traverse(Maybe.of, safeDiv(10), [2, 4, 5]); //=> Maybe.Just([5, 2.5, 2]) - * R.traverse(Maybe.of, safeDiv(10), [2, 0, 5]); //=> Maybe.Nothing - */ - - -var traverse = -/*#__PURE__*/ -_curry3(function traverse(of, f, traversable) { - return typeof traversable['fantasy-land/traverse'] === 'function' ? traversable['fantasy-land/traverse'](f, of) : sequence(of, map(f, traversable)); -}); - -module.exports = traverse; \ No newline at end of file diff --git a/node_modules/ramda/src/trim.js b/node_modules/ramda/src/trim.js deleted file mode 100644 index 9805811..0000000 --- a/node_modules/ramda/src/trim.js +++ /dev/null @@ -1,39 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + '\u2029\uFEFF'; -var zeroWidth = '\u200b'; -var hasProtoTrim = typeof String.prototype.trim === 'function'; -/** - * Removes (strips) whitespace from both ends of the string. - * - * @func - * @memberOf R - * @since v0.6.0 - * @category String - * @sig String -> String - * @param {String} str The string to trim. - * @return {String} Trimmed version of `str`. - * @example - * - * R.trim(' xyz '); //=> 'xyz' - * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z'] - */ - -var trim = !hasProtoTrim || -/*#__PURE__*/ -ws.trim() || ! -/*#__PURE__*/ -zeroWidth.trim() ? -/*#__PURE__*/ -_curry1(function trim(str) { - var beginRx = new RegExp('^[' + ws + '][' + ws + ']*'); - var endRx = new RegExp('[' + ws + '][' + ws + ']*$'); - return str.replace(beginRx, '').replace(endRx, ''); -}) : -/*#__PURE__*/ -_curry1(function trim(str) { - return str.trim(); -}); -module.exports = trim; \ No newline at end of file diff --git a/node_modules/ramda/src/tryCatch.js b/node_modules/ramda/src/tryCatch.js deleted file mode 100644 index 0583054..0000000 --- a/node_modules/ramda/src/tryCatch.js +++ /dev/null @@ -1,49 +0,0 @@ -var _arity = -/*#__PURE__*/ -require("./internal/_arity"); - -var _concat = -/*#__PURE__*/ -require("./internal/_concat"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * `tryCatch` takes two functions, a `tryer` and a `catcher`. The returned - * function evaluates the `tryer`; if it does not throw, it simply returns the - * result. If the `tryer` *does* throw, the returned function evaluates the - * `catcher` function and returns its result. Note that for effective - * composition with this function, both the `tryer` and `catcher` functions - * must return the same type of results. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Function - * @sig (...x -> a) -> ((e, ...x) -> a) -> (...x -> a) - * @param {Function} tryer The function that may throw. - * @param {Function} catcher The function that will be evaluated if `tryer` throws. - * @return {Function} A new function that will catch exceptions and send then to the catcher. - * @example - * - * R.tryCatch(R.prop('x'), R.F)({x: true}); //=> true - * R.tryCatch(() => { throw 'foo'}, R.always('catched'))('bar') // => 'catched' - * R.tryCatch(R.times(R.identity), R.always([]))('s') // => [] - * R.tryCatch(() => { throw 'this is not a valid value'}, (err, value)=>({error : err, value }))('bar') // => {'error': 'this is not a valid value', 'value': 'bar'} - */ - - -var tryCatch = -/*#__PURE__*/ -_curry2(function _tryCatch(tryer, catcher) { - return _arity(tryer.length, function () { - try { - return tryer.apply(this, arguments); - } catch (e) { - return catcher.apply(this, _concat([e], arguments)); - } - }); -}); - -module.exports = tryCatch; \ No newline at end of file diff --git a/node_modules/ramda/src/type.js b/node_modules/ramda/src/type.js deleted file mode 100644 index b953ba1..0000000 --- a/node_modules/ramda/src/type.js +++ /dev/null @@ -1,37 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Gives a single-word string description of the (native) type of a value, - * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not - * attempt to distinguish user Object types any further, reporting them all as - * 'Object'. - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Type - * @sig (* -> {*}) -> String - * @param {*} val The value to test - * @return {String} - * @example - * - * R.type({}); //=> "Object" - * R.type(1); //=> "Number" - * R.type(false); //=> "Boolean" - * R.type('s'); //=> "String" - * R.type(null); //=> "Null" - * R.type([]); //=> "Array" - * R.type(/[A-z]/); //=> "RegExp" - * R.type(() => {}); //=> "Function" - * R.type(undefined); //=> "Undefined" - */ - - -var type = -/*#__PURE__*/ -_curry1(function type(val) { - return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1); -}); - -module.exports = type; \ No newline at end of file diff --git a/node_modules/ramda/src/unapply.js b/node_modules/ramda/src/unapply.js deleted file mode 100644 index 3fd173b..0000000 --- a/node_modules/ramda/src/unapply.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Takes a function `fn`, which takes a single array argument, and returns a - * function which: - * - * - takes any number of positional arguments; - * - passes these arguments to `fn` as an array; and - * - returns the result. - * - * In other words, `R.unapply` derives a variadic function from a function which - * takes an array. `R.unapply` is the inverse of [`R.apply`](#apply). - * - * @func - * @memberOf R - * @since v0.8.0 - * @category Function - * @sig ([*...] -> a) -> (*... -> a) - * @param {Function} fn - * @return {Function} - * @see R.apply - * @example - * - * R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]' - * @symb R.unapply(f)(a, b) = f([a, b]) - */ - - -var unapply = -/*#__PURE__*/ -_curry1(function unapply(fn) { - return function () { - return fn(Array.prototype.slice.call(arguments, 0)); - }; -}); - -module.exports = unapply; \ No newline at end of file diff --git a/node_modules/ramda/src/unary.js b/node_modules/ramda/src/unary.js deleted file mode 100644 index 1ce6d42..0000000 --- a/node_modules/ramda/src/unary.js +++ /dev/null @@ -1,44 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var nAry = -/*#__PURE__*/ -require("./nAry"); -/** - * Wraps a function of any arity (including nullary) in a function that accepts - * exactly 1 parameter. Any extraneous parameters will not be passed to the - * supplied function. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Function - * @sig (* -> b) -> (a -> b) - * @param {Function} fn The function to wrap. - * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of - * arity 1. - * @see R.binary, R.nAry - * @example - * - * const takesTwoArgs = function(a, b) { - * return [a, b]; - * }; - * takesTwoArgs.length; //=> 2 - * takesTwoArgs(1, 2); //=> [1, 2] - * - * const takesOneArg = R.unary(takesTwoArgs); - * takesOneArg.length; //=> 1 - * // Only 1 argument is passed to the wrapped function - * takesOneArg(1, 2); //=> [1, undefined] - * @symb R.unary(f)(a, b, c) = f(a) - */ - - -var unary = -/*#__PURE__*/ -_curry1(function unary(fn) { - return nAry(1, fn); -}); - -module.exports = unary; \ No newline at end of file diff --git a/node_modules/ramda/src/uncurryN.js b/node_modules/ramda/src/uncurryN.js deleted file mode 100644 index beb13dd..0000000 --- a/node_modules/ramda/src/uncurryN.js +++ /dev/null @@ -1,49 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); -/** - * Returns a function of arity `n` from a (manually) curried function. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Function - * @sig Number -> (a -> b) -> (a -> c) - * @param {Number} length The arity for the returned function. - * @param {Function} fn The function to uncurry. - * @return {Function} A new function. - * @see R.curry - * @example - * - * const addFour = a => b => c => d => a + b + c + d; - * - * const uncurriedAddFour = R.uncurryN(4, addFour); - * uncurriedAddFour(1, 2, 3, 4); //=> 10 - */ - - -var uncurryN = -/*#__PURE__*/ -_curry2(function uncurryN(depth, fn) { - return curryN(depth, function () { - var currentDepth = 1; - var value = fn; - var idx = 0; - var endIdx; - - while (currentDepth <= depth && typeof value === 'function') { - endIdx = currentDepth === depth ? arguments.length : idx + value.length; - value = value.apply(this, Array.prototype.slice.call(arguments, idx, endIdx)); - currentDepth += 1; - idx = endIdx; - } - - return value; - }); -}); - -module.exports = uncurryN; \ No newline at end of file diff --git a/node_modules/ramda/src/unfold.js b/node_modules/ramda/src/unfold.js deleted file mode 100644 index 4695c19..0000000 --- a/node_modules/ramda/src/unfold.js +++ /dev/null @@ -1,45 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Builds a list from a seed value. Accepts an iterator function, which returns - * either false to stop iteration or an array of length 2 containing the value - * to add to the resulting list and the seed to be used in the next call to the - * iterator function. - * - * The iterator function receives one argument: *(seed)*. - * - * @func - * @memberOf R - * @since v0.10.0 - * @category List - * @sig (a -> [b]) -> * -> [b] - * @param {Function} fn The iterator function. receives one argument, `seed`, and returns - * either false to quit iteration or an array of length two to proceed. The element - * at index 0 of this array will be added to the resulting array, and the element - * at index 1 will be passed to the next call to `fn`. - * @param {*} seed The seed value. - * @return {Array} The final list. - * @example - * - * const f = n => n > 50 ? false : [-n, n + 10]; - * R.unfold(f, 10); //=> [-10, -20, -30, -40, -50] - * @symb R.unfold(f, x) = [f(x)[0], f(f(x)[1])[0], f(f(f(x)[1])[1])[0], ...] - */ - - -var unfold = -/*#__PURE__*/ -_curry2(function unfold(fn, seed) { - var pair = fn(seed); - var result = []; - - while (pair && pair.length) { - result[result.length] = pair[0]; - pair = fn(pair[1]); - } - - return result; -}); - -module.exports = unfold; \ No newline at end of file diff --git a/node_modules/ramda/src/union.js b/node_modules/ramda/src/union.js deleted file mode 100644 index d4b28c7..0000000 --- a/node_modules/ramda/src/union.js +++ /dev/null @@ -1,41 +0,0 @@ -var _concat = -/*#__PURE__*/ -require("./internal/_concat"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var compose = -/*#__PURE__*/ -require("./compose"); - -var uniq = -/*#__PURE__*/ -require("./uniq"); -/** - * Combines two lists into a set (i.e. no duplicates) composed of the elements - * of each list. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig [*] -> [*] -> [*] - * @param {Array} as The first list. - * @param {Array} bs The second list. - * @return {Array} The first and second lists concatenated, with - * duplicates removed. - * @example - * - * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4] - */ - - -var union = -/*#__PURE__*/ -_curry2( -/*#__PURE__*/ -compose(uniq, _concat)); - -module.exports = union; \ No newline at end of file diff --git a/node_modules/ramda/src/unionWith.js b/node_modules/ramda/src/unionWith.js deleted file mode 100644 index 7bb4941..0000000 --- a/node_modules/ramda/src/unionWith.js +++ /dev/null @@ -1,42 +0,0 @@ -var _concat = -/*#__PURE__*/ -require("./internal/_concat"); - -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var uniqWith = -/*#__PURE__*/ -require("./uniqWith"); -/** - * Combines two lists into a set (i.e. no duplicates) composed of the elements - * of each list. Duplication is determined according to the value returned by - * applying the supplied predicate to two list elements. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Relation - * @sig ((a, a) -> Boolean) -> [*] -> [*] -> [*] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list1 The first list. - * @param {Array} list2 The second list. - * @return {Array} The first and second lists concatenated, with - * duplicates removed. - * @see R.union - * @example - * - * const l1 = [{a: 1}, {a: 2}]; - * const l2 = [{a: 1}, {a: 4}]; - * R.unionWith(R.eqBy(R.prop('a')), l1, l2); //=> [{a: 1}, {a: 2}, {a: 4}] - */ - - -var unionWith = -/*#__PURE__*/ -_curry3(function unionWith(pred, list1, list2) { - return uniqWith(pred, _concat(list1, list2)); -}); - -module.exports = unionWith; \ No newline at end of file diff --git a/node_modules/ramda/src/uniq.js b/node_modules/ramda/src/uniq.js deleted file mode 100644 index 9436184..0000000 --- a/node_modules/ramda/src/uniq.js +++ /dev/null @@ -1,30 +0,0 @@ -var identity = -/*#__PURE__*/ -require("./identity"); - -var uniqBy = -/*#__PURE__*/ -require("./uniqBy"); -/** - * Returns a new list containing only one copy of each element in the original - * list. [`R.equals`](#equals) is used to determine equality. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [a] - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * R.uniq([1, 1, 2, 1]); //=> [1, 2] - * R.uniq([1, '1']); //=> [1, '1'] - * R.uniq([[42], [42]]); //=> [[42]] - */ - - -var uniq = -/*#__PURE__*/ -uniqBy(identity); -module.exports = uniq; \ No newline at end of file diff --git a/node_modules/ramda/src/uniqBy.js b/node_modules/ramda/src/uniqBy.js deleted file mode 100644 index 6d7e00c..0000000 --- a/node_modules/ramda/src/uniqBy.js +++ /dev/null @@ -1,50 +0,0 @@ -var _Set = -/*#__PURE__*/ -require("./internal/_Set"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns a new list containing only one copy of each element in the original - * list, based upon the value returned by applying the supplied function to - * each list element. Prefers the first item if the supplied function produces - * the same value on two items. [`R.equals`](#equals) is used for comparison. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category List - * @sig (a -> b) -> [a] -> [a] - * @param {Function} fn A function used to produce a value to use during comparisons. - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10] - */ - - -var uniqBy = -/*#__PURE__*/ -_curry2(function uniqBy(fn, list) { - var set = new _Set(); - var result = []; - var idx = 0; - var appliedItem, item; - - while (idx < list.length) { - item = list[idx]; - appliedItem = fn(item); - - if (set.add(appliedItem)) { - result.push(item); - } - - idx += 1; - } - - return result; -}); - -module.exports = uniqBy; \ No newline at end of file diff --git a/node_modules/ramda/src/uniqWith.js b/node_modules/ramda/src/uniqWith.js deleted file mode 100644 index 1d8ed74..0000000 --- a/node_modules/ramda/src/uniqWith.js +++ /dev/null @@ -1,53 +0,0 @@ -var _includesWith = -/*#__PURE__*/ -require("./internal/_includesWith"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Returns a new list containing only one copy of each element in the original - * list, based upon the value returned by applying the supplied predicate to - * two list elements. Prefers the first item if two items compare equal based - * on the predicate. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category List - * @sig ((a, a) -> Boolean) -> [a] -> [a] - * @param {Function} pred A predicate used to test whether two items are equal. - * @param {Array} list The array to consider. - * @return {Array} The list of unique items. - * @example - * - * const strEq = R.eqBy(String); - * R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2] - * R.uniqWith(strEq)([{}, {}]); //=> [{}] - * R.uniqWith(strEq)([1, '1', 1]); //=> [1] - * R.uniqWith(strEq)(['1', 1, 1]); //=> ['1'] - */ - - -var uniqWith = -/*#__PURE__*/ -_curry2(function uniqWith(pred, list) { - var idx = 0; - var len = list.length; - var result = []; - var item; - - while (idx < len) { - item = list[idx]; - - if (!_includesWith(pred, item, result)) { - result[result.length] = item; - } - - idx += 1; - } - - return result; -}); - -module.exports = uniqWith; \ No newline at end of file diff --git a/node_modules/ramda/src/unless.js b/node_modules/ramda/src/unless.js deleted file mode 100644 index 79cd42a..0000000 --- a/node_modules/ramda/src/unless.js +++ /dev/null @@ -1,36 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Tests the final argument by passing it to the given predicate function. If - * the predicate is not satisfied, the function will return the result of - * calling the `whenFalseFn` function with the same argument. If the predicate - * is satisfied, the argument is returned as is. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} whenFalseFn A function to invoke when the `pred` evaluates - * to a falsy value. - * @param {*} x An object to test with the `pred` function and - * pass to `whenFalseFn` if necessary. - * @return {*} Either `x` or the result of applying `x` to `whenFalseFn`. - * @see R.ifElse, R.when, R.cond - * @example - * - * let safeInc = R.unless(R.isNil, R.inc); - * safeInc(null); //=> null - * safeInc(1); //=> 2 - */ - - -var unless = -/*#__PURE__*/ -_curry3(function unless(pred, whenFalseFn, x) { - return pred(x) ? x : whenFalseFn(x); -}); - -module.exports = unless; \ No newline at end of file diff --git a/node_modules/ramda/src/unnest.js b/node_modules/ramda/src/unnest.js deleted file mode 100644 index 2318994..0000000 --- a/node_modules/ramda/src/unnest.js +++ /dev/null @@ -1,30 +0,0 @@ -var _identity = -/*#__PURE__*/ -require("./internal/_identity"); - -var chain = -/*#__PURE__*/ -require("./chain"); -/** - * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from - * any [Chain](https://github.com/fantasyland/fantasy-land#chain). - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig Chain c => c (c a) -> c a - * @param {*} list - * @return {*} - * @see R.flatten, R.chain - * @example - * - * R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]] - * R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6] - */ - - -var unnest = -/*#__PURE__*/ -chain(_identity); -module.exports = unnest; \ No newline at end of file diff --git a/node_modules/ramda/src/until.js b/node_modules/ramda/src/until.js deleted file mode 100644 index 4891401..0000000 --- a/node_modules/ramda/src/until.js +++ /dev/null @@ -1,37 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Takes a predicate, a transformation function, and an initial value, - * and returns a value of the same type as the initial value. - * It does so by applying the transformation until the predicate is satisfied, - * at which point it returns the satisfactory value. - * - * @func - * @memberOf R - * @since v0.20.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} fn The iterator function - * @param {*} init Initial value - * @return {*} Final value that satisfies predicate - * @example - * - * R.until(R.gt(R.__, 100), R.multiply(2))(1) // => 128 - */ - - -var until = -/*#__PURE__*/ -_curry3(function until(pred, fn, init) { - var val = init; - - while (!pred(val)) { - val = fn(val); - } - - return val; -}); - -module.exports = until; \ No newline at end of file diff --git a/node_modules/ramda/src/update.js b/node_modules/ramda/src/update.js deleted file mode 100644 index bf9bb1d..0000000 --- a/node_modules/ramda/src/update.js +++ /dev/null @@ -1,42 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); - -var adjust = -/*#__PURE__*/ -require("./adjust"); - -var always = -/*#__PURE__*/ -require("./always"); -/** - * Returns a new copy of the array with the element at the provided index - * replaced with the given value. - * - * @func - * @memberOf R - * @since v0.14.0 - * @category List - * @sig Number -> a -> [a] -> [a] - * @param {Number} idx The index to update. - * @param {*} x The value to exist at the given index of the returned array. - * @param {Array|Arguments} list The source array-like object to be updated. - * @return {Array} A copy of `list` with the value at index `idx` replaced with `x`. - * @see R.adjust - * @example - * - * R.update(1, '_', ['a', 'b', 'c']); //=> ['a', '_', 'c'] - * R.update(-1, '_', ['a', 'b', 'c']); //=> ['a', 'b', '_'] - * @symb R.update(-1, a, [b, c]) = [b, a] - * @symb R.update(0, a, [b, c]) = [a, c] - * @symb R.update(1, a, [b, c]) = [b, a] - */ - - -var update = -/*#__PURE__*/ -_curry3(function update(idx, x, list) { - return adjust(idx, always(x), list); -}); - -module.exports = update; \ No newline at end of file diff --git a/node_modules/ramda/src/useWith.js b/node_modules/ramda/src/useWith.js deleted file mode 100644 index 2b8a120..0000000 --- a/node_modules/ramda/src/useWith.js +++ /dev/null @@ -1,55 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var curryN = -/*#__PURE__*/ -require("./curryN"); -/** - * Accepts a function `fn` and a list of transformer functions and returns a - * new curried function. When the new function is invoked, it calls the - * function `fn` with parameters consisting of the result of calling each - * supplied handler on successive arguments to the new function. - * - * If more arguments are passed to the returned function than transformer - * functions, those arguments are passed directly to `fn` as additional - * parameters. If you expect additional arguments that don't need to be - * transformed, although you can ignore them, it's best to pass an identity - * function so that the new function reports the correct arity. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Function - * @sig ((x1, x2, ...) -> z) -> [(a -> x1), (b -> x2), ...] -> (a -> b -> ... -> z) - * @param {Function} fn The function to wrap. - * @param {Array} transformers A list of transformer functions - * @return {Function} The wrapped function. - * @see R.converge - * @example - * - * R.useWith(Math.pow, [R.identity, R.identity])(3, 4); //=> 81 - * R.useWith(Math.pow, [R.identity, R.identity])(3)(4); //=> 81 - * R.useWith(Math.pow, [R.dec, R.inc])(3, 4); //=> 32 - * R.useWith(Math.pow, [R.dec, R.inc])(3)(4); //=> 32 - * @symb R.useWith(f, [g, h])(a, b) = f(g(a), h(b)) - */ - - -var useWith = -/*#__PURE__*/ -_curry2(function useWith(fn, transformers) { - return curryN(transformers.length, function () { - var args = []; - var idx = 0; - - while (idx < transformers.length) { - args.push(transformers[idx].call(this, arguments[idx])); - idx += 1; - } - - return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, transformers.length))); - }); -}); - -module.exports = useWith; \ No newline at end of file diff --git a/node_modules/ramda/src/values.js b/node_modules/ramda/src/values.js deleted file mode 100644 index e1d6d9c..0000000 --- a/node_modules/ramda/src/values.js +++ /dev/null @@ -1,43 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); - -var keys = -/*#__PURE__*/ -require("./keys"); -/** - * Returns a list of all the enumerable own properties of the supplied object. - * Note that the order of the output array is not guaranteed across different - * JS platforms. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category Object - * @sig {k: v} -> [v] - * @param {Object} obj The object to extract values from - * @return {Array} An array of the values of the object's own properties. - * @see R.valuesIn, R.keys - * @example - * - * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3] - */ - - -var values = -/*#__PURE__*/ -_curry1(function values(obj) { - var props = keys(obj); - var len = props.length; - var vals = []; - var idx = 0; - - while (idx < len) { - vals[idx] = obj[props[idx]]; - idx += 1; - } - - return vals; -}); - -module.exports = values; \ No newline at end of file diff --git a/node_modules/ramda/src/valuesIn.js b/node_modules/ramda/src/valuesIn.js deleted file mode 100644 index 589d9d0..0000000 --- a/node_modules/ramda/src/valuesIn.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry1 = -/*#__PURE__*/ -require("./internal/_curry1"); -/** - * Returns a list of all the properties, including prototype properties, of the - * supplied object. - * Note that the order of the output array is not guaranteed to be consistent - * across different JS platforms. - * - * @func - * @memberOf R - * @since v0.2.0 - * @category Object - * @sig {k: v} -> [v] - * @param {Object} obj The object to extract values from - * @return {Array} An array of the values of the object's own and prototype properties. - * @see R.values, R.keysIn - * @example - * - * const F = function() { this.x = 'X'; }; - * F.prototype.y = 'Y'; - * const f = new F(); - * R.valuesIn(f); //=> ['X', 'Y'] - */ - - -var valuesIn = -/*#__PURE__*/ -_curry1(function valuesIn(obj) { - var prop; - var vs = []; - - for (prop in obj) { - vs[vs.length] = obj[prop]; - } - - return vs; -}); - -module.exports = valuesIn; \ No newline at end of file diff --git a/node_modules/ramda/src/view.js b/node_modules/ramda/src/view.js deleted file mode 100644 index 0fddab6..0000000 --- a/node_modules/ramda/src/view.js +++ /dev/null @@ -1,45 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); // `Const` is a functor that effectively ignores the function given to `map`. - - -var Const = function (x) { - return { - value: x, - 'fantasy-land/map': function () { - return this; - } - }; -}; -/** - * Returns a "view" of the given data structure, determined by the given lens. - * The lens's focus determines which portion of the data structure is visible. - * - * @func - * @memberOf R - * @since v0.16.0 - * @category Object - * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s - * @sig Lens s a -> s -> a - * @param {Lens} lens - * @param {*} x - * @return {*} - * @see R.prop, R.lensIndex, R.lensProp - * @example - * - * const xLens = R.lensProp('x'); - * - * R.view(xLens, {x: 1, y: 2}); //=> 1 - * R.view(xLens, {x: 4, y: 2}); //=> 4 - */ - - -var view = -/*#__PURE__*/ -_curry2(function view(lens, x) { - // Using `Const` effectively ignores the setter function of the `lens`, - // leaving the value returned by the getter function unmodified. - return lens(Const)(x).value; -}); - -module.exports = view; \ No newline at end of file diff --git a/node_modules/ramda/src/when.js b/node_modules/ramda/src/when.js deleted file mode 100644 index 982216f..0000000 --- a/node_modules/ramda/src/when.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Tests the final argument by passing it to the given predicate function. If - * the predicate is satisfied, the function will return the result of calling - * the `whenTrueFn` function with the same argument. If the predicate is not - * satisfied, the argument is returned as is. - * - * @func - * @memberOf R - * @since v0.18.0 - * @category Logic - * @sig (a -> Boolean) -> (a -> a) -> a -> a - * @param {Function} pred A predicate function - * @param {Function} whenTrueFn A function to invoke when the `condition` - * evaluates to a truthy value. - * @param {*} x An object to test with the `pred` function and - * pass to `whenTrueFn` if necessary. - * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`. - * @see R.ifElse, R.unless, R.cond - * @example - * - * // truncate :: String -> String - * const truncate = R.when( - * R.propSatisfies(R.gt(R.__, 10), 'length'), - * R.pipe(R.take(10), R.append('…'), R.join('')) - * ); - * truncate('12345'); //=> '12345' - * truncate('0123456789ABC'); //=> '0123456789…' - */ - - -var when = -/*#__PURE__*/ -_curry3(function when(pred, whenTrueFn, x) { - return pred(x) ? whenTrueFn(x) : x; -}); - -module.exports = when; \ No newline at end of file diff --git a/node_modules/ramda/src/where.js b/node_modules/ramda/src/where.js deleted file mode 100644 index 55bc6b5..0000000 --- a/node_modules/ramda/src/where.js +++ /dev/null @@ -1,57 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var _has = -/*#__PURE__*/ -require("./internal/_has"); -/** - * Takes a spec object and a test object; returns true if the test satisfies - * the spec. Each of the spec's own properties must be a predicate function. - * Each predicate is applied to the value of the corresponding property of the - * test object. `where` returns true if all the predicates return true, false - * otherwise. - * - * `where` is well suited to declaratively expressing constraints for other - * functions such as [`filter`](#filter) and [`find`](#find). - * - * @func - * @memberOf R - * @since v0.1.1 - * @category Object - * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean - * @param {Object} spec - * @param {Object} testObj - * @return {Boolean} - * @see R.propSatisfies, R.whereEq - * @example - * - * // pred :: Object -> Boolean - * const pred = R.where({ - * a: R.equals('foo'), - * b: R.complement(R.equals('bar')), - * x: R.gt(R.__, 10), - * y: R.lt(R.__, 20) - * }); - * - * pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true - * pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false - * pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false - * pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false - * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false - */ - - -var where = -/*#__PURE__*/ -_curry2(function where(spec, testObj) { - for (var prop in spec) { - if (_has(prop, spec) && !spec[prop](testObj[prop])) { - return false; - } - } - - return true; -}); - -module.exports = where; \ No newline at end of file diff --git a/node_modules/ramda/src/whereEq.js b/node_modules/ramda/src/whereEq.js deleted file mode 100644 index b37c5e4..0000000 --- a/node_modules/ramda/src/whereEq.js +++ /dev/null @@ -1,52 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var equals = -/*#__PURE__*/ -require("./equals"); - -var map = -/*#__PURE__*/ -require("./map"); - -var where = -/*#__PURE__*/ -require("./where"); -/** - * Takes a spec object and a test object; returns true if the test satisfies - * the spec, false otherwise. An object satisfies the spec if, for each of the - * spec's own properties, accessing that property of the object gives the same - * value (in [`R.equals`](#equals) terms) as accessing that property of the - * spec. - * - * `whereEq` is a specialization of [`where`](#where). - * - * @func - * @memberOf R - * @since v0.14.0 - * @category Object - * @sig {String: *} -> {String: *} -> Boolean - * @param {Object} spec - * @param {Object} testObj - * @return {Boolean} - * @see R.propEq, R.where - * @example - * - * // pred :: Object -> Boolean - * const pred = R.whereEq({a: 1, b: 2}); - * - * pred({a: 1}); //=> false - * pred({a: 1, b: 2}); //=> true - * pred({a: 1, b: 2, c: 3}); //=> true - * pred({a: 1, b: 1}); //=> false - */ - - -var whereEq = -/*#__PURE__*/ -_curry2(function whereEq(spec, testObj) { - return where(map(equals, spec), testObj); -}); - -module.exports = whereEq; \ No newline at end of file diff --git a/node_modules/ramda/src/without.js b/node_modules/ramda/src/without.js deleted file mode 100644 index fd3102b..0000000 --- a/node_modules/ramda/src/without.js +++ /dev/null @@ -1,43 +0,0 @@ -var _includes = -/*#__PURE__*/ -require("./internal/_includes"); - -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); - -var flip = -/*#__PURE__*/ -require("./flip"); - -var reject = -/*#__PURE__*/ -require("./reject"); -/** - * Returns a new list without values in the first argument. - * [`R.equals`](#equals) is used to determine equality. - * - * Acts as a transducer if a transformer is given in list position. - * - * @func - * @memberOf R - * @since v0.19.0 - * @category List - * @sig [a] -> [a] -> [a] - * @param {Array} list1 The values to be removed from `list2`. - * @param {Array} list2 The array to remove values from. - * @return {Array} The new array without values in `list1`. - * @see R.transduce, R.difference, R.remove - * @example - * - * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4] - */ - - -var without = -/*#__PURE__*/ -_curry2(function (xs, list) { - return reject(flip(_includes)(xs), list); -}); - -module.exports = without; \ No newline at end of file diff --git a/node_modules/ramda/src/xor.js b/node_modules/ramda/src/xor.js deleted file mode 100644 index 8cd01c6..0000000 --- a/node_modules/ramda/src/xor.js +++ /dev/null @@ -1,33 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Exclusive disjunction logical operation. - * Returns `true` if one of the arguments is truthy and the other is falsy. - * Otherwise, it returns `false`. - * - * @func - * @memberOf R - * @since v0.27.1 - * @category Logic - * @sig a -> b -> Boolean - * @param {Any} a - * @param {Any} b - * @return {Boolean} true if one of the arguments is truthy and the other is falsy - * @see R.or, R.and - * @example - * - * R.xor(true, true); //=> false - * R.xor(true, false); //=> true - * R.xor(false, true); //=> true - * R.xor(false, false); //=> false - */ - - -var xor = -/*#__PURE__*/ -_curry2(function xor(a, b) { - return Boolean(!a ^ !b); -}); - -module.exports = xor; \ No newline at end of file diff --git a/node_modules/ramda/src/xprod.js b/node_modules/ramda/src/xprod.js deleted file mode 100644 index ad55d62..0000000 --- a/node_modules/ramda/src/xprod.js +++ /dev/null @@ -1,48 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Creates a new list out of the two supplied by creating each possible pair - * from the lists. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] -> [[a,b]] - * @param {Array} as The first list. - * @param {Array} bs The second list. - * @return {Array} The list made by combining each possible pair from - * `as` and `bs` into pairs (`[a, b]`). - * @example - * - * R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] - * @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]] - */ - - -var xprod = -/*#__PURE__*/ -_curry2(function xprod(a, b) { - // = xprodWith(prepend); (takes about 3 times as long...) - var idx = 0; - var ilen = a.length; - var j; - var jlen = b.length; - var result = []; - - while (idx < ilen) { - j = 0; - - while (j < jlen) { - result[result.length] = [a[idx], b[j]]; - j += 1; - } - - idx += 1; - } - - return result; -}); - -module.exports = xprod; \ No newline at end of file diff --git a/node_modules/ramda/src/zip.js b/node_modules/ramda/src/zip.js deleted file mode 100644 index 9da870c..0000000 --- a/node_modules/ramda/src/zip.js +++ /dev/null @@ -1,40 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Creates a new list out of the two supplied by pairing up equally-positioned - * items from both lists. The returned list is truncated to the length of the - * shorter of the two input lists. - * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`. - * - * @func - * @memberOf R - * @since v0.1.0 - * @category List - * @sig [a] -> [b] -> [[a,b]] - * @param {Array} list1 The first array to consider. - * @param {Array} list2 The second array to consider. - * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`. - * @example - * - * R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']] - * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]] - */ - - -var zip = -/*#__PURE__*/ -_curry2(function zip(a, b) { - var rv = []; - var idx = 0; - var len = Math.min(a.length, b.length); - - while (idx < len) { - rv[idx] = [a[idx], b[idx]]; - idx += 1; - } - - return rv; -}); - -module.exports = zip; \ No newline at end of file diff --git a/node_modules/ramda/src/zipObj.js b/node_modules/ramda/src/zipObj.js deleted file mode 100644 index 071f501..0000000 --- a/node_modules/ramda/src/zipObj.js +++ /dev/null @@ -1,38 +0,0 @@ -var _curry2 = -/*#__PURE__*/ -require("./internal/_curry2"); -/** - * Creates a new object out of a list of keys and a list of values. - * Key/value pairing is truncated to the length of the shorter of the two lists. - * Note: `zipObj` is equivalent to `pipe(zip, fromPairs)`. - * - * @func - * @memberOf R - * @since v0.3.0 - * @category List - * @sig [String] -> [*] -> {String: *} - * @param {Array} keys The array that will be properties on the output object. - * @param {Array} values The list of values on the output object. - * @return {Object} The object made by pairing up same-indexed elements of `keys` and `values`. - * @example - * - * R.zipObj(['a', 'b', 'c'], [1, 2, 3]); //=> {a: 1, b: 2, c: 3} - */ - - -var zipObj = -/*#__PURE__*/ -_curry2(function zipObj(keys, values) { - var idx = 0; - var len = Math.min(keys.length, values.length); - var out = {}; - - while (idx < len) { - out[keys[idx]] = values[idx]; - idx += 1; - } - - return out; -}); - -module.exports = zipObj; \ No newline at end of file diff --git a/node_modules/ramda/src/zipWith.js b/node_modules/ramda/src/zipWith.js deleted file mode 100644 index 3385cca..0000000 --- a/node_modules/ramda/src/zipWith.js +++ /dev/null @@ -1,45 +0,0 @@ -var _curry3 = -/*#__PURE__*/ -require("./internal/_curry3"); -/** - * Creates a new list out of the two supplied by applying the function to each - * equally-positioned pair in the lists. The returned list is truncated to the - * length of the shorter of the two input lists. - * - * @function - * @memberOf R - * @since v0.1.0 - * @category List - * @sig ((a, b) -> c) -> [a] -> [b] -> [c] - * @param {Function} fn The function used to combine the two elements into one value. - * @param {Array} list1 The first array to consider. - * @param {Array} list2 The second array to consider. - * @return {Array} The list made by combining same-indexed elements of `list1` and `list2` - * using `fn`. - * @example - * - * const f = (x, y) => { - * // ... - * }; - * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']); - * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')] - * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)] - */ - - -var zipWith = -/*#__PURE__*/ -_curry3(function zipWith(fn, a, b) { - var rv = []; - var idx = 0; - var len = Math.min(a.length, b.length); - - while (idx < len) { - rv[idx] = fn(a[idx], b[idx]); - idx += 1; - } - - return rv; -}); - -module.exports = zipWith; \ No newline at end of file diff --git a/node_modules/sonic-boom/.travis.yml b/node_modules/sonic-boom/.travis.yml deleted file mode 100644 index 6054234..0000000 --- a/node_modules/sonic-boom/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -sudo: false -node_js: -- '6' -- '8' -- '10' -- '11' -- '12' -- '13' diff --git a/node_modules/sonic-boom/LICENSE b/node_modules/sonic-boom/LICENSE deleted file mode 100644 index eea791d..0000000 --- a/node_modules/sonic-boom/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Matteo Collina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/sonic-boom/README.md b/node_modules/sonic-boom/README.md deleted file mode 100644 index d4cf0e5..0000000 --- a/node_modules/sonic-boom/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# sonic-boom  [![Build Status](https://travis-ci.org/mcollina/sonic-boom.svg?branch=master)](https://travis-ci.org/mcollina/sonic-boom) - -Extremely fast utf8-only stream implementation to write to files and -file descriptors. - -This implementation is partial, but support backpressure and `.pipe()` in is here. -However, it is 2-3x faster than Node Core `fs.createWriteStream()`: - -``` -benchSonic*1000: 2215.220ms -benchSonicSync*1000: 8315.173ms -benchSonic4k*1000: 2184.558ms -benchSonicSync4k*1000: 1733.582ms -benchCore*1000: 6513.752ms -``` - -Note that sync mode without buffering is _slower_ than a Node Core WritableStream, however -this mode matches the expected behavior of `console.log()`. - -Note that if this is used to log to a windows terminal (`cmd.exe` or -powershell), it is needed to run `chcp 65001` in the terminal to -correctly display utf-8 characters, see -[chcp](https://ss64.com/nt/chcp.html) for more details. - -## Install - -``` -npm i sonic-boom -``` - -## Example - -```js -'use strict' - -const SonicBoom = require('sonic-boom') -const sonic = new SonicBoom(process.stdout.fd) // or '/path/to/destination' - -for (var i = 0; i < 10; i++) { - sonic.write('hello sonic\n') -} -``` - -## API - -### SonicBoom(String|Number, [minLength], [sync]) - -Creates a new instance of SonicBoom. - -The first argument can be: - -1. a string that is a path to a file to be written to (mode `'a'`) -2. a file descriptor, something that is returned by `fs.open` or - `fs.openSync`. - -The second argument is the minimum length of the internal buffer that is -required before flushing. - -The third argument is a flag that, when true, causes `SonicBoom` to perform synchronous writes. - -It will emit the `'ready'` event when a file descriptor is available. - -### SonicBoom#write(string) - -Writes the string to the file. -It will return false to signal the producer to slow down. - -### SonicBoom#flush() - -Writes the current buffer to the file if a write was not in progress. -Do nothing if `minLength` is zero or if it is already writing. - -### SonicBoom#reopen([file]) - -Reopen the file in place, useful for log rotation. - -Example: - -```js -const stream = new SonicBoom('./my.log') -process.on('SIGUSR2', function () { - stream.reopen() -}) -``` - -### SonicBoom#flushSync() - -Flushes the buffered data synchronously. This is a costly operation. - -### SonicBoom#end() - -Closes the stream, the data will be flushed down asynchronously - -### SonicBook#destroy() - -Closes the stream immediately, the data is not flushed. - -## License - -MIT diff --git a/node_modules/sonic-boom/bench.js b/node_modules/sonic-boom/bench.js deleted file mode 100644 index 9018466..0000000 --- a/node_modules/sonic-boom/bench.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict' - -var bench = require('fastbench') -var SonicBoom = require('./') -var fs = require('fs') - -var core = fs.createWriteStream('/dev/null') -var fd = fs.openSync('/dev/null', 'w') -var sonic = new SonicBoom(fd) -var sonic4k = new SonicBoom(fd, 4096) -var sonicSync = new SonicBoom(fd, 0, true) -var sonicSync4k = new SonicBoom(fd, 4096, true) - -var MAX = 10000 - -function str () { - var res = '' - - for (var i = 0; i < 10; i++) { - res += 'hello' - } - - return res -} - -setTimeout(doBench, 100) - -var run = bench([ - function benchSonic (cb) { - sonic.once('drain', cb) - for (var i = 0; i < MAX; i++) { - sonic.write(str()) - } - }, - function benchSonicSync (cb) { - sonicSync.once('drain', cb) - for (var i = 0; i < MAX; i++) { - sonicSync.write(str()) - } - }, - function benchSonic4k (cb) { - sonic4k.once('drain', cb) - for (var i = 0; i < MAX; i++) { - sonic4k.write(str()) - } - }, - function benchSonicSync4k (cb) { - sonicSync4k.once('drain', cb) - for (var i = 0; i < MAX; i++) { - sonicSync4k.write(str()) - } - }, - function benchCore (cb) { - core.once('drain', cb) - for (var i = 0; i < MAX; i++) { - core.write(str()) - } - } -], 1000) - -function doBench () { - run(run) -} diff --git a/node_modules/sonic-boom/check.js b/node_modules/sonic-boom/check.js deleted file mode 100644 index 2e554f0..0000000 --- a/node_modules/sonic-boom/check.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict' - -const SonicBoom = require('.') -const sonic = new SonicBoom(process.stdout.fd) - -let count = 0 -function scheduleWrites () { - for (var i = 0; i < 1000; i++) { - sonic.write('hello sonic\n') - console.log('hello console') - } - - if (++count < 10) { - setTimeout(scheduleWrites, 100) - } -} - -scheduleWrites() diff --git a/node_modules/sonic-boom/example.js b/node_modules/sonic-boom/example.js deleted file mode 100644 index fac5cdb..0000000 --- a/node_modules/sonic-boom/example.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict' - -const SonicBoom = require('.') -const sonic = new SonicBoom(process.stdout.fd) // or 'destination' - -for (var i = 0; i < 10; i++) { - sonic.write('hello sonic\n') -} diff --git a/node_modules/sonic-boom/fixtures/firehose.js b/node_modules/sonic-boom/fixtures/firehose.js deleted file mode 100644 index ef698f0..0000000 --- a/node_modules/sonic-boom/fixtures/firehose.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict' - -const SonicBoom = require('..') - -const out = new SonicBoom(process.stdout.fd) -const str = Buffer.alloc(1000).fill('a').toString() - -let i = 0 - -function write () { - if (i++ === 10) { - return - } - - if (out.write(str)) { - write() - } else { - out.once('drain', write) - } -} - -write() diff --git a/node_modules/sonic-boom/index.js b/node_modules/sonic-boom/index.js deleted file mode 100644 index ceff418..0000000 --- a/node_modules/sonic-boom/index.js +++ /dev/null @@ -1,317 +0,0 @@ -'use strict' - -const fs = require('fs') -const EventEmitter = require('events') -const flatstr = require('flatstr') -const inherits = require('util').inherits - -const BUSY_WRITE_TIMEOUT = 100 - -const sleep = require('atomic-sleep') - -// 16 MB - magic number -// This constant ensures that SonicBoom only needs -// 32 MB of free memory to run. In case of having 1GB+ -// of data to write, this prevents an out of memory -// condition. -const MAX_WRITE = 16 * 1024 * 1024 - -function openFile (file, sonic) { - sonic._opening = true - sonic._writing = true - sonic.file = file - fs.open(file, 'a', (err, fd) => { - if (err) { - sonic.emit('error', err) - return - } - - sonic.fd = fd - sonic._reopening = false - sonic._opening = false - sonic._writing = false - - sonic.emit('ready') - - if (sonic._reopening) { - return - } - - // start - var len = sonic._buf.length - if (len > 0 && len > sonic.minLength && !sonic.destroyed) { - actualWrite(sonic) - } - }) -} - -function SonicBoom (fd, minLength, sync) { - if (!(this instanceof SonicBoom)) { - return new SonicBoom(fd, minLength, sync) - } - - this._buf = '' - this.fd = -1 - this._writing = false - this._writingBuf = '' - this._ending = false - this._reopening = false - this._asyncDrainScheduled = false - this.file = null - this.destroyed = false - this.sync = sync || false - - this.minLength = minLength || 0 - - if (typeof fd === 'number') { - this.fd = fd - process.nextTick(() => this.emit('ready')) - } else if (typeof fd === 'string') { - openFile(fd, this) - } else { - throw new Error('SonicBoom supports only file descriptors and files') - } - - this.release = (err, n) => { - if (err) { - if (err.code === 'EAGAIN') { - if (this.sync) { - // This error code should not happen in sync mode, because it is - // not using the underlining operating system asynchronous functions. - // However it happens, and so we handle it. - // Ref: https://github.com/pinojs/pino/issues/783 - try { - sleep(BUSY_WRITE_TIMEOUT) - this.release(undefined, 0) - } catch (err) { - this.release(err) - } - } else { - // Let's give the destination some time to process the chunk. - setTimeout(() => { - fs.write(this.fd, this._writingBuf, 'utf8', this.release) - }, BUSY_WRITE_TIMEOUT) - } - } else { - this.emit('error', err) - } - return - } - - if (this._writingBuf.length !== n) { - this._writingBuf = this._writingBuf.slice(n) - if (this.sync) { - try { - do { - n = fs.writeSync(this.fd, this._writingBuf, 'utf8') - this._writingBuf = this._writingBuf.slice(n) - } while (this._writingBuf.length !== 0) - } catch (err) { - this.release(err) - return - } - } else { - fs.write(this.fd, this._writingBuf, 'utf8', this.release) - return - } - } - - this._writingBuf = '' - - if (this.destroyed) { - return - } - - var len = this._buf.length - if (this._reopening) { - this._writing = false - this._reopening = false - this.reopen() - } else if (len > 0 && len > this.minLength) { - actualWrite(this) - } else if (this._ending) { - if (len > 0) { - actualWrite(this) - } else { - this._writing = false - actualClose(this) - } - } else { - this._writing = false - if (this.sync) { - if (!this._asyncDrainScheduled) { - this._asyncDrainScheduled = true - process.nextTick(emitDrain, this) - } - } else { - this.emit('drain') - } - } - } -} - -function emitDrain (sonic) { - sonic._asyncDrainScheduled = false - sonic.emit('drain') -} - -inherits(SonicBoom, EventEmitter) - -SonicBoom.prototype.write = function (data) { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - this._buf += data - var len = this._buf.length - if (!this._writing && len > this.minLength) { - actualWrite(this) - } - return len < 16384 -} - -SonicBoom.prototype.flush = function () { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this._writing || this.minLength <= 0) { - return - } - - actualWrite(this) -} - -SonicBoom.prototype.reopen = function (file) { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this._opening) { - this.once('ready', () => { - this.reopen(file) - }) - return - } - - if (this._ending) { - return - } - - if (!this.file) { - throw new Error('Unable to reopen a file descriptor, you must pass a file to SonicBoom') - } - - this._reopening = true - - if (this._writing) { - return - } - - fs.close(this.fd, (err) => { - if (err) { - return this.emit('error', err) - } - }) - - openFile(file || this.file, this) -} - -SonicBoom.prototype.end = function () { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this._opening) { - this.once('ready', () => { - this.end() - }) - return - } - - if (this._ending) { - return - } - - this._ending = true - - if (!this._writing && this._buf.length > 0 && this.fd >= 0) { - actualWrite(this) - return - } - - if (this._writing) { - return - } - - actualClose(this) -} - -SonicBoom.prototype.flushSync = function () { - if (this.destroyed) { - throw new Error('SonicBoom destroyed') - } - - if (this.fd < 0) { - throw new Error('sonic boom is not ready yet') - } - - if (this._buf.length > 0) { - fs.writeSync(this.fd, this._buf, 'utf8') - this._buf = '' - } -} - -SonicBoom.prototype.destroy = function () { - if (this.destroyed) { - return - } - actualClose(this) -} - -function actualWrite (sonic) { - sonic._writing = true - var buf = sonic._buf - var release = sonic.release - if (buf.length > MAX_WRITE) { - buf = buf.slice(0, MAX_WRITE) - sonic._buf = sonic._buf.slice(MAX_WRITE) - } else { - sonic._buf = '' - } - flatstr(buf) - sonic._writingBuf = buf - if (sonic.sync) { - try { - var written = fs.writeSync(sonic.fd, buf, 'utf8') - release(null, written) - } catch (err) { - release(err) - } - } else { - fs.write(sonic.fd, buf, 'utf8', release) - } -} - -function actualClose (sonic) { - if (sonic.fd === -1) { - sonic.once('ready', actualClose.bind(null, sonic)) - return - } - // TODO write a test to check if we are not leaking fds - fs.close(sonic.fd, (err) => { - if (err) { - sonic.emit('error', err) - return - } - - if (sonic._ending && !sonic._writing) { - sonic.emit('finish') - } - sonic.emit('close') - }) - sonic.destroyed = true - sonic._buf = '' -} - -module.exports = SonicBoom diff --git a/node_modules/sonic-boom/package.json b/node_modules/sonic-boom/package.json deleted file mode 100644 index 083ee69..0000000 --- a/node_modules/sonic-boom/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "sonic-boom@^0.7.5", - "_id": "sonic-boom@0.7.7", - "_inBundle": false, - "_integrity": "sha512-Ei5YOo5J64GKClHIL/5evJPgASXFVpfVYbJV9PILZQytTK6/LCwHvsZJW2Ig4p9FMC2OrBrMnXKgRN/OEoAWfg==", - "_location": "/sonic-boom", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "sonic-boom@^0.7.5", - "name": "sonic-boom", - "escapedName": "sonic-boom", - "rawSpec": "^0.7.5", - "saveSpec": null, - "fetchSpec": "^0.7.5" - }, - "_requiredBy": [ - "/pino" - ], - "_resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.7.tgz", - "_shasum": "d921de887428208bfa07b0ae32c278de043f350a", - "_spec": "sonic-boom@^0.7.5", - "_where": "/home/dawidd6/github/dawidd6/action-debian-package/node_modules/pino", - "author": { - "name": "Matteo Collina", - "email": "hello@matteocollina.com" - }, - "bugs": { - "url": "https://github.com/mcollina/sonic-boom/issues" - }, - "bundleDependencies": false, - "dependencies": { - "atomic-sleep": "^1.0.0", - "flatstr": "^1.0.12" - }, - "deprecated": false, - "description": "Extremely fast utf8 only stream implementation", - "devDependencies": { - "fastbench": "^1.0.1", - "pre-commit": "^1.2.2", - "proxyquire": "^2.1.0", - "standard": "^13.0.2", - "tap": "^12.1.0" - }, - "homepage": "https://github.com/mcollina/sonic-boom#readme", - "keywords": [ - "stream", - "fs", - "net", - "fd", - "file", - "descriptor", - "fast" - ], - "license": "MIT", - "main": "index.js", - "name": "sonic-boom", - "repository": { - "type": "git", - "url": "git+https://github.com/mcollina/sonic-boom.git" - }, - "scripts": { - "test": "standard && tap --no-esm -t 120 test.js" - }, - "version": "0.7.7" -} diff --git a/node_modules/sonic-boom/test.js b/node_modules/sonic-boom/test.js deleted file mode 100644 index 112ef57..0000000 --- a/node_modules/sonic-boom/test.js +++ /dev/null @@ -1,762 +0,0 @@ -'use strict' - -const { test, tearDown } = require('tap') -const { join } = require('path') -const { fork } = require('child_process') -const fs = require('fs') -const os = require('os') -const path = require('path') -const proxyquire = require('proxyquire') -const SonicBoom = require('.') - -const files = [] -var count = 0 - -function file () { - const file = path.join(os.tmpdir(), `sonic-boom-${process.pid}-${process.hrtime().toString()}-${count++}`) - files.push(file) - return file -} - -tearDown(() => { - files.forEach((file) => { - try { - fs.unlinkSync(file) - } catch (e) { - console.log(e) - } - }) -}) - -test('sync false', (t) => { - buildTests(t.test, false) - t.end() -}) - -test('sync true', (t) => { - buildTests(t.test, true) - t.end() -}) - -function buildTests (test, sync) { - test('write things to a file descriptor', (t) => { - t.plan(6) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 0, sync) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('write things in a streaming fashion', (t) => { - t.plan(8) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 0, sync) - - t.ok(stream.write('hello world\n')) - - stream.once('drain', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\n') - t.ok(stream.write('something else\n')) - }) - - stream.once('drain', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - stream.end() - }) - }) - }) - - stream.on('finish', () => { - t.pass('finish emitted') - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('can be piped into', (t) => { - t.plan(4) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 0, sync) - const source = fs.createReadStream(__filename) - - source.pipe(stream) - - stream.on('finish', () => { - fs.readFile(__filename, 'utf8', (err, expected) => { - t.error(err) - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, expected) - }) - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('write things to a file', (t) => { - t.plan(6) - - const dest = file() - const stream = new SonicBoom(dest, 0, sync) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('flushSync', (t) => { - t.plan(4) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 4096, sync) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.flushSync() - - // let the file system settle down things - setImmediate(function () { - stream.end() - const data = fs.readFileSync(dest, 'utf8') - t.equal(data, 'hello world\nsomething else\n') - - stream.on('close', () => { - t.pass('close emitted') - }) - }) - }) - - test('destroy', (t) => { - t.plan(5) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 0, sync) - - t.ok(stream.write('hello world\n')) - stream.destroy() - t.throws(() => { stream.write('hello world\n') }) - - fs.readFile(dest, 'utf8', function (err, data) { - t.error(err) - t.equal(data, 'hello world\n') - }) - - stream.on('finish', () => { - t.fail('finish emitted') - }) - - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('destroy while opening', (t) => { - t.plan(1) - - const dest = file() - const stream = new SonicBoom(dest) - - stream.destroy() - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('minLength', (t) => { - t.plan(8) - - const dest = file() - const stream = new SonicBoom(dest, 4096, sync) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - var fail = t.fail - stream.on('drain', fail) - - // bad use of timer - // TODO refactor - setTimeout(function () { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, '') - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - }) - }, 100) - - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('flush', (t) => { - t.plan(5) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 4096, sync) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.flush() - - stream.on('drain', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - stream.end() - }) - }) - }) - - test('reopen', (t) => { - t.plan(9) - - const dest = file() - const stream = new SonicBoom(dest, 0, sync) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - const after = dest + '-moved' - - stream.once('drain', () => { - t.pass('drain emitted') - - fs.renameSync(dest, after) - stream.reopen() - - stream.once('ready', () => { - t.pass('ready emitted') - t.ok(stream.write('after reopen\n')) - - stream.on('drain', () => { - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'after reopen\n') - stream.end() - }) - }) - }) - }) - }) - }) - - test('reopen with buffer', (t) => { - t.plan(9) - - const dest = file() - const stream = new SonicBoom(dest, 4096, sync) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - const after = dest + '-moved' - - stream.once('ready', () => { - t.pass('drain emitted') - - stream.flush() - fs.renameSync(dest, after) - stream.reopen() - - stream.once('ready', () => { - t.pass('ready emitted') - t.ok(stream.write('after reopen\n')) - stream.flush() - - stream.on('drain', () => { - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'after reopen\n') - stream.end() - }) - }) - }) - }) - }) - }) - - test('reopen if not open', (t) => { - t.plan(3) - - const dest = file() - const stream = new SonicBoom(dest, 0, sync) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.reopen() - - stream.end() - stream.on('close', function () { - t.pass('ended') - }) - }) - - test('end after reopen', (t) => { - t.plan(4) - - const dest = file() - const stream = new SonicBoom(dest, 4096, sync) - - stream.once('ready', () => { - t.pass('ready emitted') - const after = dest + '-moved' - stream.reopen(after) - stream.write('after reopen\n') - stream.on('finish', () => { - t.pass('finish emitted') - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'after reopen\n') - }) - }) - stream.end() - }) - }) - - test('end after 2x reopen', (t) => { - t.plan(4) - - const dest = file() - const stream = new SonicBoom(dest, 4096, sync) - - stream.once('ready', () => { - t.pass('ready emitted') - stream.reopen(dest + '-moved') - const after = dest + '-moved-moved' - stream.reopen(after) - stream.write('after reopen\n') - stream.on('finish', () => { - t.pass('finish emitted') - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'after reopen\n') - }) - }) - stream.end() - }) - }) - - test('end if not ready', (t) => { - t.plan(3) - - const dest = file() - const stream = new SonicBoom(dest, 4096, sync) - const after = dest + '-moved' - stream.reopen(after) - stream.write('after reopen\n') - stream.on('finish', () => { - t.pass('finish emitted') - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'after reopen\n') - }) - }) - stream.end() - }) - - test('reopen with file', (t) => { - t.plan(9) - - const dest = file() - const stream = new SonicBoom(dest, 0, sync) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - const after = dest + '-new' - - stream.once('drain', () => { - t.pass('drain emitted') - - stream.reopen(after) - - stream.once('ready', () => { - t.pass('ready emitted') - t.ok(stream.write('after reopen\n')) - - stream.on('drain', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - fs.readFile(after, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'after reopen\n') - stream.end() - }) - }) - }) - }) - }) - }) - - test('chunk data accordingly', (t) => { - t.plan(2) - - const child = fork(join(__dirname, 'fixtures', 'firehose.js'), { silent: true }) - const str = Buffer.alloc(10000).fill('a').toString() - - let data = '' - - child.stdout.on('data', function (chunk) { - data += chunk.toString() - }) - - child.stdout.on('end', function () { - t.is(data, str) - }) - - child.on('close', function (code) { - t.is(code, 0) - }) - }) -} - -test('retry on EAGAIN', (t) => { - t.plan(7) - - const fakeFs = Object.create(fs) - fakeFs.write = function (fd, buf, enc, cb) { - t.pass('fake fs.write called') - fakeFs.write = fs.write - const err = new Error('EAGAIN') - err.code = 'EAGAIN' - process.nextTick(cb, err) - } - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 0, false) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) -}) - -test('retry on EAGAIN (sync)', (t) => { - t.plan(7) - - const fakeFs = Object.create(fs) - fakeFs.writeSync = function (fd, buf, enc, cb) { - t.pass('fake fs.writeSync called') - fakeFs.writeSync = fs.writeSync - const err = new Error('EAGAIN') - err.code = 'EAGAIN' - throw err - } - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 0, true) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) -}) - -test('write buffers that are not totally written', (t) => { - t.plan(9) - - const fakeFs = Object.create(fs) - fakeFs.write = function (fd, buf, enc, cb) { - t.pass('fake fs.write called') - fakeFs.write = function (fd, buf, enc, cb) { - t.pass('calling real fs.write, ' + buf) - fs.write(fd, buf, enc, cb) - } - process.nextTick(cb, null, 0) - } - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 0, false) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) -}) - -test('write buffers that are not totally written with sync mode', (t) => { - t.plan(9) - - const fakeFs = Object.create(fs) - fakeFs.writeSync = function (fd, buf, enc) { - t.pass('fake fs.write called') - fakeFs.writeSync = (fd, buf, enc) => { - t.pass('calling real fs.writeSync, ' + buf) - return fs.writeSync(fd, buf, enc) - } - return 0 - } - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 0, true) - - stream.on('ready', () => { - t.pass('ready emitted') - }) - - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - stream.end() - - stream.on('finish', () => { - fs.readFile(dest, 'utf8', (err, data) => { - t.error(err) - t.equal(data, 'hello world\nsomething else\n') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) -}) - -test('sync writing is fully sync', (t) => { - t.plan(6) - - const fakeFs = Object.create(fs) - fakeFs.writeSync = function (fd, buf, enc, cb) { - t.pass('fake fs.write called') - return fs.writeSync(fd, buf, enc) - } - const SonicBoom = proxyquire('.', { - fs: fakeFs - }) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 0, true) - t.ok(stream.write('hello world\n')) - t.ok(stream.write('something else\n')) - - // 'drain' will be only emitted once, - // the number of assertions at the top check this. - stream.on('drain', () => { - t.pass('drain emitted') - }) - - const data = fs.readFileSync(dest, 'utf8') - t.equal(data, 'hello world\nsomething else\n') -}) - -// These they will fail on Node 6, as we cannot allocate a string this -// big. It's considered a won't fix on Node 6, as it's deprecated. -if (process.versions.node.indexOf('6.') !== 0) { - test('write enormously large buffers async', (t) => { - t.plan(3) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 0, false) - - const buf = Buffer.alloc(1024).fill('x').toString() // 1 MB - let length = 0 - - for (let i = 0; i < 1024 * 1024; i++) { - length += buf.length - stream.write(buf) - } - - stream.end() - - stream.on('finish', () => { - fs.stat(dest, (err, stat) => { - t.error(err) - t.equal(stat.size, length) - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }) - - test('write enormously large buffers sync', (t) => { - t.plan(3) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 0, true) - - const buf = Buffer.alloc(1024).fill('x').toString() // 1 MB - let length = 0 - - for (let i = 0; i < 1024 * 1024; i++) { - length += buf.length - stream.write(buf) - } - - stream.end() - - stream.on('finish', () => { - fs.stat(dest, (err, stat) => { - t.error(err) - t.equal(stat.size, length) - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) - }) -} - -test('write enormously large buffers sync with utf8 multi-byte split', (t) => { - t.plan(4) - - const dest = file() - const fd = fs.openSync(dest, 'w') - const stream = new SonicBoom(fd, 0, true) - - let buf = Buffer.alloc((1024 * 16) - 2).fill('x') // 16MB - 3B - const length = buf.length + 4 - buf = buf.toString() + '🌲' // 16 MB + 1B - - stream.write(buf) - - stream.end() - - stream.on('finish', () => { - fs.stat(dest, (err, stat) => { - t.error(err) - t.equal(stat.size, length) - const char = Buffer.alloc(4) - const fd = fs.openSync(dest, 'r') - fs.readSync(fd, char, 0, 4, length - 4) - t.equal(char.toString(), '🌲') - }) - }) - stream.on('close', () => { - t.pass('close emitted') - }) -}) diff --git a/node_modules/tunnel/.travis.yml b/node_modules/tunnel/.travis.yml new file mode 100644 index 0000000..cb6e182 --- /dev/null +++ b/node_modules/tunnel/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "4" + - "6" + - "8" + - "10" diff --git a/node_modules/tunnel/CHANGELOG.md b/node_modules/tunnel/CHANGELOG.md new file mode 100644 index 0000000..baf6b18 --- /dev/null +++ b/node_modules/tunnel/CHANGELOG.md @@ -0,0 +1,22 @@ +# Changelog + + - 0.0.6 (2018/09/11) + - Fix `localAddress` not working (#25) + - Fix `Host:` header for CONNECT method by @tmurakam (#29, #30) + - Fix default port for https (#32) + - Fix error handling when the proxy send illegal response body (#33) + + - 0.0.5 (2017/06/12) + - Fix socket leak. + + - 0.0.4 (2016/01/23) + - supported Node v0.12 or later. + + - 0.0.3 (2014/01/20) + - fixed package.json + + - 0.0.1 (2012/02/18) + - supported Node v0.6.x (0.6.11 or later). + + - 0.0.0 (2012/02/11) + - first release. diff --git a/node_modules/ramda/LICENSE.txt b/node_modules/tunnel/LICENSE similarity index 94% rename from node_modules/ramda/LICENSE.txt rename to node_modules/tunnel/LICENSE index 7eb3353..8b8a895 100644 --- a/node_modules/ramda/LICENSE.txt +++ b/node_modules/tunnel/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013-2018 Scott Sauyet and Michael Hurley +Copyright (c) 2012 Koichi Kobayashi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/node_modules/tunnel/README.md b/node_modules/tunnel/README.md new file mode 100644 index 0000000..f54bca5 --- /dev/null +++ b/node_modules/tunnel/README.md @@ -0,0 +1,185 @@ +# node-tunnel - HTTP/HTTPS Agents for tunneling proxies + +[![Build Status](https://img.shields.io/travis/koichik/node-tunnel.svg?style=flat)](https://travis-ci.org/koichik/node-tunnel) +[![Dependency Status](http://img.shields.io/david/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=dependencies) +[![DevDependency Status](http://img.shields.io/david/dev/koichik/node-tunnel.svg?style=flat)](https://david-dm.org/koichik/node-tunnel#info=devDependencies) + +## Example + +```javascript +var tunnel = require('tunnel'); + +var tunnelingAgent = tunnel.httpsOverHttp({ + proxy: { + host: 'localhost', + port: 3128 + } +}); + +var req = https.request({ + host: 'example.com', + port: 443, + agent: tunnelingAgent +}); +``` + +## Installation + + $ npm install tunnel + +## Usages + +### HTTP over HTTP tunneling + +```javascript +var tunnelingAgent = tunnel.httpOverHttp({ + maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets + + proxy: { // Proxy settings + host: proxyHost, // Defaults to 'localhost' + port: proxyPort, // Defaults to 80 + localAddress: localAddress, // Local interface if necessary + + // Basic authorization for proxy server if necessary + proxyAuth: 'user:password', + + // Header fields for proxy server if necessary + headers: { + 'User-Agent': 'Node' + } + } +}); + +var req = http.request({ + host: 'example.com', + port: 80, + agent: tunnelingAgent +}); +``` + +### HTTPS over HTTP tunneling + +```javascript +var tunnelingAgent = tunnel.httpsOverHttp({ + maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets + + // CA for origin server if necessary + ca: [ fs.readFileSync('origin-server-ca.pem')], + + // Client certification for origin server if necessary + key: fs.readFileSync('origin-server-key.pem'), + cert: fs.readFileSync('origin-server-cert.pem'), + + proxy: { // Proxy settings + host: proxyHost, // Defaults to 'localhost' + port: proxyPort, // Defaults to 80 + localAddress: localAddress, // Local interface if necessary + + // Basic authorization for proxy server if necessary + proxyAuth: 'user:password', + + // Header fields for proxy server if necessary + headers: { + 'User-Agent': 'Node' + }, + } +}); + +var req = https.request({ + host: 'example.com', + port: 443, + agent: tunnelingAgent +}); +``` + +### HTTP over HTTPS tunneling + +```javascript +var tunnelingAgent = tunnel.httpOverHttps({ + maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets + + proxy: { // Proxy settings + host: proxyHost, // Defaults to 'localhost' + port: proxyPort, // Defaults to 443 + localAddress: localAddress, // Local interface if necessary + + // Basic authorization for proxy server if necessary + proxyAuth: 'user:password', + + // Header fields for proxy server if necessary + headers: { + 'User-Agent': 'Node' + }, + + // CA for proxy server if necessary + ca: [ fs.readFileSync('origin-server-ca.pem')], + + // Server name for verification if necessary + servername: 'example.com', + + // Client certification for proxy server if necessary + key: fs.readFileSync('origin-server-key.pem'), + cert: fs.readFileSync('origin-server-cert.pem'), + } +}); + +var req = http.request({ + host: 'example.com', + port: 80, + agent: tunnelingAgent +}); +``` + +### HTTPS over HTTPS tunneling + +```javascript +var tunnelingAgent = tunnel.httpsOverHttps({ + maxSockets: poolSize, // Defaults to http.Agent.defaultMaxSockets + + // CA for origin server if necessary + ca: [ fs.readFileSync('origin-server-ca.pem')], + + // Client certification for origin server if necessary + key: fs.readFileSync('origin-server-key.pem'), + cert: fs.readFileSync('origin-server-cert.pem'), + + proxy: { // Proxy settings + host: proxyHost, // Defaults to 'localhost' + port: proxyPort, // Defaults to 443 + localAddress: localAddress, // Local interface if necessary + + // Basic authorization for proxy server if necessary + proxyAuth: 'user:password', + + // Header fields for proxy server if necessary + headers: { + 'User-Agent': 'Node' + } + + // CA for proxy server if necessary + ca: [ fs.readFileSync('origin-server-ca.pem')], + + // Server name for verification if necessary + servername: 'example.com', + + // Client certification for proxy server if necessary + key: fs.readFileSync('origin-server-key.pem'), + cert: fs.readFileSync('origin-server-cert.pem'), + } +}); + +var req = https.request({ + host: 'example.com', + port: 443, + agent: tunnelingAgent +}); +``` + +## CONTRIBUTORS +* [Aleksis Brezas (abresas)](https://github.com/abresas) +* [Jackson Tian (JacksonTian)](https://github.com/JacksonTian) +* [Dmitry Sorin (1999)](https://github.com/1999) + +## License + +Licensed under the [MIT](https://github.com/koichik/node-tunnel/blob/master/LICENSE) license. diff --git a/node_modules/tunnel/index.js b/node_modules/tunnel/index.js new file mode 100644 index 0000000..2947757 --- /dev/null +++ b/node_modules/tunnel/index.js @@ -0,0 +1 @@ +module.exports = require('./lib/tunnel'); diff --git a/node_modules/tunnel/lib/tunnel.js b/node_modules/tunnel/lib/tunnel.js new file mode 100644 index 0000000..10cc382 --- /dev/null +++ b/node_modules/tunnel/lib/tunnel.js @@ -0,0 +1,264 @@ +'use strict'; + +var net = require('net'); +var tls = require('tls'); +var http = require('http'); +var https = require('https'); +var events = require('events'); +var assert = require('assert'); +var util = require('util'); + + +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + + +function TunnelingAgent(options) { + var self = this; + self.options = options || {}; + self.proxyOptions = self.options.proxy || {}; + self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets; + self.requests = []; + self.sockets = []; + + self.on('free', function onFree(socket, host, port, localAddress) { + var options = toOptions(host, port, localAddress); + for (var i = 0, len = self.requests.length; i < len; ++i) { + var pending = self.requests[i]; + if (pending.host === options.host && pending.port === options.port) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); +} +util.inherits(TunnelingAgent, events.EventEmitter); + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } + + // If we are under maxSockets create a new one. + self.createSocket(options, function(socket) { + socket.on('free', onFree); + socket.on('close', onCloseOrRemove); + socket.on('agentRemove', onCloseOrRemove); + req.onSocket(socket); + + function onFree() { + self.emit('free', socket, options); + } + + function onCloseOrRemove(err) { + self.removeSocket(socket); + socket.removeListener('free', onFree); + socket.removeListener('close', onCloseOrRemove); + socket.removeListener('agentRemove', onCloseOrRemove); + } + }); +}; + +TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { + var self = this; + var placeholder = {}; + self.sockets.push(placeholder); + + var connectOptions = mergeOptions({}, self.proxyOptions, { + method: 'CONNECT', + path: options.host + ':' + options.port, + agent: false, + headers: { + host: options.host + ':' + options.port + } + }); + if (options.localAddress) { + connectOptions.localAddress = options.localAddress; + } + if (connectOptions.proxyAuth) { + connectOptions.headers = connectOptions.headers || {}; + connectOptions.headers['Proxy-Authorization'] = 'Basic ' + + new Buffer(connectOptions.proxyAuth).toString('base64'); + } + + debug('making CONNECT request'); + var connectReq = self.request(connectOptions); + connectReq.useChunkedEncodingByDefault = false; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + + function onUpgrade(res, socket, head) { + // Hacky. + process.nextTick(function() { + onConnect(res, socket, head); + }); + } + + function onConnect(res, socket, head) { + connectReq.removeAllListeners(); + socket.removeAllListeners(); + + if (res.statusCode !== 200) { + debug('tunneling socket could not be established, statusCode=%d', + res.statusCode); + socket.destroy(); + var error = new Error('tunneling socket could not be established, ' + + 'statusCode=' + res.statusCode); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + if (head.length > 0) { + debug('got illegal response body from proxy'); + socket.destroy(); + var error = new Error('got illegal response body from proxy'); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + return; + } + debug('tunneling connection has established'); + self.sockets[self.sockets.indexOf(placeholder)] = socket; + return cb(socket); + } + + function onError(cause) { + connectReq.removeAllListeners(); + + debug('tunneling socket could not be established, cause=%s\n', + cause.message, cause.stack); + var error = new Error('tunneling socket could not be established, ' + + 'cause=' + cause.message); + error.code = 'ECONNRESET'; + options.request.emit('error', error); + self.removeSocket(placeholder); + } +}; + +TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { + var pos = this.sockets.indexOf(socket) + if (pos === -1) { + return; + } + this.sockets.splice(pos, 1); + + var pending = this.requests.shift(); + if (pending) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); + } +}; + +function createSecureSocket(options, cb) { + var self = this; + TunnelingAgent.prototype.createSocket.call(self, options, function(socket) { + var hostHeader = options.request.getHeader('host'); + var tlsOptions = mergeOptions({}, self.options, { + socket: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); + + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} + + +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} + +function mergeOptions(target) { + for (var i = 1, len = arguments.length; i < len; ++i) { + var overrides = arguments[i]; + if (typeof overrides === 'object') { + var keys = Object.keys(overrides); + for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { + var k = keys[j]; + if (overrides[k] !== undefined) { + target[k] = overrides[k]; + } + } + } + } + return target; +} + + +var debug; +if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { + debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === 'string') { + args[0] = 'TUNNEL: ' + args[0]; + } else { + args.unshift('TUNNEL:'); + } + console.error.apply(console, args); + } +} else { + debug = function() {}; +} +exports.debug = debug; // for test diff --git a/node_modules/tunnel/package.json b/node_modules/tunnel/package.json new file mode 100644 index 0000000..bcd7b95 --- /dev/null +++ b/node_modules/tunnel/package.json @@ -0,0 +1,34 @@ +{ + "name": "tunnel", + "version": "0.0.6", + "description": "Node HTTP/HTTPS Agents for tunneling proxies", + "keywords": [ + "http", + "https", + "agent", + "proxy", + "tunnel" + ], + "homepage": "https://github.com/koichik/node-tunnel/", + "bugs": "https://github.com/koichik/node-tunnel/issues", + "license": "MIT", + "author": "Koichi Kobayashi ", + "main": "./index.js", + "directories": { + "lib": "./lib" + }, + "repository": { + "type": "git", + "url": "https://github.com/koichik/node-tunnel.git" + }, + "scripts": { + "test": "mocha" + }, + "devDependencies": { + "mocha": "^5.2.0", + "should": "^13.2.3" + }, + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } +} diff --git a/node_modules/uuid/CHANGELOG.md b/node_modules/uuid/CHANGELOG.md new file mode 100644 index 0000000..7519d19 --- /dev/null +++ b/node_modules/uuid/CHANGELOG.md @@ -0,0 +1,229 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08) + +### Bug Fixes + +- lazy load getRandomValues ([#537](https://github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#536](https://github.com/uuidjs/uuid/issues/536) + +### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04) + +### Bug Fixes + +- support expo>=39.0.0 ([#515](https://github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#375](https://github.com/uuidjs/uuid/issues/375) + +## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27) + +### Features + +- add parse/stringify/validate/version/NIL APIs ([#479](https://github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)), closes [#475](https://github.com/uuidjs/uuid/issues/475) [#478](https://github.com/uuidjs/uuid/issues/478) [#480](https://github.com/uuidjs/uuid/issues/480) [#481](https://github.com/uuidjs/uuid/issues/481) [#180](https://github.com/uuidjs/uuid/issues/180) + +## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23) + +### Features + +- improve performance of v1 string representation ([#453](https://github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5)) +- remove deprecated v4 string parameter ([#454](https://github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)), closes [#437](https://github.com/uuidjs/uuid/issues/437) +- support jspm ([#473](https://github.com/uuidjs/uuid/issues/473)) ([e9f2587](https://github.com/uuidjs/uuid/commit/e9f2587a92575cac31bc1d4ae944e17c09756659)) + +### Bug Fixes + +- prepare package exports for webpack 5 ([#468](https://github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8)) + +## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20) + +### Features + +- improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d)) +- optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2)) + +### Bug Fixes + +- export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [ai/nanoevents#44](https://github.com/ai/nanoevents/issues/44#issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444) + +## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29) + +### ⚠ BREAKING CHANGES + +- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export. + + ```diff + -import uuid from 'uuid'; + -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869' + +import { v4 as uuidv4 } from 'uuid'; + +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' + ``` + +- Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported. + + Instead use the named exports that this module exports. + + For ECMAScript Modules (ESM): + + ```diff + -import uuidv4 from 'uuid/v4'; + +import { v4 as uuidv4 } from 'uuid'; + uuidv4(); + ``` + + For CommonJS: + + ```diff + -const uuidv4 = require('uuid/v4'); + +const { v4: uuidv4 } = require('uuid'); + uuidv4(); + ``` + +### Features + +- native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342) +- remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba)) + +### Bug Fixes + +- add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0)) + +### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31) + +### Bug Fixes + +- make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408) + +### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04) + +### Bug Fixes + +- make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c)) +- simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7)) +- update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4)) + +### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25) + +### Bug Fixes + +- clean up esm builds for node and browser ([#383](https://github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc)) +- provide browser versions independent from module system ([#380](https://github.com/uuidjs/uuid/issues/380)) ([4344a22](https://github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#378](https://github.com/uuidjs/uuid/issues/378) + +## [7.0.0](https://github.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) (2020-02-24) + +### ⚠ BREAKING CHANGES + +- The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed. +- Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants. +- Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function. +- Remove support for generating v3 and v5 UUIDs in Node.js<4.x +- Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers. + +### Features + +- add UMD build to npm package ([#357](https://github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#345](https://github.com/uuidjs/uuid/issues/345) +- add various es module and CommonJS examples ([b238510](https://github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555)) +- ensure that docs are up-to-date in CI ([ee5e77d](https://github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b)) +- hybrid CommonJS & ECMAScript modules build ([a3f078f](https://github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0)) +- remove insecure fallback random number generator ([3a5842b](https://github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#173](https://github.com/uuidjs/uuid/issues/173) +- remove support for pre Node.js v4 Buffer API ([#356](https://github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627)) +- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([c37a518](https://github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +### Bug Fixes + +- add deep-require proxies for local testing and adjust tests ([#365](https://github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48)) +- add note about removal of default export ([#372](https://github.com/uuidjs/uuid/issues/372)) ([12749b7](https://github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#370](https://github.com/uuidjs/uuid/issues/370) +- deprecated deep requiring of the different algorithm versions ([#361](https://github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23)) + +## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) + +### Features + +- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) + +## [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) + +### Bug Fixes + +- no longer run ci tests on node v4 +- upgrade dependencies + +## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) + +### Bug Fixes + +- typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) + +## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) + +### Bug Fixes + +- fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) + +# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) + +### Bug Fixes + +- assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) +- fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) +- Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) +- mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) + +### Features + +- enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) + +## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) + +### Bug Fixes + +- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + +# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) + +### Bug Fixes + +- remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) +- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) + +### Features + +- Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) + +# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) + +### Bug Fixes + +- (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) +- Fix typo (#178) +- Simple typo fix (#165) + +### Features + +- v5 support in CLI (#197) +- V5 support (#188) + +# 3.0.1 (2016-11-28) + +- split uuid versions into separate files + +# 3.0.0 (2016-11-17) + +- remove .parse and .unparse + +# 2.0.0 + +- Removed uuid.BufferClass + +# 1.4.0 + +- Improved module context detection +- Removed public RNG functions + +# 1.3.2 + +- Improve tests and handling of v1() options (Issue #24) +- Expose RNG option to allow for perf testing with different generators + +# 1.3.0 + +- Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! +- Support for node.js crypto API +- De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/node_modules/uuid/CONTRIBUTING.md b/node_modules/uuid/CONTRIBUTING.md new file mode 100644 index 0000000..4a4503d --- /dev/null +++ b/node_modules/uuid/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing + +Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library! + +## Testing + +```shell +npm test +``` + +## Releasing + +Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version): + +```shell +npm run release -- --dry-run # verify output manually +npm run release # follow the instructions from the output of this command +``` diff --git a/node_modules/quick-lru/license b/node_modules/uuid/LICENSE.md similarity index 92% rename from node_modules/quick-lru/license rename to node_modules/uuid/LICENSE.md index e7af2f7..3934168 100644 --- a/node_modules/quick-lru/license +++ b/node_modules/uuid/LICENSE.md @@ -1,6 +1,6 @@ -MIT License +The MIT License (MIT) -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) 2010-2020 Robert Kieffer and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/node_modules/uuid/README.md b/node_modules/uuid/README.md new file mode 100644 index 0000000..ed27e57 --- /dev/null +++ b/node_modules/uuid/README.md @@ -0,0 +1,505 @@ + + +# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser) + +For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs + +- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs +- **Cross-platform** - Support for ... + - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds) + - Node 8, 10, 12, 14 + - Chrome, Safari, Firefox, Edge, IE 11 browsers + - Webpack and rollup.js module bundlers + - [React Native / Expo](#react-native--expo) +- **Secure** - Cryptographically-strong random values +- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers +- **CLI** - Includes the [`uuid` command line](#command-line) utility + +**Upgrading from `uuid@3.x`?** Your code is probably okay, but check out [Upgrading From `uuid@3.x`](#upgrading-from-uuid3x) for details. + +## Quickstart + +To create a random UUID... + +**1. Install** + +```shell +npm install uuid +``` + +**2. Create a UUID** (ES6 module syntax) + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' +``` + +... or using CommonJS syntax: + +```javascript +const { v4: uuidv4 } = require('uuid'); +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' +``` + +For timestamp UUIDs, namespace UUIDs, and other options read on ... + +## API Summary + +| | | | +| --- | --- | --- | +| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` | +| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` | +| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` | +| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | | +| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | | +| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | | +| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | | +| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` | +| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` | + +## API + +### uuid.NIL + +The nil UUID string (all zeros). + +Example: + +```javascript +import { NIL as NIL_UUID } from 'uuid'; + +NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000' +``` + +### uuid.parse(str) + +Convert UUID string to array of bytes + +| | | +| --------- | ---------------------------------------- | +| `str` | A valid UUID `String` | +| _returns_ | `Uint8Array[16]` | +| _throws_ | `TypeError` if `str` is not a valid UUID | + +Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. + +Example: + +```javascript +import { parse as uuidParse } from 'uuid'; + +// Parse a UUID +const bytes = uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); + +// Convert to hex strings to show byte order (for documentation purposes) +[...bytes].map((v) => v.toString(16).padStart(2, '0')); // ⇨ + // [ + // '6e', 'c0', 'bd', '7f', + // '11', 'c0', '43', 'da', + // '97', '5e', '2a', '8a', + // 'd9', 'eb', 'ae', '0b' + // ] +``` + +### uuid.stringify(arr[, offset]) + +Convert array of bytes to UUID string + +| | | +| -------------- | ---------------------------------------------------------------------------- | +| `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. | +| [`offset` = 0] | `Number` Starting index in the Array | +| _returns_ | `String` | +| _throws_ | `TypeError` if a valid UUID string cannot be generated | + +Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. + +Example: + +```javascript +import { stringify as uuidStringify } from 'uuid'; + +const uuidBytes = [ + 0x6e, + 0xc0, + 0xbd, + 0x7f, + 0x11, + 0xc0, + 0x43, + 0xda, + 0x97, + 0x5e, + 0x2a, + 0x8a, + 0xd9, + 0xeb, + 0xae, + 0x0b, +]; + +uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b' +``` + +### uuid.v1([options[, buffer[, offset]]]) + +Create an RFC version 1 (timestamp) UUID + +| | | +| --- | --- | +| [`options`] | `Object` with one or more of the following properties: | +| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) | +| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff | +| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | +| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanseconds to add to `msecs`, should be 0-10,000) | +| [`options.random`] | `Array` of 16 random bytes (0-255) | +| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | +| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | +| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | +| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | +| _throws_ | `Error` if more than 10M UUIDs/sec are requested | + +Note: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process. + +Note: `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields. + +Example: + +```javascript +import { v1 as uuidv1 } from 'uuid'; + +uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' +``` + +Example using `options`: + +```javascript +import { v1 as uuidv1 } from 'uuid'; + +const v1options = { + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678, +}; +uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' +``` + +### uuid.v3(name, namespace[, buffer[, offset]]) + +Create an RFC version 3 (namespace w/ MD5) UUID + +API is identical to `v5()`, but uses "v3" instead. + +⚠️ Note: Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_." + +### uuid.v4([options[, buffer[, offset]]]) + +Create an RFC version 4 (random) UUID + +| | | +| --- | --- | +| [`options`] | `Object` with one or more of the following properties: | +| [`options.random`] | `Array` of 16 random bytes (0-255) | +| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | +| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | +| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | +| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | + +Example: + +```javascript +import { v4 as uuidv4 } from 'uuid'; + +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' +``` + +Example using predefined `random` values: + +```javascript +import { v4 as uuidv4 } from 'uuid'; + +const v4options = { + random: [ + 0x10, + 0x91, + 0x56, + 0xbe, + 0xc4, + 0xfb, + 0xc1, + 0xea, + 0x71, + 0xb4, + 0xef, + 0xe1, + 0x67, + 0x1c, + 0x58, + 0x36, + ], +}; +uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' +``` + +### uuid.v5(name, namespace[, buffer[, offset]]) + +Create an RFC version 5 (namespace w/ SHA-1) UUID + +| | | +| --- | --- | +| `name` | `String \| Array` | +| `namespace` | `String \| Array[16]` Namespace UUID | +| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | +| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | +| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | + +Note: The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`. + +Example with custom namespace: + +```javascript +import { v5 as uuidv5 } from 'uuid'; + +// Define a custom namespace. Readers, create your own using something like +// https://www.uuidgenerator.net/ +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; + +uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' +``` + +Example with RFC `URL` namespace: + +```javascript +import { v5 as uuidv5 } from 'uuid'; + +uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1' +``` + +### uuid.validate(str) + +Test a string to see if it is a valid UUID + +| | | +| --------- | --------------------------------------------------- | +| `str` | `String` to validate | +| _returns_ | `true` if string is a valid UUID, `false` otherwise | + +Example: + +```javascript +import { validate as uuidValidate } from 'uuid'; + +uuidValidate('not a UUID'); // ⇨ false +uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true +``` + +Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds. + +```javascript +import { version as uuidVersion } from 'uuid'; +import { validate as uuidValidate } from 'uuid'; + +function uuidValidateV4(uuid) { + return uuidValidate(uuid) && uuidVersion(uuid) === 4; +} + +const v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210'; +const v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836'; + +uuidValidateV4(v4Uuid); // ⇨ true +uuidValidateV4(v1Uuid); // ⇨ false +``` + +### uuid.version(str) + +Detect RFC version of a UUID + +| | | +| --------- | ---------------------------------------- | +| `str` | A valid UUID `String` | +| _returns_ | `Number` The RFC version of the UUID | +| _throws_ | `TypeError` if `str` is not a valid UUID | + +Example: + +```javascript +import { version as uuidVersion } from 'uuid'; + +uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1 +uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4 +``` + +## Command Line + +UUIDs can be generated from the command line using `uuid`. + +```shell +$ uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 +``` + +The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details: + +```shell +$ uuid --help + +Usage: + uuid + uuid v1 + uuid v3 + uuid v4 + uuid v5 + uuid --help + +Note: may be "URL" or "DNS" to use the corresponding UUIDs +defined by RFC4122 +``` + +## ECMAScript Modules + +This library comes with [ECMAScript Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) support for Node.js versions that support it ([example](./examples/node-esmodules/)) as well as bundlers like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking) ([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/) ([example](./examples/browser-webpack/)) (targeting both, Node.js and browser environments). + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' +``` + +To run the examples you must first create a dist build of this library in the module root: + +```shell +npm run build +``` + +## CDN Builds + +### ECMAScript Modules + +To load this module directly into modern browsers that [support loading ECMAScript Modules](https://caniuse.com/#feat=es6-module) you can make use of [jspm](https://jspm.org/): + +```html + +``` + +### UMD + +To load this module directly into older browsers you can use the [UMD (Universal Module Definition)](https://github.com/umdjs/umd) builds from any of the following CDNs: + +**Using [UNPKG](https://unpkg.com/uuid@latest/dist/umd/)**: + +```html + +``` + +**Using [jsDelivr](https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/)**: + +```html + +``` + +**Using [cdnjs](https://cdnjs.com/libraries/uuid)**: + +```html + +``` + +These CDNs all provide the same [`uuidv4()`](#uuidv4options-buffer-offset) method: + +```html + +``` + +Methods for the other algorithms ([`uuidv1()`](#uuidv1options-buffer-offset), [`uuidv3()`](#uuidv3name-namespace-buffer-offset) and [`uuidv5()`](#uuidv5name-namespace-buffer-offset)) are available from the files `uuidv1.min.js`, `uuidv3.min.js` and `uuidv5.min.js` respectively. + +## "getRandomValues() not supported" + +This error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill: + +### React Native / Expo + +1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) +1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point: + +```javascript +import 'react-native-get-random-values'; +import { v4 as uuidv4 } from 'uuid'; +``` + +Note: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`. + +### Web Workers / Service Workers (Edge <= 18) + +[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please). + +## Upgrading From `uuid@7.x` + +### Only Named Exports Supported When Using with Node.js ESM + +`uuid@7.x` did not come with native ECMAScript Module (ESM) support for Node.js. Importing it in Node.js ESM consequently imported the CommonJS source with a default export. This library now comes with true Node.js ESM support and only provides named exports. + +Instead of doing: + +```javascript +import uuid from 'uuid'; +uuid.v4(); +``` + +you will now have to use the named exports: + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); +``` + +### Deep Requires No Longer Supported + +Deep requires like `require('uuid/v4')` [which have been deprecated in `uuid@7.x`](#deep-requires-now-deprecated) are no longer supported. + +## Upgrading From `uuid@3.x` + +"_Wait... what happened to `uuid@4.x` - `uuid@6.x`?!?_" + +In order to avoid confusion with RFC [version 4](#uuidv4options-buffer-offset) and [version 5](#uuidv5name-namespace-buffer-offset) UUIDs, and a possible [version 6](http://gh.peabody.io/uuidv6/), releases 4 thru 6 of this module have been skipped. + +### Deep Requires Now Deprecated + +`uuid@3.x` encouraged the use of deep requires to minimize the bundle size of browser builds: + +```javascript +const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED! +uuidv4(); +``` + +As of `uuid@7.x` this library now provides ECMAScript modules builds, which allow packagers like Webpack and Rollup to do "tree-shaking" to remove dead code. Instead, use the `import` syntax: + +```javascript +import { v4 as uuidv4 } from 'uuid'; +uuidv4(); +``` + +... or for CommonJS: + +```javascript +const { v4: uuidv4 } = require('uuid'); +uuidv4(); +``` + +### Default Export Removed + +`uuid@3.x` was exporting the Version 4 UUID method as a default export: + +```javascript +const uuid = require('uuid'); // <== REMOVED! +``` + +This usage pattern was already discouraged in `uuid@3.x` and has been removed in `uuid@7.x`. + +---- +Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/node_modules/uuid/dist/bin/uuid b/node_modules/uuid/dist/bin/uuid new file mode 100755 index 0000000..f38d2ee --- /dev/null +++ b/node_modules/uuid/dist/bin/uuid @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('../uuid-bin'); diff --git a/node_modules/uuid/dist/esm-browser/index.js b/node_modules/uuid/dist/esm-browser/index.js new file mode 100644 index 0000000..1db6f6d --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/index.js @@ -0,0 +1,9 @@ +export { default as v1 } from './v1.js'; +export { default as v3 } from './v3.js'; +export { default as v4 } from './v4.js'; +export { default as v5 } from './v5.js'; +export { default as NIL } from './nil.js'; +export { default as version } from './version.js'; +export { default as validate } from './validate.js'; +export { default as stringify } from './stringify.js'; +export { default as parse } from './parse.js'; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/md5.js b/node_modules/uuid/dist/esm-browser/md5.js new file mode 100644 index 0000000..8b5d46a --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/md5.js @@ -0,0 +1,215 @@ +/* + * Browser-compatible JavaScript MD5 + * + * Modification of JavaScript MD5 + * https://github.com/blueimp/JavaScript-MD5 + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + * + * Based on + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ +function md5(bytes) { + if (typeof bytes === 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + + bytes = new Uint8Array(msg.length); + + for (var i = 0; i < msg.length; ++i) { + bytes[i] = msg.charCodeAt(i); + } + } + + return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8)); +} +/* + * Convert an array of little-endian words to an array of bytes + */ + + +function md5ToHexEncodedArray(input) { + var output = []; + var length32 = input.length * 32; + var hexTab = '0123456789abcdef'; + + for (var i = 0; i < length32; i += 8) { + var x = input[i >> 5] >>> i % 32 & 0xff; + var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16); + output.push(hex); + } + + return output; +} +/** + * Calculate output length with padding and bit length + */ + + +function getOutputLength(inputLength8) { + return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; +} +/* + * Calculate the MD5 of an array of little-endian words, and a bit length. + */ + + +function wordsToMd5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << len % 32; + x[getOutputLength(len) - 1] = len; + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for (var i = 0; i < x.length; i += 16) { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + a = md5ff(a, b, c, d, x[i], 7, -680876936); + d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5gg(b, c, d, a, x[i], 20, -373897302); + a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + a = md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5hh(d, a, b, c, x[i], 11, -358537222); + c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); + a = md5ii(a, b, c, d, x[i], 6, -198630844); + d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); + a = safeAdd(a, olda); + b = safeAdd(b, oldb); + c = safeAdd(c, oldc); + d = safeAdd(d, oldd); + } + + return [a, b, c, d]; +} +/* + * Convert an array bytes to an array of little-endian words + * Characters >255 have their high-byte silently ignored. + */ + + +function bytesToWords(input) { + if (input.length === 0) { + return []; + } + + var length8 = input.length * 8; + var output = new Uint32Array(getOutputLength(length8)); + + for (var i = 0; i < length8; i += 8) { + output[i >> 5] |= (input[i / 8] & 0xff) << i % 32; + } + + return output; +} +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ + + +function safeAdd(x, y) { + var lsw = (x & 0xffff) + (y & 0xffff); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return msw << 16 | lsw & 0xffff; +} +/* + * Bitwise rotate a 32-bit number to the left. + */ + + +function bitRotateLeft(num, cnt) { + return num << cnt | num >>> 32 - cnt; +} +/* + * These functions implement the four basic operations the algorithm uses. + */ + + +function md5cmn(q, a, b, x, s, t) { + return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); +} + +function md5ff(a, b, c, d, x, s, t) { + return md5cmn(b & c | ~b & d, a, b, x, s, t); +} + +function md5gg(a, b, c, d, x, s, t) { + return md5cmn(b & d | c & ~d, a, b, x, s, t); +} + +function md5hh(a, b, c, d, x, s, t) { + return md5cmn(b ^ c ^ d, a, b, x, s, t); +} + +function md5ii(a, b, c, d, x, s, t) { + return md5cmn(c ^ (b | ~d), a, b, x, s, t); +} + +export default md5; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/nil.js b/node_modules/uuid/dist/esm-browser/nil.js new file mode 100644 index 0000000..b36324c --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/nil.js @@ -0,0 +1 @@ +export default '00000000-0000-0000-0000-000000000000'; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/parse.js b/node_modules/uuid/dist/esm-browser/parse.js new file mode 100644 index 0000000..7c5b1d5 --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/parse.js @@ -0,0 +1,35 @@ +import validate from './validate.js'; + +function parse(uuid) { + if (!validate(uuid)) { + throw TypeError('Invalid UUID'); + } + + var v; + var arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +export default parse; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/regex.js b/node_modules/uuid/dist/esm-browser/regex.js new file mode 100644 index 0000000..3da8673 --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/regex.js @@ -0,0 +1 @@ +export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/rng.js b/node_modules/uuid/dist/esm-browser/rng.js new file mode 100644 index 0000000..8abbf2e --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/rng.js @@ -0,0 +1,19 @@ +// Unique ID creation requires a high quality random # generator. In the browser we therefore +// require the crypto API and do not support built-in fallback to lower quality random number +// generators (like Math.random()). +var getRandomValues; +var rnds8 = new Uint8Array(16); +export default function rng() { + // lazy load so that environments that need to polyfill have a chance to do so + if (!getRandomValues) { + // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also, + // find the complete implementation of crypto (msCrypto) on IE11. + getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); + + if (!getRandomValues) { + throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); + } + } + + return getRandomValues(rnds8); +} \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/sha1.js b/node_modules/uuid/dist/esm-browser/sha1.js new file mode 100644 index 0000000..940548b --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/sha1.js @@ -0,0 +1,96 @@ +// Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html +function f(s, x, y, z) { + switch (s) { + case 0: + return x & y ^ ~x & z; + + case 1: + return x ^ y ^ z; + + case 2: + return x & y ^ x & z ^ y & z; + + case 3: + return x ^ y ^ z; + } +} + +function ROTL(x, n) { + return x << n | x >>> 32 - n; +} + +function sha1(bytes) { + var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; + var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; + + if (typeof bytes === 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + + bytes = []; + + for (var i = 0; i < msg.length; ++i) { + bytes.push(msg.charCodeAt(i)); + } + } else if (!Array.isArray(bytes)) { + // Convert Array-like to Array + bytes = Array.prototype.slice.call(bytes); + } + + bytes.push(0x80); + var l = bytes.length / 4 + 2; + var N = Math.ceil(l / 16); + var M = new Array(N); + + for (var _i = 0; _i < N; ++_i) { + var arr = new Uint32Array(16); + + for (var j = 0; j < 16; ++j) { + arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3]; + } + + M[_i] = arr; + } + + M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); + M[N - 1][14] = Math.floor(M[N - 1][14]); + M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; + + for (var _i2 = 0; _i2 < N; ++_i2) { + var W = new Uint32Array(80); + + for (var t = 0; t < 16; ++t) { + W[t] = M[_i2][t]; + } + + for (var _t = 16; _t < 80; ++_t) { + W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1); + } + + var a = H[0]; + var b = H[1]; + var c = H[2]; + var d = H[3]; + var e = H[4]; + + for (var _t2 = 0; _t2 < 80; ++_t2) { + var s = Math.floor(_t2 / 20); + var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + + H[0] = H[0] + a >>> 0; + H[1] = H[1] + b >>> 0; + H[2] = H[2] + c >>> 0; + H[3] = H[3] + d >>> 0; + H[4] = H[4] + e >>> 0; + } + + return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; +} + +export default sha1; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/stringify.js b/node_modules/uuid/dist/esm-browser/stringify.js new file mode 100644 index 0000000..3102111 --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/stringify.js @@ -0,0 +1,30 @@ +import validate from './validate.js'; +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + +var byteToHex = []; + +for (var i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +function stringify(arr) { + var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!validate(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +export default stringify; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/v1.js b/node_modules/uuid/dist/esm-browser/v1.js new file mode 100644 index 0000000..1a22591 --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/v1.js @@ -0,0 +1,95 @@ +import rng from './rng.js'; +import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +var _nodeId; + +var _clockseq; // Previous uuid creation time + + +var _lastMSecs = 0; +var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || new Array(16); + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + var seedBytes = options.random || (options.rng || rng)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + var tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || stringify(b); +} + +export default v1; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/v3.js b/node_modules/uuid/dist/esm-browser/v3.js new file mode 100644 index 0000000..c9ab9a4 --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/v3.js @@ -0,0 +1,4 @@ +import v35 from './v35.js'; +import md5 from './md5.js'; +var v3 = v35('v3', 0x30, md5); +export default v3; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/v35.js b/node_modules/uuid/dist/esm-browser/v35.js new file mode 100644 index 0000000..31dd8a1 --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/v35.js @@ -0,0 +1,64 @@ +import stringify from './stringify.js'; +import parse from './parse.js'; + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + var bytes = []; + + for (var i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +export var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +export var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +export default function (name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = parse(namespace); + } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + var bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (var i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return stringify(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/v4.js b/node_modules/uuid/dist/esm-browser/v4.js new file mode 100644 index 0000000..404810a --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/v4.js @@ -0,0 +1,24 @@ +import rng from './rng.js'; +import stringify from './stringify.js'; + +function v4(options, buf, offset) { + options = options || {}; + var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (var i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return stringify(rnds); +} + +export default v4; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/v5.js b/node_modules/uuid/dist/esm-browser/v5.js new file mode 100644 index 0000000..c08d96b --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/v5.js @@ -0,0 +1,4 @@ +import v35 from './v35.js'; +import sha1 from './sha1.js'; +var v5 = v35('v5', 0x50, sha1); +export default v5; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/validate.js b/node_modules/uuid/dist/esm-browser/validate.js new file mode 100644 index 0000000..f1cdc7a --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/validate.js @@ -0,0 +1,7 @@ +import REGEX from './regex.js'; + +function validate(uuid) { + return typeof uuid === 'string' && REGEX.test(uuid); +} + +export default validate; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-browser/version.js b/node_modules/uuid/dist/esm-browser/version.js new file mode 100644 index 0000000..77530e9 --- /dev/null +++ b/node_modules/uuid/dist/esm-browser/version.js @@ -0,0 +1,11 @@ +import validate from './validate.js'; + +function version(uuid) { + if (!validate(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +export default version; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/index.js b/node_modules/uuid/dist/esm-node/index.js new file mode 100644 index 0000000..1db6f6d --- /dev/null +++ b/node_modules/uuid/dist/esm-node/index.js @@ -0,0 +1,9 @@ +export { default as v1 } from './v1.js'; +export { default as v3 } from './v3.js'; +export { default as v4 } from './v4.js'; +export { default as v5 } from './v5.js'; +export { default as NIL } from './nil.js'; +export { default as version } from './version.js'; +export { default as validate } from './validate.js'; +export { default as stringify } from './stringify.js'; +export { default as parse } from './parse.js'; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/md5.js b/node_modules/uuid/dist/esm-node/md5.js new file mode 100644 index 0000000..4d68b04 --- /dev/null +++ b/node_modules/uuid/dist/esm-node/md5.js @@ -0,0 +1,13 @@ +import crypto from 'crypto'; + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return crypto.createHash('md5').update(bytes).digest(); +} + +export default md5; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/nil.js b/node_modules/uuid/dist/esm-node/nil.js new file mode 100644 index 0000000..b36324c --- /dev/null +++ b/node_modules/uuid/dist/esm-node/nil.js @@ -0,0 +1 @@ +export default '00000000-0000-0000-0000-000000000000'; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/parse.js b/node_modules/uuid/dist/esm-node/parse.js new file mode 100644 index 0000000..6421c5d --- /dev/null +++ b/node_modules/uuid/dist/esm-node/parse.js @@ -0,0 +1,35 @@ +import validate from './validate.js'; + +function parse(uuid) { + if (!validate(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +export default parse; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/regex.js b/node_modules/uuid/dist/esm-node/regex.js new file mode 100644 index 0000000..3da8673 --- /dev/null +++ b/node_modules/uuid/dist/esm-node/regex.js @@ -0,0 +1 @@ +export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/rng.js b/node_modules/uuid/dist/esm-node/rng.js new file mode 100644 index 0000000..8006244 --- /dev/null +++ b/node_modules/uuid/dist/esm-node/rng.js @@ -0,0 +1,12 @@ +import crypto from 'crypto'; +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; +export default function rng() { + if (poolPtr > rnds8Pool.length - 16) { + crypto.randomFillSync(rnds8Pool); + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/sha1.js b/node_modules/uuid/dist/esm-node/sha1.js new file mode 100644 index 0000000..e23850b --- /dev/null +++ b/node_modules/uuid/dist/esm-node/sha1.js @@ -0,0 +1,13 @@ +import crypto from 'crypto'; + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return crypto.createHash('sha1').update(bytes).digest(); +} + +export default sha1; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/stringify.js b/node_modules/uuid/dist/esm-node/stringify.js new file mode 100644 index 0000000..f9bca12 --- /dev/null +++ b/node_modules/uuid/dist/esm-node/stringify.js @@ -0,0 +1,29 @@ +import validate from './validate.js'; +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ + +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!validate(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +export default stringify; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/v1.js b/node_modules/uuid/dist/esm-node/v1.js new file mode 100644 index 0000000..ebf81ac --- /dev/null +++ b/node_modules/uuid/dist/esm-node/v1.js @@ -0,0 +1,95 @@ +import rng from './rng.js'; +import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || stringify(b); +} + +export default v1; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/v3.js b/node_modules/uuid/dist/esm-node/v3.js new file mode 100644 index 0000000..09063b8 --- /dev/null +++ b/node_modules/uuid/dist/esm-node/v3.js @@ -0,0 +1,4 @@ +import v35 from './v35.js'; +import md5 from './md5.js'; +const v3 = v35('v3', 0x30, md5); +export default v3; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/v35.js b/node_modules/uuid/dist/esm-node/v35.js new file mode 100644 index 0000000..22f6a19 --- /dev/null +++ b/node_modules/uuid/dist/esm-node/v35.js @@ -0,0 +1,64 @@ +import stringify from './stringify.js'; +import parse from './parse.js'; + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +export default function (name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = parse(namespace); + } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return stringify(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/v4.js b/node_modules/uuid/dist/esm-node/v4.js new file mode 100644 index 0000000..efad926 --- /dev/null +++ b/node_modules/uuid/dist/esm-node/v4.js @@ -0,0 +1,24 @@ +import rng from './rng.js'; +import stringify from './stringify.js'; + +function v4(options, buf, offset) { + options = options || {}; + const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return stringify(rnds); +} + +export default v4; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/v5.js b/node_modules/uuid/dist/esm-node/v5.js new file mode 100644 index 0000000..e87fe31 --- /dev/null +++ b/node_modules/uuid/dist/esm-node/v5.js @@ -0,0 +1,4 @@ +import v35 from './v35.js'; +import sha1 from './sha1.js'; +const v5 = v35('v5', 0x50, sha1); +export default v5; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/validate.js b/node_modules/uuid/dist/esm-node/validate.js new file mode 100644 index 0000000..f1cdc7a --- /dev/null +++ b/node_modules/uuid/dist/esm-node/validate.js @@ -0,0 +1,7 @@ +import REGEX from './regex.js'; + +function validate(uuid) { + return typeof uuid === 'string' && REGEX.test(uuid); +} + +export default validate; \ No newline at end of file diff --git a/node_modules/uuid/dist/esm-node/version.js b/node_modules/uuid/dist/esm-node/version.js new file mode 100644 index 0000000..77530e9 --- /dev/null +++ b/node_modules/uuid/dist/esm-node/version.js @@ -0,0 +1,11 @@ +import validate from './validate.js'; + +function version(uuid) { + if (!validate(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +export default version; \ No newline at end of file diff --git a/node_modules/uuid/dist/index.js b/node_modules/uuid/dist/index.js new file mode 100644 index 0000000..bf13b10 --- /dev/null +++ b/node_modules/uuid/dist/index.js @@ -0,0 +1,79 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +Object.defineProperty(exports, "v1", { + enumerable: true, + get: function () { + return _v.default; + } +}); +Object.defineProperty(exports, "v3", { + enumerable: true, + get: function () { + return _v2.default; + } +}); +Object.defineProperty(exports, "v4", { + enumerable: true, + get: function () { + return _v3.default; + } +}); +Object.defineProperty(exports, "v5", { + enumerable: true, + get: function () { + return _v4.default; + } +}); +Object.defineProperty(exports, "NIL", { + enumerable: true, + get: function () { + return _nil.default; + } +}); +Object.defineProperty(exports, "version", { + enumerable: true, + get: function () { + return _version.default; + } +}); +Object.defineProperty(exports, "validate", { + enumerable: true, + get: function () { + return _validate.default; + } +}); +Object.defineProperty(exports, "stringify", { + enumerable: true, + get: function () { + return _stringify.default; + } +}); +Object.defineProperty(exports, "parse", { + enumerable: true, + get: function () { + return _parse.default; + } +}); + +var _v = _interopRequireDefault(require("./v1.js")); + +var _v2 = _interopRequireDefault(require("./v3.js")); + +var _v3 = _interopRequireDefault(require("./v4.js")); + +var _v4 = _interopRequireDefault(require("./v5.js")); + +var _nil = _interopRequireDefault(require("./nil.js")); + +var _version = _interopRequireDefault(require("./version.js")); + +var _validate = _interopRequireDefault(require("./validate.js")); + +var _stringify = _interopRequireDefault(require("./stringify.js")); + +var _parse = _interopRequireDefault(require("./parse.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } \ No newline at end of file diff --git a/node_modules/uuid/dist/md5-browser.js b/node_modules/uuid/dist/md5-browser.js new file mode 100644 index 0000000..7a4582a --- /dev/null +++ b/node_modules/uuid/dist/md5-browser.js @@ -0,0 +1,223 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +/* + * Browser-compatible JavaScript MD5 + * + * Modification of JavaScript MD5 + * https://github.com/blueimp/JavaScript-MD5 + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + * + * Based on + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ +function md5(bytes) { + if (typeof bytes === 'string') { + const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + + bytes = new Uint8Array(msg.length); + + for (let i = 0; i < msg.length; ++i) { + bytes[i] = msg.charCodeAt(i); + } + } + + return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8)); +} +/* + * Convert an array of little-endian words to an array of bytes + */ + + +function md5ToHexEncodedArray(input) { + const output = []; + const length32 = input.length * 32; + const hexTab = '0123456789abcdef'; + + for (let i = 0; i < length32; i += 8) { + const x = input[i >> 5] >>> i % 32 & 0xff; + const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16); + output.push(hex); + } + + return output; +} +/** + * Calculate output length with padding and bit length + */ + + +function getOutputLength(inputLength8) { + return (inputLength8 + 64 >>> 9 << 4) + 14 + 1; +} +/* + * Calculate the MD5 of an array of little-endian words, and a bit length. + */ + + +function wordsToMd5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << len % 32; + x[getOutputLength(len) - 1] = len; + let a = 1732584193; + let b = -271733879; + let c = -1732584194; + let d = 271733878; + + for (let i = 0; i < x.length; i += 16) { + const olda = a; + const oldb = b; + const oldc = c; + const oldd = d; + a = md5ff(a, b, c, d, x[i], 7, -680876936); + d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5gg(b, c, d, a, x[i], 20, -373897302); + a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + a = md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5hh(d, a, b, c, x[i], 11, -358537222); + c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); + a = md5ii(a, b, c, d, x[i], 6, -198630844); + d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); + a = safeAdd(a, olda); + b = safeAdd(b, oldb); + c = safeAdd(c, oldc); + d = safeAdd(d, oldd); + } + + return [a, b, c, d]; +} +/* + * Convert an array bytes to an array of little-endian words + * Characters >255 have their high-byte silently ignored. + */ + + +function bytesToWords(input) { + if (input.length === 0) { + return []; + } + + const length8 = input.length * 8; + const output = new Uint32Array(getOutputLength(length8)); + + for (let i = 0; i < length8; i += 8) { + output[i >> 5] |= (input[i / 8] & 0xff) << i % 32; + } + + return output; +} +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ + + +function safeAdd(x, y) { + const lsw = (x & 0xffff) + (y & 0xffff); + const msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return msw << 16 | lsw & 0xffff; +} +/* + * Bitwise rotate a 32-bit number to the left. + */ + + +function bitRotateLeft(num, cnt) { + return num << cnt | num >>> 32 - cnt; +} +/* + * These functions implement the four basic operations the algorithm uses. + */ + + +function md5cmn(q, a, b, x, s, t) { + return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); +} + +function md5ff(a, b, c, d, x, s, t) { + return md5cmn(b & c | ~b & d, a, b, x, s, t); +} + +function md5gg(a, b, c, d, x, s, t) { + return md5cmn(b & d | c & ~d, a, b, x, s, t); +} + +function md5hh(a, b, c, d, x, s, t) { + return md5cmn(b ^ c ^ d, a, b, x, s, t); +} + +function md5ii(a, b, c, d, x, s, t) { + return md5cmn(c ^ (b | ~d), a, b, x, s, t); +} + +var _default = md5; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/md5.js b/node_modules/uuid/dist/md5.js new file mode 100644 index 0000000..824d481 --- /dev/null +++ b/node_modules/uuid/dist/md5.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _crypto = _interopRequireDefault(require("crypto")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); +} + +var _default = md5; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/nil.js b/node_modules/uuid/dist/nil.js new file mode 100644 index 0000000..7ade577 --- /dev/null +++ b/node_modules/uuid/dist/nil.js @@ -0,0 +1,8 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/parse.js b/node_modules/uuid/dist/parse.js new file mode 100644 index 0000000..4c69fc3 --- /dev/null +++ b/node_modules/uuid/dist/parse.js @@ -0,0 +1,45 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _validate = _interopRequireDefault(require("./validate.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +var _default = parse; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/regex.js b/node_modules/uuid/dist/regex.js new file mode 100644 index 0000000..1ef91d6 --- /dev/null +++ b/node_modules/uuid/dist/regex.js @@ -0,0 +1,8 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/rng-browser.js b/node_modules/uuid/dist/rng-browser.js new file mode 100644 index 0000000..91faeae --- /dev/null +++ b/node_modules/uuid/dist/rng-browser.js @@ -0,0 +1,26 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = rng; +// Unique ID creation requires a high quality random # generator. In the browser we therefore +// require the crypto API and do not support built-in fallback to lower quality random number +// generators (like Math.random()). +let getRandomValues; +const rnds8 = new Uint8Array(16); + +function rng() { + // lazy load so that environments that need to polyfill have a chance to do so + if (!getRandomValues) { + // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also, + // find the complete implementation of crypto (msCrypto) on IE11. + getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto); + + if (!getRandomValues) { + throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported'); + } + } + + return getRandomValues(rnds8); +} \ No newline at end of file diff --git a/node_modules/uuid/dist/rng.js b/node_modules/uuid/dist/rng.js new file mode 100644 index 0000000..3507f93 --- /dev/null +++ b/node_modules/uuid/dist/rng.js @@ -0,0 +1,24 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = rng; + +var _crypto = _interopRequireDefault(require("crypto")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} \ No newline at end of file diff --git a/node_modules/uuid/dist/sha1-browser.js b/node_modules/uuid/dist/sha1-browser.js new file mode 100644 index 0000000..24cbced --- /dev/null +++ b/node_modules/uuid/dist/sha1-browser.js @@ -0,0 +1,104 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +// Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html +function f(s, x, y, z) { + switch (s) { + case 0: + return x & y ^ ~x & z; + + case 1: + return x ^ y ^ z; + + case 2: + return x & y ^ x & z ^ y & z; + + case 3: + return x ^ y ^ z; + } +} + +function ROTL(x, n) { + return x << n | x >>> 32 - n; +} + +function sha1(bytes) { + const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; + const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; + + if (typeof bytes === 'string') { + const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + + bytes = []; + + for (let i = 0; i < msg.length; ++i) { + bytes.push(msg.charCodeAt(i)); + } + } else if (!Array.isArray(bytes)) { + // Convert Array-like to Array + bytes = Array.prototype.slice.call(bytes); + } + + bytes.push(0x80); + const l = bytes.length / 4 + 2; + const N = Math.ceil(l / 16); + const M = new Array(N); + + for (let i = 0; i < N; ++i) { + const arr = new Uint32Array(16); + + for (let j = 0; j < 16; ++j) { + arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3]; + } + + M[i] = arr; + } + + M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32); + M[N - 1][14] = Math.floor(M[N - 1][14]); + M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff; + + for (let i = 0; i < N; ++i) { + const W = new Uint32Array(80); + + for (let t = 0; t < 16; ++t) { + W[t] = M[i][t]; + } + + for (let t = 16; t < 80; ++t) { + W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1); + } + + let a = H[0]; + let b = H[1]; + let c = H[2]; + let d = H[3]; + let e = H[4]; + + for (let t = 0; t < 80; ++t) { + const s = Math.floor(t / 20); + const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + + H[0] = H[0] + a >>> 0; + H[1] = H[1] + b >>> 0; + H[2] = H[2] + c >>> 0; + H[3] = H[3] + d >>> 0; + H[4] = H[4] + e >>> 0; + } + + return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff]; +} + +var _default = sha1; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/sha1.js b/node_modules/uuid/dist/sha1.js new file mode 100644 index 0000000..03bdd63 --- /dev/null +++ b/node_modules/uuid/dist/sha1.js @@ -0,0 +1,23 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _crypto = _interopRequireDefault(require("crypto")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); +} + +var _default = sha1; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/stringify.js b/node_modules/uuid/dist/stringify.js new file mode 100644 index 0000000..b8e7519 --- /dev/null +++ b/node_modules/uuid/dist/stringify.js @@ -0,0 +1,39 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _validate = _interopRequireDefault(require("./validate.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +var _default = stringify; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/umd/uuid.min.js b/node_modules/uuid/dist/umd/uuid.min.js new file mode 100644 index 0000000..639ca2f --- /dev/null +++ b/node_modules/uuid/dist/umd/uuid.min.js @@ -0,0 +1 @@ +!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((r="undefined"!=typeof globalThis?globalThis:r||self).uuid={})}(this,(function(r){"use strict";var e,n=new Uint8Array(16);function t(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(n)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function a(r){return"string"==typeof r&&o.test(r)}for(var i,u,f=[],s=0;s<256;++s)f.push((s+256).toString(16).substr(1));function c(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(f[r[e+0]]+f[r[e+1]]+f[r[e+2]]+f[r[e+3]]+"-"+f[r[e+4]]+f[r[e+5]]+"-"+f[r[e+6]]+f[r[e+7]]+"-"+f[r[e+8]]+f[r[e+9]]+"-"+f[r[e+10]]+f[r[e+11]]+f[r[e+12]]+f[r[e+13]]+f[r[e+14]]+f[r[e+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n}var l=0,d=0;function v(r){if(!a(r))throw TypeError("Invalid UUID");var e,n=new Uint8Array(16);return n[0]=(e=parseInt(r.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(r.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(r.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(r.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n}function p(r,e,n){function t(r,t,o,a){if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=[],n=0;n>>9<<4)+1}function y(r,e){var n=(65535&r)+(65535&e);return(r>>16)+(e>>16)+(n>>16)<<16|65535&n}function g(r,e,n,t,o,a){return y((i=y(y(e,r),y(t,a)))<<(u=o)|i>>>32-u,n);var i,u}function m(r,e,n,t,o,a,i){return g(e&n|~e&t,r,e,o,a,i)}function w(r,e,n,t,o,a,i){return g(e&t|n&~t,r,e,o,a,i)}function b(r,e,n,t,o,a,i){return g(e^n^t,r,e,o,a,i)}function A(r,e,n,t,o,a,i){return g(n^(e|~t),r,e,o,a,i)}var U=p("v3",48,(function(r){if("string"==typeof r){var e=unescape(encodeURIComponent(r));r=new Uint8Array(e.length);for(var n=0;n>5]>>>o%32&255,i=parseInt(t.charAt(a>>>4&15)+t.charAt(15&a),16);e.push(i)}return e}(function(r,e){r[e>>5]|=128<>5]|=(255&r[t/8])<>>32-e}var R=p("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var t=unescape(encodeURIComponent(r));r=[];for(var o=0;o>>0;w=m,m=g,g=C(y,30)>>>0,y=h,h=U}n[0]=n[0]+h>>>0,n[1]=n[1]+y>>>0,n[2]=n[2]+g>>>0,n[3]=n[3]+m>>>0,n[4]=n[4]+w>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));r.NIL="00000000-0000-0000-0000-000000000000",r.parse=v,r.stringify=c,r.v1=function(r,e,n){var o=e&&n||0,a=e||new Array(16),f=(r=r||{}).node||i,s=void 0!==r.clockseq?r.clockseq:u;if(null==f||null==s){var v=r.random||(r.rng||t)();null==f&&(f=i=[1|v[0],v[1],v[2],v[3],v[4],v[5]]),null==s&&(s=u=16383&(v[6]<<8|v[7]))}var p=void 0!==r.msecs?r.msecs:Date.now(),h=void 0!==r.nsecs?r.nsecs:d+1,y=p-l+(h-d)/1e4;if(y<0&&void 0===r.clockseq&&(s=s+1&16383),(y<0||p>l)&&void 0===r.nsecs&&(h=0),h>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");l=p,d=h,u=s;var g=(1e4*(268435455&(p+=122192928e5))+h)%4294967296;a[o++]=g>>>24&255,a[o++]=g>>>16&255,a[o++]=g>>>8&255,a[o++]=255&g;var m=p/4294967296*1e4&268435455;a[o++]=m>>>8&255,a[o++]=255&m,a[o++]=m>>>24&15|16,a[o++]=m>>>16&255,a[o++]=s>>>8|128,a[o++]=255&s;for(var w=0;w<6;++w)a[o+w]=f[w];return e||c(a)},r.v3=U,r.v4=function(r,e,n){var o=(r=r||{}).random||(r.rng||t)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e){n=n||0;for(var a=0;a<16;++a)e[n+a]=o[a];return e}return c(o)},r.v5=R,r.validate=a,r.version=function(r){if(!a(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)},Object.defineProperty(r,"__esModule",{value:!0})})); \ No newline at end of file diff --git a/node_modules/uuid/dist/umd/uuidNIL.min.js b/node_modules/uuid/dist/umd/uuidNIL.min.js new file mode 100644 index 0000000..30b28a7 --- /dev/null +++ b/node_modules/uuid/dist/umd/uuidNIL.min.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidNIL=n()}(this,(function(){"use strict";return"00000000-0000-0000-0000-000000000000"})); \ No newline at end of file diff --git a/node_modules/uuid/dist/umd/uuidParse.min.js b/node_modules/uuid/dist/umd/uuidParse.min.js new file mode 100644 index 0000000..d48ea6a --- /dev/null +++ b/node_modules/uuid/dist/umd/uuidParse.min.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidParse=n()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(n){if(!function(n){return"string"==typeof n&&e.test(n)}(n))throw TypeError("Invalid UUID");var t,i=new Uint8Array(16);return i[0]=(t=parseInt(n.slice(0,8),16))>>>24,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i[4]=(t=parseInt(n.slice(9,13),16))>>>8,i[5]=255&t,i[6]=(t=parseInt(n.slice(14,18),16))>>>8,i[7]=255&t,i[8]=(t=parseInt(n.slice(19,23),16))>>>8,i[9]=255&t,i[10]=(t=parseInt(n.slice(24,36),16))/1099511627776&255,i[11]=t/4294967296&255,i[12]=t>>>24&255,i[13]=t>>>16&255,i[14]=t>>>8&255,i[15]=255&t,i}})); \ No newline at end of file diff --git a/node_modules/uuid/dist/umd/uuidStringify.min.js b/node_modules/uuid/dist/umd/uuidStringify.min.js new file mode 100644 index 0000000..fd39adc --- /dev/null +++ b/node_modules/uuid/dist/umd/uuidStringify.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidStringify=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function t(t){return"string"==typeof t&&e.test(t)}for(var i=[],n=0;n<256;++n)i.push((n+256).toString(16).substr(1));return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,f=(i[e[n+0]]+i[e[n+1]]+i[e[n+2]]+i[e[n+3]]+"-"+i[e[n+4]]+i[e[n+5]]+"-"+i[e[n+6]]+i[e[n+7]]+"-"+i[e[n+8]]+i[e[n+9]]+"-"+i[e[n+10]]+i[e[n+11]]+i[e[n+12]]+i[e[n+13]]+i[e[n+14]]+i[e[n+15]]).toLowerCase();if(!t(f))throw TypeError("Stringified UUID is invalid");return f}})); \ No newline at end of file diff --git a/node_modules/uuid/dist/umd/uuidValidate.min.js b/node_modules/uuid/dist/umd/uuidValidate.min.js new file mode 100644 index 0000000..378e5b9 --- /dev/null +++ b/node_modules/uuid/dist/umd/uuidValidate.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidValidate=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(t){return"string"==typeof t&&e.test(t)}})); \ No newline at end of file diff --git a/node_modules/uuid/dist/umd/uuidVersion.min.js b/node_modules/uuid/dist/umd/uuidVersion.min.js new file mode 100644 index 0000000..274bb09 --- /dev/null +++ b/node_modules/uuid/dist/umd/uuidVersion.min.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidVersion=t()}(this,(function(){"use strict";var e=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;return function(t){if(!function(t){return"string"==typeof t&&e.test(t)}(t))throw TypeError("Invalid UUID");return parseInt(t.substr(14,1),16)}})); \ No newline at end of file diff --git a/node_modules/uuid/dist/umd/uuidv1.min.js b/node_modules/uuid/dist/umd/uuidv1.min.js new file mode 100644 index 0000000..2622889 --- /dev/null +++ b/node_modules/uuid/dist/umd/uuidv1.min.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).uuidv1=o()}(this,(function(){"use strict";var e,o=new Uint8Array(16);function t(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(o)}var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function r(e){return"string"==typeof e&&n.test(e)}for(var i,u,s=[],a=0;a<256;++a)s.push((a+256).toString(16).substr(1));var d=0,f=0;return function(e,o,n){var a=o&&n||0,c=o||new Array(16),l=(e=e||{}).node||i,p=void 0!==e.clockseq?e.clockseq:u;if(null==l||null==p){var v=e.random||(e.rng||t)();null==l&&(l=i=[1|v[0],v[1],v[2],v[3],v[4],v[5]]),null==p&&(p=u=16383&(v[6]<<8|v[7]))}var y=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:f+1,g=y-d+(m-f)/1e4;if(g<0&&void 0===e.clockseq&&(p=p+1&16383),(g<0||y>d)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=y,f=m,u=p;var h=(1e4*(268435455&(y+=122192928e5))+m)%4294967296;c[a++]=h>>>24&255,c[a++]=h>>>16&255,c[a++]=h>>>8&255,c[a++]=255&h;var w=y/4294967296*1e4&268435455;c[a++]=w>>>8&255,c[a++]=255&w,c[a++]=w>>>24&15|16,c[a++]=w>>>16&255,c[a++]=p>>>8|128,c[a++]=255&p;for(var b=0;b<6;++b)c[a+b]=l[b];return o||function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=(s[e[o+0]]+s[e[o+1]]+s[e[o+2]]+s[e[o+3]]+"-"+s[e[o+4]]+s[e[o+5]]+"-"+s[e[o+6]]+s[e[o+7]]+"-"+s[e[o+8]]+s[e[o+9]]+"-"+s[e[o+10]]+s[e[o+11]]+s[e[o+12]]+s[e[o+13]]+s[e[o+14]]+s[e[o+15]]).toLowerCase();if(!r(t))throw TypeError("Stringified UUID is invalid");return t}(c)}})); \ No newline at end of file diff --git a/node_modules/uuid/dist/umd/uuidv3.min.js b/node_modules/uuid/dist/umd/uuidv3.min.js new file mode 100644 index 0000000..8d37b62 --- /dev/null +++ b/node_modules/uuid/dist/umd/uuidv3.min.js @@ -0,0 +1 @@ +!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(n="undefined"!=typeof globalThis?globalThis:n||self).uuidv3=r()}(this,(function(){"use strict";var n=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function r(r){return"string"==typeof r&&n.test(r)}for(var e=[],t=0;t<256;++t)e.push((t+256).toString(16).substr(1));function i(n){return 14+(n+64>>>9<<4)+1}function o(n,r){var e=(65535&n)+(65535&r);return(n>>16)+(r>>16)+(e>>16)<<16|65535&e}function a(n,r,e,t,i,a){return o((f=o(o(r,n),o(t,a)))<<(u=i)|f>>>32-u,e);var f,u}function f(n,r,e,t,i,o,f){return a(r&e|~r&t,n,r,i,o,f)}function u(n,r,e,t,i,o,f){return a(r&t|e&~t,n,r,i,o,f)}function c(n,r,e,t,i,o,f){return a(r^e^t,n,r,i,o,f)}function s(n,r,e,t,i,o,f){return a(e^(r|~t),n,r,i,o,f)}return function(n,t,i){function o(n,o,a,f){if("string"==typeof n&&(n=function(n){n=unescape(encodeURIComponent(n));for(var r=[],e=0;e>>24,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[4]=(e=parseInt(n.slice(9,13),16))>>>8,t[5]=255&e,t[6]=(e=parseInt(n.slice(14,18),16))>>>8,t[7]=255&e,t[8]=(e=parseInt(n.slice(19,23),16))>>>8,t[9]=255&e,t[10]=(e=parseInt(n.slice(24,36),16))/1099511627776&255,t[11]=e/4294967296&255,t[12]=e>>>24&255,t[13]=e>>>16&255,t[14]=e>>>8&255,t[15]=255&e,t}(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var u=new Uint8Array(16+n.length);if(u.set(o),u.set(n,o.length),(u=i(u))[6]=15&u[6]|t,u[8]=63&u[8]|128,a){f=f||0;for(var c=0;c<16;++c)a[f+c]=u[c];return a}return function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(e[n[t+0]]+e[n[t+1]]+e[n[t+2]]+e[n[t+3]]+"-"+e[n[t+4]]+e[n[t+5]]+"-"+e[n[t+6]]+e[n[t+7]]+"-"+e[n[t+8]]+e[n[t+9]]+"-"+e[n[t+10]]+e[n[t+11]]+e[n[t+12]]+e[n[t+13]]+e[n[t+14]]+e[n[t+15]]).toLowerCase();if(!r(i))throw TypeError("Stringified UUID is invalid");return i}(u)}try{o.name=n}catch(n){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v3",48,(function(n){if("string"==typeof n){var r=unescape(encodeURIComponent(n));n=new Uint8Array(r.length);for(var e=0;e>5]>>>i%32&255,a=parseInt(t.charAt(o>>>4&15)+t.charAt(15&o),16);r.push(a)}return r}(function(n,r){n[r>>5]|=128<>5]|=(255&n[t/8])<1&&void 0!==arguments[1]?arguments[1]:0,o=(i[t[e+0]]+i[t[e+1]]+i[t[e+2]]+i[t[e+3]]+"-"+i[t[e+4]]+i[t[e+5]]+"-"+i[t[e+6]]+i[t[e+7]]+"-"+i[t[e+8]]+i[t[e+9]]+"-"+i[t[e+10]]+i[t[e+11]]+i[t[e+12]]+i[t[e+13]]+i[t[e+14]]+i[t[e+15]]).toLowerCase();if(!r(o))throw TypeError("Stringified UUID is invalid");return o}(u)}})); \ No newline at end of file diff --git a/node_modules/uuid/dist/umd/uuidv5.min.js b/node_modules/uuid/dist/umd/uuidv5.min.js new file mode 100644 index 0000000..ba6fc63 --- /dev/null +++ b/node_modules/uuid/dist/umd/uuidv5.min.js @@ -0,0 +1 @@ +!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r="undefined"!=typeof globalThis?globalThis:r||self).uuidv5=e()}(this,(function(){"use strict";var r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function e(e){return"string"==typeof e&&r.test(e)}for(var t=[],n=0;n<256;++n)t.push((n+256).toString(16).substr(1));function a(r,e,t,n){switch(r){case 0:return e&t^~e&n;case 1:return e^t^n;case 2:return e&t^e&n^t&n;case 3:return e^t^n}}function o(r,e){return r<>>32-e}return function(r,n,a){function o(r,o,i,f){if("string"==typeof r&&(r=function(r){r=unescape(encodeURIComponent(r));for(var e=[],t=0;t>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(r.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(r.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(r.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(r.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}(o)),16!==o.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+r.length);if(s.set(o),s.set(r,o.length),(s=a(s))[6]=15&s[6]|n,s[8]=63&s[8]|128,i){f=f||0;for(var u=0;u<16;++u)i[f+u]=s[u];return i}return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=(t[r[n+0]]+t[r[n+1]]+t[r[n+2]]+t[r[n+3]]+"-"+t[r[n+4]]+t[r[n+5]]+"-"+t[r[n+6]]+t[r[n+7]]+"-"+t[r[n+8]]+t[r[n+9]]+"-"+t[r[n+10]]+t[r[n+11]]+t[r[n+12]]+t[r[n+13]]+t[r[n+14]]+t[r[n+15]]).toLowerCase();if(!e(a))throw TypeError("Stringified UUID is invalid");return a}(s)}try{o.name=r}catch(r){}return o.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",o.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",o}("v5",80,(function(r){var e=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var n=unescape(encodeURIComponent(r));r=[];for(var i=0;i>>0;A=U,U=w,w=o(b,30)>>>0,b=g,g=C}t[0]=t[0]+g>>>0,t[1]=t[1]+b>>>0,t[2]=t[2]+w>>>0,t[3]=t[3]+U>>>0,t[4]=t[4]+A>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,255&t[0],t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,255&t[1],t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,255&t[2],t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,255&t[3],t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,255&t[4]]}))})); \ No newline at end of file diff --git a/node_modules/uuid/dist/uuid-bin.js b/node_modules/uuid/dist/uuid-bin.js new file mode 100644 index 0000000..50a7a9f --- /dev/null +++ b/node_modules/uuid/dist/uuid-bin.js @@ -0,0 +1,85 @@ +"use strict"; + +var _assert = _interopRequireDefault(require("assert")); + +var _v = _interopRequireDefault(require("./v1.js")); + +var _v2 = _interopRequireDefault(require("./v3.js")); + +var _v3 = _interopRequireDefault(require("./v4.js")); + +var _v4 = _interopRequireDefault(require("./v5.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function usage() { + console.log('Usage:'); + console.log(' uuid'); + console.log(' uuid v1'); + console.log(' uuid v3 '); + console.log(' uuid v4'); + console.log(' uuid v5 '); + console.log(' uuid --help'); + console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); +} + +const args = process.argv.slice(2); + +if (args.indexOf('--help') >= 0) { + usage(); + process.exit(0); +} + +const version = args.shift() || 'v4'; + +switch (version) { + case 'v1': + console.log((0, _v.default)()); + break; + + case 'v3': + { + const name = args.shift(); + let namespace = args.shift(); + (0, _assert.default)(name != null, 'v3 name not specified'); + (0, _assert.default)(namespace != null, 'v3 namespace not specified'); + + if (namespace === 'URL') { + namespace = _v2.default.URL; + } + + if (namespace === 'DNS') { + namespace = _v2.default.DNS; + } + + console.log((0, _v2.default)(name, namespace)); + break; + } + + case 'v4': + console.log((0, _v3.default)()); + break; + + case 'v5': + { + const name = args.shift(); + let namespace = args.shift(); + (0, _assert.default)(name != null, 'v5 name not specified'); + (0, _assert.default)(namespace != null, 'v5 namespace not specified'); + + if (namespace === 'URL') { + namespace = _v4.default.URL; + } + + if (namespace === 'DNS') { + namespace = _v4.default.DNS; + } + + console.log((0, _v4.default)(name, namespace)); + break; + } + + default: + usage(); + process.exit(1); +} \ No newline at end of file diff --git a/node_modules/uuid/dist/v1.js b/node_modules/uuid/dist/v1.js new file mode 100644 index 0000000..abb9b3d --- /dev/null +++ b/node_modules/uuid/dist/v1.js @@ -0,0 +1,107 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _rng = _interopRequireDefault(require("./rng.js")); + +var _stringify = _interopRequireDefault(require("./stringify.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.default)(b); +} + +var _default = v1; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/v3.js b/node_modules/uuid/dist/v3.js new file mode 100644 index 0000000..6b47ff5 --- /dev/null +++ b/node_modules/uuid/dist/v3.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _v = _interopRequireDefault(require("./v35.js")); + +var _md = _interopRequireDefault(require("./md5.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/v35.js b/node_modules/uuid/dist/v35.js new file mode 100644 index 0000000..f784c63 --- /dev/null +++ b/node_modules/uuid/dist/v35.js @@ -0,0 +1,78 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = _default; +exports.URL = exports.DNS = void 0; + +var _stringify = _interopRequireDefault(require("./stringify.js")); + +var _parse = _interopRequireDefault(require("./parse.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify.default)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} \ No newline at end of file diff --git a/node_modules/uuid/dist/v4.js b/node_modules/uuid/dist/v4.js new file mode 100644 index 0000000..838ce0b --- /dev/null +++ b/node_modules/uuid/dist/v4.js @@ -0,0 +1,37 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _rng = _interopRequireDefault(require("./rng.js")); + +var _stringify = _interopRequireDefault(require("./stringify.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return (0, _stringify.default)(rnds); +} + +var _default = v4; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/v5.js b/node_modules/uuid/dist/v5.js new file mode 100644 index 0000000..99d615e --- /dev/null +++ b/node_modules/uuid/dist/v5.js @@ -0,0 +1,16 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _v = _interopRequireDefault(require("./v35.js")); + +var _sha = _interopRequireDefault(require("./sha1.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/validate.js b/node_modules/uuid/dist/validate.js new file mode 100644 index 0000000..fd05215 --- /dev/null +++ b/node_modules/uuid/dist/validate.js @@ -0,0 +1,17 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _regex = _interopRequireDefault(require("./regex.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default = validate; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/dist/version.js b/node_modules/uuid/dist/version.js new file mode 100644 index 0000000..b72949c --- /dev/null +++ b/node_modules/uuid/dist/version.js @@ -0,0 +1,21 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; + +var _validate = _interopRequireDefault(require("./validate.js")); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +var _default = version; +exports.default = _default; \ No newline at end of file diff --git a/node_modules/uuid/package.json b/node_modules/uuid/package.json new file mode 100644 index 0000000..f0ab371 --- /dev/null +++ b/node_modules/uuid/package.json @@ -0,0 +1,135 @@ +{ + "name": "uuid", + "version": "8.3.2", + "description": "RFC4122 (v1, v4, and v5) UUIDs", + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "bin": { + "uuid": "./dist/bin/uuid" + }, + "sideEffects": false, + "main": "./dist/index.js", + "exports": { + ".": { + "node": { + "module": "./dist/esm-node/index.js", + "require": "./dist/index.js", + "import": "./wrapper.mjs" + }, + "default": "./dist/esm-browser/index.js" + }, + "./package.json": "./package.json" + }, + "module": "./dist/esm-node/index.js", + "browser": { + "./dist/md5.js": "./dist/md5-browser.js", + "./dist/rng.js": "./dist/rng-browser.js", + "./dist/sha1.js": "./dist/sha1-browser.js", + "./dist/esm-node/index.js": "./dist/esm-browser/index.js" + }, + "files": [ + "CHANGELOG.md", + "CONTRIBUTING.md", + "LICENSE.md", + "README.md", + "dist", + "wrapper.mjs" + ], + "devDependencies": { + "@babel/cli": "7.11.6", + "@babel/core": "7.11.6", + "@babel/preset-env": "7.11.5", + "@commitlint/cli": "11.0.0", + "@commitlint/config-conventional": "11.0.0", + "@rollup/plugin-node-resolve": "9.0.0", + "babel-eslint": "10.1.0", + "bundlewatch": "0.3.1", + "eslint": "7.10.0", + "eslint-config-prettier": "6.12.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.22.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-prettier": "3.1.4", + "eslint-plugin-promise": "4.2.1", + "eslint-plugin-standard": "4.0.1", + "husky": "4.3.0", + "jest": "25.5.4", + "lint-staged": "10.4.0", + "npm-run-all": "4.1.5", + "optional-dev-dependency": "2.0.1", + "prettier": "2.1.2", + "random-seed": "0.3.0", + "rollup": "2.28.2", + "rollup-plugin-terser": "7.0.2", + "runmd": "1.3.2", + "standard-version": "9.0.0" + }, + "optionalDevDependencies": { + "@wdio/browserstack-service": "6.4.0", + "@wdio/cli": "6.4.0", + "@wdio/jasmine-framework": "6.4.0", + "@wdio/local-runner": "6.4.0", + "@wdio/spec-reporter": "6.4.0", + "@wdio/static-server-service": "6.4.0", + "@wdio/sync": "6.4.0" + }, + "scripts": { + "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build", + "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build", + "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test", + "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test", + "lint": "npm run eslint:check && npm run prettier:check", + "eslint:check": "eslint src/ test/ examples/ *.js", + "eslint:fix": "eslint --fix src/ test/ examples/ *.js", + "pretest": "[ -n $CI ] || npm run build", + "test": "BABEL_ENV=commonjs node --throw-deprecation node_modules/.bin/jest test/unit/", + "pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**", + "test:browser": "wdio run ./wdio.conf.js", + "pretest:node": "npm run build", + "test:node": "npm-run-all --parallel examples:node:**", + "test:pack": "./scripts/testpack.sh", + "pretest:benchmark": "npm run build", + "test:benchmark": "cd examples/benchmark && npm install && npm test", + "prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'", + "prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'", + "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json", + "md": "runmd --watch --output=README.md README_js.md", + "docs": "( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )", + "docs:diff": "npm run docs && git diff --quiet README.md", + "build": "./scripts/build.sh", + "prepack": "npm run build", + "release": "standard-version --no-verify" + }, + "repository": { + "type": "git", + "url": "https://github.com/uuidjs/uuid.git" + }, + "husky": { + "hooks": { + "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "*.{js,jsx,json,md}": [ + "prettier --write" + ], + "*.{js,jsx}": [ + "eslint --fix" + ] + }, + "standard-version": { + "scripts": { + "postchangelog": "prettier --write CHANGELOG.md" + } + } +} diff --git a/node_modules/uuid/wrapper.mjs b/node_modules/uuid/wrapper.mjs new file mode 100644 index 0000000..c31e9ce --- /dev/null +++ b/node_modules/uuid/wrapper.mjs @@ -0,0 +1,10 @@ +import uuid from './dist/index.js'; +export const v1 = uuid.v1; +export const v3 = uuid.v3; +export const v4 = uuid.v4; +export const v5 = uuid.v5; +export const NIL = uuid.NIL; +export const version = uuid.version; +export const validate = uuid.validate; +export const stringify = uuid.stringify; +export const parse = uuid.parse; diff --git a/package-lock.json b/package-lock.json index c849a3b..a095745 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,80 @@ { "name": "action-debian-package", + "lockfileVersion": 2, "requires": true, - "lockfileVersion": 1, + "packages": { + "": { + "name": "action-debian-package", + "dependencies": { + "@actions/core": "^1.2.7", + "@actions/exec": "^1.1.1", + "firstline": "^2.0.2" + } + }, + "node_modules/@actions/core": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", + "dependencies": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } + }, + "node_modules/@actions/exec": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", + "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", + "dependencies": { + "@actions/io": "^1.0.1" + } + }, + "node_modules/@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "dependencies": { + "tunnel": "^0.0.6" + } + }, + "node_modules/@actions/io": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.2.tgz", + "integrity": "sha512-d+RwPlMp+2qmBfeLYPLXuSRykDIFEwdTA0MMxzS9kh4kvP1ftrc/9fzy6pX6qAjthdXruHQ6/6kjT/DNo5ALuw==" + }, + "node_modules/firstline": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/firstline/-/firstline-2.0.2.tgz", + "integrity": "sha512-8KcmfI0jgSECnzdhucm0i7vrwef3BWwgjimW2YkRC5eSFwjb5DibVoA0YvgkYwwxuJi9c+7M7X3b3lX8o9B6wg==", + "engines": { + "node": ">=6.4.0" + } + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + } + }, "dependencies": { "@actions/core": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.7.tgz", - "integrity": "sha512-kzLFD5BgEvq6ubcxdgPbRKGD2Qrgya/5j+wh4LZzqT915I0V3rED+MvjH6NXghbvk1MXknpNNQ3uKjXSEN00Ig==" + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", + "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", + "requires": { + "@actions/http-client": "^2.0.1", + "uuid": "^8.3.2" + } }, "@actions/exec": { "version": "1.1.1", @@ -16,127 +84,33 @@ "@actions/io": "^1.0.1" } }, + "@actions/http-client": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", + "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "requires": { + "tunnel": "^0.0.6" + } + }, "@actions/io": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.2.tgz", "integrity": "sha512-d+RwPlMp+2qmBfeLYPLXuSRykDIFEwdTA0MMxzS9kh4kvP1ftrc/9fzy6pX6qAjthdXruHQ6/6kjT/DNo5ALuw==" }, - "atomic-sleep": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", - "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==" - }, - "axios": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.3.tgz", - "integrity": "sha512-JtoZ3Ndke/+Iwt5n+BgSli/3idTvpt5OjKyoCmz4LX5+lPiY5l7C1colYezhlxThjNa/NhngCUWZSZFypIFuaA==", - "requires": { - "follow-redirects": "^1.14.0" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" - }, - "camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "requires": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - } - }, - "docker-hub-utils": { - "version": "1.10.43", - "resolved": "https://registry.npmjs.org/docker-hub-utils/-/docker-hub-utils-1.10.43.tgz", - "integrity": "sha512-cY/+KbOyZb3j4AiUUPHlGTeUi7vt/vc2MdIIX4Wl0pAI5c4m8mU6+7tzPT6K5LZ9d/59sdcX1AYET2k4F6/iTA==", - "requires": { - "axios": "0.21.3", - "camelcase-keys": "6.2.2", - "luxon": "1.28.0", - "pino": "5.17.0", - "ramda": "0.27.1" - } - }, - "fast-redact": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-2.1.0.tgz", - "integrity": "sha512-0LkHpTLyadJavq9sRzzyqIoMZemWli77K2/MGOkafrR64B9ItrvZ9aT+jluvNDsv0YEHjSNhlMBtbokuoqii4A==" - }, - "fast-safe-stringify": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.8.tgz", - "integrity": "sha512-lXatBjf3WPjmWD6DpIZxkeSsCOwqI0maYMpgDlx8g4U2qi4lbjA9oH/HD2a87G+KfsUmo5WbJFmqBZlPxtptag==" - }, "firstline": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/firstline/-/firstline-2.0.2.tgz", "integrity": "sha512-8KcmfI0jgSECnzdhucm0i7vrwef3BWwgjimW2YkRC5eSFwjb5DibVoA0YvgkYwwxuJi9c+7M7X3b3lX8o9B6wg==" }, - "flatstr": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/flatstr/-/flatstr-1.0.12.tgz", - "integrity": "sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==" + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" }, - "follow-redirects": { - "version": "1.14.8", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", - "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==" - }, - "luxon": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.28.0.tgz", - "integrity": "sha512-TfTiyvZhwBYM/7QdAVDh+7dBTBA29v4ik0Ce9zda3Mnf8on1S5KJI8P2jKFZ8+5C0jhmr0KwJEO/Wdpm0VeWJQ==" - }, - "map-obj": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", - "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==" - }, - "pino": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/pino/-/pino-5.17.0.tgz", - "integrity": "sha512-LqrqmRcJz8etUjyV0ddqB6OTUutCgQULPFg2b4dtijRHUsucaAdBgSUW58vY6RFSX+NT8963F+q0tM6lNwGShA==", - "requires": { - "fast-redact": "^2.0.0", - "fast-safe-stringify": "^2.0.7", - "flatstr": "^1.0.12", - "pino-std-serializers": "^2.4.2", - "quick-format-unescaped": "^3.0.3", - "sonic-boom": "^0.7.5" - } - }, - "pino-std-serializers": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-2.5.0.tgz", - "integrity": "sha512-wXqbqSrIhE58TdrxxlfLwU9eDhrzppQDvGhBEr1gYbzzM4KKo3Y63gSjiDXRKLVS2UOXdPNR2v+KnQgNrs+xUg==" - }, - "quick-format-unescaped": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.3.tgz", - "integrity": "sha512-dy1yjycmn9blucmJLXOfZDx1ikZJUi6E8bBZLnhPG5gBrVhHXx2xVyqqgKBubVNEXmx51dBACMHpoMQK/N/AXQ==" - }, - "quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==" - }, - "ramda": { - "version": "0.27.1", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.1.tgz", - "integrity": "sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==" - }, - "sonic-boom": { - "version": "0.7.7", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.7.tgz", - "integrity": "sha512-Ei5YOo5J64GKClHIL/5evJPgASXFVpfVYbJV9PILZQytTK6/LCwHvsZJW2Ig4p9FMC2OrBrMnXKgRN/OEoAWfg==", - "requires": { - "atomic-sleep": "^1.0.0", - "flatstr": "^1.0.12" - } + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" } } } diff --git a/package.json b/package.json index 58f9a20..e79df09 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "dependencies": { "@actions/core": "^1.2.7", "@actions/exec": "^1.1.1", - "docker-hub-utils": "^1.10.43", "firstline": "^2.0.2" } } From 3d1ba69630c4366128e70b7c71910367aa595ac4 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Thu, 27 Oct 2022 10:27:49 +0200 Subject: [PATCH 2/2] action: bump to node16 --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 92e6d1f..c9771ce 100644 --- a/action.yml +++ b/action.yml @@ -20,6 +20,6 @@ inputs: description: OS distribution name, value from `debian/changelog` is used if not defined required: false runs: - using: node12 + using: node16 main: main.js post: post.js